diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index f5a7286a1..3da082925 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -147,7 +147,7 @@ /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([7,0]); +/******/ deferredModules.push([8,0]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) @@ -164,35 +164,35 @@ "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Player; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return loadPlayer; }); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CodingContracts */ 38); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Company */ 13); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CompanyManagement */ 55); +/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CompanyManagement */ 54); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateProgram */ 22); /* harmony import */ var _Crimes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Crimes */ 33); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang */ 49); +/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang */ 53); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Locations */ 3); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SpecialServerIps */ 27); -/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SourceFile */ 58); +/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SourceFile */ 61); /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! decimal.js */ 30); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_20__); -/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/IPAddress */ 51); +/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/IPAddress */ 50); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__); @@ -216,8 +216,6 @@ - - @@ -568,7 +566,7 @@ PlayerObject.prototype.prestigeSourceFile = function() { //Gang this.gang = null; - Object(_Gang__WEBPACK_IMPORTED_MODULE_10__[/* resetGangs */ "f"])(); + Object(_Gang__WEBPACK_IMPORTED_MODULE_10__[/* resetGangs */ "d"])(); //Reset Stock market this.hasWseAccount = false; @@ -910,17 +908,17 @@ PlayerObject.prototype.work = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently working as a " + this.companyPosition.positionName + " at " + this.companyName + " (Current Company Reputation: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(companyRep, 0) + ")

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(companyRep, '0,0') + ")

" + "You have been working for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + "You have earned:

" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + " ($" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this company

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + " ($" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this company

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "You will automatically finish after working for 8 hours. You can cancel earlier if you wish, " + "but you will only gain half of the reputation you've earned so far." } @@ -939,14 +937,14 @@ PlayerObject.prototype.finishWork = function(cancelled, sing=false) { this.updateSkillLevels(); var txt = "You earned a total of:
" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + "
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " reputation for the company
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp
"; + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + "
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " reputation for the company
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (cancelled) { txt = "You worked a short shift of " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + @@ -963,14 +961,14 @@ PlayerObject.prototype.finishWork = function(cancelled, sing=false) { if (sing) { var res = "You worked a short shift of " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + " and " + - "earned $" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + ", " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " reputation, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp, and " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp."; + "earned $" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + ", " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " reputation, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp."; this.resetWorkStatus(); return res; } @@ -1032,17 +1030,17 @@ PlayerObject.prototype.workPartTime = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently working as a " + this.companyPosition.positionName + " at " + Player.companyName + " (Current Company Reputation: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(companyRep, 0) + ")

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(companyRep, '0,0') + ")

" + "You have been working for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + "You have earned:

" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + " ($" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this company

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + " ($" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this company

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "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."; @@ -1057,14 +1055,14 @@ PlayerObject.prototype.finishWorkPartTime = function(sing=false) { this.updateSkillLevels(); var txt = "You earned a total of:
" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + "
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " reputation for the company
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp
"; + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + "
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " reputation for the company
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; txt = "You worked for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + txt; if (!sing) {Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__["dialogBoxCreate"])(txt);} @@ -1075,14 +1073,14 @@ PlayerObject.prototype.finishWorkPartTime = function(sing=false) { if (sing) { var res = "You worked for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + " and " + "earned a total of " + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + ", " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " reputation, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp, and " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp"; + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + ", " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " reputation, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp"; this.resetWorkStatus(); return res; } @@ -1201,17 +1199,17 @@ PlayerObject.prototype.workForFaction = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently " + this.currentWorkFactionDescription + " for your faction " + faction.name + - " (Current Faction Reputation: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(faction.playerReputation, 0) + ").
" + + " (Current Faction Reputation: " + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(faction.playerReputation, '0,0') + ").
" + "You have been doing this for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + "You have earned:

" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this faction

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this faction

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
" + "There is no penalty for cancelling earlier."; @@ -1227,14 +1225,14 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, sing=false) { var txt = "You worked for your faction " + faction.name + " for a total of " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + "You earned a total of:
" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + "
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " reputation for the faction
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp
"; + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + "
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " reputation for the faction
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (!sing) {Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__["dialogBoxCreate"])(txt);} var mainMenu = document.getElementById("mainmenu-container"); @@ -1247,13 +1245,13 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, sing=false) { if (sing) { var res="You worked for your faction " + faction.name + " for a total of " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + ". " + "You earned " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workRepGained, 4) + " rep, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " str exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " def exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dex exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agi exp, and " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " cha exp."; + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workRepGained, '0,0.0000') + " rep, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " str exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " def exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agi exp, and " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " cha exp."; this.resetWorkStatus(); return res; } @@ -1539,14 +1537,14 @@ PlayerObject.prototype.takeClass = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You have been " + className + " for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + "

" + "This has cost you:
" + - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + " ($" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyLossRate * CYCLES_PER_SEC, 2) + " / sec)

" + + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + " ($" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyLossRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + "You have gained:
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp
" + "You may cancel at any time"; } @@ -1562,14 +1560,14 @@ PlayerObject.prototype.finishClass = function(sing=false) { this.updateSkillLevels(); var txt = "After " + this.className + " for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + ",
" + - "you spent a total of $" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained * -1, 2) + ".

" + + "you spent a total of $" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained * -1, '0,0.00') + ".

" + "You earned a total of:
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility exp
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma exp
"; + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (!sing) {Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__["dialogBoxCreate"])(txt);} var mainMenu = document.getElementById("mainmenu-container"); @@ -1580,14 +1578,14 @@ PlayerObject.prototype.finishClass = function(sing=false) { _engine__WEBPACK_IMPORTED_MODULE_8__["Engine"].loadLocationContent(); if (sing) { var res="After " + this.className + " for " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["convertTimeMsToTimeElapsedString"])(this.timeWorked) + ", " + - "you spent a total of $" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained * -1, 2) + ". " + + "you spent a total of $" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained * -1, '0,0.00') + ". " + "You earned a total of: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 3) + " hacking exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 3) + " strength exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 3) + " defense exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 3) + " dexterity exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 3) + " agility exp, and " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 3) + " charisma exp"; + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma exp"; this.resetWorkStatus(); return res; } @@ -1678,23 +1676,23 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained " + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, "$0.000a") + ", " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 3) + " hack exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 3) + " str exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 3) + " def exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 3) + " dex exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 3) + " agi exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 3) + " cha exp."); + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hack exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " str exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " def exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agi exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " cha exp."); } } else { Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__["dialogBoxCreate"])("Crime successful!

" + "You gained:
"+ - "$" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workMoneyGained, 2) + "
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma experience"); + "$" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workMoneyGained, '0,0.00') + "
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma experience"); } } else { @@ -1708,22 +1706,22 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if (this.committingCrimeThruSingFn) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 3) + " hack exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 3) + " str exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 3) + " def exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 3) + " dex exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 3) + " agi exp, " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 3) + " cha exp."); + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hack exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " str exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " def exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agi exp, " + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " cha exp."); } } else { Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__["dialogBoxCreate"])("Crime failed!

" + "You gained:
"+ - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workHackExpGained, 4) + " hacking experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workStrExpGained, 4) + " strength experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDefExpGained, 4) + " defense experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workDexExpGained, 4) + " dexterity experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workAgiExpGained, 4) + " agility experience
" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_23__["formatNumber"])(this.workChaExpGained, 4) + " charisma experience"); + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workHackExpGained, '0,0.0000') + " hacking experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workStrExpGained, '0,0.0000') + " strength experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDefExpGained, '0,0.0000') + " defense experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workDexExpGained, '0,0.0000') + " dexterity experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workAgiExpGained, '0,0.0000') + " agility experience
" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__[/* numeralWrapper */ "a"].format(this.workChaExpGained, '0,0.0000') + " charisma experience"); } } @@ -2101,10 +2099,10 @@ PlayerObject.prototype.reapplyAllAugmentations = function(resetMultipliers=true) this.augmentations[i].name = "Hacknet Node NIC Architecture Neural-Upload"; } - var augName = this.augmentations[i].name; + const augName = this.augmentations[i].name; var aug = _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ "c"][augName]; if (aug == null) { - console.log("WARNING: Invalid augmentation name"); + console.log(`WARNING: Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`); continue; } aug.owned = true; @@ -2627,7 +2625,7 @@ let CONSTANTS = { /* Netscript Constants */ //RAM Costs for different commands ScriptBaseRamCost: 1.6, - ScriptDomRamCost: 100, + ScriptDomRamCost: 25, ScriptWhileRamCost: 0, ScriptForRamCost: 0, ScriptIfRamCost: 0, @@ -2670,6 +2668,8 @@ let CONSTANTS = { ScriptSingularityFn2RamCost: 2, ScriptSingularityFn3RamCost: 3, + ScriptSingularityFnRamMult: 2, // Multiplier for RAM cost outside of BN-4 + ScriptBladeburnerApiBaseRamCost: 4, NumNetscriptPorts: 20, @@ -3079,9 +3079,27 @@ let CONSTANTS = { LatestUpdate: ` v0.41.0 + * WARNING: In NetscriptJS, defining a function called print() is no longer possible + * Gang Mechanic Changes (BitNode-2): + *** Added new 'ascension' mechanic for Gang Members + *** The first three gang members are now 'free' (can be recruited instantly) + *** Maximum number of increased Gang Members increased from 20 to 50 + *** Changed the formula for calculating respect needed to recruit the next gang member + *** Added a new category of upgrades for Gang Members: Augmentations + *** Non-Augmentation Gang member upgrades are now significantly weaker + *** Reputation for your Gang faction can no longer be gained through Infiltration + * RAM Cost of accessing the global document object lowered from 100 GB to 25 GB + * RAM Cost to use Singularity Functions outside of BitNode-4 lowered by 75%. They now only cost twice as much as they do in BitNode-4 * b1t_flum3.exe now takes significantly less time to create + * Improved number formatting for Player 'work' actions (including crimes, etc.). These numbers should also adhere to locale settings now (by Kline-) + * Bug Fix: Calling print() in NetscriptJS no longer brings up the print dialog * Bug Fix: Fixed a bug that sometimes caused a blank black screen when destroying/resetting/switching BitNodes * Bug Fix: Netscript calls that throw errors will now no longer cause the 'concurrent calls' error if they are caught in the script. i.e. try/catch should now work properly in scripts + * Bug Fix: Fixed a bug where sometimes the NeuroFlux Governor Augmentation level would be incorrectly calculated when the game was loaded + * Bug Fix: Fixed a bug where calling the scp() Netscript function with invalid hostname/ips would throw an unclear error message + * Bug Fix: Bladeburner API function getActionCountRemaining() should now work properly for BlackOps + * Bug Fix: Black Ops can no longer be attempted out-of-order or without the required rank via Bladeburner API + * RAM cost for basic Netscript functions added to documentation (by CBJamo) ` } @@ -3091,214 +3109,6 @@ let CONSTANTS = { /***/ }), /* 2 */ -/*!****************************************!*\ - !*** ./utils/StringHelperFunctions.ts ***! - \****************************************/ -/*! no static exports found */ -/*! exports used: containsAllStrings, convertTimeMsToTimeElapsedString, formatNumber, generateRandomString, isString, longestCommonStart, replaceAt */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const isString_1 = __webpack_require__(/*! ./helpers/isString */ 34); -// Netburner String helper functions -// Replaces the character at an index with a new character -function replaceAt(base, index, character) { - return base.substr(0, index) + character + base.substr(index + character.length); -} -exports.replaceAt = replaceAt; -/* -Converts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds -e.g. 10000 -> "0 hours 0 minutes and 10 seconds" - 120000 -> "0 0 hours 2 minutes and 0 seconds" -*/ -function convertTimeMsToTimeElapsedString(time) { - const millisecondsPerSecond = 1000; - const secondPerMinute = 60; - const minutesPerHours = 60; - const secondPerHours = secondPerMinute * minutesPerHours; - const hoursPerDays = 24; - const secondPerDay = secondPerHours * hoursPerDays; - // Convert ms to seconds, since we only have second-level precision - const totalSeconds = Math.floor(time / millisecondsPerSecond); - const days = Math.floor(totalSeconds / secondPerDay); - const secTruncDays = totalSeconds % secondPerDay; - const hours = Math.floor(secTruncDays / secondPerHours); - const secTruncHours = secTruncDays % secondPerHours; - const minutes = Math.floor(secTruncHours / secondPerMinute); - const secTruncMinutes = secTruncHours % secondPerMinute; - const seconds = secTruncMinutes; - let res = ""; - if (days > 0) { - res += `${days} days `; - } - if (hours > 0) { - res += `${hours} hours `; - } - if (minutes > 0) { - res += `${minutes} minutes `; - } - res += `${seconds} seconds `; - return res; -} -exports.convertTimeMsToTimeElapsedString = convertTimeMsToTimeElapsedString; -// Finds the longest common starting substring in a set of strings -function longestCommonStart(strings) { - if (!containsAllStrings(strings)) { - return ""; - } - if (strings.length === 0) { - return ""; - } - const A = strings.concat() - .sort(); - const a1 = A[0]; - const a2 = A[A.length - 1]; - const L = a1.length; - let i = 0; - const areEqualCaseInsensitive = (a, b) => a.toUpperCase() === b.toUpperCase(); - while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) { - i++; - } - return a1.substring(0, i); -} -exports.longestCommonStart = longestCommonStart; -// Returns whether an array contains entirely of string objects -function containsAllStrings(arr) { - return arr.every(isString_1.isString); -} -exports.containsAllStrings = containsAllStrings; -// Formats a number with commas and a specific number of decimal digits -function formatNumber(num, numFractionDigits) { - return num.toLocaleString(undefined, { - maximumFractionDigits: numFractionDigits, - minimumFractionDigits: numFractionDigits, - }); -} -exports.formatNumber = formatNumber; -// Checks if a string contains HTML elements -function isHTML(str) { - const element = document.createElement("div"); - element.innerHTML = str; - const c = element.childNodes; - for (let i = c.length - 1; i >= 0; i--) { - if (c[i].nodeType === 1) { - return true; - } - } - return false; -} -exports.isHTML = isHTML; -// Generates a random alphanumeric string with N characters -function generateRandomString(n) { - let str = ""; - const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (let i = 0; i < n; i++) { - str += chars.charAt(Math.floor(Math.random() * chars.length)); - } - return str; -} -exports.generateRandomString = generateRandomString; - - -/***/ }), -/* 3 */ -/*!**************************!*\ - !*** ./src/Locations.ts ***! - \**************************/ -/*! no static exports found */ -/*! exports used: Locations */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Display Location Content when visiting somewhere in the World - */ -// tslint:disable-next-line:variable-name -exports.Locations = { - // Cities - Aevum: "Aevum", - Chongqing: "Chongqing", - Ishima: "Ishima", - NewTokyo: "New Tokyo", - Sector12: "Sector-12", - Volhaven: "Volhaven", - // Aevum Locations - AevumAeroCorp: "AeroCorp", - AevumBachmanAndAssociates: "Bachman & Associates", - AevumClarkeIncorporated: "Clarke Incorporated", - AevumCrushFitnessGym: "Crush Fitness Gym", - AevumECorp: "ECorp", - AevumFulcrumTechnologies: "Fulcrum Technologies", - AevumGalacticCybersystems: "Galactic Cybersystems", - AevumNetLinkTechnologies: "NetLink Technologies", - AevumPolice: "Aevum Police Headquarters", - AevumRhoConstruction: "Rho Construction", - AevumSlums: "Aevum Slums", - AevumSnapFitnessGym: "Snap Fitness Gym", - AevumSummitUniversity: "Summit University", - AevumTravelAgency: "Aevum Travel Agency", - AevumWatchdogSecurity: "Watchdog Security", - // Chongqing locations - ChongqingKuaiGongInternational: "KuaiGong International", - ChongqingSlums: "Chongqing Slums", - ChongqingSolarisSpaceSystems: "Solaris Space Systems", - ChongqingTravelAgency: "Chongqing Travel Agency", - // Sector 12 - Sector12AlphaEnterprises: "Alpha Enterprises", - Sector12BladeIndustries: "Blade Industries", - Sector12CIA: "Central Intelligence Agency", - Sector12CarmichaelSecurity: "Carmichael Security", - Sector12CityHall: "Sector-12 City Hall", - Sector12DeltaOne: "DeltaOne", - Sector12FoodNStuff: "FoodNStuff", - Sector12FourSigma: "Four Sigma", - Sector12IcarusMicrosystems: "Icarus Microsystems", - Sector12IronGym: "Iron Gym", - Sector12JoesGuns: "Joe's Guns", - Sector12MegaCorp: "MegaCorp", - Sector12NSA: "National Security Agency", - Sector12PowerhouseGym: "Powerhouse Gym", - Sector12RothmanUniversity: "Rothman University", - Sector12Slums: "Sector-12 Slums", - Sector12TravelAgency: "Sector-12 Travel Agency", - Sector12UniversalEnergy: "Universal Energy", - // New Tokyo - NewTokyoDefComm: "DefComm", - NewTokyoGlobalPharmaceuticals: "Global Pharmaceuticals", - NewTokyoNoodleBar: "Noodle Bar", - NewTokyoSlums: "New Tokyo Slums", - NewTokyoTravelAgency: "New Tokyo Travel Agency", - NewTokyoVitaLife: "VitaLife", - // Ishima - IshimaNovaMedical: "Nova Medical", - IshimaOmegaSoftware: "Omega Software", - IshimaSlums: "Ishima Slums", - IshimaStormTechnologies: "Storm Technologies", - IshimaTravelAgency: "Ishima Travel Agency", - // Volhaven - VolhavenCompuTek: "CompuTek", - VolhavenHeliosLabs: "Helios Labs", - VolhavenLexoCorp: "LexoCorp", - VolhavenMilleniumFitnessGym: "Millenium Fitness Gym", - VolhavenNWO: "NWO", - VolhavenOmniTekIncorporated: "OmniTek Incorporated", - VolhavenOmniaCybersystems: "Omnia Cybersystems", - VolhavenSlums: "Volhaven Slums", - VolhavenSysCoreSecurities: "SysCore Securities", - VolhavenTravelAgency: "Volhaven Travel Agency", - VolhavenZBInstituteOfTechnology: "ZB Institute of Technology", - // Generic locations - Hospital: "Hospital", - WorldStockExchange: "World Stock Exchange", -}; - - -/***/ }), -/* 4 */ /*!******************************************!*\ !*** ./utils/uiHelpers/createElement.ts ***! \******************************************/ @@ -3429,6 +3239,13 @@ function setElementTooltip(el, params) { innerHTML: params.tooltipleft, })); } + else if (params.tooltipsmall !== undefined) { + el.className += " tooltip"; + el.appendChild(createElement("span", { + class: "tooltiptext smallfont", + innerHTML: params.tooltipsmall, + })); + } } /** * An all-in-one-call way of creating an element to be added to the DOM at some point. @@ -3463,8 +3280,298 @@ function createElement(tagName, params = {}) { exports.createElement = createElement; +/***/ }), +/* 3 */ +/*!**************************!*\ + !*** ./src/Locations.ts ***! + \**************************/ +/*! no static exports found */ +/*! exports used: Locations */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Display Location Content when visiting somewhere in the World + */ +// tslint:disable-next-line:variable-name +exports.Locations = { + // Cities + Aevum: "Aevum", + Chongqing: "Chongqing", + Ishima: "Ishima", + NewTokyo: "New Tokyo", + Sector12: "Sector-12", + Volhaven: "Volhaven", + // Aevum Locations + AevumAeroCorp: "AeroCorp", + AevumBachmanAndAssociates: "Bachman & Associates", + AevumClarkeIncorporated: "Clarke Incorporated", + AevumCrushFitnessGym: "Crush Fitness Gym", + AevumECorp: "ECorp", + AevumFulcrumTechnologies: "Fulcrum Technologies", + AevumGalacticCybersystems: "Galactic Cybersystems", + AevumNetLinkTechnologies: "NetLink Technologies", + AevumPolice: "Aevum Police Headquarters", + AevumRhoConstruction: "Rho Construction", + AevumSlums: "Aevum Slums", + AevumSnapFitnessGym: "Snap Fitness Gym", + AevumSummitUniversity: "Summit University", + AevumTravelAgency: "Aevum Travel Agency", + AevumWatchdogSecurity: "Watchdog Security", + // Chongqing locations + ChongqingKuaiGongInternational: "KuaiGong International", + ChongqingSlums: "Chongqing Slums", + ChongqingSolarisSpaceSystems: "Solaris Space Systems", + ChongqingTravelAgency: "Chongqing Travel Agency", + // Sector 12 + Sector12AlphaEnterprises: "Alpha Enterprises", + Sector12BladeIndustries: "Blade Industries", + Sector12CIA: "Central Intelligence Agency", + Sector12CarmichaelSecurity: "Carmichael Security", + Sector12CityHall: "Sector-12 City Hall", + Sector12DeltaOne: "DeltaOne", + Sector12FoodNStuff: "FoodNStuff", + Sector12FourSigma: "Four Sigma", + Sector12IcarusMicrosystems: "Icarus Microsystems", + Sector12IronGym: "Iron Gym", + Sector12JoesGuns: "Joe's Guns", + Sector12MegaCorp: "MegaCorp", + Sector12NSA: "National Security Agency", + Sector12PowerhouseGym: "Powerhouse Gym", + Sector12RothmanUniversity: "Rothman University", + Sector12Slums: "Sector-12 Slums", + Sector12TravelAgency: "Sector-12 Travel Agency", + Sector12UniversalEnergy: "Universal Energy", + // New Tokyo + NewTokyoDefComm: "DefComm", + NewTokyoGlobalPharmaceuticals: "Global Pharmaceuticals", + NewTokyoNoodleBar: "Noodle Bar", + NewTokyoSlums: "New Tokyo Slums", + NewTokyoTravelAgency: "New Tokyo Travel Agency", + NewTokyoVitaLife: "VitaLife", + // Ishima + IshimaNovaMedical: "Nova Medical", + IshimaOmegaSoftware: "Omega Software", + IshimaSlums: "Ishima Slums", + IshimaStormTechnologies: "Storm Technologies", + IshimaTravelAgency: "Ishima Travel Agency", + // Volhaven + VolhavenCompuTek: "CompuTek", + VolhavenHeliosLabs: "Helios Labs", + VolhavenLexoCorp: "LexoCorp", + VolhavenMilleniumFitnessGym: "Millenium Fitness Gym", + VolhavenNWO: "NWO", + VolhavenOmniTekIncorporated: "OmniTek Incorporated", + VolhavenOmniaCybersystems: "Omnia Cybersystems", + VolhavenSlums: "Volhaven Slums", + VolhavenSysCoreSecurities: "SysCore Securities", + VolhavenTravelAgency: "Volhaven Travel Agency", + VolhavenZBInstituteOfTechnology: "ZB Institute of Technology", + // Generic locations + Hospital: "Hospital", + WorldStockExchange: "World Stock Exchange", +}; + + +/***/ }), +/* 4 */ +/*!****************************************!*\ + !*** ./utils/StringHelperFunctions.ts ***! + \****************************************/ +/*! no static exports found */ +/*! exports used: containsAllStrings, convertTimeMsToTimeElapsedString, formatNumber, generateRandomString, isString, longestCommonStart, replaceAt */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const isString_1 = __webpack_require__(/*! ./helpers/isString */ 34); +// Netburner String helper functions +// Replaces the character at an index with a new character +function replaceAt(base, index, character) { + return base.substr(0, index) + character + base.substr(index + character.length); +} +exports.replaceAt = replaceAt; +/* +Converts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds +e.g. 10000 -> "0 hours 0 minutes and 10 seconds" + 120000 -> "0 0 hours 2 minutes and 0 seconds" +*/ +function convertTimeMsToTimeElapsedString(time) { + const millisecondsPerSecond = 1000; + const secondPerMinute = 60; + const minutesPerHours = 60; + const secondPerHours = secondPerMinute * minutesPerHours; + const hoursPerDays = 24; + const secondPerDay = secondPerHours * hoursPerDays; + // Convert ms to seconds, since we only have second-level precision + const totalSeconds = Math.floor(time / millisecondsPerSecond); + const days = Math.floor(totalSeconds / secondPerDay); + const secTruncDays = totalSeconds % secondPerDay; + const hours = Math.floor(secTruncDays / secondPerHours); + const secTruncHours = secTruncDays % secondPerHours; + const minutes = Math.floor(secTruncHours / secondPerMinute); + const secTruncMinutes = secTruncHours % secondPerMinute; + const seconds = secTruncMinutes; + let res = ""; + if (days > 0) { + res += `${days} days `; + } + if (hours > 0) { + res += `${hours} hours `; + } + if (minutes > 0) { + res += `${minutes} minutes `; + } + res += `${seconds} seconds `; + return res; +} +exports.convertTimeMsToTimeElapsedString = convertTimeMsToTimeElapsedString; +// Finds the longest common starting substring in a set of strings +function longestCommonStart(strings) { + if (!containsAllStrings(strings)) { + return ""; + } + if (strings.length === 0) { + return ""; + } + const A = strings.concat() + .sort(); + const a1 = A[0]; + const a2 = A[A.length - 1]; + const L = a1.length; + let i = 0; + const areEqualCaseInsensitive = (a, b) => a.toUpperCase() === b.toUpperCase(); + while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) { + i++; + } + return a1.substring(0, i); +} +exports.longestCommonStart = longestCommonStart; +// Returns whether an array contains entirely of string objects +function containsAllStrings(arr) { + return arr.every(isString_1.isString); +} +exports.containsAllStrings = containsAllStrings; +// Formats a number with commas and a specific number of decimal digits +function formatNumber(num, numFractionDigits) { + return num.toLocaleString(undefined, { + maximumFractionDigits: numFractionDigits, + minimumFractionDigits: numFractionDigits, + }); +} +exports.formatNumber = formatNumber; +// Checks if a string contains HTML elements +function isHTML(str) { + const element = document.createElement("div"); + element.innerHTML = str; + const c = element.childNodes; + for (let i = c.length - 1; i >= 0; i--) { + if (c[i].nodeType === 1) { + return true; + } + } + return false; +} +exports.isHTML = isHTML; +// Generates a random alphanumeric string with N characters +function generateRandomString(n) { + let str = ""; + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + for (let i = 0; i < n; i++) { + str += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return str; +} +exports.generateRandomString = generateRandomString; + + /***/ }), /* 5 */ +/*!*********************************!*\ + !*** ./src/ui/numeralFormat.js ***! + \*********************************/ +/*! exports provided: numeralWrapper */ +/*! exports used: numeralWrapper */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return numeralWrapper; }); +/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 64); +/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 243); +/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 242); +/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 241); +/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 240); +/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 239); +/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 238); +/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 237); +/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 236); +/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 235); +/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 234); +/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 233); +/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 232); +/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 231); +/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 230); +/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__); + + + + + + + + + + + + + + + + +/* eslint-disable class-methods-use-this */ + +class NumeralFormatter { + constructor() { + this.defaultLocale = 'en'; + } + + updateLocale(l) { + if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) { + console.warn(`Invalid locale for numeral: ${l}`); + + numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale); + return false; + } + return true; + } + + format(n, format) { + return numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format); + } +} + +const numeralWrapper = new NumeralFormatter(); + + +/***/ }), +/* 6 */ /*!***********************************!*\ !*** ./src/NetscriptEvaluator.js ***! \***********************************/ @@ -3480,17 +3587,17 @@ exports.createElement = createElement; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isScriptErrorMessage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return killNetscriptDelay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return evaluateImport; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _NetscriptEnvironment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NetscriptEnvironment */ 93); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptWorker */ 24); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/acorn */ 41); +/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/acorn */ 42); /* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 48); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_9__); @@ -3512,7 +3619,7 @@ exports.createElement = createElement; -var Promise = __webpack_require__(/*! bluebird */ 213); +var Promise = __webpack_require__(/*! bluebird */ 214); Promise.config({ warnings: false, @@ -4414,7 +4521,7 @@ function isScriptErrorMessage(msg) { /***/ }), -/* 6 */ +/* 7 */ /*!**********************************!*\ !*** ./src/ui/postToTerminal.ts ***! \**********************************/ @@ -4425,7 +4532,7 @@ function isScriptErrorMessage(msg) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getElementById_1 = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 45); +const getElementById_1 = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 46); /** * Adds some output to the terminal. * @param input Text or HTML to output to the terminal @@ -4466,7 +4573,7 @@ function scrollTerminalToBottom() { /***/ }), -/* 7 */ +/* 8 */ /*!***********************!*\ !*** ./src/engine.js ***! \***********************/ @@ -4477,92 +4584,92 @@ function scrollTerminalToBottom() { "use strict"; __webpack_require__.r(__webpack_exports__); /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Engine", function() { return Engine; }); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_GameOptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/GameOptions */ 73); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); -/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 97); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 98); /* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/LogBox */ 68); -/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ActiveScriptsUI */ 60); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./BitNode */ 50); +/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ActiveScriptsUI */ 59); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./BitNode */ 49); /* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Bladeburner */ 29); -/* harmony import */ var _CharacterOverview__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CharacterOverview */ 106); +/* harmony import */ var _CharacterOverview__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CharacterOverview */ 107); /* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CinematicText */ 83); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CodingContracts */ 38); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Company */ 13); -/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CompanyManagement */ 55); +/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CompanyManagement */ 54); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CreateProgram */ 22); -/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _Fconf__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Fconf */ 40); -/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Location */ 78); -/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Locations */ 3); -/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_25__); -/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Gang */ 49); -/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./HacknetNode */ 59); -/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./InteractiveTutorial */ 31); +/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./DevMenu */ 95); +/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Faction */ 15); +/* harmony import */ var _Fconf__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Fconf */ 40); +/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Location */ 78); +/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Locations */ 3); +/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_26__); +/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./HacknetNode */ 57); +/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./InteractiveTutorial */ 32); /* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Literature */ 70); /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Message */ 35); -/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Missions */ 46); +/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Missions */ 47); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./NetscriptWorker */ 24); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Prestige */ 76); -/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./RedPill */ 54); +/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./RedPill */ 58); /* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./SaveObject */ 65); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_40__); -/* harmony import */ var _ui_setSettingsLabels__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./ui/setSettingsLabels */ 105); -/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./SourceFile */ 58); +/* harmony import */ var _ui_setSettingsLabels__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./ui/setSettingsLabels */ 106); +/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./SourceFile */ 61); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./SpecialServerIps */ 27); /* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./StockMarket */ 23); -/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Terminal */ 47); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 32); +/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Terminal */ 44); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 31); /* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_46___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_46__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__); -/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! normalize.css */ 177); +/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! normalize.css */ 178); /* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(normalize_css__WEBPACK_IMPORTED_MODULE_48__); -/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../css/styles.scss */ 155); +/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../css/styles.scss */ 156); /* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(_css_styles_scss__WEBPACK_IMPORTED_MODULE_49__); -/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../css/buttons.scss */ 153); +/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../css/buttons.scss */ 154); /* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(_css_buttons_scss__WEBPACK_IMPORTED_MODULE_50__); -/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../css/mainmenu.scss */ 151); +/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../css/mainmenu.scss */ 152); /* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(_css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_51__); -/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../css/terminal.scss */ 149); +/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../css/terminal.scss */ 150); /* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_52___default = /*#__PURE__*/__webpack_require__.n(_css_terminal_scss__WEBPACK_IMPORTED_MODULE_52__); -/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../css/menupages.scss */ 147); +/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../css/menupages.scss */ 148); /* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_53___default = /*#__PURE__*/__webpack_require__.n(_css_menupages_scss__WEBPACK_IMPORTED_MODULE_53__); -/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../css/workinprogress.scss */ 145); +/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../css/workinprogress.scss */ 146); /* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_54___default = /*#__PURE__*/__webpack_require__.n(_css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_54__); -/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../css/popupboxes.scss */ 143); +/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../css/popupboxes.scss */ 144); /* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_55___default = /*#__PURE__*/__webpack_require__.n(_css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_55__); -/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 141); +/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 142); /* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_56___default = /*#__PURE__*/__webpack_require__.n(_css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_56__); -/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../css/loader.scss */ 139); +/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../css/loader.scss */ 140); /* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_57___default = /*#__PURE__*/__webpack_require__.n(_css_loader_scss__WEBPACK_IMPORTED_MODULE_57__); -/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../css/missions.scss */ 137); +/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../css/missions.scss */ 138); /* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_58___default = /*#__PURE__*/__webpack_require__.n(_css_missions_scss__WEBPACK_IMPORTED_MODULE_58__); -/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../css/companymanagement.scss */ 135); +/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../css/companymanagement.scss */ 136); /* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_59___default = /*#__PURE__*/__webpack_require__.n(_css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_59__); -/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../css/bladeburner.scss */ 133); +/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../css/bladeburner.scss */ 134); /* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_60___default = /*#__PURE__*/__webpack_require__.n(_css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_60__); -/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../css/gang.scss */ 131); +/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../css/gang.scss */ 132); /* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_61___default = /*#__PURE__*/__webpack_require__.n(_css_gang_scss__WEBPACK_IMPORTED_MODULE_61__); @@ -4679,7 +4786,7 @@ $(document).keydown(function(e) { Engine.loadCreateProgramContent(); } else if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_46__["KEY"].F && e.altKey) { //Overriden by Fconf - if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Terminal) && _Fconf__WEBPACK_IMPORTED_MODULE_23__[/* FconfSettings */ "a"].ENABLE_BASH_HOTKEYS) { + if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Terminal) && _Fconf__WEBPACK_IMPORTED_MODULE_24__[/* FconfSettings */ "a"].ENABLE_BASH_HOTKEYS) { return; } e.preventDefault(); @@ -4736,41 +4843,6 @@ const Engine = { tutorialFactionsButton: null, tutorialAugmentationsButton: null, tutorialBackButton: null, - - //Dev menu - devMenuGiveMoney: null, - devMenuGiveRam: null, - devMenuAugDropdown: null, - devMenuAddAug: null, - devMenuTriggerBitFlume: null, - devMenuFactionDropdown: null, - devMenuAddFaction: null, - devMenuOpen: null, - devMenuMinSecurity: null, - devMenuMaxMoney: null, - devMenuConnectDropdown: null, - devMenuConnect: null, - devMenuProgramsDropdown: null, - devMenuAddProgram: null, - devMenuHackingExp: null, - devMenuAddHacking: null, - devMenuStrengthExp: null, - devMenuAddStrength: null, - devMenuDefenseExp: null, - devMenuAddDefense: null, - devMenuDexterityExp: null, - devMenuAddDexterity: null, - devMenuAgilityExp: null, - devMenuAddAgility: null, - devMenuCharismaExp: null, - devMenuAddCharisma: null, - devMenuIntelligenceExp: null, - devMenuAddIntelligence: null, - devMenuEnableIntelligence: null, - devMenuDisableIntelligence: null, - devMenuSFN: null, - devMenuSFLvl: null, - devMenuAddSF: null, }, //Display objects @@ -4796,7 +4868,6 @@ const Engine = { factionAugmentationsContent: null, augmentationsContent: null, tutorialContent: null, - devMenuContent: null, infiltrationContent: null, stockMarketContent: null, locationContent: null, @@ -4907,8 +4978,7 @@ const Engine = { loadDevMenuContent: function() { Engine.hideAllContent(); - Engine.Display.devMenuContent.style.display = "block"; - Engine.displayDevMenuContent(); + Object(_DevMenu__WEBPACK_IMPORTED_MODULE_22__[/* createDevMenu */ "b"])(); _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].navigateTo(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].DevMenu); document.getElementById("dev-menu-link").classList.add("active"); }, @@ -4916,29 +4986,29 @@ const Engine = { loadLocationContent: function() { Engine.hideAllContent(); Engine.Display.locationContent.style.display = "block"; - Object(_Location__WEBPACK_IMPORTED_MODULE_24__[/* displayLocationContent */ "a"])(); + Object(_Location__WEBPACK_IMPORTED_MODULE_25__[/* displayLocationContent */ "a"])(); _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].navigateTo(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Location); }, loadTravelContent: function() { switch(_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].city) { - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Aevum: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].AevumTravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Aevum: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].AevumTravelAgency; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Chongqing: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].ChongqingTravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Chongqing: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].ChongqingTravelAgency; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Sector12: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Sector12TravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Sector12: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Sector12TravelAgency; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].NewTokyo: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].NewTokyoTravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].NewTokyo: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].NewTokyoTravelAgency; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Ishima: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].IshimaTravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Ishima: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].IshimaTravelAgency; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Volhaven: - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].VolhavenTravelAgency; + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Volhaven: + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].VolhavenTravelAgency; break; default: Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_0__["dialogBoxCreate"])("ERROR: Invalid city. This is a bug please contact game dev"); @@ -4998,7 +5068,7 @@ const Engine = { loadGangContent: function() { Engine.hideAllContent(); if (document.getElementById("gang-container") || _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].inGang()) { - Object(_Gang__WEBPACK_IMPORTED_MODULE_26__[/* displayGangContent */ "d"])(); + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gang.displayGangContent(); _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].navigateTo(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Gang); } else { Engine.loadTerminalContent(); @@ -5049,7 +5119,6 @@ const Engine = { Engine.Display.factionAugmentationsContent.style.display = "none"; Engine.Display.augmentationsContent.style.display = "none"; Engine.Display.tutorialContent.style.display = "none"; - Engine.Display.devMenuContent.style.display = "none"; Engine.Display.locationContent.style.display = "none"; Engine.Display.workInProgressContent.style.display = "none"; Engine.Display.redPillContent.style.display = "none"; @@ -5061,6 +5130,9 @@ const Engine = { document.getElementById("gang-container").style.display = "none"; } + if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].inGang()) { + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gang.clearUI(); + } if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].corporation instanceof _CompanyManagement__WEBPACK_IMPORTED_MODULE_19__[/* Corporation */ "a"]) { _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].corporation.clearUI(); } @@ -5093,12 +5165,14 @@ const Engine = { document.getElementById("bladeburner-menu-link").classList.remove("active"); document.getElementById("corporation-menu-link").classList.remove("active"); document.getElementById("gang-menu-link").classList.remove("active"); + + // Close dev menu + Object(_DevMenu__WEBPACK_IMPORTED_MODULE_22__[/* closeDevMenu */ "a"])(); }, displayCharacterOverviewInfo: function() { Engine.overview.update(); - const save = document.getElementById("character-overview-save-button"); const flashClass = "flashing-button"; if(!_Settings__WEBPACK_IMPORTED_MODULE_40__["Settings"].AutosaveInterval) { @@ -5219,13 +5293,13 @@ const Engine = { document.getElementById("world-city-name").innerHTML = _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].city; var cityDesc = document.getElementById("world-city-desc"); //TODO switch(_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].city) { - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Aevum: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Aevum: Engine.aevumLocationsList.style.display = "inline"; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Chongqing: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Chongqing: Engine.chongqingLocationsList.style.display = "inline"; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Sector12: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Sector12: Engine.sector12LocationsList.style.display = "inline"; //City hall only in BitNode-3/with Source-File 3 @@ -5235,13 +5309,13 @@ const Engine = { document.getElementById("sector12-cityhall-li").style.display = "none"; } break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].NewTokyo: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].NewTokyo: Engine.newTokyoLocationsList.style.display = "inline"; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Ishima: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Ishima: Engine.ishimaLocationsList.style.display = "inline"; break; - case _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].Volhaven: + case _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].Volhaven: Engine.volhavenLocationsList.style.display = "inline"; break; default: @@ -5260,7 +5334,7 @@ const Engine = { li.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__["createElement"])("a", { innerText:"World Stock Exchange", class:"a-link-button", clickListener:()=>{ - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_25__["Locations"].WorldStockExchange; + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].location = _Locations__WEBPACK_IMPORTED_MODULE_26__["Locations"].WorldStockExchange; Engine.loadStockMarketContent(); return false; } @@ -5316,7 +5390,7 @@ const Engine = { display:"inline-block", clickListener:()=>{ Engine.loadFactionContent(); - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* displayFactionContent */ "c"])(factionName); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* displayFactionContent */ "c"])(factionName); return false; } })); @@ -5351,9 +5425,9 @@ const Engine = { innerText:"Accept Faction Invitation", class:"a-link-button", display:"inline", margin:"4px", padding:"4px", clickListener:()=>{ - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* joinFaction */ "h"])(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][factionName]); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* joinFaction */ "g"])(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* Factions */ "b"][factionName]); for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations.length; ++i) { - if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations[i] == factionName || _Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations[i]].isBanned) { + if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations[i] == factionName || _Faction__WEBPACK_IMPORTED_MODULE_23__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations[i]].isBanned) { _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factionInvitations.splice(i, 1); i--; } @@ -5386,43 +5460,6 @@ const Engine = { document.getElementById("tutorial-text").style.display = "none"; }, - displayDevMenuContent: function() { - Engine.Clickables.devMenuGiveMoney.style.display = "block"; - Engine.Clickables.devMenuGiveRam.style.display = "block"; - Engine.Clickables.devMenuAugDropdown.style.display = "block"; - Engine.Clickables.devMenuAddAug.style.display = "block"; - Engine.Clickables.devMenuTriggerBitFlume.style.display = "block"; - Engine.Clickables.devMenuFactionDropdown.style.display = "block"; - Engine.Clickables.devMenuAddFaction.style.display = "block"; - Engine.Clickables.devMenuOpen.style.display = "block"; - Engine.Clickables.devMenuMinSecurity.style.display = "block"; - Engine.Clickables.devMenuMaxMoney.style.display = "block"; - Engine.Clickables.devMenuConnectDropdown.style.display = "block"; - Engine.Clickables.devMenuConnect.style.display = "block"; - Engine.Clickables.devMenuProgramsDropdown.style.display = "block"; - Engine.Clickables.devMenuAddProgram.style.display = "block"; - - Engine.Clickables.devMenuHackingExp.style.display = "block"; - Engine.Clickables.devMenuAddHacking.style.display = "block"; - Engine.Clickables.devMenuStrengthExp.style.display = "block"; - Engine.Clickables.devMenuAddStrength.style.display = "block"; - Engine.Clickables.devMenuDefenseExp.style.display = "block"; - Engine.Clickables.devMenuAddDefense.style.display = "block"; - Engine.Clickables.devMenuDexterityExp.style.display = "block"; - Engine.Clickables.devMenuAddDexterity.style.display = "block"; - Engine.Clickables.devMenuAgilityExp.style.display = "block"; - Engine.Clickables.devMenuAddAgility.style.display = "block"; - Engine.Clickables.devMenuCharismaExp.style.display = "block"; - Engine.Clickables.devMenuAddCharisma.style.display = "block"; - Engine.Clickables.devMenuIntelligenceExp.style.display = "block"; - Engine.Clickables.devMenuAddIntelligence.style.display = "block"; - Engine.Clickables.devMenuEnableIntelligence.style.display = "block"; - Engine.Clickables.devMenuDisableIntelligence.style.display = "block"; - Engine.Clickables.devMenuSFN.style.display = "block"; - Engine.Clickables.devMenuSFLvl.style.display = "block"; - Engine.Clickables.devMenuAddSF.style.display = "block"; - }, - //Displays the text when a section of the Tutorial is opened displayTutorialPage: function(text) { document.getElementById("tutorial-getting-started-link").style.display = "none"; @@ -5617,8 +5654,8 @@ const Engine = { } if (Engine.Counters.updateDisplaysLong <= 0) { - if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Gang)) { - Object(_Gang__WEBPACK_IMPORTED_MODULE_26__[/* updateGangContent */ "g"])(); + if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].Gang) && _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].inGang()) { + _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gang.updateGangContent(); } else if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_47__["Page"].ScriptEditor)) { Object(_Script__WEBPACK_IMPORTED_MODULE_38__[/* updateScriptEditorContent */ "h"])(); } @@ -5649,14 +5686,14 @@ const Engine = { } var randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)]; - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* inviteToFaction */ "g"])(randFaction); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* inviteToFaction */ "f"])(randFaction); } Engine.Counters.checkFactionInvitations = 100; } if (Engine.Counters.passiveFactionGrowth <= 0) { var adjustedCycles = Math.floor((600 - Engine.Counters.passiveFactionGrowth)); - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* processPassiveFactionRepGain */ "j"])(adjustedCycles); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* processPassiveFactionRepGain */ "i"])(adjustedCycles); Engine.Counters.passiveFactionGrowth = 600; } @@ -5713,7 +5750,7 @@ const Engine = { // Change type based on certain conditions var factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].factions.filter((fac) => { try { - return _Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][fac].getInfo().offerHackingWork; + return _Faction__WEBPACK_IMPORTED_MODULE_23__[/* Factions */ "b"][fac].getInfo().offerHackingWork; } catch (e) { console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`); return false; @@ -5921,7 +5958,7 @@ const Engine = { var offlineProductionFromHacknetNodes = Object(_HacknetNode__WEBPACK_IMPORTED_MODULE_27__[/* processAllHacknetNodeEarnings */ "d"])(numCyclesOffline); //Passive faction rep gain offline - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* processPassiveFactionRepGain */ "j"])(numCyclesOffline); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* processPassiveFactionRepGain */ "i"])(numCyclesOffline); //Gang progress for BitNode 2 if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].bitNodeN != null && _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].bitNodeN === 2 && _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].inGang()) { @@ -5981,7 +6018,7 @@ const Engine = { _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].init(); Object(_Server__WEBPACK_IMPORTED_MODULE_39__[/* initForeignServers */ "f"])(); Object(_Company__WEBPACK_IMPORTED_MODULE_18__[/* initCompanies */ "h"])(); - Object(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* initFactions */ "f"])(); + Object(_Faction__WEBPACK_IMPORTED_MODULE_23__[/* initFactions */ "e"])(); _Company__WEBPACK_IMPORTED_MODULE_18__[/* CompanyPositions */ "d"].init(); Object(_Augmentations__WEBPACK_IMPORTED_MODULE_12__[/* initAugmentations */ "h"])(); Object(_Message__WEBPACK_IMPORTED_MODULE_30__[/* initMessages */ "d"])(); @@ -6067,9 +6104,6 @@ const Engine = { Engine.Display.tutorialContent = document.getElementById("tutorial-container"); Engine.Display.tutorialContent.style.display = "none"; - Engine.Display.devMenuContent = document.getElementById("dev-menu-container"); - Engine.Display.devMenuContent.style.display = "none"; - Engine.Display.infiltrationContent = document.getElementById("infiltration-container"); Engine.Display.infiltrationContent.style.display = "none"; @@ -6109,7 +6143,7 @@ const Engine = { Engine.Display.cinematicTextContent.style.display = "none"; //Init Location buttons - Object(_Location__WEBPACK_IMPORTED_MODULE_24__[/* initLocationButtons */ "b"])(); + Object(_Location__WEBPACK_IMPORTED_MODULE_25__[/* initLocationButtons */ "b"])(); //Tutorial buttons Engine.Clickables.tutorialNetworkingButton = document.getElementById("tutorial-networking-link"); @@ -6156,190 +6190,6 @@ const Engine = { Engine.Clickables.tutorialBackButton.addEventListener("click", function() { Engine.displayTutorialContent(); }); - - // dev menu buttons - Engine.Clickables.devMenuGiveMoney = document.getElementById("dev-need-money"); - Engine.Clickables.devMenuGiveMoney.addEventListener("click", function() { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainMoney(1e15); - }); - - Engine.Clickables.devMenuGiveRam = document.getElementById("dev-need-ram"); - Engine.Clickables.devMenuGiveRam.addEventListener("click", function() { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].getHomeComputer().maxRam *= 2; - }); - - Engine.Clickables.devMenuAugDropdown = document.getElementById("dev-menu-aug-dropdown"); - const augDD = Engine.Clickables.devMenuAugDropdown; - for(const i in _Augmentations__WEBPACK_IMPORTED_MODULE_12__[/* AugmentationNames */ "b"]) { - augDD.options[augDD.options.length] = new Option(_Augmentations__WEBPACK_IMPORTED_MODULE_12__[/* AugmentationNames */ "b"][i], _Augmentations__WEBPACK_IMPORTED_MODULE_12__[/* AugmentationNames */ "b"][i]); - } - - Engine.Clickables.devMenuAddAug = document.getElementById("dev-add-aug"); - Engine.Clickables.devMenuAddAug.addEventListener("click", function() { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].queueAugmentation(augDD.options[augDD.selectedIndex].value); - }); - - Engine.Clickables.devMenuTriggerBitFlume = document.getElementById("dev-bit-flume"); - Engine.Clickables.devMenuTriggerBitFlume.addEventListener("click", function() { - Object(_RedPill__WEBPACK_IMPORTED_MODULE_36__[/* hackWorldDaemon */ "a"])(_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].bitNodeN, true); - }); - - Engine.Clickables.devMenuFactionDropdown = document.getElementById("dev-menu-faction-dropdown"); - const facDD = Engine.Clickables.devMenuFactionDropdown; - for(const i in _Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"]) { - facDD.options[facDD.options.length] = new Option(_Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][i].name, _Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][i].name); - } - - Engine.Clickables.devMenuAddFaction = document.getElementById("dev-add-faction"); - Engine.Clickables.devMenuAddFaction.addEventListener("click", function() { - const factionName = facDD.options[facDD.selectedIndex].value; - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].receiveInvite(factionName); - }); - - Engine.Clickables.devMenuOpen = document.getElementById("dev-open-all"); - Engine.Clickables.devMenuOpen.addEventListener("click", function() { - for(const i in _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"]) { - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].hasAdminRights = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].sshPortOpen = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].ftpPortOpen = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].smtpPortOpen = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].httpPortOpen = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].sqlPortOpen = true; - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].openPortCount = 5; - } - }); - - Engine.Clickables.devMenuMinSecurity = document.getElementById("dev-min-security"); - Engine.Clickables.devMenuMinSecurity.addEventListener("click", function() { - for(const i in _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"]) { - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].hackDifficulty = _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].minDifficulty; - } - }); - - Engine.Clickables.devMenuMaxMoney = document.getElementById("dev-max-money"); - Engine.Clickables.devMenuMaxMoney.addEventListener("click", function() { - for(const i in _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"]) { - _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].moneyAvailable = _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].moneyMax; - } - }); - - Engine.Clickables.devMenuConnectDropdown = document.getElementById("dev-menu-connect-dropdown"); - const connectDD = Engine.Clickables.devMenuConnectDropdown; - for(const i in _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"]) { - connectDD.options[connectDD.options.length] = new Option(_Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].hostname, _Server__WEBPACK_IMPORTED_MODULE_39__[/* AllServers */ "b"][i].hostname); - } - - Engine.Clickables.devMenuConnect = document.getElementById("dev-connect"); - Engine.Clickables.devMenuConnect.addEventListener("click", function() { - const host = connectDD.options[connectDD.selectedIndex].value; - _Terminal__WEBPACK_IMPORTED_MODULE_45__[/* Terminal */ "a"].connectToServer(host); - }); - - Engine.Clickables.devMenuProgramsDropdown = document.getElementById("dev-menu-add-program-dropdown"); - const programsDD = Engine.Clickables.devMenuProgramsDropdown; - for(const i in _CreateProgram__WEBPACK_IMPORTED_MODULE_21__[/* Programs */ "a"]) { - programsDD.options[programsDD.options.length] = new Option(_CreateProgram__WEBPACK_IMPORTED_MODULE_21__[/* Programs */ "a"][i].name, _CreateProgram__WEBPACK_IMPORTED_MODULE_21__[/* Programs */ "a"][i].name); - } - - Engine.Clickables.devMenuAddProgram = document.getElementById("dev-add-program"); - Engine.Clickables.devMenuAddProgram.addEventListener("click", function() { - const program = programsDD.options[programsDD.selectedIndex].value; - if(!_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].hasProgram(program)) { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].getHomeComputer().programs.push(program); - } - }); - - Engine.Clickables.devMenuHackingExp = document.getElementById("dev-hacking-exp"); - Engine.Clickables.devMenuAddHacking = document.getElementById("dev-add-hacking"); - Engine.Clickables.devMenuAddHacking.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuHackingExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainHackingExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuStrengthExp = document.getElementById("dev-strength-exp"); - Engine.Clickables.devMenuAddStrength = document.getElementById("dev-add-strength"); - Engine.Clickables.devMenuAddStrength.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuStrengthExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainStrengthExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuDefenseExp = document.getElementById("dev-defense-exp"); - Engine.Clickables.devMenuAddDefense = document.getElementById("dev-add-defense"); - Engine.Clickables.devMenuAddDefense.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuDefenseExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainDefenseExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuDexterityExp = document.getElementById("dev-dexterity-exp"); - Engine.Clickables.devMenuAddDexterity = document.getElementById("dev-add-dexterity"); - Engine.Clickables.devMenuAddDexterity.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuDexterityExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainDexterityExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuAgilityExp = document.getElementById("dev-agility-exp"); - Engine.Clickables.devMenuAddAgility = document.getElementById("dev-add-agility"); - Engine.Clickables.devMenuAddAgility.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuAgilityExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainAgilityExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuCharismaExp = document.getElementById("dev-charisma-exp"); - Engine.Clickables.devMenuAddCharisma = document.getElementById("dev-add-charisma"); - Engine.Clickables.devMenuAddCharisma.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuCharismaExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainCharismaExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuIntelligenceExp = document.getElementById("dev-intelligence-exp"); - Engine.Clickables.devMenuAddIntelligence = document.getElementById("dev-add-intelligence"); - Engine.Clickables.devMenuAddIntelligence.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuIntelligenceExp.value); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].gainIntelligenceExp(exp); - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].updateSkillLevels(); - }); - - Engine.Clickables.devMenuEnableIntelligence = document.getElementById("dev-enable-intelligence"); - Engine.Clickables.devMenuEnableIntelligence.addEventListener("click", function() { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].intelligence = 1; - }); - - Engine.Clickables.devMenuDisableIntelligence = document.getElementById("dev-disable-intelligence"); - Engine.Clickables.devMenuDisableIntelligence.addEventListener("click", function() { - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].intelligence = 0; - }); - - Engine.Clickables.devMenuSFN = document.getElementById("dev-sf-n"); - Engine.Clickables.devMenuSFLvl = document.getElementById("dev-sf-lvl"); - Engine.Clickables.devMenuAddSF = document.getElementById("dev-add-source-file"); - Engine.Clickables.devMenuAddSF.addEventListener("click", function() { - const sfN = parseInt(Engine.Clickables.devMenuSFN.value); - const sfLvl = parseInt(Engine.Clickables.devMenuSFLvl.value); - let sfIndex = -1; - for(const i in _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].sourceFiles) { - if(_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].sourceFiles[i].n === sfN) { - sfIndex = i; - break; - } - } - - if(sfIndex === -1) { // add fresh source file - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].sourceFiles.push(new _SourceFile__WEBPACK_IMPORTED_MODULE_42__[/* PlayerOwnedSourceFile */ "a"](sfN, sfLvl)); - } else if(sfLvl === 0) { // remove a source file. - if(sfIndex === -1) { // doesn't have it anyway. - return; - } - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].sourceFiles.splice(sfIndex, 1); - } else { // set source file level - _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].sourceFiles[sfIndex].lvl=sfLvl; - } - }); }, /* Initialization */ @@ -6441,7 +6291,7 @@ const Engine = { this.classList.toggle("opened"); const elems = [tutorial, options]; const links = [tutorialLink, optionsLink]; - if(true) { + if (true) { elems.push(document.getElementById("dev-tab")); links.push(document.getElementById("dev-menu-link")); } @@ -6594,7 +6444,7 @@ const Engine = { var cancelButton = document.getElementById("work-in-progress-cancel-button"); cancelButton.addEventListener("click", function() { if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].workType == _Constants__WEBPACK_IMPORTED_MODULE_20__[/* CONSTANTS */ "a"].WorkTypeFaction) { - var fac = _Faction__WEBPACK_IMPORTED_MODULE_22__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].currentWorkFactionName]; + var fac = _Faction__WEBPACK_IMPORTED_MODULE_23__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].currentWorkFactionName]; _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].finishFactionWork(true); } else if (_Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].workType == _Constants__WEBPACK_IMPORTED_MODULE_20__[/* CONSTANTS */ "a"].WorkTypeCreateProgram) { _Player__WEBPACK_IMPORTED_MODULE_34__[/* Player */ "a"].finishCreateProgramWork(true); @@ -6691,10 +6541,10 @@ window.onload = function() { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), -/* 8 */ +/* 9 */ /*!****************************!*\ !*** ./utils/DialogBox.js ***! \****************************/ @@ -6779,10 +6629,10 @@ function dialogBoxCreate(txt, preformatted=false) { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), -/* 9 */ +/* 10 */ /*!***********************************!*\ !*** ./src/BitNodeMultipliers.ts ***! \***********************************/ @@ -6828,7 +6678,7 @@ exports.BitNodeMultipliers = { /***/ }), -/* 10 */ +/* 11 */ /*!***************************************!*\ !*** ./utils/helpers/getRandomInt.ts ***! \***************************************/ @@ -6853,7 +6703,7 @@ exports.getRandomInt = getRandomInt; /***/ }), -/* 11 */ +/* 12 */ /*!***********************!*\ !*** ./src/Server.js ***! \***********************/ @@ -6872,7 +6722,7 @@ exports.getRandomInt = getRandomInt; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return initForeignServers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return prestigeAllServers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return prestigeHomeComputer; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CodingContracts */ 38); /* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_1__); @@ -6881,12 +6731,12 @@ exports.getRandomInt = getRandomInt; /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CreateProgram */ 22); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SpecialServerIps */ 27); -/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TextFile */ 53); +/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TextFile */ 52); /* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/IPAddress */ 51); -/* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./data/servers */ 112); +/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/IPAddress */ 50); +/* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./data/servers */ 113); /* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_data_servers__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); /* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/helpers/isValidIPAddress */ 75); @@ -7351,88 +7201,6 @@ Directory.prototype.getPath = function(name) { -/***/ }), -/* 12 */ -/*!*********************************!*\ - !*** ./src/ui/numeralFormat.js ***! - \*********************************/ -/*! exports provided: numeralWrapper */ -/*! exports used: numeralWrapper */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return numeralWrapper; }); -/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 63); -/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 242); -/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 241); -/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 240); -/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 239); -/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 238); -/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 237); -/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 236); -/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 235); -/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 234); -/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 233); -/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 232); -/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 231); -/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 230); -/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 229); -/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__); - - - - - - - - - - - - - - - - -/* eslint-disable class-methods-use-this */ - -class NumeralFormatter { - constructor() { - this.defaultLocale = 'en'; - } - - updateLocale(l) { - if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) { - console.warn(`Invalid locale for numeral: ${l}`); - - numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale); - return false; - } - return true; - } - - format(n, format) { - return numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format); - } -} - -const numeralWrapper = new NumeralFormatter(); - - /***/ }), /* 13 */ /*!************************!*\ @@ -8697,44 +8465,44 @@ function Generic_fromJSON(ctor, data) { !*** ./src/Faction.js ***! \************************/ /*! exports provided: getNextNeurofluxLevel, Factions, initFactions, inviteToFaction, joinFaction, displayFactionContent, processPassiveFactionRepGain, loadFactions, Faction, purchaseAugmentation, factionExists */ -/*! exports used: Faction, Factions, displayFactionContent, factionExists, getNextNeurofluxLevel, initFactions, inviteToFaction, joinFaction, loadFactions, processPassiveFactionRepGain, purchaseAugmentation */ +/*! exports used: Faction, Factions, displayFactionContent, factionExists, initFactions, inviteToFaction, joinFaction, loadFactions, processPassiveFactionRepGain, purchaseAugmentation */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getNextNeurofluxLevel; }); +/* unused harmony export getNextNeurofluxLevel */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Factions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return initFactions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return inviteToFaction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return joinFaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return initFactions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return inviteToFaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return joinFaction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return displayFactionContent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return processPassiveFactionRepGain; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return loadFactions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return processPassiveFactionRepGain; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return loadFactions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Faction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return purchaseAugmentation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return purchaseAugmentation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return factionExists; }); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FactionInfo */ 96); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FactionInfo */ 97); /* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_FactionInfo__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Location */ 78); -/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Missions */ 46); +/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Missions */ 47); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_FactionInvitationBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/FactionInvitationBox */ 108); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_FactionInvitationBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/FactionInvitationBox */ 109); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -9470,27 +9238,21 @@ function purchaseAugmentation(aug, fac, sing=false) { } function getNextNeurofluxLevel() { - var aug = _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ "c"][_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"].NeuroFluxGovernor]; - if (aug == null) { - for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations.length; ++i) { - if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations[i].name == _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"].NeuroFluxGovernor) { - aug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations[i]; - } - } - if (aug == null) { - console.log("WARNING: Could not find NeuroFlux Governor aug. This is OK if " + - "it happens during the loading/initialization of the game, but probably " + - "indicates something seriously wrong at other times"); - return 1; + // Get current Neuroflux level based on Player's augmentations + let currLevel = 0; + for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations.length; ++i) { + if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations[i].name === _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"].NeuroFluxGovernor) { + currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].augmentations[i].level; } } - var nextLevel = aug.level + 1; + + // Account for purchased but uninstalled Augmentations for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].queuedAugmentations.length; ++i) { if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ "a"].queuedAugmentations[i].name == _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"].NeuroFluxGovernor) { - ++nextLevel; + ++currLevel; } } - return nextLevel; + return currLevel + 1; } function processPassiveFactionRepGain(numCycles) { @@ -9660,7 +9422,7 @@ exports.routing = new Routing(); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getElementById_1 = __webpack_require__(/*! ./getElementById */ 45); +const getElementById_1 = __webpack_require__(/*! ./getElementById */ 46); /** * Given an element by its ID, removes all event listeners from that element by cloning and * replacing. Then returns the new cloned element. @@ -9848,6 +9610,36 @@ exports.Settings = { /***/ }), /* 20 */ +/*!**********************************************!*\ + !*** ./utils/uiHelpers/removeElementById.ts ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const getElementById_1 = __webpack_require__(/*! ./getElementById */ 46); +const removeElement_1 = __webpack_require__(/*! ./removeElement */ 62); +/** + * Given its id, this function removes an element AND its children + * @param id The HTML identifier to search for and remove. + */ +function removeElementById(id) { + try { + const elem = getElementById_1.getElementById(id); + removeElement_1.removeElement(elem); + } + catch (e) { + // Probably should log this as we're trying to remove elements that don't exist. + } +} +exports.removeElementById = removeElementById; + + +/***/ }), +/* 21 */ /*!******************************!*\ !*** ./src/Augmentations.js ***! \******************************/ @@ -9865,10 +9657,10 @@ exports.Settings = { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return augmentationExists; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Augmentation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return displayAugmentationsContent; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Faction */ 15); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptWorker */ 24); @@ -9876,15 +9668,15 @@ exports.Settings = { /* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Prestige */ 76); /* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SaveObject */ 65); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server */ 11); -/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile */ 58); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server */ 12); +/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile */ 61); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/uiHelpers/createAccordionElement */ 66); /* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); /* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/clearObject */ 67); /* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_15__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__); @@ -10919,9 +10711,25 @@ function initAugmentations() { "This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation " + "increases ALL of the player's multipliers by 1%." }); - var nextLevel = Object(_Faction__WEBPACK_IMPORTED_MODULE_3__[/* getNextNeurofluxLevel */ "e"])(); - NeuroFluxGovernor.level = nextLevel - 1; - mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ "a"].NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); + + // Set the Augmentation's level to the currently-installed level + let currLevel = 0; + for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].augmentations.length; ++i) { + if (_Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].augmentations[i].name === AugmentationNames.NeuroFluxGovernor) { + currLevel = _Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].augmentations[i].level; + } + } + NeuroFluxGovernor.level = currLevel; + + // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux + // levels that are purchased but not yet installed + let nextLevel = currLevel; + for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].queuedAugmentations.length; ++i) { + if (_Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) { + ++nextLevel; + } + } + mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ "a"].NeuroFluxGovernorLevelMult, nextLevel); NeuroFluxGovernor.baseRepRequirement = 500 * mult * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ "a"].AugmentationRepMultiplier * _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__["BitNodeMultipliers"].AugmentationRepCost; NeuroFluxGovernor.baseCost = 750e3 * mult * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ "a"].AugmentationCostMultiplier * _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__["BitNodeMultipliers"].AugmentationMoneyCost; if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) { @@ -12270,7 +12078,7 @@ function applyAugmentation(aug, reapply=false) { return; } - if (aug.name == AugmentationNames.NeuroFluxGovernor) { + if (aug.name === AugmentationNames.NeuroFluxGovernor) { for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].augmentations.length; ++i) { if (_Player__WEBPACK_IMPORTED_MODULE_6__[/* Player */ "a"].augmentations[i].name == AugmentationNames.NeuroFluxGovernor) { //Already have this aug, just upgrade the level @@ -12523,36 +12331,6 @@ function displaySourceFiles(listElement, sourceFiles) { -/***/ }), -/* 21 */ -/*!**********************************************!*\ - !*** ./utils/uiHelpers/removeElementById.ts ***! - \**********************************************/ -/*! no static exports found */ -/*! all exports used */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const getElementById_1 = __webpack_require__(/*! ./getElementById */ 45); -const removeElement_1 = __webpack_require__(/*! ./removeElement */ 64); -/** - * Given its id, this function removes an element AND its children - * @param id The HTML identifier to search for and remove. - */ -function removeElementById(id) { - try { - const elem = getElementById_1.getElementById(id); - removeElement_1.removeElement(elem); - } - catch (e) { - // Probably should log this as we're trying to remove elements that don't exist. - } -} -exports.removeElementById = removeElementById; - - /***/ }), /* 22 */ /*!******************************!*\ @@ -12569,7 +12347,7 @@ exports.removeElementById = removeElementById; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initCreateProgramButtons; }); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__); @@ -12771,23 +12549,23 @@ function initCreateProgramButtons() { /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Stock */ 25); /* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Stock__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 32); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 31); /* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_15__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -14265,30 +14043,30 @@ function updateStockOrderList(stock) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return addWorkerScript; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return updateOnlineScriptTimes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return prestigeWorkerScripts; }); -/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 60); +/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 59); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./JSInterpreter */ 107); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./JSInterpreter */ 108); /* harmony import */ var _NetscriptEnvironment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptEnvironment */ 93); -/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptEvaluator */ 5); +/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptEvaluator */ 6); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 94); -/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptPort */ 62); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptPort */ 63); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! escodegen */ 88); /* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn */ 41); +/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn */ 42); /* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/compareArrays */ 79); /* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 48); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 71); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_17__); @@ -14302,7 +14080,6 @@ function updateStockOrderList(stock) { -//TODO Maybe escodegen might be better? @@ -14312,7 +14089,7 @@ function updateStockOrderList(stock) { -const walk = __webpack_require__(/*! acorn/dist/walk */ 125); +const walk = __webpack_require__(/*! acorn/dist/walk */ 126); function WorkerScript(runningScriptObj) { this.name = runningScriptObj.filename; @@ -14982,7 +14759,7 @@ JSONReviver_1.Reviver.constructors.Stock = Stock; Object.defineProperty(exports, "__esModule", { value: true }); const isString_1 = __webpack_require__(/*! ../helpers/isString */ 34); -const getElementById_1 = __webpack_require__(/*! ./getElementById */ 45); +const getElementById_1 = __webpack_require__(/*! ./getElementById */ 46); /** * Clears out all children from the provided element. * If a string is passed in, it will treat it as an ID and search for the element to delete all children from. @@ -15095,53 +14872,53 @@ function initSpecialServerIps() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return scriptEditorInit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isScriptFilename; }); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Fconf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Fconf */ 40); -/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractiveTutorial */ 31); -/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptEvaluator */ 5); +/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractiveTutorial */ 32); +/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptEvaluator */ 6); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NetscriptWorker */ 24); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/postToTerminal */ 6); +/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ui/postToTerminal */ 7); /* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile */ 53); +/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile */ 52); /* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn */ 41); +/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn */ 42); /* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); /* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/helpers/compareArrays */ 79); /* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/helpers/getTimestamp */ 74); /* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 71); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20__); -var ace = __webpack_require__(/*! brace */ 227); -var beautify = __webpack_require__(/*! js-beautify */ 226).js_beautify; -__webpack_require__(/*! brace/mode/javascript */ 225); -__webpack_require__(/*! ../netscript */ 164); -__webpack_require__(/*! brace/theme/chaos */ 224); -__webpack_require__(/*! brace/theme/chrome */ 223); -__webpack_require__(/*! brace/theme/monokai */ 222); -__webpack_require__(/*! brace/theme/solarized_dark */ 221); -__webpack_require__(/*! brace/theme/solarized_light */ 220); -__webpack_require__(/*! brace/theme/terminal */ 219); -__webpack_require__(/*! brace/theme/twilight */ 218); -__webpack_require__(/*! brace/theme/xcode */ 217); -__webpack_require__(/*! brace/keybinding/vim */ 216); -__webpack_require__(/*! brace/keybinding/emacs */ 215); -__webpack_require__(/*! brace/ext/language_tools */ 214); +var ace = __webpack_require__(/*! brace */ 228); +var beautify = __webpack_require__(/*! js-beautify */ 227).js_beautify; +__webpack_require__(/*! brace/mode/javascript */ 226); +__webpack_require__(/*! ../netscript */ 165); +__webpack_require__(/*! brace/theme/chaos */ 225); +__webpack_require__(/*! brace/theme/chrome */ 224); +__webpack_require__(/*! brace/theme/monokai */ 223); +__webpack_require__(/*! brace/theme/solarized_dark */ 222); +__webpack_require__(/*! brace/theme/solarized_light */ 221); +__webpack_require__(/*! brace/theme/terminal */ 220); +__webpack_require__(/*! brace/theme/twilight */ 219); +__webpack_require__(/*! brace/theme/xcode */ 218); +__webpack_require__(/*! brace/keybinding/vim */ 217); +__webpack_require__(/*! brace/keybinding/emacs */ 216); +__webpack_require__(/*! brace/ext/language_tools */ 215); // Importing this doesn't work for some reason. -const walk = __webpack_require__(/*! acorn/dist/walk */ 125); +const walk = __webpack_require__(/*! acorn/dist/walk */ 126); @@ -16216,7 +15993,7 @@ _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_16__["Reviver"].constructors.AllServ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 29 */ @@ -16229,47 +16006,47 @@ _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_16__["Reviver"].constructors.AllServ "use strict"; /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Bladeburner; }); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction */ 15); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Locations */ 3); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RedPill */ 54); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 32); +/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RedPill */ 58); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 31); /* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/helpers/createProgressBarText */ 72); /* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 56); +/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 55); /* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_14__); -/* harmony import */ var _utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/uiHelpers/appendLineBreaks */ 52); +/* harmony import */ var _utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/uiHelpers/appendLineBreaks */ 51); /* harmony import */ var _utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/helpers/clearObject */ 67); /* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/getTimestamp */ 74); /* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_23__); -/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 64); +/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 62); /* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_24__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_25__); @@ -16993,7 +16770,7 @@ Bladeburner.prototype.prestige = function() { this.resetAction(); var bladeburnerFac = _Faction__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ "b"]["Bladeburners"]; if (this.rank >= RankNeededForFaction) { - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "h"])(bladeburnerFac); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "g"])(bladeburnerFac); } } @@ -18039,8 +17816,9 @@ Bladeburner.prototype.createOverviewContent = function() { }); DomElems.overviewStaminaHelpTip = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__["createElement"])("div", { - innerText:"?", class:"help-tip", - clickListener:()=>{ + class:"help-tip", + innerText:"?", + clickListener: ()=> { Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__["dialogBoxCreate"])("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 " + @@ -18052,7 +17830,7 @@ Bladeburner.prototype.createOverviewContent = function() { "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."); - } + }, }); DomElems.overviewGen1 = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__["createElement"])("p", { @@ -18102,7 +17880,7 @@ Bladeburner.prototype.createOverviewContent = function() { innerText: "Bonus time: ", display: "inline-block", tooltip: "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." + "Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed." }); DomElems.overviewSkillPoints = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_17__["createElement"])("p", {display:"block"}); @@ -18188,7 +17966,7 @@ Bladeburner.prototype.createOverviewContent = function() { Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* displayFactionContent */ "c"])(bladeburnersFactionName); } else { if (this.rank >= RankNeededForFaction) { - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "h"])(bladeburnerFac); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "g"])(bladeburnerFac); Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__["dialogBoxCreate"])("Congratulations! You were accepted into the Bladeburners faction"); Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_12__["removeChildrenFromElement"])(DomElems.overviewDiv); this.createOverviewContent(); @@ -19606,6 +19384,38 @@ Bladeburner.prototype.startActionNetscriptFn = function(type, name, workerScript return false; } + // Special logic for Black Ops + if (actionId.type === ActionTypes["BlackOp"]) { + // Can't start a BlackOp if you don't have the required rank + let action = this.getActionObject(actionId); + if (action.reqdRank > this.rank) { + workerScript.log(`Failed to start Black Op ${actionId.name} due to insufficient rank`); + return false; + } + + // Can't start a BlackOp if you haven't done the one before it + var blackops = []; + for (const nm in BlackOperations) { + if (BlackOperations.hasOwnProperty(nm)) { + blackops.push(nm); + } + } + blackops.sort(function(a, b) { + return (BlackOperations[a].reqdRank - BlackOperations[b].reqdRank); // Sort black ops in intended order + }); + + let i = blackops.indexOf(actionId.name); + if (i === -1) { + workerScript.log("ERROR: Invalid Black Operation name passed into bladeburner.startAction(). Note that this name is case-sensitive & whitespace-sensitive"); + return false; + } + + if (i > 0 && this.blackops[blackops[i-1]] == null) { + workerScript.log(`ERROR: Cannot attempt Black Operation ${actionId.name} because you have not done the preceding one`); + return false; + } + } + try { this.startAction(actionId); if (workerScript.shouldLog("startAction")) { @@ -19707,9 +19517,14 @@ Bladeburner.prototype.getActionCountRemainingNetscriptFn = function(type, name, switch (actionId.type) { case ActionTypes["Contract"]: case ActionTypes["Operation"]: + return actionObj.count; case ActionTypes["BlackOp"]: case ActionTypes["BlackOperation"]: - return actionObj.count; + if (this.blackops[name] != null) { + return 0; + } else { + return 1; + } case ActionTypes["Training"]: case ActionTypes["Field Analysis"]: case ActionTypes["FieldAnalysis"]: @@ -19912,7 +19727,7 @@ Bladeburner.prototype.joinBladeburnerFactionNetscriptFn = function(workerScript) if (bladeburnerFac.isMember) { return true; } else if (this.rank >= RankNeededForFaction) { - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "h"])(bladeburnerFac); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* joinFaction */ "g"])(bladeburnerFac); if (workerScript.shouldLog("joinBladeburnerFaction")) { workerScript.log("Joined Bladeburners Faction"); } @@ -20391,11 +20206,55 @@ function initBladeburner() { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 30 */, /* 31 */ +/*!***********************************!*\ + !*** ./utils/helpers/keyCodes.ts ***! + \***********************************/ +/*! no static exports found */ +/*! exports used: KEY */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Keyboard key codes + */ +exports.KEY = { + A: 65, + B: 66, + C: 67, + CTRL: 17, + D: 68, + DOWNARROW: 40, + E: 69, + ENTER: 13, + F: 70, + H: 72, + J: 74, + K: 75, + L: 76, + M: 77, + N: 78, + O: 79, + P: 80, + R: 82, + S: 83, + TAB: 9, + U: 85, + UPARROW: 38, + W: 87, + "1": 49, + "2": 50, +}; + + +/***/ }), +/* 32 */ /*!************************************!*\ !*** ./src/InteractiveTutorial.js ***! \************************************/ @@ -20409,17 +20268,17 @@ function initBladeburner() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return iTutorialStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return iTutorialNextStep; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ITutorial; }); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_6__); @@ -20932,48 +20791,6 @@ function iTutorialSetText(txt) { -/***/ }), -/* 32 */ -/*!***********************************!*\ - !*** ./utils/helpers/keyCodes.ts ***! - \***********************************/ -/*! no static exports found */ -/*! exports used: KEY */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Keyboard key codes - */ -exports.KEY = { - A: 65, - B: 66, - C: 67, - CTRL: 17, - D: 68, - DOWNARROW: 40, - E: 69, - ENTER: 13, - F: 70, - H: 72, - J: 74, - K: 75, - L: 76, - M: 77, - N: 78, - O: 79, - P: 80, - R: 82, - S: 83, - TAB: 9, - U: 85, - UPARROW: 38, - W: 87, -}; - - /***/ }), /* 33 */ /*!***********************!*\ @@ -20989,7 +20806,7 @@ exports.KEY = { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Crimes; }); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 9); @@ -21306,15 +21123,15 @@ exports.isString = isString; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return loadMessages; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initMessages; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Message; }); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 20); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 21); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateProgram */ 22); -/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Missions */ 46); +/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Missions */ 47); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill */ 54); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill */ 58); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); @@ -21521,8 +21338,8 @@ function initMessages() { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const createElement_1 = __webpack_require__(/*! ./createElement */ 4); -const getElementById_1 = __webpack_require__(/*! ./getElementById */ 45); +const createElement_1 = __webpack_require__(/*! ./createElement */ 2); +const getElementById_1 = __webpack_require__(/*! ./getElementById */ 46); /** * Creates the necessary DOM elements to present an in-game popup to the player. * @param id The (hopefully) unique identifier for the popup container. @@ -21568,9 +21385,9 @@ exports.createPopup = createPopup; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return hasCorporationSF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hasAISF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasBladeburnerSF; }); -/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 60); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 59); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Crimes */ 33); /* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner */ 29); @@ -21578,47 +21395,47 @@ exports.createPopup = createPopup; /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateProgram */ 22); /* harmony import */ var _DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DarkWeb */ 69); -/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Hacking */ 42); -/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang */ 49); +/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Hacking */ 43); +/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang */ 53); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HacknetNode */ 59); +/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HacknetNode */ 57); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Locations */ 3); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Message */ 35); -/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Missions */ 46); +/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Missions */ 47); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SpecialServerIps */ 27); /* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Stock */ 25); /* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_Stock__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket */ 23); -/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ui/postToTerminal */ 6); +/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ui/postToTerminal */ 7); /* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_23__); -/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./TextFile */ 53); +/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./TextFile */ 52); /* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_24__); -/* harmony import */ var _NetscriptBladeburner_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptBladeburner.js */ 44); +/* harmony import */ var _NetscriptBladeburner_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptBladeburner.js */ 45); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./NetscriptWorker */ 24); -/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./NetscriptEvaluator */ 5); -/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./NetscriptPort */ 62); +/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./NetscriptEvaluator */ 6); +/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./NetscriptPort */ 63); /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! decimal.js */ 30); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_30__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/helpers/isPowerOfTwo */ 113); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/helpers/isPowerOfTwo */ 114); /* harmony import */ var _utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_32__); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 48); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_33__); -/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/IPAddress */ 51); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/IPAddress */ 50); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_35__); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_36__); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); -var sprintf = __webpack_require__(/*! sprintf-js */ 124).sprintf, - vsprintf = __webpack_require__(/*! sprintf-js */ 124).vsprintf +var sprintf = __webpack_require__(/*! sprintf-js */ 125).sprintf, + vsprintf = __webpack_require__(/*! sprintf-js */ 125).vsprintf @@ -22478,12 +22295,12 @@ function NetscriptFunctions(workerScript) { } destServer = Object(_Server__WEBPACK_IMPORTED_MODULE_18__[/* getServer */ "e"])(ip2); if (destServer == null) { - throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip); + throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip2}`); } currServ = Object(_Server__WEBPACK_IMPORTED_MODULE_18__[/* getServer */ "e"])(ip1); if (currServ == null) { - throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer"); + throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip1}`); } } else if (arguments.length === 2) { //scriptname, destination if (scriptname === undefined || ip1 === undefined) { @@ -22491,7 +22308,7 @@ function NetscriptFunctions(workerScript) { } destServer = Object(_Server__WEBPACK_IMPORTED_MODULE_18__[/* getServer */ "e"])(ip1); if (destServer == null) { - throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip); + throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_27__[/* makeRuntimeRejectMsg */ "d"])(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip1}`); } currServ = Object(_Server__WEBPACK_IMPORTED_MODULE_18__[/* getServer */ "e"])(workerScript.serverIp); @@ -23909,7 +23726,7 @@ function NetscriptFunctions(workerScript) { /* Singularity Functions */ universityCourse : function(universityName, className) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("universityCourse", ramCost); } @@ -23998,7 +23815,7 @@ function NetscriptFunctions(workerScript) { gymWorkout : function(gymName, stat) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("gymWorkout", ramCost); } @@ -24100,7 +23917,7 @@ function NetscriptFunctions(workerScript) { travelToCity(cityname) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("travelToCity", ramCost); } @@ -24137,7 +23954,7 @@ function NetscriptFunctions(workerScript) { purchaseTor() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseTor", ramCost); } @@ -24181,7 +23998,7 @@ function NetscriptFunctions(workerScript) { }, purchaseProgram(programName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseProgram", ramCost); } @@ -24233,7 +24050,7 @@ function NetscriptFunctions(workerScript) { }, getStats : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getStats", ramCost); } @@ -24257,7 +24074,7 @@ function NetscriptFunctions(workerScript) { }, getCharacterInformation : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCharacterInformation", ramCost); } @@ -24293,7 +24110,7 @@ function NetscriptFunctions(workerScript) { }, isBusy : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("isBusy", ramCost); } @@ -24308,7 +24125,7 @@ function NetscriptFunctions(workerScript) { }, stopAction : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn1RamCost / 2; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("stopAction", ramCost); } @@ -24330,7 +24147,7 @@ function NetscriptFunctions(workerScript) { }, upgradeHomeRam : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("upgradeHomeRam", ramCost); } @@ -24362,7 +24179,7 @@ function NetscriptFunctions(workerScript) { }, getUpgradeHomeRamCost : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost / 2; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getUpgradeHomeRamCost", ramCost); } @@ -24378,7 +24195,7 @@ function NetscriptFunctions(workerScript) { }, workForCompany : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("workForCompany", ramCost); } @@ -24419,7 +24236,7 @@ function NetscriptFunctions(workerScript) { }, applyToCompany : function(companyName, field) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("applyToCompany", ramCost); } @@ -24500,7 +24317,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyRep : function(companyName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost / 2; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyRep", ramCost); } @@ -24521,7 +24338,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyFavor : function(companyName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyFavor", ramCost); } @@ -24542,7 +24359,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyFavorGain : function(companyName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyFavorGain", ramCost); } @@ -24563,7 +24380,7 @@ function NetscriptFunctions(workerScript) { }, checkFactionInvitations : function() { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("checkFactionInvitations", ramCost); } @@ -24579,7 +24396,7 @@ function NetscriptFunctions(workerScript) { }, joinFaction : function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("joinFaction", ramCost); } @@ -24601,7 +24418,7 @@ function NetscriptFunctions(workerScript) { return false; } var fac = _Faction__WEBPACK_IMPORTED_MODULE_11__[/* Factions */ "b"][name]; - Object(_Faction__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ "h"])(fac); + Object(_Faction__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ "g"])(fac); //Update Faction Invitation list to account for joined + banned factions for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].factionInvitations.length; ++i) { @@ -24618,7 +24435,7 @@ function NetscriptFunctions(workerScript) { }, workForFaction : function(name, type) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("workForFaction", ramCost); } @@ -24718,7 +24535,7 @@ function NetscriptFunctions(workerScript) { }, getFactionRep : function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost / 4; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionRep", ramCost); } @@ -24739,7 +24556,7 @@ function NetscriptFunctions(workerScript) { }, getFactionFavor : function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionFavor", ramCost); } @@ -24760,7 +24577,7 @@ function NetscriptFunctions(workerScript) { }, getFactionFavorGain: function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn2RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionFavorGain", ramCost); } @@ -24781,7 +24598,7 @@ function NetscriptFunctions(workerScript) { }, donateToFaction : function(name, amt) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("donateToFaction", ramCost); } @@ -24820,7 +24637,7 @@ function NetscriptFunctions(workerScript) { }, createProgram : function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("createProgram", ramCost); } @@ -24874,7 +24691,7 @@ function NetscriptFunctions(workerScript) { }, commitCrime : function(crimeRoughName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("commitCrime", ramCost); } @@ -24931,7 +24748,7 @@ function NetscriptFunctions(workerScript) { }, getCrimeChance : function(crimeRoughName) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCrimeChance", ramCost); } @@ -24952,7 +24769,7 @@ function NetscriptFunctions(workerScript) { }, getOwnedAugmentations : function(purchased=false) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getOwnedAugmentations", ramCost); } @@ -24976,7 +24793,7 @@ function NetscriptFunctions(workerScript) { }, getOwnedSourceFiles : function() { let ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getOwnedSourceFiles", ramCost); } @@ -24995,7 +24812,7 @@ function NetscriptFunctions(workerScript) { }, getAugmentationsFromFaction : function(facname) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getAugmentationsFromFaction", ramCost); } @@ -25021,7 +24838,7 @@ function NetscriptFunctions(workerScript) { }, getAugmentationCost : function(name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getAugmentationCost", ramCost); } @@ -25043,7 +24860,7 @@ function NetscriptFunctions(workerScript) { }, purchaseAugmentation : function(faction, name) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseAugmentation", ramCost); } @@ -25097,7 +24914,7 @@ function NetscriptFunctions(workerScript) { return false; } - var res = Object(_Faction__WEBPACK_IMPORTED_MODULE_11__[/* purchaseAugmentation */ "k"])(aug, fac, true); + var res = Object(_Faction__WEBPACK_IMPORTED_MODULE_11__[/* purchaseAugmentation */ "j"])(aug, fac, true); workerScript.scriptRef.log(res); if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_36__["isString"])(res) && res.startsWith("You purchased")) { _Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].IntelligenceSingFnBaseExpGain); @@ -25108,7 +24925,7 @@ function NetscriptFunctions(workerScript) { }, installAugmentations : function(cbScript) { var ramCost = _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFn3RamCost; - if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= 8;} + if (_Player__WEBPACK_IMPORTED_MODULE_16__[/* Player */ "a"].bitNodeN !== 4) {ramCost *= _Constants__WEBPACK_IMPORTED_MODULE_6__[/* CONSTANTS */ "a"].ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("installAugmentations", ramCost); } @@ -25741,7 +25558,7 @@ function NetscriptFunctions(workerScript) { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 38 */ @@ -25764,10 +25581,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONReviver_1 = __webpack_require__(/*! ../utils/JSONReviver */ 14); -const createElement_1 = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +const createElement_1 = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); const createPopup_1 = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); -const removeElementById_1 = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); -const codingcontracttypes_1 = __webpack_require__(/*! ./data/codingcontracttypes */ 169); +const removeElementById_1 = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); +const codingcontracttypes_1 = __webpack_require__(/*! ./data/codingcontracttypes */ 170); /* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */ /* Represents different types of problems that a Coding Contract can have */ class CodingContractType { @@ -25935,7 +25752,7 @@ JSONReviver_1.Reviver.constructors.CodingContract = CodingContract; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return substituteAliases; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return loadAliases; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return loadGlobalAliases; }); -/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/postToTerminal */ 6); +/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/postToTerminal */ 7); /* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_0__); @@ -26066,9 +25883,9 @@ function substituteAliases(origCommand) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createFconf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return parseFconfSettings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return loadFconf; }); -/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn */ 41); +/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn */ 42); /* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox */ 9); @@ -26324,6 +26141,33 @@ function setMainMenuStyle() { /***/ }), /* 41 */ +/*!*****************************************!*\ + !*** ./utils/helpers/exceptionAlert.js ***! + \*****************************************/ +/*! exports provided: exceptionAlert */ +/*! exports used: exceptionAlert */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exceptionAlert; }); +/* harmony import */ var _DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DialogBox */ 9); + + +function exceptionAlert(e) { + Object(_DialogBox__WEBPACK_IMPORTED_MODULE_0__["dialogBoxCreate"])("Caught an exception: " + e + "

" + + "Filename: " + (e.fileName || "UNKNOWN FILE NAME") + "

" + + "Line Number: " + (e.lineNumber || "UNKNOWN LINE NUMBER") + "

" + + "This is a bug, please report to game developer with this " + + "message as well as details about how to reproduce the bug.

" + + "If you want to be safe, I suggest refreshing the game WITHOUT saving so that your " + + "safe doesn't get corrupted"); +} + + + + +/***/ }), +/* 42 */ /*!************************!*\ !*** ./utils/acorn.js ***! \************************/ @@ -29963,7 +29807,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); /***/ }), -/* 42 */ +/* 43 */ /*!************************!*\ !*** ./src/Hacking.js ***! \************************/ @@ -29978,10 +29822,10 @@ Object.defineProperty(exports, '__esModule', { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return calculateHackingTime; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return calculateGrowTime; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return calculateWeakenTime; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 12); @@ -30076,1678 +29920,8 @@ function calculateWeakenTime(server, hack, int) { } -/***/ }), -/* 43 */ -/*!*****************************************!*\ - !*** ./utils/helpers/exceptionAlert.js ***! - \*****************************************/ -/*! exports provided: exceptionAlert */ -/*! exports used: exceptionAlert */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exceptionAlert; }); -/* harmony import */ var _DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DialogBox */ 8); - - -function exceptionAlert(e) { - Object(_DialogBox__WEBPACK_IMPORTED_MODULE_0__["dialogBoxCreate"])("Caught an exception: " + e + "

" + - "Filename: " + (e.fileName || "UNKNOWN FILE NAME") + "

" + - "Line Number: " + (e.lineNumber || "UNKNOWN LINE NUMBER") + "

" + - "This is a bug, please report to game developer with this " + - "message as well as details about how to reproduce the bug.

" + - "If you want to be safe, I suggest refreshing the game WITHOUT saving so that your " + - "safe doesn't get corrupted"); -} - - - - /***/ }), /* 44 */ -/*!*************************************!*\ - !*** ./src/NetscriptBladeburner.js ***! - \*************************************/ -/*! exports provided: unknownBladeburnerActionErrorMessage, unknownBladeburnerExceptionMessage, checkBladeburnerAccess */ -/*! exports used: checkBladeburnerAccess, unknownBladeburnerActionErrorMessage, unknownBladeburnerExceptionMessage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unknownBladeburnerActionErrorMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unknownBladeburnerExceptionMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkBladeburnerAccess; }); -/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Bladeburner */ 29); -/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NetscriptEvaluator */ 5); - - - - -function unknownBladeburnerActionErrorMessage(functionName, actionType, actionName) { - return `ERROR: bladeburner.${functionName}() failed due to an invalid action specified. ` + - `Type: ${actionType}, Name: ${actionName}. Note that for contracts and operations, the ` + - `name of the operation is case-sensitive.`; -} - -function unknownBladeburnerExceptionMessage(functionName, err) { - return `Bladeburner.${functionName}() failed with exception: ` + err; -} - -function checkBladeburnerAccess(workerScript, functionName) { - const accessDenied = `${functionName}() failed because you do not` + - " currently have access to the Bladeburner API. This is either" + - " because you are not currently employed at the Bladeburner division" + - " or because you do not have Source-File 7"; - const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner instanceof _Bladeburner__WEBPACK_IMPORTED_MODULE_1__[/* Bladeburner */ "a"] && (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].sourceFiles.some(a=>{return a.n === 7})); - if(!hasAccess) { - throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__[/* makeRuntimeRejectMsg */ "d"])(workerScript, accessDenied); - } -} - - - - -/***/ }), -/* 45 */ -/*!*******************************************!*\ - !*** ./utils/uiHelpers/getElementById.ts ***! - \*******************************************/ -/*! no static exports found */ -/*! all exports used */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Returns a reference to the first object with the specified value of the ID or NAME attribute, - * throwing an error if it is unable to find it. - * @param elementId The HTML ID to retrieve the element by. - * @throws {Error} When the 'elementId' cannot be found. - */ -function getElementById(elementId) { - const el = document.getElementById(elementId); - if (el === null) { - throw new Error(`Unable to find element with id '${elementId}'`); - } - return el; -} -exports.getElementById = getElementById; - - -/***/ }), -/* 46 */ -/*!*************************!*\ - !*** ./src/Missions.js ***! - \*************************/ -/*! exports provided: HackingMission, inMission, setInMission, currMission */ -/*! exports used: HackingMission, currMission, inMission, setInMission */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HackingMission; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return inMission; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return setInMission; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return currMission; }); -/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); -/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 56); -/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); -/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! jsplumb */ 228); -/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_10__); - - - - - - - - - - - - -let inMission = false; //Flag to denote whether a mission is running -let currMission = null; -function setInMission(bool, mission) { - inMission = bool; - if (bool) { - currMission = mission; - } else { - currMission = null; - } -} - -//Keyboard shortcuts -$(document).keydown(function(e) { - if (inMission && currMission && currMission.selectedNode.length != 0) { - switch (e.keyCode) { - case 65: //a for Attack - currMission.actionButtons[0].click(); - break; - case 83: //s for Scan - currMission.actionButtons[1].click(); - break; - case 87: //w for Weaken - currMission.actionButtons[2].click(); - break; - case 70: //f for Fortify - currMission.actionButtons[3].click(); - break; - case 82: //r for Overflow - currMission.actionButtons[4].click(); - break; - case 68: //d for Detach connection - currMission.actionButtons[5].click(); - break; - default: - break; - } - } -}); - -let NodeTypes = { - Core: "CPU Core Node", //All actions available - Firewall: "Firewall Node", //No actions available - Database: "Database Node", //No actions available - Spam: "Spam Node", //No actions Available - Transfer: "Transfer Node", //Can Weaken, Scan, Fortify and Overflow - Shield: "Shield Node" //Can Fortify -} - -let NodeActions = { - Attack: "Attacking", //Damaged based on attack stat + hacking level + opp def - Scan: "Scanning", //-Def for target, affected by attack and hacking level - Weaken: "Weakening", //-Attack for target, affected by attack and hacking level - Fortify: "Fortifying", //+Defense for Node, affected by hacking level - Overflow: "Overflowing", //+Attack but -Defense for Node, affected by hacking level -} - -function Node(type, stats) { - this.type = type; - this.atk = stats.atk ? stats.atk : 0; - this.def = stats.def ? stats.def : 0; - this.hp = stats.hp ? stats.hp : 0; - this.maxhp = this.hp; - this.plyrCtrl = false; - this.enmyCtrl = false; - this.pos = [0, 0]; //x, y - this.el = null; //Holds the Node's DOM element - this.action = null; - this.targetedCount = 0; //Count of how many connections this node is the target of - - //Holds the JsPlumb Connection object for this Node, - //where this Node is the Source (since each Node - //can only have 1 outgoing Connection) - this.conn = null; -} - -Node.prototype.setPosition = function(x, y) { - this.pos = [x, y]; -} - -Node.prototype.setControlledByPlayer = function() { - this.plyrCtrl = true; - this.enmyCtrl = false; - if (this.el) { - this.el.classList.remove("hack-mission-enemy-node"); - this.el.classList.add("hack-mission-player-node"); - } -} - -Node.prototype.setControlledByEnemy = function() { - this.plyrCtrl = false; - this.enmyCtrl = true; - if (this.el) { - this.el.classList.remove("hack-mission-player-node"); - this.el.classList.add("hack-mission-enemy-node"); - } -} - -//Sets this node to be the active node -Node.prototype.select = function(actionButtons) { - if (this.enmyCtrl) {return;} - this.el.classList.add("hack-mission-player-node-active"); - - //Make all buttons inactive - for (var i = 0; i < actionButtons.length; ++i) { - actionButtons[i].classList.remove("a-link-button"); - actionButtons[i].classList.add("a-link-button-inactive"); - } - - switch(this.type) { - case NodeTypes.Core: - //All buttons active - for (var i = 0; i < actionButtons.length; ++i) { - actionButtons[i].classList.remove("a-link-button-inactive"); - actionButtons[i].classList.add("a-link-button"); - } - break; - case NodeTypes.Transfer: - actionButtons[1].classList.remove("a-link-button-inactive"); - actionButtons[1].classList.add("a-link-button"); - actionButtons[2].classList.remove("a-link-button-inactive"); - actionButtons[2].classList.add("a-link-button"); - actionButtons[3].classList.remove("a-link-button-inactive"); - actionButtons[3].classList.add("a-link-button"); - actionButtons[4].classList.remove("a-link-button-inactive"); - actionButtons[4].classList.add("a-link-button"); - actionButtons[5].classList.remove("a-link-button-inactive"); - actionButtons[5].classList.add("a-link-button"); - break; - case NodeTypes.Shield: - case NodeTypes.Firewall: - actionButtons[3].classList.remove("a-link-button-inactive"); - actionButtons[3].classList.add("a-link-button"); - break; - default: - break; - } -} - -Node.prototype.deselect = function(actionButtons) { - this.el.classList.remove("hack-mission-player-node-active"); - for (var i = 0; i < actionButtons.length; ++i) { - actionButtons[i].classList.remove("a-link-button"); - actionButtons[i].classList.add("a-link-button-inactive"); - } -} - - -Node.prototype.untarget = function() { - if (this.targetedCount === 0) { - console.log("WARN: Node " + this.el.id + " is being 'untargeted' when it has no target count"); - return; - } - --this.targetedCount; -} - -//Hacking mission instance -//Takes in the reputation of the Faction for which the mission is -//being conducted -function HackingMission(rep, fac) { - this.faction = fac; - - this.started = false; - this.time = 180000; //5 minutes to start, milliseconds - - this.playerCores = []; - this.playerNodes = []; //Non-core nodes - this.playerAtk = 0; - this.playerDef = 0; - - this.enemyCores = []; - this.enemyDatabases = []; - this.enemyNodes = []; //Non-core nodes - this.enemyAtk = 0; - this.enemyDef = 0; - - this.miscNodes = []; - - this.selectedNode = []; //Which of the player's nodes are currently selected - - this.actionButtons = []; //DOM buttons for actions - - this.availablePositions = []; - for (var r = 0; r < 8; ++r) { - for (var c = 0; c < 8; ++c) { - this.availablePositions.push([r, c]); - } - } - - this.map = []; - for (var i = 0; i < 8; ++i) { - this.map.push([null, null, null, null, null, null, null, null]); - } - - this.jsplumbinstance = null; - - this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionRepToDiffConversion + 1; - console.log("difficulty: " + this.difficulty); - this.reward = 250 + (rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionRepToRewardConversion); -} - -HackingMission.prototype.init = function() { - //Create Header DOM - this.createPageDom(); - - //Create player starting nodes - var home = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].getHomeComputer() - for (var i = 0; i < home.cpuCores; ++i) { - var stats = { - atk: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 7.5) + 30, - def: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 20), - hp: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 4), - }; - this.playerCores.push(new Node(NodeTypes.Core, stats)); - this.playerCores[i].setControlledByPlayer(); - this.setNodePosition(this.playerCores[i], i, 0); - this.removeAvailablePosition(i, 0); - } - - //Randomly generate enemy nodes (CPU and Firewall) based on difficulty - var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4))); - var numFirewalls = Math.min(20, - Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(Math.round(this.difficulty/3), Math.round(this.difficulty/3) + 1)); - var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(1, Math.round(this.difficulty / 3) + 1)); - var totalNodes = numNodes + numFirewalls + numDatabases; - var xlimit = 7 - Math.floor(totalNodes / 8); - var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__["addOffset"])(0.8 + (this.difficulty / 5), 10); - for (var i = 0; i < numNodes; ++i) { - var stats = { - atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(80, 86), - def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(5, 10), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(210, 230) - } - this.enemyCores.push(new Node(NodeTypes.Core, stats)); - this.enemyCores[i].setControlledByEnemy(); - this.setNodeRandomPosition(this.enemyCores[i], xlimit); - } - for (var i = 0; i < numFirewalls; ++i) { - var stats = { - atk: 0, - def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(10, 20), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(275, 300) - } - this.enemyNodes.push(new Node(NodeTypes.Firewall, stats)); - this.enemyNodes[i].setControlledByEnemy(); - this.setNodeRandomPosition(this.enemyNodes[i], xlimit); - } - for (var i = 0; i < numDatabases; ++i) { - var stats = { - atk: 0, - def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(30, 55), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(210, 275) - } - var node = new Node(NodeTypes.Database, stats); - node.setControlledByEnemy(); - this.setNodeRandomPosition(node, xlimit); - this.enemyDatabases.push(node); - } - this.calculateDefenses(); - this.calculateAttacks(); - this.createMap(); -} - -HackingMission.prototype.createPageDom = function() { - var container = document.getElementById("mission-container"); - - var favorMult = 1 + (this.faction.favor / 100); - var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult * favorMult; - var headerText = document.createElement("p"); - headerText.innerHTML = "You are about to start a hacking mission! You will gain " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(gain, 3) + " faction reputation with " + this.faction.name + - " if you win. For more information " + - "about how hacking missions work, click one of the guide links " + - "below (one opens up an in-game guide and the other opens up " + - "the guide from the wiki). Click the 'Start' button to begin."; - headerText.style.display = "block"; - headerText.classList.add("hack-mission-header-element"); - headerText.style.width = "80%"; - - var inGameGuideBtn = document.createElement("a"); - inGameGuideBtn.innerText = "How to Play"; - inGameGuideBtn.classList.add("a-link-button"); - inGameGuideBtn.style.display = "inline-block"; - inGameGuideBtn.classList.add("hack-mission-header-element"); - inGameGuideBtn.addEventListener("click", function() { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionHowToPlay); - return false; - }); - - var wikiGuideBtn = document.createElement("a"); - wikiGuideBtn.innerText = "Wiki Guide"; - wikiGuideBtn.classList.add("a-link-button"); - wikiGuideBtn.style.display = "inline-block"; - wikiGuideBtn.classList.add("hack-mission-header-element"); - wikiGuideBtn.target = "_blank"; - //TODO Add link to wiki page wikiGuideBtn.href = - - - //Start button will get replaced with forfeit when game is started - var startBtn = document.createElement("a"); - startBtn.innerHTML = "Start"; - startBtn.setAttribute("id", "hack-mission-start-btn"); - startBtn.classList.add("a-link-button"); - startBtn.classList.add("hack-mission-header-element"); - startBtn.style.display = "inline-block"; - startBtn.addEventListener("click", ()=>{ - this.start(); - return false; - }); - - var forfeitMission = document.createElement("a"); - forfeitMission.innerHTML = "Forfeit Mission (Exit)"; - forfeitMission.classList.add("a-link-button"); - forfeitMission.classList.add("hack-mission-header-element"); - forfeitMission.style.display = "inline-block"; - forfeitMission.addEventListener("click", ()=> { - this.finishMission(false); - return false; - }); - - var timer = document.createElement("p"); - timer.setAttribute("id", "hacking-mission-timer"); - timer.style.display = "inline-block"; - timer.style.margin = "6px"; - - //Create Action Buttons (Attack/Scan/Weaken/ etc...) - var actionsContainer = document.createElement("span"); - actionsContainer.style.display = "block"; - actionsContainer.classList.add("hack-mission-action-buttons-container"); - for (var i = 0; i < 6; ++i) { - this.actionButtons.push(document.createElement("a")); - this.actionButtons[i].style.display = "inline-block"; - this.actionButtons[i].classList.add("a-link-button-inactive"); //Disabled at start - this.actionButtons[i].classList.add("tooltip"); //Disabled at start - this.actionButtons[i].classList.add("hack-mission-header-element"); - actionsContainer.appendChild(this.actionButtons[i]); - } - this.actionButtons[0].innerText = "Attack(a)"; - var atkTooltip = document.createElement("span"); - atkTooltip.classList.add("tooltiptexthigh"); - 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."; - this.actionButtons[0].appendChild(atkTooltip); - this.actionButtons[1].innerText = "Scan(s)"; - var scanTooltip = document.createElement("span"); - scanTooltip.classList.add("tooltiptexthigh"); - 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."; - this.actionButtons[1].appendChild(scanTooltip); - this.actionButtons[2].innerText = "Weaken(w)"; - var WeakenTooltip = document.createElement("span"); - WeakenTooltip.classList.add("tooltiptexthigh"); - 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."; - this.actionButtons[2].appendChild(WeakenTooltip); - this.actionButtons[3].innerText = "Fortify(f)"; - var fortifyTooltip = document.createElement("span"); - fortifyTooltip.classList.add("tooltiptexthigh"); - fortifyTooltip.innerText = "Raises this node's Defense level. The effectiveness of this depends on " + - "your hacking level"; - this.actionButtons[3].appendChild(fortifyTooltip); - this.actionButtons[4].innerText = "Overflow(r)"; - var overflowTooltip = document.createElement("span"); - overflowTooltip.classList.add("tooltiptexthigh"); - overflowTooltip.innerText = "Raises this node's Attack level but lowers its Defense level. The effectiveness " + - "of this depends on your hacking level."; - this.actionButtons[4].appendChild(overflowTooltip); - this.actionButtons[5].innerText = "Drop Connection(d)"; - var dropconnTooltip = document.createElement("span"); - dropconnTooltip.classList.add("tooltiptexthigh"); - 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."; - this.actionButtons[5].appendChild(dropconnTooltip); - - //Player/enemy defense displays will be in action container - var playerStats = document.createElement("p"); - var enemyStats = document.createElement("p"); - playerStats.style.display = "inline-block"; - enemyStats.style.display = "inline-block"; - playerStats.style.color = "#00ccff"; - enemyStats.style.color = "red"; - playerStats.style.margin = "4px"; - enemyStats.style.margin = "4px"; - playerStats.setAttribute("id", "hacking-mission-player-stats"); - enemyStats.setAttribute("id", "hacking-mission-enemy-stats"); - actionsContainer.appendChild(playerStats); - actionsContainer.appendChild(enemyStats); - - //Set Action Button event listeners - this.actionButtons[0].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - if (this.selectedNode[0].type !== NodeTypes.Core) {return;} - this.setActionButtonsActive(this.selectedNode[0].type); - this.setActionButton(NodeActions.Attack, false); //Set attack button inactive - this.selectedNode.forEach(function(node){ - node.action = NodeActions.Attack; - }); - }); - - this.actionButtons[1].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - var nodeType = this.selectedNode[0].type; //In a multiselect, every Node will have the same type - if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} - this.setActionButtonsActive(nodeType); - this.setActionButton(NodeActions.Scan, false); //Set scan button inactive - this.selectedNode.forEach(function(node){ - node.action = NodeActions.Scan; - }); - }); - - this.actionButtons[2].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - var nodeType = this.selectedNode[0].type; //In a multiselect, every Node will have the same type - if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} - this.setActionButtonsActive(nodeType); - this.setActionButton(NodeActions.Weaken, false); //Set Weaken button inactive - this.selectedNode.forEach(function(node){ - node.action = NodeActions.Weaken; - }); - }); - - this.actionButtons[3].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - this.setActionButtonsActive(this.selectedNode[0].type); - this.setActionButton(NodeActions.Fortify, false); //Set Fortify button inactive - this.selectedNode.forEach(function(node){ - node.action = NodeActions.Fortify; - }); - }); - - this.actionButtons[4].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - var nodeType = this.selectedNode[0].type; - if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} - this.setActionButtonsActive(nodeType); - this.setActionButton(NodeActions.Overflow, false); //Set Overflow button inactive - this.selectedNode.forEach(function(node){ - node.action = NodeActions.Overflow; - }); - }); - - this.actionButtons[5].addEventListener("click", ()=>{ - if (!(this.selectedNode.length > 0)) { - console.log("ERR: Pressing Action button without selected node"); - return; - } - this.selectedNode.forEach(function(node){ - if (node.conn) { - var endpoints = node.conn.endpoints; - endpoints[0].detachFrom(endpoints[1]); - } - node.action = NodeActions.Fortify; - }); - // if (this.selectedNode.conn) { - // var endpoints = this.selectedNode.conn.endpoints; - // endpoints[0].detachFrom(endpoints[1]); - // } - }) - - var timeDisplay = document.createElement("p"); - - container.appendChild(headerText); - container.appendChild(inGameGuideBtn); - container.appendChild(wikiGuideBtn); - container.appendChild(startBtn); - container.appendChild(forfeitMission); - container.appendChild(timer); - container.appendChild(actionsContainer); - container.appendChild(timeDisplay); -} - -HackingMission.prototype.setActionButtonsInactive = function() { - for (var i = 0; i < this.actionButtons.length; ++i) { - this.actionButtons[i].classList.remove("a-link-button"); - this.actionButtons[i].classList.add("a-link-button-inactive"); - } -} - -HackingMission.prototype.setActionButtonsActive = function(nodeType=null) { - for (var i = 0; i < this.actionButtons.length; ++i) { - this.actionButtons[i].classList.add("a-link-button"); - this.actionButtons[i].classList.remove("a-link-button-inactive"); - } - - //For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled - //0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn - if (nodeType) { - switch (nodeType) { - case NodeTypes.Firewall: - case NodeTypes.Shield: - this.actionButtons[0].classList.remove("a-link-button"); - this.actionButtons[0].classList.add("a-link-button-inactive"); - this.actionButtons[1].classList.remove("a-link-button"); - this.actionButtons[1].classList.add("a-link-button-inactive"); - this.actionButtons[2].classList.remove("a-link-button"); - this.actionButtons[2].classList.add("a-link-button-inactive"); - this.actionButtons[4].classList.remove("a-link-button"); - this.actionButtons[4].classList.add("a-link-button-inactive"); - this.actionButtons[5].classList.remove("a-link-button"); - this.actionButtons[5].classList.add("a-link-button-inactive"); - break; - case NodeTypes.Transfer: - this.actionButtons[0].classList.remove("a-link-button"); - this.actionButtons[0].classList.add("a-link-button-inactive"); - break; - default: - break; - } - } -} - -//True for active, false for inactive -HackingMission.prototype.setActionButton = function(i, active=true) { - if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__["isString"])(i)) { - switch (i) { - case NodeActions.Attack: - i = 0; - break; - case NodeActions.Scan: - i = 1; - break; - case NodeActions.Weaken: - i = 2; - break; - case NodeActions.Fortify: - i = 3; - break; - case NodeActions.Overflow: - default: - i = 4; - break; - } - } - if (active) { - this.actionButtons[i].classList.remove("a-link-button-inactive"); - this.actionButtons[i].classList.add("a-link-button"); - } else { - this.actionButtons[i].classList.remove("a-link-button"); - this.actionButtons[i].classList.add("a-link-button-inactive"); - } - -} - -HackingMission.prototype.calculateAttacks = function() { - var total = 0; - for (var i = 0; i < this.playerCores.length; ++i) { - total += this.playerCores[i].atk; - } - for (var i = 0; i < this.playerNodes.length; ++i) { - total += this.playerNodes[i].atk; - } - this.playerAtk = total; - document.getElementById("hacking-mission-player-stats").innerHTML = - "Player Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerAtk, 1) + "
" + - "Player Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerDef, 1); - total = 0; - for (var i = 0; i < this.enemyCores.length; ++i) { - total += this.enemyCores[i].atk; - } - for (var i = 0; i < this.enemyDatabases.length; ++i) { - total += this.enemyDatabases[i].atk; - } - for (var i = 0; i < this.enemyNodes.length; ++i) { - total += this.enemyNodes[i].atk; - } - this.enemyAtk = total; - document.getElementById("hacking-mission-enemy-stats").innerHTML = - "Enemy Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyAtk, 1) + "
" + - "Enemy Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyDef, 1); -} - -HackingMission.prototype.calculateDefenses = function() { - var total = 0; - for (var i = 0; i < this.playerCores.length; ++i) { - total += this.playerCores[i].def; - } - for (var i = 0; i < this.playerNodes.length; ++i) { - total += this.playerNodes[i].def; - } - this.playerDef = total; - document.getElementById("hacking-mission-player-stats").innerHTML = - "Player Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerAtk, 1) + "
" + - "Player Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerDef, 1); - total = 0; - for (var i = 0; i < this.enemyCores.length; ++i) { - total += this.enemyCores[i].def; - } - for (var i = 0; i < this.enemyDatabases.length; ++i) { - total += this.enemyDatabases[i].def; - } - for (var i = 0; i < this.enemyNodes.length; ++i) { - total += this.enemyNodes[i].def; - } - this.enemyDef = total; - document.getElementById("hacking-mission-enemy-stats").innerHTML = - "Enemy Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyAtk, 1) + "
" + - "Enemy Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyDef, 1); -} - -HackingMission.prototype.removeAvailablePosition = function(x, y) { - for (var i = 0; i < this.availablePositions.length; ++i) { - if (this.availablePositions[i][0] === x && - this.availablePositions[i][1] === y) { - this.availablePositions.splice(i, 1); - return; - } - } - console.log("WARNING: removeAvailablePosition() did not remove " + x + ", " + y); -} - -HackingMission.prototype.setNodePosition = function(nodeObj, x, y) { - if (!(nodeObj instanceof Node)) { - console.log("WARNING: Non-Node object passed into setNodePOsition"); - return; - } - if (isNaN(x) || isNaN(y)) { - console.log("ERR: Invalid values passed as x and y for setNodePosition"); - console.log(x); - console.log(y); - return; - } - nodeObj.pos = [x, y]; - this.map[x][y] = nodeObj; -} - -HackingMission.prototype.setNodeRandomPosition = function(nodeObj, xlimit=0) { - var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.availablePositions.length - 1); - if (this.availablePositions[i][1] < xlimit) { - //Recurse if not within limit - return this.setNodeRandomPosition(nodeObj, xlimit); - } - var pos = this.availablePositions.splice(i, 1); - pos = pos[0]; - this.setNodePosition(nodeObj, pos[0], pos[1]); -} - -HackingMission.prototype.createMap = function() { - //Use a grid - var map = document.createElement("div"); - map.classList.add("hack-mission-grid"); - map.setAttribute("id", "hacking-mission-map"); - document.getElementById("mission-container").appendChild(map); - - //Create random Nodes for every space in the map that - //hasn't been filled yet. The stats of each Node will be based on - //the player/enemy attack - var averageAttack = (this.playerAtk + this.enemyAtk) / 2; - for (var x = 0; x < 8; ++x) { - for (var y = 0; y < 8; ++y) { - if (!(this.map[x][y] instanceof Node)) { - var node, type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, 2); - var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__["addOffset"])(0.85 + (this.difficulty / 2), 15); - switch (type) { - case 0: //Spam - var stats = { - atk: 0, - def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(15, 45), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(200, 225) - } - node = new Node(NodeTypes.Spam, stats); - break; - case 1: //Transfer - var stats = { - atk: 0, - def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(15, 45), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(250, 275) - } - node = new Node(NodeTypes.Transfer, stats); - break; - case 2: //Shield - default: - var stats = { - atk: 0, - def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(30, 70), - hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(300, 320) - } - node = new Node(NodeTypes.Shield, stats); - break; - } - this.setNodePosition(node, x, y); - this.removeAvailablePosition(x, y); - this.miscNodes.push(node); - } - } - } - - //Create DOM elements in order - for (var r = 0; r < 8; ++r) { - for (var c = 0; c < 8; ++c) { - this.createNodeDomElement(this.map[r][c]); - } - } - - //Configure all Player CPUS - for (var i = 0; i < this.playerCores.length; ++i) { - console.log("Configuring Player Node: " + this.playerCores[i].el.id); - this.configurePlayerNodeElement(this.playerCores[i].el); - } -} - -HackingMission.prototype.createNodeDomElement = function(nodeObj) { - var nodeDiv = document.createElement("a"), txtEl = document.createElement('p'); - nodeObj.el = nodeDiv; - - //Set the node element's id based on its coordinates - var id = "hacking-mission-node-" + nodeObj.pos[0] + "-" + nodeObj.pos[1]; - nodeDiv.setAttribute("id", id); - txtEl.setAttribute("id", id + "-txt"); - - //Set node classes for owner - nodeDiv.classList.add("hack-mission-node"); - if (nodeObj.plyrCtrl) { - nodeDiv.classList.add("hack-mission-player-node"); - } else if (nodeObj.enmyCtrl) { - nodeDiv.classList.add("hack-mission-enemy-node"); - } - - //Set node classes based on type - var txt; - switch (nodeObj.type) { - case NodeTypes.Core: - txt = "CPU Core
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-cpu-node"); - break; - case NodeTypes.Firewall: - txt = "Firewall
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-firewall-node"); - break; - case NodeTypes.Database: - txt = "Database
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-database-node"); - break; - case NodeTypes.Spam: - txt = "Spam
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-spam-node"); - break; - case NodeTypes.Transfer: - txt = "Transfer
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-transfer-node"); - break; - case NodeTypes.Shield: - default: - txt = "Shield
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - nodeDiv.classList.add("hack-mission-shield-node"); - break; - } - - txt += "
Atk: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.atk, 1) + - "
Def: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.def, 1); - txtEl.innerHTML = txt; - - nodeDiv.appendChild(txtEl); - document.getElementById("hacking-mission-map").appendChild(nodeDiv); -} - -HackingMission.prototype.updateNodeDomElement = function(nodeObj) { - if (nodeObj.el == null) { - console.log("ERR: Calling updateNodeDomElement on a Node without an element"); - return; - } - - var id = "hacking-mission-node-" + nodeObj.pos[0] + "-" + nodeObj.pos[1]; - var nodeDiv = document.getElementById(id), txtEl = document.getElementById(id + "-txt"); - - //Set node classes based on type - var txt; - switch (nodeObj.type) { - case NodeTypes.Core: - txt = "CPU Core
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - case NodeTypes.Firewall: - txt = "Firewall
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - case NodeTypes.Database: - txt = "Database
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - case NodeTypes.Spam: - txt = "Spam
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - case NodeTypes.Transfer: - txt = "Transfer
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - case NodeTypes.Shield: - default: - txt = "Shield
" + "HP: " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); - break; - } - - txt += "
Atk: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.atk, 1) + - "
Def: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.def, 1); - if (nodeObj.action) { - txt += "
" + nodeObj.action; - } - txtEl.innerHTML = txt; -} - -//Gets a Node DOM element's corresponding Node object using its -//element id. Function accepts either the DOM element object or the ID as -//an argument -HackingMission.prototype.getNodeFromElement = function(el) { - var id; - if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__["isString"])(el)) { - id = el; - } else { - id = el.id; - } - id = id.replace("hacking-mission-node-", ""); - var res = id.split('-'); - if (res.length != 2) { - console.log("ERROR Parsing Hacking Mission Node Id. Could not find coordinates"); - return null; - } - var x = res[0], y = res[1]; - if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) { - console.log("ERROR: Unexpected values for x and y: " + x + ", " + y); - return null; - } - return this.map[x][y]; -} - -function selectNode(hackMissionInst, el) { - var nodeObj = hackMissionInst.getNodeFromElement(el); - if (nodeObj == null) {console.log("Error getting Node object");} - if (!nodeObj.plyrCtrl) {return;} - - clearAllSelectedNodes(hackMissionInst); - nodeObj.select(hackMissionInst.actionButtons); - hackMissionInst.selectedNode.push(nodeObj); -} - -function multiselectNode(hackMissionInst, el) { - var nodeObj = hackMissionInst.getNodeFromElement(el); - if (nodeObj == null) {console.log("ERROR: Getting Node Object in multiselectNode()");} - if (!nodeObj.plyrCtrl) {return;} - - clearAllSelectedNodes(hackMissionInst); - var type = nodeObj.type; - if (type === NodeTypes.Core) { - hackMissionInst.playerCores.forEach(function(node) { - node.select(hackMissionInst.actionButtons); - hackMissionInst.selectedNode.push(node); - }); - } else { - hackMissionInst.playerNodes.forEach(function(node) { - if (node.type === type) { - node.select(hackMissionInst.actionButtons); - hackMissionInst.selectedNode.push(node); - } - }); - } -} - -function clearAllSelectedNodes(hackMissionInst) { - if (hackMissionInst.selectedNode.length > 0) { - hackMissionInst.selectedNode.forEach(function(node){ - node.deselect(hackMissionInst.actionButtons); - }); - hackMissionInst.selectedNode.length = 0; - } -} - -//Configures a DOM element representing a player-owned node to -//be selectable and actionable -//Note: Does NOT change its css class. This is handled by Node.setControlledBy... -HackingMission.prototype.configurePlayerNodeElement = function(el) { - var nodeObj = this.getNodeFromElement(el); - if (nodeObj == null) {console.log("Error getting Node object");} - - //Add event listener - var self = this; - function selectNodeWrapper() { - selectNode(self, el); - } - el.addEventListener("click", selectNodeWrapper); - - function multiselectNodeWrapper() { - multiselectNode(self, el); - } - el.addEventListener("dblclick", multiselectNodeWrapper); - - - if (el.firstChild) { - el.firstChild.addEventListener("click", selectNodeWrapper); - } -} - -//Configures a DOM element representing an enemy-node by removing -//any event listeners -HackingMission.prototype.configureEnemyNodeElement = function(el) { - //Deselect node if it was the selected node - var nodeObj = this.getNodeFromElement(el); - for (var i = 0; i < this.selectedNode.length; ++i) { - if (this.selectedNode[i] == nodeObj) { - nodeObj.deselect(this.actionButtons); - this.selectedNode.splice(i, 1); - break; - } - } -} - -//Returns bool indicating whether a node is reachable by player -//by checking if any of the adjacent nodes are owned by the player -HackingMission.prototype.nodeReachable = function(node) { - var x = node.pos[0], y = node.pos[1]; - if (x > 0 && this.map[x-1][y].plyrCtrl) {return true;} - if (x < 7 && this.map[x+1][y].plyrCtrl) {return true;} - if (y > 0 && this.map[x][y-1].plyrCtrl) {return true;} - if (y < 7 && this.map[x][y+1].plyrCtrl) {return true;} - return false; -} - -HackingMission.prototype.nodeReachableByEnemy = function(node) { - if (node == null) {return false;} - var x = node.pos[0], y = node.pos[1]; - if (x > 0 && this.map[x-1][y].enmyCtrl) {return true;} - if (x < 7 && this.map[x+1][y].enmyCtrl) {return true;} - if (y > 0 && this.map[x][y-1].enmyCtrl) {return true;} - if (y < 7 && this.map[x][y+1].enmyCtrl) {return true;} - return false; -} - -HackingMission.prototype.start = function() { - this.started = true; - this.initJsPlumb(); - var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__["clearEventListeners"])("hack-mission-start-btn"); - startBtn.classList.remove("a-link-button"); - startBtn.classList.add("a-link-button-inactive"); -} - -HackingMission.prototype.initJsPlumb = function() { - var instance = jsPlumb.getInstance({ - DragOptions:{cursor:"pointer", zIndex:2000}, - PaintStyle: { - gradient: { stops: [ - [ 0, "#FFFFFF" ], - [ 1, "#FFFFFF" ] - ] }, - stroke: "#FFFFFF", - strokeWidth: 8 - }, - }); - - this.jsplumbinstance = instance; - - //All player cores are sources - for (var i = 0; i < this.playerCores.length; ++i) { - instance.makeSource(this.playerCores[i].el, { - deleteEndpointsOnEmpty:true, - maxConnections:1, - anchor:"Continuous", - connector:"Flowchart" - }); - } - - //Everything else is a target - for (var i = 0; i < this.enemyCores.length; ++i) { - instance.makeTarget(this.enemyCores[i].el, { - maxConnections:-1, - anchor:"Continuous", - connector:"Flowchart" - }); - } - for (var i = 0; i < this.enemyDatabases.length; ++i) { - instance.makeTarget(this.enemyDatabases[i].el, { - maxConnections:-1, - anchor:"Continuous", - connector:["Flowchart"] - }); - } - for (var i = 0; i < this.enemyNodes.length; ++i) { - instance.makeTarget(this.enemyNodes[i].el, { - maxConnections:-1, - anchor:"Continuous", - connector:"Flowchart" - }); - } - for (var i = 0; i < this.miscNodes.length; ++i) { - instance.makeTarget(this.miscNodes[i].el, { - maxConnections:-1, - anchor:"Continuous", - connector:"Flowchart" - }); - } - - //Clicking a connection drops it - instance.bind("click", function(conn, originalEvent) { - var endpoints = conn.endpoints; - endpoints[0].detachFrom(endpoints[1]); - }); - - //Connection events - instance.bind("connection", (info)=>{ - var targetNode = this.getNodeFromElement(info.target); - - //Do not detach for enemy nodes - var thisNode = this.getNodeFromElement(info.source); - if (thisNode.enmyCtrl) {return;} - - //If the node is not reachable, drop the connection - if (!this.nodeReachable(targetNode)) { - info.sourceEndpoint.detachFrom(info.targetEndpoint); - return; - } - - var sourceNode = this.getNodeFromElement(info.source); - sourceNode.conn = info.connection; - var targetNode = this.getNodeFromElement(info.target); - ++targetNode.targetedCount; - }); - - //Detach Connection events - instance.bind("connectionDetached", (info, originalEvent)=>{ - var sourceNode = this.getNodeFromElement(info.source); - sourceNode.conn = null; - var targetNode = this.getNodeFromElement(info.target); - targetNode.untarget(); - }); - -} - -//Drops all connections where the specified node is the source -HackingMission.prototype.dropAllConnectionsFromNode = function(node) { - var allConns = this.jsplumbinstance.getAllConnections(); - for (var i = allConns.length-1; i >= 0; --i) { - if (allConns[i].source == node.el) { - allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]); - } - } -} - -//Drops all connections where the specified node is the target -HackingMission.prototype.dropAllConnectionsToNode = function(node) { - var allConns = this.jsplumbinstance.getAllConnections(); - for (var i = allConns.length-1; i >= 0; --i) { - if (allConns[i].target == node.el) { - allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]); - } - } - node.beingTargeted = false; -} - -var storedCycles = 0; -HackingMission.prototype.process = function(numCycles=1) { - if (!this.started) {return;} - storedCycles += numCycles; - if (storedCycles < 2) {return;} //Only process every 3 cycles minimum - - var res = false; - //Process actions of all player nodes - this.playerCores.forEach((node)=>{ - res |= this.processNode(node, storedCycles); - }); - - this.playerNodes.forEach((node)=>{ - if (node.type === NodeTypes.Transfer || - node.type === NodeTypes.Shield || - node.type === NodeTypes.Firewall) { - res |= this.processNode(node, storedCycles); - } - }); - - //Process actions of all enemy nodes - this.enemyCores.forEach((node)=>{ - this.enemyAISelectAction(node); - res |= this.processNode(node, storedCycles); - }); - - this.enemyNodes.forEach((node)=>{ - if (node.type === NodeTypes.Transfer || - node.type === NodeTypes.Shield || - node.type === NodeTypes.Firewall) { - this.enemyAISelectAction(node); - res |= this.processNode(node, storedCycles); - } - }); - - //The hp of enemy databases increases slowly - this.enemyDatabases.forEach((node)=>{ - node.maxhp += (0.1 * storedCycles); - node.hp += (0.1 * storedCycles); - }); - - if (res) { - this.calculateAttacks(); - this.calculateDefenses(); - } - - //Win if all enemy databases are conquered - if (this.enemyDatabases.length === 0) { - this.finishMission(true); - return; - } - - //Lose if all your cores are gone - if (this.playerCores.length === 0) { - this.finishMission(false); - return; - } - - //Defense/hp of misc nodes increases slowly over time - this.miscNodes.forEach((node)=>{ - node.def += (0.1 * storedCycles); - node.maxhp += (0.05 * storedCycles); - node.hp += (0.1 * storedCycles); - if (node.hp > node.maxhp) {node.hp = node.maxhp;} - this.updateNodeDomElement(node); - }); - - //Update timer and check if player lost - this.time -= (storedCycles * _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"]._idleSpeed); - if (this.time <= 0) { - this.finishMission(false); - return; - } - this.updateTimer(); - - storedCycles = 0; -} - -//Returns a bool representing whether defenses need to be re-calculated -HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { - if (nodeObj.action == null) { - return; - } - - var targetNode = null, def, atk; - if (nodeObj.conn) { - if (nodeObj.conn.target != null) { - targetNode = this.getNodeFromElement(nodeObj.conn.target); - } else { - targetNode = this.getNodeFromElement(nodeObj.conn.targetId); - } - - if (targetNode == null) { - //Player is in the middle of dragging the connection, - //so the target node is null. Do nothing here - } else if (targetNode.plyrCtrl) { - def = this.playerDef; - atk = this.enemyAtk; - } else if (targetNode.enmyCtrl) { - def = this.enemyDef; - atk = this.playerAtk; - } else { //Misc Node - def = targetNode.def; - nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk; - } - } - - //Calculations are per second, so divide everything by 5 - var calcStats = false, plyr = nodeObj.plyrCtrl; - var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionDifficultyToHacking; - switch(nodeObj.action) { - case NodeActions.Attack: - if (targetNode == null) {break;} - if (nodeObj.conn == null) {break;} - var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); - targetNode.hp -= (dmg/5 * numCycles); - break; - case NodeActions.Scan: - if (targetNode == null) {break;} - if (nodeObj.conn == null) {break;} - var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); - targetNode.def -= (eff/5 * numCycles); - calcStats = true; - break; - case NodeActions.Weaken: - if (targetNode == null) {break;} - if (nodeObj.conn == null) {break;} - var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); - targetNode.atk -= (eff/5 * numCycles); - calcStats = true; - break; - case NodeActions.Fortify: - var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill); - nodeObj.def += (eff/5 * numCycles); - calcStats = true; - break; - case NodeActions.Overflow: - var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill); - if (nodeObj.def < eff) {break;} - nodeObj.def -= (eff/5 * numCycles); - nodeObj.atk += (eff/5 * numCycles); - calcStats = true; - break; - default: - console.log("ERR: Invalid Node Action: " + nodeObj.action); - break; - } - - //Stats can't go below 0 - if (nodeObj.atk < 0) {nodeObj.atk = 0;} - if (nodeObj.def < 0) {nodeObj.def = 0;} - if (targetNode && targetNode.atk < 0) {targetNode.atk = 0;} - if (targetNode && targetNode.def < 0) {targetNode.def = 0;} - - //Conquering a node - if (targetNode && targetNode.hp <= 0) { - var conqueredByPlayer = nodeObj.plyrCtrl; - targetNode.hp = targetNode.maxhp; - targetNode.action = null; - targetNode.conn = null; - if (this.selectedNode == targetNode) { - targetNode.deselect(this.actionButtons); - } - - //The conquered node has its stats reduced - targetNode.atk /= 2; - targetNode.def /= 3.5; - - //Flag for whether the target node was a misc node - var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; - - //Remove all connections from Node - this.dropAllConnectionsToNode(targetNode); - this.dropAllConnectionsFromNode(targetNode); - - //Changes the css class and turn the node into a JsPlumb Source/Target - if (conqueredByPlayer) { - targetNode.setControlledByPlayer(); - this.jsplumbinstance.unmakeTarget(targetNode.el); - this.jsplumbinstance.makeSource(targetNode.el, { - deleteEndpointsOnEmpty:true, - maxConnections:1, - anchor:"Continuous", - connector:"Flowchart" - }); - } else { - targetNode.setControlledByEnemy(); - nodeObj.conn = null; //Clear connection - this.jsplumbinstance.unmakeSource(targetNode.el); - this.jsplumbinstance.makeTarget(targetNode.el, { - maxConnections:-1, - anchor:"Continuous", - connector:["Flowchart"] - }); - } - - calcStats = true; - - //Helper function to swap nodes between the respective enemyNodes/playerNodes arrays - function swapNodes(orig, dest, targetNode) { - for (var i = 0; i < orig.length; ++i) { - if (orig[i] == targetNode) { - var node = orig.splice(i, 1); - node = node[0]; - dest.push(node); - break; - } - } - } - - switch(targetNode.type) { - case NodeTypes.Core: - if (conqueredByPlayer) { - swapNodes(this.enemyCores, this.playerCores, targetNode); - this.configurePlayerNodeElement(targetNode.el); - } else { - swapNodes(this.playerCores, this.enemyCores, targetNode); - this.configureEnemyNodeElement(targetNode.el); - } - break; - case NodeTypes.Firewall: - if (conqueredByPlayer) { - swapNodes(this.enemyNodes, this.playerNodes, targetNode); - } else { - swapNodes(this.playerNodes, this.enemyNodes, targetNode); - this.configureEnemyNodeElement(targetNode.el); - } - break; - case NodeTypes.Database: - if (conqueredByPlayer) { - swapNodes(this.enemyDatabases, this.playerNodes, targetNode); - } else { - swapNodes(this.playerNodes, this.enemyDatabases, targetNode); - } - break; - case NodeTypes.Spam: - if (conqueredByPlayer) { - swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); - //Conquering spam node increases time limit - this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionSpamTimeIncrease; - } else { - swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); - } - - break; - case NodeTypes.Transfer: - //Conquering a Transfer node increases the attack of all cores by some percentages - if (conqueredByPlayer) { - swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); - this.playerCores.forEach(function(node) { - node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionTransferAttackIncrease; - }); - this.configurePlayerNodeElement(targetNode.el); - } else { - swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); - this.enemyCores.forEach(function(node) { - node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionTransferAttackIncrease; - }); - this.configureEnemyNodeElement(targetNode.el); - } - break; - case NodeTypes.Shield: - if (conqueredByPlayer) { - swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); - this.configurePlayerNodeElement(targetNode.el); - } else { - swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); - this.configureEnemyNodeElement(targetNode.el); - } - break; - } - - //If a misc node was conquered, the defense for all misc nodes increases by some fixed amount - if (isMiscNode) { //&& conqueredByPlayer) { - this.miscNodes.forEach((node)=>{ - if (node.targetedCount === 0) { - node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionMiscDefenseIncrease; - } - }); - } - } - - //Update node DOMs - this.updateNodeDomElement(nodeObj); - if (targetNode) {this.updateNodeDomElement(targetNode);} - return calcStats; -} - -//Enemy "AI" for CPU Core and Transfer Nodes -HackingMission.prototype.enemyAISelectAction = function(nodeObj) { - if (nodeObj == null) {return;} - switch(nodeObj.type) { - case NodeTypes.Core: - //Select a single RANDOM target from miscNodes and player's Nodes - //If it is reachable, it will target it. If not, no target will - //be selected for now, and the next time process() gets called this will repeat - if (nodeObj.conn == null) { - if (this.miscNodes.length === 0) { - //Randomly pick a player node and attack it if its reachable - var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.playerNodes.length-1); - var node; - if (this.playerNodes.length === 0) { - node = null; - } else { - node = this.playerNodes[rand]; - } - if (this.nodeReachableByEnemy(node)) { - //Create connection - nodeObj.conn = this.jsplumbinstance.connect({ - source:nodeObj.el, - target:node.el - }); - ++node.targetedCount; - } else { - //Randomly pick a player core and attack it if its reachable - rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.playerCores.length-1); - if (this.playerCores.length === 0) { - return; //No Misc Nodes, no player Nodes, no Player cores. Player lost - } else { - node = this.playerCores[rand]; - } - - if (this.nodeReachableByEnemy(node)) { - //Create connection - nodeObj.conn = this.jsplumbinstance.connect({ - source:nodeObj.el, - target:node.el - }); - ++node.targetedCount; - } - } - } else { - //Randomly pick a misc node and attack it if its reachable - var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.miscNodes.length-1); - var node = this.miscNodes[rand]; - if (this.nodeReachableByEnemy(node)) { - nodeObj.conn = this.jsplumbinstance.connect({ - source:nodeObj.el, - target:node.el, - }); - ++node.targetedCount; - } - } - - //If no connection was made, set the Core to Fortify - nodeObj.action = NodeActions.Fortify; - } else { - //If this node has a selected target - var targetNode; - if (nodeObj.conn.target) { - targetNode = this.getNodeFromElement(nodeObj.conn.target); - } else { - targetNode = this.getNodeFromElement(nodeObj.conn.targetId); - } - if (targetNode == null) { - console.log("Error getting Target node Object in enemyAISelectAction()"); - } - - if (targetNode.def > this.enemyAtk + 15) { - if (nodeObj.def < 50) { - nodeObj.action = NodeActions.Fortify; - } else { - nodeObj.action = NodeActions.Overflow; - } - } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) { - nodeObj.action = NodeActions.Scan; - } else { - nodeObj.action = NodeActions.Attack; - } - } - break; - case NodeTypes.Transfer: - //Switch between fortifying and overflowing as necessary - if (nodeObj.def < 125) { - nodeObj.action = NodeActions.Fortify; - } else { - nodeObj.action = NodeActions.Overflow; - } - break; - case NodeTypes.Firewall: - case NodeTypes.Shield: - nodeObj.action = NodeActions.Fortify; - break; - default: - break; - } -} - -var hackEffWeightSelf = 130; //Weight for Node actions on self -var hackEffWeightTarget = 25; //Weight for Node Actions against Target -var hackEffWeightAttack = 80; //Weight for Attack action - -//Returns damage per cycle based on stats -HackingMission.prototype.calculateAttackDamage = function(atk, def, hacking = 0) { - return Math.max(0.55 * (atk + (hacking / hackEffWeightAttack) - def), 1); -} - -HackingMission.prototype.calculateScanEffect = function(atk, def, hacking=0) { - return Math.max(0.6 * ((atk) + hacking / hackEffWeightTarget - (def * 0.95)), 2); -} - -HackingMission.prototype.calculateWeakenEffect = function(atk, def, hacking=0) { - return Math.max((atk) + hacking / hackEffWeightTarget - (def * 0.95), 2); -} - -HackingMission.prototype.calculateFortifyEffect = function(hacking=0) { - return 0.9 * hacking / hackEffWeightSelf; -} - -HackingMission.prototype.calculateOverflowEffect = function(hacking=0) { - return 0.95 * hacking / hackEffWeightSelf; -} - -//Updates timer display -HackingMission.prototype.updateTimer = function() { - var timer = document.getElementById("hacking-mission-timer"); - - //Convert time remaining to a string of the form mm:ss - var seconds = Math.round(this.time / 1000); - var minutes = Math.trunc(seconds / 60); - seconds %= 60; - var str = ("0" + minutes).slice(-2) + ":" + ("0" + seconds).slice(-2); - timer.innerText = "Time left: " + str; -} - -//The 'win' argument is a bool for whether or not the player won -HackingMission.prototype.finishMission = function(win) { - inMission = false; - currMission = null; - - if (win) { - var favorMult = 1 + (this.faction.favor / 100); - console.log("Hacking mission base reward: " + this.reward); - console.log("favorMult: " + favorMult); - console.log("rep mult: " + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult); - var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult * favorMult; - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Mission won! You earned " + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(gain, 3) + " reputation with " + this.faction.name); - _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainIntelligenceExp(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].IntelligenceHackingMissionBaseExpGain); - this.faction.playerReputation += gain; - } else { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Mission lost/forfeited! You did not gain any faction reputation."); - } - - //Clear mission container - var container = document.getElementById("mission-container"); - while(container.firstChild) { - container.removeChild(container.firstChild); - } - - //Return to Faction page - document.getElementById("mainmenu-container").style.visibility = "visible"; - document.getElementById("character-overview-wrapper").style.visibility = "visible"; - _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent(); - Object(_Faction__WEBPACK_IMPORTED_MODULE_2__[/* displayFactionContent */ "c"])(this.faction.name); -} - - - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) - -/***/ }), -/* 47 */ /*!*************************!*\ !*** ./src/Terminal.js ***! \*************************/ @@ -31764,32 +29938,32 @@ HackingMission.prototype.finishMission = function(win) { /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CreateProgram */ 22); /* harmony import */ var _DarkWeb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DarkWeb */ 69); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Fconf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf */ 40); -/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Hacking */ 42); +/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Hacking */ 43); /* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./HelpText */ 85); /* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_HelpText__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./InteractiveTutorial */ 31); +/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./InteractiveTutorial */ 32); /* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Literature */ 70); /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Message */ 35); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./NetscriptWorker */ 24); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./RedPill */ 54); +/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./RedPill */ 58); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./SpecialServerIps */ 27); -/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TextFile */ 53); +/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TextFile */ 52); /* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_19__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_21__); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 32); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 31); /* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__); -/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 56); +/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 55); /* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_25__); @@ -31799,13 +29973,13 @@ HackingMission.prototype.finishMission = function(win) { /* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utils/LogBox */ 68); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); -/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/postToTerminal */ 6); +/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/postToTerminal */ 7); /* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__); -/* harmony import */ var autosize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! autosize */ 128); +/* harmony import */ var autosize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! autosize */ 129); /* harmony import */ var autosize__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_31__); -/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! jszip */ 127); +/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! jszip */ 128); /* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_32__); -/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! file-saver */ 126); +/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! file-saver */ 127); /* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_33__); @@ -33944,7 +32118,1650 @@ let Terminal = { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) + +/***/ }), +/* 45 */ +/*!*************************************!*\ + !*** ./src/NetscriptBladeburner.js ***! + \*************************************/ +/*! exports provided: unknownBladeburnerActionErrorMessage, unknownBladeburnerExceptionMessage, checkBladeburnerAccess */ +/*! exports used: checkBladeburnerAccess, unknownBladeburnerActionErrorMessage, unknownBladeburnerExceptionMessage */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unknownBladeburnerActionErrorMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unknownBladeburnerExceptionMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkBladeburnerAccess; }); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Bladeburner */ 29); +/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NetscriptEvaluator */ 6); + + + + +function unknownBladeburnerActionErrorMessage(functionName, actionType, actionName) { + return `ERROR: bladeburner.${functionName}() failed due to an invalid action specified. ` + + `Type: ${actionType}, Name: ${actionName}. Note that for contracts and operations, the ` + + `name of the operation is case-sensitive.`; +} + +function unknownBladeburnerExceptionMessage(functionName, err) { + return `Bladeburner.${functionName}() failed with exception: ` + err; +} + +function checkBladeburnerAccess(workerScript, functionName) { + const accessDenied = `${functionName}() failed because you do not` + + " currently have access to the Bladeburner API. This is either" + + " because you are not currently employed at the Bladeburner division" + + " or because you do not have Source-File 7"; + const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner instanceof _Bladeburner__WEBPACK_IMPORTED_MODULE_1__[/* Bladeburner */ "a"] && (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].sourceFiles.some(a=>{return a.n === 7})); + if(!hasAccess) { + throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__[/* makeRuntimeRejectMsg */ "d"])(workerScript, accessDenied); + } +} + + + + +/***/ }), +/* 46 */ +/*!*******************************************!*\ + !*** ./utils/uiHelpers/getElementById.ts ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Returns a reference to the first object with the specified value of the ID or NAME attribute, + * throwing an error if it is unable to find it. + * @param elementId The HTML ID to retrieve the element by. + * @throws {Error} When the 'elementId' cannot be found. + */ +function getElementById(elementId) { + const el = document.getElementById(elementId); + if (el === null) { + throw new Error(`Unable to find element with id '${elementId}'`); + } + return el; +} +exports.getElementById = getElementById; + + +/***/ }), +/* 47 */ +/*!*************************!*\ + !*** ./src/Missions.js ***! + \*************************/ +/*! exports provided: HackingMission, inMission, setInMission, currMission */ +/*! exports used: HackingMission, currMission, inMission, setInMission */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HackingMission; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return inMission; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return setInMission; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return currMission; }); +/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction */ 15); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); +/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 55); +/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); +/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! jsplumb */ 229); +/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + + + + + +let inMission = false; //Flag to denote whether a mission is running +let currMission = null; +function setInMission(bool, mission) { + inMission = bool; + if (bool) { + currMission = mission; + } else { + currMission = null; + } +} + +//Keyboard shortcuts +$(document).keydown(function(e) { + if (inMission && currMission && currMission.selectedNode.length != 0) { + switch (e.keyCode) { + case 65: //a for Attack + currMission.actionButtons[0].click(); + break; + case 83: //s for Scan + currMission.actionButtons[1].click(); + break; + case 87: //w for Weaken + currMission.actionButtons[2].click(); + break; + case 70: //f for Fortify + currMission.actionButtons[3].click(); + break; + case 82: //r for Overflow + currMission.actionButtons[4].click(); + break; + case 68: //d for Detach connection + currMission.actionButtons[5].click(); + break; + default: + break; + } + } +}); + +let NodeTypes = { + Core: "CPU Core Node", //All actions available + Firewall: "Firewall Node", //No actions available + Database: "Database Node", //No actions available + Spam: "Spam Node", //No actions Available + Transfer: "Transfer Node", //Can Weaken, Scan, Fortify and Overflow + Shield: "Shield Node" //Can Fortify +} + +let NodeActions = { + Attack: "Attacking", //Damaged based on attack stat + hacking level + opp def + Scan: "Scanning", //-Def for target, affected by attack and hacking level + Weaken: "Weakening", //-Attack for target, affected by attack and hacking level + Fortify: "Fortifying", //+Defense for Node, affected by hacking level + Overflow: "Overflowing", //+Attack but -Defense for Node, affected by hacking level +} + +function Node(type, stats) { + this.type = type; + this.atk = stats.atk ? stats.atk : 0; + this.def = stats.def ? stats.def : 0; + this.hp = stats.hp ? stats.hp : 0; + this.maxhp = this.hp; + this.plyrCtrl = false; + this.enmyCtrl = false; + this.pos = [0, 0]; //x, y + this.el = null; //Holds the Node's DOM element + this.action = null; + this.targetedCount = 0; //Count of how many connections this node is the target of + + //Holds the JsPlumb Connection object for this Node, + //where this Node is the Source (since each Node + //can only have 1 outgoing Connection) + this.conn = null; +} + +Node.prototype.setPosition = function(x, y) { + this.pos = [x, y]; +} + +Node.prototype.setControlledByPlayer = function() { + this.plyrCtrl = true; + this.enmyCtrl = false; + if (this.el) { + this.el.classList.remove("hack-mission-enemy-node"); + this.el.classList.add("hack-mission-player-node"); + } +} + +Node.prototype.setControlledByEnemy = function() { + this.plyrCtrl = false; + this.enmyCtrl = true; + if (this.el) { + this.el.classList.remove("hack-mission-player-node"); + this.el.classList.add("hack-mission-enemy-node"); + } +} + +//Sets this node to be the active node +Node.prototype.select = function(actionButtons) { + if (this.enmyCtrl) {return;} + this.el.classList.add("hack-mission-player-node-active"); + + //Make all buttons inactive + for (var i = 0; i < actionButtons.length; ++i) { + actionButtons[i].classList.remove("a-link-button"); + actionButtons[i].classList.add("a-link-button-inactive"); + } + + switch(this.type) { + case NodeTypes.Core: + //All buttons active + for (var i = 0; i < actionButtons.length; ++i) { + actionButtons[i].classList.remove("a-link-button-inactive"); + actionButtons[i].classList.add("a-link-button"); + } + break; + case NodeTypes.Transfer: + actionButtons[1].classList.remove("a-link-button-inactive"); + actionButtons[1].classList.add("a-link-button"); + actionButtons[2].classList.remove("a-link-button-inactive"); + actionButtons[2].classList.add("a-link-button"); + actionButtons[3].classList.remove("a-link-button-inactive"); + actionButtons[3].classList.add("a-link-button"); + actionButtons[4].classList.remove("a-link-button-inactive"); + actionButtons[4].classList.add("a-link-button"); + actionButtons[5].classList.remove("a-link-button-inactive"); + actionButtons[5].classList.add("a-link-button"); + break; + case NodeTypes.Shield: + case NodeTypes.Firewall: + actionButtons[3].classList.remove("a-link-button-inactive"); + actionButtons[3].classList.add("a-link-button"); + break; + default: + break; + } +} + +Node.prototype.deselect = function(actionButtons) { + this.el.classList.remove("hack-mission-player-node-active"); + for (var i = 0; i < actionButtons.length; ++i) { + actionButtons[i].classList.remove("a-link-button"); + actionButtons[i].classList.add("a-link-button-inactive"); + } +} + + +Node.prototype.untarget = function() { + if (this.targetedCount === 0) { + console.log("WARN: Node " + this.el.id + " is being 'untargeted' when it has no target count"); + return; + } + --this.targetedCount; +} + +//Hacking mission instance +//Takes in the reputation of the Faction for which the mission is +//being conducted +function HackingMission(rep, fac) { + this.faction = fac; + + this.started = false; + this.time = 180000; //5 minutes to start, milliseconds + + this.playerCores = []; + this.playerNodes = []; //Non-core nodes + this.playerAtk = 0; + this.playerDef = 0; + + this.enemyCores = []; + this.enemyDatabases = []; + this.enemyNodes = []; //Non-core nodes + this.enemyAtk = 0; + this.enemyDef = 0; + + this.miscNodes = []; + + this.selectedNode = []; //Which of the player's nodes are currently selected + + this.actionButtons = []; //DOM buttons for actions + + this.availablePositions = []; + for (var r = 0; r < 8; ++r) { + for (var c = 0; c < 8; ++c) { + this.availablePositions.push([r, c]); + } + } + + this.map = []; + for (var i = 0; i < 8; ++i) { + this.map.push([null, null, null, null, null, null, null, null]); + } + + this.jsplumbinstance = null; + + this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionRepToDiffConversion + 1; + console.log("difficulty: " + this.difficulty); + this.reward = 250 + (rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionRepToRewardConversion); +} + +HackingMission.prototype.init = function() { + //Create Header DOM + this.createPageDom(); + + //Create player starting nodes + var home = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].getHomeComputer() + for (var i = 0; i < home.cpuCores; ++i) { + var stats = { + atk: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 7.5) + 30, + def: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 20), + hp: (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill / 4), + }; + this.playerCores.push(new Node(NodeTypes.Core, stats)); + this.playerCores[i].setControlledByPlayer(); + this.setNodePosition(this.playerCores[i], i, 0); + this.removeAvailablePosition(i, 0); + } + + //Randomly generate enemy nodes (CPU and Firewall) based on difficulty + var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4))); + var numFirewalls = Math.min(20, + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(Math.round(this.difficulty/3), Math.round(this.difficulty/3) + 1)); + var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(1, Math.round(this.difficulty / 3) + 1)); + var totalNodes = numNodes + numFirewalls + numDatabases; + var xlimit = 7 - Math.floor(totalNodes / 8); + var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__["addOffset"])(0.8 + (this.difficulty / 5), 10); + for (var i = 0; i < numNodes; ++i) { + var stats = { + atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(80, 86), + def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(5, 10), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(210, 230) + } + this.enemyCores.push(new Node(NodeTypes.Core, stats)); + this.enemyCores[i].setControlledByEnemy(); + this.setNodeRandomPosition(this.enemyCores[i], xlimit); + } + for (var i = 0; i < numFirewalls; ++i) { + var stats = { + atk: 0, + def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(10, 20), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(275, 300) + } + this.enemyNodes.push(new Node(NodeTypes.Firewall, stats)); + this.enemyNodes[i].setControlledByEnemy(); + this.setNodeRandomPosition(this.enemyNodes[i], xlimit); + } + for (var i = 0; i < numDatabases; ++i) { + var stats = { + atk: 0, + def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(30, 55), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(210, 275) + } + var node = new Node(NodeTypes.Database, stats); + node.setControlledByEnemy(); + this.setNodeRandomPosition(node, xlimit); + this.enemyDatabases.push(node); + } + this.calculateDefenses(); + this.calculateAttacks(); + this.createMap(); +} + +HackingMission.prototype.createPageDom = function() { + var container = document.getElementById("mission-container"); + + var favorMult = 1 + (this.faction.favor / 100); + var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult * favorMult; + var headerText = document.createElement("p"); + headerText.innerHTML = "You are about to start a hacking mission! You will gain " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(gain, 3) + " faction reputation with " + this.faction.name + + " if you win. For more information " + + "about how hacking missions work, click one of the guide links " + + "below (one opens up an in-game guide and the other opens up " + + "the guide from the wiki). Click the 'Start' button to begin."; + headerText.style.display = "block"; + headerText.classList.add("hack-mission-header-element"); + headerText.style.width = "80%"; + + var inGameGuideBtn = document.createElement("a"); + inGameGuideBtn.innerText = "How to Play"; + inGameGuideBtn.classList.add("a-link-button"); + inGameGuideBtn.style.display = "inline-block"; + inGameGuideBtn.classList.add("hack-mission-header-element"); + inGameGuideBtn.addEventListener("click", function() { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionHowToPlay); + return false; + }); + + var wikiGuideBtn = document.createElement("a"); + wikiGuideBtn.innerText = "Wiki Guide"; + wikiGuideBtn.classList.add("a-link-button"); + wikiGuideBtn.style.display = "inline-block"; + wikiGuideBtn.classList.add("hack-mission-header-element"); + wikiGuideBtn.target = "_blank"; + //TODO Add link to wiki page wikiGuideBtn.href = + + + //Start button will get replaced with forfeit when game is started + var startBtn = document.createElement("a"); + startBtn.innerHTML = "Start"; + startBtn.setAttribute("id", "hack-mission-start-btn"); + startBtn.classList.add("a-link-button"); + startBtn.classList.add("hack-mission-header-element"); + startBtn.style.display = "inline-block"; + startBtn.addEventListener("click", ()=>{ + this.start(); + return false; + }); + + var forfeitMission = document.createElement("a"); + forfeitMission.innerHTML = "Forfeit Mission (Exit)"; + forfeitMission.classList.add("a-link-button"); + forfeitMission.classList.add("hack-mission-header-element"); + forfeitMission.style.display = "inline-block"; + forfeitMission.addEventListener("click", ()=> { + this.finishMission(false); + return false; + }); + + var timer = document.createElement("p"); + timer.setAttribute("id", "hacking-mission-timer"); + timer.style.display = "inline-block"; + timer.style.margin = "6px"; + + //Create Action Buttons (Attack/Scan/Weaken/ etc...) + var actionsContainer = document.createElement("span"); + actionsContainer.style.display = "block"; + actionsContainer.classList.add("hack-mission-action-buttons-container"); + for (var i = 0; i < 6; ++i) { + this.actionButtons.push(document.createElement("a")); + this.actionButtons[i].style.display = "inline-block"; + this.actionButtons[i].classList.add("a-link-button-inactive"); //Disabled at start + this.actionButtons[i].classList.add("tooltip"); //Disabled at start + this.actionButtons[i].classList.add("hack-mission-header-element"); + actionsContainer.appendChild(this.actionButtons[i]); + } + this.actionButtons[0].innerText = "Attack(a)"; + var atkTooltip = document.createElement("span"); + atkTooltip.classList.add("tooltiptexthigh"); + 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."; + this.actionButtons[0].appendChild(atkTooltip); + this.actionButtons[1].innerText = "Scan(s)"; + var scanTooltip = document.createElement("span"); + scanTooltip.classList.add("tooltiptexthigh"); + 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."; + this.actionButtons[1].appendChild(scanTooltip); + this.actionButtons[2].innerText = "Weaken(w)"; + var WeakenTooltip = document.createElement("span"); + WeakenTooltip.classList.add("tooltiptexthigh"); + 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."; + this.actionButtons[2].appendChild(WeakenTooltip); + this.actionButtons[3].innerText = "Fortify(f)"; + var fortifyTooltip = document.createElement("span"); + fortifyTooltip.classList.add("tooltiptexthigh"); + fortifyTooltip.innerText = "Raises this node's Defense level. The effectiveness of this depends on " + + "your hacking level"; + this.actionButtons[3].appendChild(fortifyTooltip); + this.actionButtons[4].innerText = "Overflow(r)"; + var overflowTooltip = document.createElement("span"); + overflowTooltip.classList.add("tooltiptexthigh"); + overflowTooltip.innerText = "Raises this node's Attack level but lowers its Defense level. The effectiveness " + + "of this depends on your hacking level."; + this.actionButtons[4].appendChild(overflowTooltip); + this.actionButtons[5].innerText = "Drop Connection(d)"; + var dropconnTooltip = document.createElement("span"); + dropconnTooltip.classList.add("tooltiptexthigh"); + 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."; + this.actionButtons[5].appendChild(dropconnTooltip); + + //Player/enemy defense displays will be in action container + var playerStats = document.createElement("p"); + var enemyStats = document.createElement("p"); + playerStats.style.display = "inline-block"; + enemyStats.style.display = "inline-block"; + playerStats.style.color = "#00ccff"; + enemyStats.style.color = "red"; + playerStats.style.margin = "4px"; + enemyStats.style.margin = "4px"; + playerStats.setAttribute("id", "hacking-mission-player-stats"); + enemyStats.setAttribute("id", "hacking-mission-enemy-stats"); + actionsContainer.appendChild(playerStats); + actionsContainer.appendChild(enemyStats); + + //Set Action Button event listeners + this.actionButtons[0].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + if (this.selectedNode[0].type !== NodeTypes.Core) {return;} + this.setActionButtonsActive(this.selectedNode[0].type); + this.setActionButton(NodeActions.Attack, false); //Set attack button inactive + this.selectedNode.forEach(function(node){ + node.action = NodeActions.Attack; + }); + }); + + this.actionButtons[1].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + var nodeType = this.selectedNode[0].type; //In a multiselect, every Node will have the same type + if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} + this.setActionButtonsActive(nodeType); + this.setActionButton(NodeActions.Scan, false); //Set scan button inactive + this.selectedNode.forEach(function(node){ + node.action = NodeActions.Scan; + }); + }); + + this.actionButtons[2].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + var nodeType = this.selectedNode[0].type; //In a multiselect, every Node will have the same type + if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} + this.setActionButtonsActive(nodeType); + this.setActionButton(NodeActions.Weaken, false); //Set Weaken button inactive + this.selectedNode.forEach(function(node){ + node.action = NodeActions.Weaken; + }); + }); + + this.actionButtons[3].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + this.setActionButtonsActive(this.selectedNode[0].type); + this.setActionButton(NodeActions.Fortify, false); //Set Fortify button inactive + this.selectedNode.forEach(function(node){ + node.action = NodeActions.Fortify; + }); + }); + + this.actionButtons[4].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + var nodeType = this.selectedNode[0].type; + if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {return;} + this.setActionButtonsActive(nodeType); + this.setActionButton(NodeActions.Overflow, false); //Set Overflow button inactive + this.selectedNode.forEach(function(node){ + node.action = NodeActions.Overflow; + }); + }); + + this.actionButtons[5].addEventListener("click", ()=>{ + if (!(this.selectedNode.length > 0)) { + console.log("ERR: Pressing Action button without selected node"); + return; + } + this.selectedNode.forEach(function(node){ + if (node.conn) { + var endpoints = node.conn.endpoints; + endpoints[0].detachFrom(endpoints[1]); + } + node.action = NodeActions.Fortify; + }); + // if (this.selectedNode.conn) { + // var endpoints = this.selectedNode.conn.endpoints; + // endpoints[0].detachFrom(endpoints[1]); + // } + }) + + var timeDisplay = document.createElement("p"); + + container.appendChild(headerText); + container.appendChild(inGameGuideBtn); + container.appendChild(wikiGuideBtn); + container.appendChild(startBtn); + container.appendChild(forfeitMission); + container.appendChild(timer); + container.appendChild(actionsContainer); + container.appendChild(timeDisplay); +} + +HackingMission.prototype.setActionButtonsInactive = function() { + for (var i = 0; i < this.actionButtons.length; ++i) { + this.actionButtons[i].classList.remove("a-link-button"); + this.actionButtons[i].classList.add("a-link-button-inactive"); + } +} + +HackingMission.prototype.setActionButtonsActive = function(nodeType=null) { + for (var i = 0; i < this.actionButtons.length; ++i) { + this.actionButtons[i].classList.add("a-link-button"); + this.actionButtons[i].classList.remove("a-link-button-inactive"); + } + + //For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled + //0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn + if (nodeType) { + switch (nodeType) { + case NodeTypes.Firewall: + case NodeTypes.Shield: + this.actionButtons[0].classList.remove("a-link-button"); + this.actionButtons[0].classList.add("a-link-button-inactive"); + this.actionButtons[1].classList.remove("a-link-button"); + this.actionButtons[1].classList.add("a-link-button-inactive"); + this.actionButtons[2].classList.remove("a-link-button"); + this.actionButtons[2].classList.add("a-link-button-inactive"); + this.actionButtons[4].classList.remove("a-link-button"); + this.actionButtons[4].classList.add("a-link-button-inactive"); + this.actionButtons[5].classList.remove("a-link-button"); + this.actionButtons[5].classList.add("a-link-button-inactive"); + break; + case NodeTypes.Transfer: + this.actionButtons[0].classList.remove("a-link-button"); + this.actionButtons[0].classList.add("a-link-button-inactive"); + break; + default: + break; + } + } +} + +//True for active, false for inactive +HackingMission.prototype.setActionButton = function(i, active=true) { + if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__["isString"])(i)) { + switch (i) { + case NodeActions.Attack: + i = 0; + break; + case NodeActions.Scan: + i = 1; + break; + case NodeActions.Weaken: + i = 2; + break; + case NodeActions.Fortify: + i = 3; + break; + case NodeActions.Overflow: + default: + i = 4; + break; + } + } + if (active) { + this.actionButtons[i].classList.remove("a-link-button-inactive"); + this.actionButtons[i].classList.add("a-link-button"); + } else { + this.actionButtons[i].classList.remove("a-link-button"); + this.actionButtons[i].classList.add("a-link-button-inactive"); + } + +} + +HackingMission.prototype.calculateAttacks = function() { + var total = 0; + for (var i = 0; i < this.playerCores.length; ++i) { + total += this.playerCores[i].atk; + } + for (var i = 0; i < this.playerNodes.length; ++i) { + total += this.playerNodes[i].atk; + } + this.playerAtk = total; + document.getElementById("hacking-mission-player-stats").innerHTML = + "Player Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerAtk, 1) + "
" + + "Player Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerDef, 1); + total = 0; + for (var i = 0; i < this.enemyCores.length; ++i) { + total += this.enemyCores[i].atk; + } + for (var i = 0; i < this.enemyDatabases.length; ++i) { + total += this.enemyDatabases[i].atk; + } + for (var i = 0; i < this.enemyNodes.length; ++i) { + total += this.enemyNodes[i].atk; + } + this.enemyAtk = total; + document.getElementById("hacking-mission-enemy-stats").innerHTML = + "Enemy Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyAtk, 1) + "
" + + "Enemy Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyDef, 1); +} + +HackingMission.prototype.calculateDefenses = function() { + var total = 0; + for (var i = 0; i < this.playerCores.length; ++i) { + total += this.playerCores[i].def; + } + for (var i = 0; i < this.playerNodes.length; ++i) { + total += this.playerNodes[i].def; + } + this.playerDef = total; + document.getElementById("hacking-mission-player-stats").innerHTML = + "Player Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerAtk, 1) + "
" + + "Player Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.playerDef, 1); + total = 0; + for (var i = 0; i < this.enemyCores.length; ++i) { + total += this.enemyCores[i].def; + } + for (var i = 0; i < this.enemyDatabases.length; ++i) { + total += this.enemyDatabases[i].def; + } + for (var i = 0; i < this.enemyNodes.length; ++i) { + total += this.enemyNodes[i].def; + } + this.enemyDef = total; + document.getElementById("hacking-mission-enemy-stats").innerHTML = + "Enemy Attack: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyAtk, 1) + "
" + + "Enemy Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(this.enemyDef, 1); +} + +HackingMission.prototype.removeAvailablePosition = function(x, y) { + for (var i = 0; i < this.availablePositions.length; ++i) { + if (this.availablePositions[i][0] === x && + this.availablePositions[i][1] === y) { + this.availablePositions.splice(i, 1); + return; + } + } + console.log("WARNING: removeAvailablePosition() did not remove " + x + ", " + y); +} + +HackingMission.prototype.setNodePosition = function(nodeObj, x, y) { + if (!(nodeObj instanceof Node)) { + console.log("WARNING: Non-Node object passed into setNodePOsition"); + return; + } + if (isNaN(x) || isNaN(y)) { + console.log("ERR: Invalid values passed as x and y for setNodePosition"); + console.log(x); + console.log(y); + return; + } + nodeObj.pos = [x, y]; + this.map[x][y] = nodeObj; +} + +HackingMission.prototype.setNodeRandomPosition = function(nodeObj, xlimit=0) { + var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.availablePositions.length - 1); + if (this.availablePositions[i][1] < xlimit) { + //Recurse if not within limit + return this.setNodeRandomPosition(nodeObj, xlimit); + } + var pos = this.availablePositions.splice(i, 1); + pos = pos[0]; + this.setNodePosition(nodeObj, pos[0], pos[1]); +} + +HackingMission.prototype.createMap = function() { + //Use a grid + var map = document.createElement("div"); + map.classList.add("hack-mission-grid"); + map.setAttribute("id", "hacking-mission-map"); + document.getElementById("mission-container").appendChild(map); + + //Create random Nodes for every space in the map that + //hasn't been filled yet. The stats of each Node will be based on + //the player/enemy attack + var averageAttack = (this.playerAtk + this.enemyAtk) / 2; + for (var x = 0; x < 8; ++x) { + for (var y = 0; y < 8; ++y) { + if (!(this.map[x][y] instanceof Node)) { + var node, type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, 2); + var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_6__["addOffset"])(0.85 + (this.difficulty / 2), 15); + switch (type) { + case 0: //Spam + var stats = { + atk: 0, + def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(15, 45), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(200, 225) + } + node = new Node(NodeTypes.Spam, stats); + break; + case 1: //Transfer + var stats = { + atk: 0, + def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(15, 45), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(250, 275) + } + node = new Node(NodeTypes.Transfer, stats); + break; + case 2: //Shield + default: + var stats = { + atk: 0, + def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(30, 70), + hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(300, 320) + } + node = new Node(NodeTypes.Shield, stats); + break; + } + this.setNodePosition(node, x, y); + this.removeAvailablePosition(x, y); + this.miscNodes.push(node); + } + } + } + + //Create DOM elements in order + for (var r = 0; r < 8; ++r) { + for (var c = 0; c < 8; ++c) { + this.createNodeDomElement(this.map[r][c]); + } + } + + //Configure all Player CPUS + for (var i = 0; i < this.playerCores.length; ++i) { + console.log("Configuring Player Node: " + this.playerCores[i].el.id); + this.configurePlayerNodeElement(this.playerCores[i].el); + } +} + +HackingMission.prototype.createNodeDomElement = function(nodeObj) { + var nodeDiv = document.createElement("a"), txtEl = document.createElement('p'); + nodeObj.el = nodeDiv; + + //Set the node element's id based on its coordinates + var id = "hacking-mission-node-" + nodeObj.pos[0] + "-" + nodeObj.pos[1]; + nodeDiv.setAttribute("id", id); + txtEl.setAttribute("id", id + "-txt"); + + //Set node classes for owner + nodeDiv.classList.add("hack-mission-node"); + if (nodeObj.plyrCtrl) { + nodeDiv.classList.add("hack-mission-player-node"); + } else if (nodeObj.enmyCtrl) { + nodeDiv.classList.add("hack-mission-enemy-node"); + } + + //Set node classes based on type + var txt; + switch (nodeObj.type) { + case NodeTypes.Core: + txt = "CPU Core
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-cpu-node"); + break; + case NodeTypes.Firewall: + txt = "Firewall
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-firewall-node"); + break; + case NodeTypes.Database: + txt = "Database
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-database-node"); + break; + case NodeTypes.Spam: + txt = "Spam
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-spam-node"); + break; + case NodeTypes.Transfer: + txt = "Transfer
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-transfer-node"); + break; + case NodeTypes.Shield: + default: + txt = "Shield
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + nodeDiv.classList.add("hack-mission-shield-node"); + break; + } + + txt += "
Atk: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.atk, 1) + + "
Def: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.def, 1); + txtEl.innerHTML = txt; + + nodeDiv.appendChild(txtEl); + document.getElementById("hacking-mission-map").appendChild(nodeDiv); +} + +HackingMission.prototype.updateNodeDomElement = function(nodeObj) { + if (nodeObj.el == null) { + console.log("ERR: Calling updateNodeDomElement on a Node without an element"); + return; + } + + var id = "hacking-mission-node-" + nodeObj.pos[0] + "-" + nodeObj.pos[1]; + var nodeDiv = document.getElementById(id), txtEl = document.getElementById(id + "-txt"); + + //Set node classes based on type + var txt; + switch (nodeObj.type) { + case NodeTypes.Core: + txt = "CPU Core
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + case NodeTypes.Firewall: + txt = "Firewall
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + case NodeTypes.Database: + txt = "Database
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + case NodeTypes.Spam: + txt = "Spam
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + case NodeTypes.Transfer: + txt = "Transfer
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + case NodeTypes.Shield: + default: + txt = "Shield
" + "HP: " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.hp, 1); + break; + } + + txt += "
Atk: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.atk, 1) + + "
Def: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(nodeObj.def, 1); + if (nodeObj.action) { + txt += "
" + nodeObj.action; + } + txtEl.innerHTML = txt; +} + +//Gets a Node DOM element's corresponding Node object using its +//element id. Function accepts either the DOM element object or the ID as +//an argument +HackingMission.prototype.getNodeFromElement = function(el) { + var id; + if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_9__["isString"])(el)) { + id = el; + } else { + id = el.id; + } + id = id.replace("hacking-mission-node-", ""); + var res = id.split('-'); + if (res.length != 2) { + console.log("ERROR Parsing Hacking Mission Node Id. Could not find coordinates"); + return null; + } + var x = res[0], y = res[1]; + if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) { + console.log("ERROR: Unexpected values for x and y: " + x + ", " + y); + return null; + } + return this.map[x][y]; +} + +function selectNode(hackMissionInst, el) { + var nodeObj = hackMissionInst.getNodeFromElement(el); + if (nodeObj == null) {console.log("Error getting Node object");} + if (!nodeObj.plyrCtrl) {return;} + + clearAllSelectedNodes(hackMissionInst); + nodeObj.select(hackMissionInst.actionButtons); + hackMissionInst.selectedNode.push(nodeObj); +} + +function multiselectNode(hackMissionInst, el) { + var nodeObj = hackMissionInst.getNodeFromElement(el); + if (nodeObj == null) {console.log("ERROR: Getting Node Object in multiselectNode()");} + if (!nodeObj.plyrCtrl) {return;} + + clearAllSelectedNodes(hackMissionInst); + var type = nodeObj.type; + if (type === NodeTypes.Core) { + hackMissionInst.playerCores.forEach(function(node) { + node.select(hackMissionInst.actionButtons); + hackMissionInst.selectedNode.push(node); + }); + } else { + hackMissionInst.playerNodes.forEach(function(node) { + if (node.type === type) { + node.select(hackMissionInst.actionButtons); + hackMissionInst.selectedNode.push(node); + } + }); + } +} + +function clearAllSelectedNodes(hackMissionInst) { + if (hackMissionInst.selectedNode.length > 0) { + hackMissionInst.selectedNode.forEach(function(node){ + node.deselect(hackMissionInst.actionButtons); + }); + hackMissionInst.selectedNode.length = 0; + } +} + +//Configures a DOM element representing a player-owned node to +//be selectable and actionable +//Note: Does NOT change its css class. This is handled by Node.setControlledBy... +HackingMission.prototype.configurePlayerNodeElement = function(el) { + var nodeObj = this.getNodeFromElement(el); + if (nodeObj == null) {console.log("Error getting Node object");} + + //Add event listener + var self = this; + function selectNodeWrapper() { + selectNode(self, el); + } + el.addEventListener("click", selectNodeWrapper); + + function multiselectNodeWrapper() { + multiselectNode(self, el); + } + el.addEventListener("dblclick", multiselectNodeWrapper); + + + if (el.firstChild) { + el.firstChild.addEventListener("click", selectNodeWrapper); + } +} + +//Configures a DOM element representing an enemy-node by removing +//any event listeners +HackingMission.prototype.configureEnemyNodeElement = function(el) { + //Deselect node if it was the selected node + var nodeObj = this.getNodeFromElement(el); + for (var i = 0; i < this.selectedNode.length; ++i) { + if (this.selectedNode[i] == nodeObj) { + nodeObj.deselect(this.actionButtons); + this.selectedNode.splice(i, 1); + break; + } + } +} + +//Returns bool indicating whether a node is reachable by player +//by checking if any of the adjacent nodes are owned by the player +HackingMission.prototype.nodeReachable = function(node) { + var x = node.pos[0], y = node.pos[1]; + if (x > 0 && this.map[x-1][y].plyrCtrl) {return true;} + if (x < 7 && this.map[x+1][y].plyrCtrl) {return true;} + if (y > 0 && this.map[x][y-1].plyrCtrl) {return true;} + if (y < 7 && this.map[x][y+1].plyrCtrl) {return true;} + return false; +} + +HackingMission.prototype.nodeReachableByEnemy = function(node) { + if (node == null) {return false;} + var x = node.pos[0], y = node.pos[1]; + if (x > 0 && this.map[x-1][y].enmyCtrl) {return true;} + if (x < 7 && this.map[x+1][y].enmyCtrl) {return true;} + if (y > 0 && this.map[x][y-1].enmyCtrl) {return true;} + if (y < 7 && this.map[x][y+1].enmyCtrl) {return true;} + return false; +} + +HackingMission.prototype.start = function() { + this.started = true; + this.initJsPlumb(); + var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__["clearEventListeners"])("hack-mission-start-btn"); + startBtn.classList.remove("a-link-button"); + startBtn.classList.add("a-link-button-inactive"); +} + +HackingMission.prototype.initJsPlumb = function() { + var instance = jsPlumb.getInstance({ + DragOptions:{cursor:"pointer", zIndex:2000}, + PaintStyle: { + gradient: { stops: [ + [ 0, "#FFFFFF" ], + [ 1, "#FFFFFF" ] + ] }, + stroke: "#FFFFFF", + strokeWidth: 8 + }, + }); + + this.jsplumbinstance = instance; + + //All player cores are sources + for (var i = 0; i < this.playerCores.length; ++i) { + instance.makeSource(this.playerCores[i].el, { + deleteEndpointsOnEmpty:true, + maxConnections:1, + anchor:"Continuous", + connector:"Flowchart" + }); + } + + //Everything else is a target + for (var i = 0; i < this.enemyCores.length; ++i) { + instance.makeTarget(this.enemyCores[i].el, { + maxConnections:-1, + anchor:"Continuous", + connector:"Flowchart" + }); + } + for (var i = 0; i < this.enemyDatabases.length; ++i) { + instance.makeTarget(this.enemyDatabases[i].el, { + maxConnections:-1, + anchor:"Continuous", + connector:["Flowchart"] + }); + } + for (var i = 0; i < this.enemyNodes.length; ++i) { + instance.makeTarget(this.enemyNodes[i].el, { + maxConnections:-1, + anchor:"Continuous", + connector:"Flowchart" + }); + } + for (var i = 0; i < this.miscNodes.length; ++i) { + instance.makeTarget(this.miscNodes[i].el, { + maxConnections:-1, + anchor:"Continuous", + connector:"Flowchart" + }); + } + + //Clicking a connection drops it + instance.bind("click", function(conn, originalEvent) { + var endpoints = conn.endpoints; + endpoints[0].detachFrom(endpoints[1]); + }); + + //Connection events + instance.bind("connection", (info)=>{ + var targetNode = this.getNodeFromElement(info.target); + + //Do not detach for enemy nodes + var thisNode = this.getNodeFromElement(info.source); + if (thisNode.enmyCtrl) {return;} + + //If the node is not reachable, drop the connection + if (!this.nodeReachable(targetNode)) { + info.sourceEndpoint.detachFrom(info.targetEndpoint); + return; + } + + var sourceNode = this.getNodeFromElement(info.source); + sourceNode.conn = info.connection; + var targetNode = this.getNodeFromElement(info.target); + ++targetNode.targetedCount; + }); + + //Detach Connection events + instance.bind("connectionDetached", (info, originalEvent)=>{ + var sourceNode = this.getNodeFromElement(info.source); + sourceNode.conn = null; + var targetNode = this.getNodeFromElement(info.target); + targetNode.untarget(); + }); + +} + +//Drops all connections where the specified node is the source +HackingMission.prototype.dropAllConnectionsFromNode = function(node) { + var allConns = this.jsplumbinstance.getAllConnections(); + for (var i = allConns.length-1; i >= 0; --i) { + if (allConns[i].source == node.el) { + allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]); + } + } +} + +//Drops all connections where the specified node is the target +HackingMission.prototype.dropAllConnectionsToNode = function(node) { + var allConns = this.jsplumbinstance.getAllConnections(); + for (var i = allConns.length-1; i >= 0; --i) { + if (allConns[i].target == node.el) { + allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]); + } + } + node.beingTargeted = false; +} + +var storedCycles = 0; +HackingMission.prototype.process = function(numCycles=1) { + if (!this.started) {return;} + storedCycles += numCycles; + if (storedCycles < 2) {return;} //Only process every 3 cycles minimum + + var res = false; + //Process actions of all player nodes + this.playerCores.forEach((node)=>{ + res |= this.processNode(node, storedCycles); + }); + + this.playerNodes.forEach((node)=>{ + if (node.type === NodeTypes.Transfer || + node.type === NodeTypes.Shield || + node.type === NodeTypes.Firewall) { + res |= this.processNode(node, storedCycles); + } + }); + + //Process actions of all enemy nodes + this.enemyCores.forEach((node)=>{ + this.enemyAISelectAction(node); + res |= this.processNode(node, storedCycles); + }); + + this.enemyNodes.forEach((node)=>{ + if (node.type === NodeTypes.Transfer || + node.type === NodeTypes.Shield || + node.type === NodeTypes.Firewall) { + this.enemyAISelectAction(node); + res |= this.processNode(node, storedCycles); + } + }); + + //The hp of enemy databases increases slowly + this.enemyDatabases.forEach((node)=>{ + node.maxhp += (0.1 * storedCycles); + node.hp += (0.1 * storedCycles); + }); + + if (res) { + this.calculateAttacks(); + this.calculateDefenses(); + } + + //Win if all enemy databases are conquered + if (this.enemyDatabases.length === 0) { + this.finishMission(true); + return; + } + + //Lose if all your cores are gone + if (this.playerCores.length === 0) { + this.finishMission(false); + return; + } + + //Defense/hp of misc nodes increases slowly over time + this.miscNodes.forEach((node)=>{ + node.def += (0.1 * storedCycles); + node.maxhp += (0.05 * storedCycles); + node.hp += (0.1 * storedCycles); + if (node.hp > node.maxhp) {node.hp = node.maxhp;} + this.updateNodeDomElement(node); + }); + + //Update timer and check if player lost + this.time -= (storedCycles * _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"]._idleSpeed); + if (this.time <= 0) { + this.finishMission(false); + return; + } + this.updateTimer(); + + storedCycles = 0; +} + +//Returns a bool representing whether defenses need to be re-calculated +HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { + if (nodeObj.action == null) { + return; + } + + var targetNode = null, def, atk; + if (nodeObj.conn) { + if (nodeObj.conn.target != null) { + targetNode = this.getNodeFromElement(nodeObj.conn.target); + } else { + targetNode = this.getNodeFromElement(nodeObj.conn.targetId); + } + + if (targetNode == null) { + //Player is in the middle of dragging the connection, + //so the target node is null. Do nothing here + } else if (targetNode.plyrCtrl) { + def = this.playerDef; + atk = this.enemyAtk; + } else if (targetNode.enmyCtrl) { + def = this.enemyDef; + atk = this.playerAtk; + } else { //Misc Node + def = targetNode.def; + nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk; + } + } + + //Calculations are per second, so divide everything by 5 + var calcStats = false, plyr = nodeObj.plyrCtrl; + var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionDifficultyToHacking; + switch(nodeObj.action) { + case NodeActions.Attack: + if (targetNode == null) {break;} + if (nodeObj.conn == null) {break;} + var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); + targetNode.hp -= (dmg/5 * numCycles); + break; + case NodeActions.Scan: + if (targetNode == null) {break;} + if (nodeObj.conn == null) {break;} + var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); + targetNode.def -= (eff/5 * numCycles); + calcStats = true; + break; + case NodeActions.Weaken: + if (targetNode == null) {break;} + if (nodeObj.conn == null) {break;} + var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill : enmyHacking); + targetNode.atk -= (eff/5 * numCycles); + calcStats = true; + break; + case NodeActions.Fortify: + var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill); + nodeObj.def += (eff/5 * numCycles); + calcStats = true; + break; + case NodeActions.Overflow: + var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hacking_skill); + if (nodeObj.def < eff) {break;} + nodeObj.def -= (eff/5 * numCycles); + nodeObj.atk += (eff/5 * numCycles); + calcStats = true; + break; + default: + console.log("ERR: Invalid Node Action: " + nodeObj.action); + break; + } + + //Stats can't go below 0 + if (nodeObj.atk < 0) {nodeObj.atk = 0;} + if (nodeObj.def < 0) {nodeObj.def = 0;} + if (targetNode && targetNode.atk < 0) {targetNode.atk = 0;} + if (targetNode && targetNode.def < 0) {targetNode.def = 0;} + + //Conquering a node + if (targetNode && targetNode.hp <= 0) { + var conqueredByPlayer = nodeObj.plyrCtrl; + targetNode.hp = targetNode.maxhp; + targetNode.action = null; + targetNode.conn = null; + if (this.selectedNode == targetNode) { + targetNode.deselect(this.actionButtons); + } + + //The conquered node has its stats reduced + targetNode.atk /= 2; + targetNode.def /= 3.5; + + //Flag for whether the target node was a misc node + var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; + + //Remove all connections from Node + this.dropAllConnectionsToNode(targetNode); + this.dropAllConnectionsFromNode(targetNode); + + //Changes the css class and turn the node into a JsPlumb Source/Target + if (conqueredByPlayer) { + targetNode.setControlledByPlayer(); + this.jsplumbinstance.unmakeTarget(targetNode.el); + this.jsplumbinstance.makeSource(targetNode.el, { + deleteEndpointsOnEmpty:true, + maxConnections:1, + anchor:"Continuous", + connector:"Flowchart" + }); + } else { + targetNode.setControlledByEnemy(); + nodeObj.conn = null; //Clear connection + this.jsplumbinstance.unmakeSource(targetNode.el); + this.jsplumbinstance.makeTarget(targetNode.el, { + maxConnections:-1, + anchor:"Continuous", + connector:["Flowchart"] + }); + } + + calcStats = true; + + //Helper function to swap nodes between the respective enemyNodes/playerNodes arrays + function swapNodes(orig, dest, targetNode) { + for (var i = 0; i < orig.length; ++i) { + if (orig[i] == targetNode) { + var node = orig.splice(i, 1); + node = node[0]; + dest.push(node); + break; + } + } + } + + switch(targetNode.type) { + case NodeTypes.Core: + if (conqueredByPlayer) { + swapNodes(this.enemyCores, this.playerCores, targetNode); + this.configurePlayerNodeElement(targetNode.el); + } else { + swapNodes(this.playerCores, this.enemyCores, targetNode); + this.configureEnemyNodeElement(targetNode.el); + } + break; + case NodeTypes.Firewall: + if (conqueredByPlayer) { + swapNodes(this.enemyNodes, this.playerNodes, targetNode); + } else { + swapNodes(this.playerNodes, this.enemyNodes, targetNode); + this.configureEnemyNodeElement(targetNode.el); + } + break; + case NodeTypes.Database: + if (conqueredByPlayer) { + swapNodes(this.enemyDatabases, this.playerNodes, targetNode); + } else { + swapNodes(this.playerNodes, this.enemyDatabases, targetNode); + } + break; + case NodeTypes.Spam: + if (conqueredByPlayer) { + swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); + //Conquering spam node increases time limit + this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionSpamTimeIncrease; + } else { + swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); + } + + break; + case NodeTypes.Transfer: + //Conquering a Transfer node increases the attack of all cores by some percentages + if (conqueredByPlayer) { + swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); + this.playerCores.forEach(function(node) { + node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionTransferAttackIncrease; + }); + this.configurePlayerNodeElement(targetNode.el); + } else { + swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); + this.enemyCores.forEach(function(node) { + node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionTransferAttackIncrease; + }); + this.configureEnemyNodeElement(targetNode.el); + } + break; + case NodeTypes.Shield: + if (conqueredByPlayer) { + swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); + this.configurePlayerNodeElement(targetNode.el); + } else { + swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); + this.configureEnemyNodeElement(targetNode.el); + } + break; + } + + //If a misc node was conquered, the defense for all misc nodes increases by some fixed amount + if (isMiscNode) { //&& conqueredByPlayer) { + this.miscNodes.forEach((node)=>{ + if (node.targetedCount === 0) { + node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].HackingMissionMiscDefenseIncrease; + } + }); + } + } + + //Update node DOMs + this.updateNodeDomElement(nodeObj); + if (targetNode) {this.updateNodeDomElement(targetNode);} + return calcStats; +} + +//Enemy "AI" for CPU Core and Transfer Nodes +HackingMission.prototype.enemyAISelectAction = function(nodeObj) { + if (nodeObj == null) {return;} + switch(nodeObj.type) { + case NodeTypes.Core: + //Select a single RANDOM target from miscNodes and player's Nodes + //If it is reachable, it will target it. If not, no target will + //be selected for now, and the next time process() gets called this will repeat + if (nodeObj.conn == null) { + if (this.miscNodes.length === 0) { + //Randomly pick a player node and attack it if its reachable + var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.playerNodes.length-1); + var node; + if (this.playerNodes.length === 0) { + node = null; + } else { + node = this.playerNodes[rand]; + } + if (this.nodeReachableByEnemy(node)) { + //Create connection + nodeObj.conn = this.jsplumbinstance.connect({ + source:nodeObj.el, + target:node.el + }); + ++node.targetedCount; + } else { + //Randomly pick a player core and attack it if its reachable + rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.playerCores.length-1); + if (this.playerCores.length === 0) { + return; //No Misc Nodes, no player Nodes, no Player cores. Player lost + } else { + node = this.playerCores[rand]; + } + + if (this.nodeReachableByEnemy(node)) { + //Create connection + nodeObj.conn = this.jsplumbinstance.connect({ + source:nodeObj.el, + target:node.el + }); + ++node.targetedCount; + } + } + } else { + //Randomly pick a misc node and attack it if its reachable + var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_8__["getRandomInt"])(0, this.miscNodes.length-1); + var node = this.miscNodes[rand]; + if (this.nodeReachableByEnemy(node)) { + nodeObj.conn = this.jsplumbinstance.connect({ + source:nodeObj.el, + target:node.el, + }); + ++node.targetedCount; + } + } + + //If no connection was made, set the Core to Fortify + nodeObj.action = NodeActions.Fortify; + } else { + //If this node has a selected target + var targetNode; + if (nodeObj.conn.target) { + targetNode = this.getNodeFromElement(nodeObj.conn.target); + } else { + targetNode = this.getNodeFromElement(nodeObj.conn.targetId); + } + if (targetNode == null) { + console.log("Error getting Target node Object in enemyAISelectAction()"); + } + + if (targetNode.def > this.enemyAtk + 15) { + if (nodeObj.def < 50) { + nodeObj.action = NodeActions.Fortify; + } else { + nodeObj.action = NodeActions.Overflow; + } + } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) { + nodeObj.action = NodeActions.Scan; + } else { + nodeObj.action = NodeActions.Attack; + } + } + break; + case NodeTypes.Transfer: + //Switch between fortifying and overflowing as necessary + if (nodeObj.def < 125) { + nodeObj.action = NodeActions.Fortify; + } else { + nodeObj.action = NodeActions.Overflow; + } + break; + case NodeTypes.Firewall: + case NodeTypes.Shield: + nodeObj.action = NodeActions.Fortify; + break; + default: + break; + } +} + +var hackEffWeightSelf = 130; //Weight for Node actions on self +var hackEffWeightTarget = 25; //Weight for Node Actions against Target +var hackEffWeightAttack = 80; //Weight for Attack action + +//Returns damage per cycle based on stats +HackingMission.prototype.calculateAttackDamage = function(atk, def, hacking = 0) { + return Math.max(0.55 * (atk + (hacking / hackEffWeightAttack) - def), 1); +} + +HackingMission.prototype.calculateScanEffect = function(atk, def, hacking=0) { + return Math.max(0.6 * ((atk) + hacking / hackEffWeightTarget - (def * 0.95)), 2); +} + +HackingMission.prototype.calculateWeakenEffect = function(atk, def, hacking=0) { + return Math.max((atk) + hacking / hackEffWeightTarget - (def * 0.95), 2); +} + +HackingMission.prototype.calculateFortifyEffect = function(hacking=0) { + return 0.9 * hacking / hackEffWeightSelf; +} + +HackingMission.prototype.calculateOverflowEffect = function(hacking=0) { + return 0.95 * hacking / hackEffWeightSelf; +} + +//Updates timer display +HackingMission.prototype.updateTimer = function() { + var timer = document.getElementById("hacking-mission-timer"); + + //Convert time remaining to a string of the form mm:ss + var seconds = Math.round(this.time / 1000); + var minutes = Math.trunc(seconds / 60); + seconds %= 60; + var str = ("0" + minutes).slice(-2) + ":" + ("0" + seconds).slice(-2); + timer.innerText = "Time left: " + str; +} + +//The 'win' argument is a bool for whether or not the player won +HackingMission.prototype.finishMission = function(win) { + inMission = false; + currMission = null; + + if (win) { + var favorMult = 1 + (this.faction.favor / 100); + console.log("Hacking mission base reward: " + this.reward); + console.log("favorMult: " + favorMult); + console.log("rep mult: " + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult); + var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].faction_rep_mult * favorMult; + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Mission won! You earned " + + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_7__["formatNumber"])(gain, 3) + " reputation with " + this.faction.name); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainIntelligenceExp(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ "a"].IntelligenceHackingMissionBaseExpGain); + this.faction.playerReputation += gain; + } else { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Mission lost/forfeited! You did not gain any faction reputation."); + } + + //Clear mission container + var container = document.getElementById("mission-container"); + while(container.firstChild) { + container.removeChild(container.firstChild); + } + + //Return to Faction page + document.getElementById("mainmenu-container").style.visibility = "visible"; + document.getElementById("character-overview-wrapper").style.visibility = "visible"; + _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent(); + Object(_Faction__WEBPACK_IMPORTED_MODULE_2__[/* displayFactionContent */ "c"])(this.faction.name); +} + + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 48 */ @@ -33969,1491 +33786,6 @@ exports.arrayToString = arrayToString; /***/ }), /* 49 */ -/*!*********************!*\ - !*** ./src/Gang.js ***! - \*********************/ -/*! exports provided: Gang, displayGangContent, updateGangContent, loadAllGangs, AllGangs, resetGangs, deleteGangDisplayContent */ -/*! exports used: AllGangs, Gang, deleteGangDisplayContent, displayGangContent, loadAllGangs, resetGangs, updateGangContent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Gang; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return displayGangContent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return updateGangContent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return loadAllGangs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllGangs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return resetGangs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return deleteGangDisplayContent; }); -/* harmony import */ var _data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/gangmembertasks */ 115); -/* harmony import */ var _data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/gangmemberupgrades */ 114); -/* harmony import */ var _data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 32); -/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/uiHelpers/createAccordionElement */ 66); -/* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); -/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); -/* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__); -/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); -/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 64); -/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__); -/* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); -/* -gang member upgrades - they should be cheaper as the gang gets more respect/power -kopelli09/12/2018 -Another gang-related idea (and perhaps I'm not seeing it in the code) - gangs can lose power. Seems odd that the player's power can drop by removing members, but the other gangs are forever gaining power... -Grub09/12/2018 -Maybe add a % chance of other gangs clashing? -assign gangs a number of gang members and each clash kills a number of gang members based on each one's power -and they lose a proportionate number of members -Also add police clashes -balance point to keep them from running out of control -*/ - - - - - - - - - - - - - - - - - - - - - - - -// Constants -const GangRespectToReputationRatio = 2; //Respect is divided by this to get rep gain -const MaximumGangMembers = 47; -const GangRecruitCostMultiplier = 2; -const GangTerritoryUpdateTimer = 150; -const AscensionMultiplierRatio = 10 / 100; //Portion upgrade multiplier is kept after ascending - -// Switch between territory and management screen with 1 and 2 -$(document).keydown(function(event) { - if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__["Page"].Gang) && !_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_19__[/* yesNoBoxOpen */ "e"]) { - if (gangMemberFilter != null && gangMemberFilter === document.activeElement) {return;} - if (event.keyCode === 49) { - if(gangTerritorySubpage.style.display === "block") { - managementButton.click(); - } - } else if (event.keyCode === 50) { - if (gangManagementSubpage.style.display === "block") { - territoryButton.click(); - } - } - } -}); - -//Delete upgrade box when clicking outside -$(document).mousedown(function(event) { - var boxId = "gang-member-upgrade-popup-box"; - var contentId = "gang-member-upgrade-popup-box-content"; - if (gangMemberUpgradeBoxOpened) { - if ( $(event.target).closest("#" + contentId).get(0) == null ) { - //Delete the box - Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__["removeElement"])(gangMemberUpgradeBox); - gangMemberUpgradeBox = null; - gangMemberUpgradeBoxContent = null; - gangMemberUpgradeBoxOpened = false; - gangMemberUpgradeBoxElements = null; - } - } -}); - -let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead", - "NiteSec", "The Black Hand"]; -let AllGangs = { - "Slum Snakes" : { - power: 1, - territory: 1/7, - }, - "Tetrads" : { - power: 1, - territory: 1/7, - }, - "The Syndicate" : { - power: 1, - territory: 1/7, - }, - "The Dark Army" : { - power: 1, - territory: 1/7, - }, - "Speakers for the Dead" : { - power: 1, - territory: 1/7, - }, - "NiteSec" : { - power: 1, - territory: 1/7, - }, - "The Black Hand" : { - power: 1, - territory: 1/7, - }, -} - -function resetGangs() { - AllGangs = { - "Slum Snakes" : { - power: 1, - territory: 1/7, - }, - "Tetrads" : { - power: 1, - territory: 1/7, - }, - "The Syndicate" : { - power: 1, - territory: 1/7, - }, - "The Dark Army" : { - power: 1, - territory: 1/7, - }, - "Speakers for the Dead" : { - power: 1, - territory: 1/7, - }, - "NiteSec" : { - power: 1, - territory: 1/7, - }, - "The Black Hand" : { - power: 1, - territory: 1/7, - }, - } -} - -function loadAllGangs(saveString) { - AllGangs = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"]); -} - -//Power is an estimate of a gang's ability to gain/defend territory -let gangStoredPowerCycles = 0; -function processAllGangPowerGains(numCycles=1) { - if (!_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} - gangStoredPowerCycles += numCycles; - if (gangStoredPowerCycles < 150) {return;} - var playerGangName = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName; - for (var name in AllGangs) { - if (AllGangs.hasOwnProperty(name)) { - if (name == playerGangName) { - AllGangs[name].power += _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.calculatePower(); - } else { - var gain = Math.random() * 0.02; //TODO Adjust as necessary - AllGangs[name].power += (gain); - } - } - } - - gangStoredPowerCycles -= 150; -} - -let gangStoredTerritoryCycles = 0; -function processAllGangTerritory(numCycles=1) { - if (!_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} - gangStoredTerritoryCycles += numCycles; - if (gangStoredTerritoryCycles < GangTerritoryUpdateTimer) {return;} - - for (var i = 0; i < GangNames.length; ++i) { - var other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__["getRandomInt"])(0, GangNames.length-1); - while(other == i) { - other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__["getRandomInt"])(0, GangNames.length-1); - } - var thisPwr = AllGangs[GangNames[i]].power; - var otherPwr = AllGangs[GangNames[other]].power; - var thisChance = thisPwr / (thisPwr + otherPwr); - - if (Math.random() < thisChance) { - if (AllGangs[GangNames[other]].territory <= 0) { - return; - } - AllGangs[GangNames[i]].territory += 0.0001; - AllGangs[GangNames[other]].territory -= 0.0001; - } else { - if (AllGangs[GangNames[i]].territory <= 0) { - return; - } - AllGangs[GangNames[i]].territory -= 0.0001; - AllGangs[GangNames[other]].territory += 0.0001; - } - } - - gangStoredTerritoryCycles -= GangTerritoryUpdateTimer; -} - -/* faction - Name of corresponding faction - hacking - Boolean indicating whether its a hacking gang or not - */ -function Gang(facName, hacking=false) { - this.facName = facName; - this.members = []; //Array of GangMembers - this.wanted = 1; - this.respect = 1; - this.power = 0; - - this.isHackingGang = hacking; - - this.respectGainRate = 0; - this.wantedGainRate = 0; - this.moneyGainRate = 0; - - //When processing gains, this stores the number of cycles until some - //limit is reached, and then calculates and applies the gains only at that limit - this.storedCycles = 0; -} - -Gang.prototype.process = function(numCycles=1) { - this.processGains(numCycles); - this.processExperienceGains(numCycles); - processAllGangPowerGains(numCycles); - processAllGangTerritory(numCycles); -} - -Gang.prototype.processGains = function(numCycles=1) { - this.storedCycles += numCycles; - if (isNaN(this.storedCycles)) { - console.log("ERROR: Gang's storedCylces is NaN"); - this.storedCycles = 0; - } - if (this.storedCycles < 25) { return; } //Only process every 5 seconds at least - - //Get gains per cycle - var moneyGains = 0, respectGains = 0, wantedLevelGains = 0; - for (var i = 0; i < this.members.length; ++i) { - respectGains += (this.members[i].calculateRespectGain()); - wantedLevelGains += (this.members[i].calculateWantedLevelGain()); - moneyGains += (this.members[i].calculateMoneyGain()); - } - this.respectGainRate = respectGains; - this.wantedGainRate = wantedLevelGains; - this.moneyGainRate = moneyGains; - - if (typeof respectGains === "number") { - var gain = respectGains * this.storedCycles; - this.respect += (gain); - // Faction reputation gains is respect gain divided by some constant - var fac = _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Factions */ "b"][this.facName]; - if (!(fac instanceof _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Faction */ "a"])) { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev"); - } else { - var favorMult = 1 + (fac.favor / 100); - fac.playerReputation += ((_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].faction_rep_mult * gain * favorMult) / GangRespectToReputationRatio); - } - - // Keep track of respect gained per member - for (let i = 0; i < this.members.length; ++i) { - this.members[i].recordEarnedRespect(this.storedCycles); - } - } else { - console.warn("respectGains calculated to be NaN"); - } - if (typeof wantedLevelGains === "number") { - if (this.wanted === 1 && wantedLevelGains < 0) { - //Do nothing - } else { - const oldWanted = this.wanted; - let newWanted = + (wantedLevelGains * this.storedCycles); - - // Prevent overflow - if (wantedLevelGains <= 0 && newWanted > oldWanted) { - newWanted = 1; - } - - this.wanted = newWanted; - if (this.wanted < 1) {this.wanted = 1;} - } - } else { - console.warn("ERROR: wantedLevelGains is NaN"); - } - if (typeof moneyGains === "number") { - _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gainMoney(moneyGains * this.storedCycles); - } else { - console.warn("ERROR: respectGains is NaN"); - } - - this.storedCycles = 0; -} - -Gang.prototype.canRecruitMember = function() { - if (this.members.length >= MaximumGangMembers) { return false; } - return (this.respect >= this.getRespectNeededToRecruitMember()); -} - -Gang.prototype.getRespectNeededToRecruitMember = function() { - // First N gang members are free (can be recruited at 0 respect) - const numFreeMembers = 3; - if (this.members.length < numFreeMembers) { return 0; } - - const i = this.members.length - (numFreeMembers - 1); - return Math.round(0.7 * Math.pow(i, 3) + 0.8 * Math.pow(i, 2)); -} - -// Money and Respect gains multiplied by this number (< 1) -Gang.prototype.getWantedPenalty = function() { - return (this.respect) / (this.respect + this.wanted); -} - -Gang.prototype.processExperienceGains = function(numCycles=1) { - for (var i = 0; i < this.members.length; ++i) { - this.members[i].gainExperience(numCycles); - this.members[i].updateSkillLevels(); - } -} - -//Calculates power GAIN, which is added onto the Gang's existing power -Gang.prototype.calculatePower = function() { - var memberTotal = 0; - for (var i = 0; i < this.members.length; ++i) { - if (this.members[i].task instanceof GangMemberTask && - this.members[i].task.name == "Territory Warfare") { - memberTotal += this.members[i].calculatePower(); - } - } - return (0.0005 * memberTotal); -} - -Gang.prototype.killMember = function(memberObj) { - // TODO -} - -Gang.prototype.ascendMember = function(memberObj) { - try { - //Member.ascend() returns the amount of respect to deduct - this.respect = Math.min(1, this.respect - memberObj.ascend()); - } catch(e) { - Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ "a"])(e); - } -} - -Gang.prototype.toJSON = function() { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("Gang", this); -} - -Gang.fromJSON = function(value) { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(Gang, value.data); -} - -_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.Gang = Gang; - -/*** Gang Member object ***/ -function GangMember(name) { - this.name = name; - this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object - - this.earnedRespect = 0; - - this.hack = 1; - this.str = 1; - this.def = 1; - this.dex = 1; - this.agi = 1; - this.cha = 1; - - this.hack_exp = 0; - this.str_exp = 0; - this.def_exp = 0; - this.dex_exp = 0; - this.agi_exp = 0; - this.cha_exp = 0; - - this.hack_mult = 1; - this.str_mult = 1; - this.def_mult = 1; - this.dex_mult = 1; - this.agi_mult = 1; - this.cha_mult = 1; - - this.hack_asc_mult = 1; - this.str_asc_mult = 1; - this.def_asc_mult = 1; - this.dex_asc_mult = 1; - this.agi_asc_mult = 1; - this.cha_asc_mult = 1; - - this.upgrades = []; //Names of upgrades - this.augmentations = []; //Names only -} - -//Same formula for Player -GangMember.prototype.calculateSkill = function(exp, mult=1) { - return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1); -} - -GangMember.prototype.updateSkillLevels = function() { - this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.hack_asc_mult); - this.str = this.calculateSkill(this.str_exp, this.str_mult * this.str_asc_mult); - this.def = this.calculateSkill(this.def_exp, this.def_mult * this.def_asc_mult); - this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.dex_asc_mult); - this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.agi_asc_mult); - this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.cha_asc_mult); -} - -GangMember.prototype.calculatePower = function() { - return (this.hack + this.str + this.def + - this.dex + this.agi + this.cha) / 100; -} - -GangMember.prototype.assignToTask = function(taskName) { - if (GangMemberTasks.hasOwnProperty(taskName)) { - this.task = GangMemberTasks[taskName]; - } else { - this.task = GangMemberTasks["Unassigned"]; - } -} - -GangMember.prototype.unassignFromTask = function() { - if (GangMemberTasks.hasOwnProperty("Unassigned")) { - this.task = GangMemberTasks["Unassigned"]; - } else { - console.log("ERROR: Can't find Unassigned Gang member task"); - this.task = null; - } -} - -//Gains are per cycle -GangMember.prototype.calculateRespectGain = function() { - var task = this.task; - if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;} - var statWeight = (task.hackWeight/100) * this.hack + - (task.strWeight/100) * this.str + - (task.defWeight/100) * this.def + - (task.dexWeight/100) * this.dex + - (task.agiWeight/100) * this.agi + - (task.chaWeight/100) * this.cha; - statWeight -= (3.5 * task.difficulty); - if (statWeight <= 0) { return 0; } - var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; - if (territoryMult <= 0) { return 0; } - var respectMult = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getWantedPenalty(); - return 12 * task.baseRespect * statWeight * territoryMult * respectMult; -} - -GangMember.prototype.calculateWantedLevelGain = function() { - var task = this.task; - if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;} - var statWeight = (task.hackWeight/100) * this.hack + - (task.strWeight/100) * this.str + - (task.defWeight/100) * this.def + - (task.dexWeight/100) * this.dex + - (task.agiWeight/100) * this.agi + - (task.chaWeight/100) * this.cha; - statWeight -= (3.5 * task.difficulty); - if (statWeight <= 0) {return 0;} - var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; - if (territoryMult <= 0) {return 0;} - if (task.baseWanted < 0) { - return task.baseWanted * statWeight * territoryMult; - } else { - return 6 * task.baseWanted / (3 * statWeight * territoryMult); - } -} - -GangMember.prototype.calculateMoneyGain = function() { - var task = this.task; - if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;} - var statWeight = (task.hackWeight/100) * this.hack + - (task.strWeight/100) * this.str + - (task.defWeight/100) * this.def + - (task.dexWeight/100) * this.dex + - (task.agiWeight/100) * this.agi + - (task.chaWeight/100) * this.cha; - statWeight -= (3.5 * task.difficulty); - if (statWeight <= 0) {return 0;} - var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; - if (territoryMult <= 0) {return 0;} - var respectMult = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getWantedPenalty(); - return 5 * task.baseMoney * statWeight * territoryMult * respectMult; -} - -GangMember.prototype.gainExperience = function(numCycles=1) { - var task = this.task; - if (task == null || !(task instanceof GangMemberTask)) {return;} - this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles; - this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles; - this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles; - this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles; - this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles; - this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles; -} - -GangMember.prototype.recordEarnedRespect = function(numCycles=1) { - this.earnedRespect += (this.calculateRespectGain() * numCycles); -} - -GangMember.prototype.ascend = function() { - // Calculate ascension bonus to stat multipliers. - // This is based on the current number of multipliers from Non-Augmentation upgrades - // + Ascension Bonus = N% of current bonus from Augmentations - let hack = 1; - let str = 1; - let def = 1; - let dex = 1; - let agi = 1; - let cha = 1; - for (let i = 0; i < this.upgrades.length; ++i) { - let upg = GangMemberUpgrades[this.upgrades[i]]; - if (upg.mults.hack != null) { hack *= upg.mults.hack; } - if (upg.mults.str != null) { str *= upg.mults.str; } - if (upg.mults.def != null) { def *= upg.mults.def; } - if (upg.mults.dex != null) { dex *= upg.mults.dex; } - if (upg.mults.agi != null) { agi *= upg.mults.agi; } - if (upg.mults.cha != null) { cha *= upg.mults.cha; } - } - - // Get just the bonus multiplier part, and then record - --hack; --str; --def; --dex; --agi; --cha; - this.hack_asc_mult += (hack * AscensionMultiplierRatio); - this.str_asc_mult += (str * AscensionMultiplierRatio); - this.def_asc_mult += (def * AscensionMultiplierRatio); - this.dex_asc_mult += (dex * AscensionMultiplierRatio); - this.agi_asc_mult += (agi * AscensionMultiplierRatio); - this.cha_asc_mult += (cha * AscensionMultiplierRatio); - - // Remove upgrades. Then re-calculate multipliers and stats - this.upgrades.length = 0; - this.hack_mult = 1; - this.str_mult = 1; - this.def_mult = 1; - this.dex_mult = 1; - this.agi_mult = 1; - this.cha_mult = 1; - for (let i = 0; i < this.augmentations.length; ++i) { - let aug = GangMemberUpgrades[this.augmentations[i]]; - aug.apply(this); - } - this.updateSkillLevels(); - - const respectToDeduct = this.earnedRespect; - this.earnedRespect = 0; - return respectToDeduct; -} - -GangMember.prototype.toJSON = function() { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMember", this); -} - -GangMember.fromJSON = function(value) { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMember, value.data); -} - -_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMember = GangMember; - -//Defines tasks that Gang Members can work on -function GangMemberTask(name="", desc="", isHacking=false, isCombat=false, - params={baseRespect: 0, baseWanted: 0, baseMoney: 0, - hackWeight: 0, strWeight: 0, defWeight: 0, - dexWeight: 0, agiWeight: 0, chaWeight: 0, - difficulty: 0}) { - this.name = name; - this.desc = desc; - - // Flags that describe whether this Task is applicable for Hacking/Combat gangs - this.isHacking = isHacking; - this.isCombat = isCombat; - - // Base gain rates for respect/wanted/money - this.baseRespect = params.baseRespect ? params.baseRespect : 0; - this.baseWanted = params.baseWanted ? params.baseWanted : 0; - this.baseMoney = params.baseMoney ? params.baseMoney : 0; - - // Weighting for the effect that each stat has on the tasks effectiveness. - // Weights must add up to 100 - this.hackWeight = params.hackWeight ? params.hackWeight : 0; - this.strWeight = params.strWeight ? params.strWeight : 0; - this.defWeight = params.defWeight ? params.defWeight : 0; - this.dexWeight = params.dexWeight ? params.dexWeight : 0; - this.agiWeight = params.agiWeight ? params.agiWeight : 0; - this.chaWeight = params.chaWeight ? params.chaWeight : 0; - - // 1 - 100 - this.difficulty = params.difficulty ? params.difficulty : 1; -} - -GangMemberTask.prototype.toJSON = function() { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMemberTask", this); -} - -GangMemberTask.fromJSON = function(value) { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMemberTask, value.data); -} - -_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMemberTask = GangMemberTask; - -//TODO Human trafficking and an equivalent hacking crime -const GangMemberTasks = {}; - -function addGangMemberTask(name, desc, isHacking, isCombat, params) { - GangMemberTasks[name] = new GangMemberTask(name, desc, isHacking, isCombat, params); -} - -_data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__["gangMemberTasksMetadata"].forEach((e) => { - addGangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params); -}); - -function GangMemberUpgrade(name="", cost=0, type="w", mults={}) { - this.name = name; - this.cost = cost; - this.type = type; //w = weapon, a = armor, v = vehicle, r = rootkit, g = Aug - this.mults = mults; - - this.createDescription(); -} - -GangMemberUpgrade.prototype.createDescription = function() { - const lines = ["Increases:"]; - if (this.mults.str != null) { - lines.push(`* Strength by ${Math.round((this.mults.str - 1) * 100)}%`); - } - if (this.mults.def != null) { - lines.push(`* Defense by ${Math.round((this.mults.def - 1) * 100)}%`); - } - if (this.mults.dex != null) { - lines.push(`* Dexterity by ${Math.round((this.mults.dex - 1) * 100)}%`); - } - if (this.mults.agi != null) { - lines.push(`* Agility by ${Math.round((this.mults.agi - 1) * 100)}%`); - } - if (this.mults.cha != null) { - lines.push(`* Charisma by ${Math.round((this.mults.cha - 1) * 100)}%`); - } - if (this.mults.hack != null) { - lines.push(`* Hacking by ${Math.round((this.mults.hack - 1) * 100)}%`); - } - this.desc = lines.join("\n"); -} - -//Passes in a GangMember object -GangMemberUpgrade.prototype.apply = function(member) { - if (this.mults.str != null) { member.str_mult *= this.mults.str; } - if (this.mults.def != null) { member.def_mult *= this.mults.def; } - if (this.mults.dex != null) { member.dex_mult *= this.mults.dex; } - if (this.mults.agi != null) { member.agi_mult *= this.mults.agi; } - if (this.mults.cha != null) { member.cha_mult *= this.mults.cha; } - if (this.mults.hack != null) { member.hack_mult *= this.mults.hack; } - return; -} - -GangMemberUpgrade.prototype.toJSON = function() { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMemberUpgrade", this); -} - -GangMemberUpgrade.fromJSON = function(value) { - return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMemberUpgrade, value.data); -} - -_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade; - -// Initialize Gang Member Upgrades -const GangMemberUpgrades = {} - -function addGangMemberUpgrade(name, cost, type, mults) { - GangMemberUpgrades[name] = new GangMemberUpgrade(name, cost, type, mults); -} - -_data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__["gangMemberUpgradesMetadata"].forEach((e) => { - addGangMemberUpgrade(e.name, e.cost, e.upgType, e.mults); -}); - -//Create a pop-up box that lets player purchase upgrades -let gangMemberUpgradeBoxOpened = false; -function createGangMemberUpgradeBox(initialFilter="") { - var boxId = "gang-member-upgrade-popup-box"; - if (gangMemberUpgradeBoxOpened) { - //Already opened, refreshing - if (gangMemberUpgradeBoxElements == null || gangMemberUpgradeBox == null || gangMemberUpgradeBoxContent == null) { - console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null"); - return; - } - - for (var i = 1; i < gangMemberUpgradeBoxElements.length; ++i) { - Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__["removeElement"])(gangMemberUpgradeBoxElements[i]); - } - gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter]; - - var filter = gangMemberUpgradeBoxFilter.value.toString(); - for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.length; ++i) { - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].name.indexOf(filter) > -1 || _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].task.name.indexOf(filter) > -1) { - var newPanel = createGangMemberUpgradePanel(_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i]); - gangMemberUpgradeBoxContent.appendChild(newPanel); - gangMemberUpgradeBoxElements.push(newPanel); - } - } - } else { - //New popup - gangMemberUpgradeBoxFilter = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { - type:"text", placeholder:"Filter gang members", - value:initialFilter, - onkeyup:()=>{ - var filterValue = gangMemberUpgradeBoxFilter.value.toString(); - createGangMemberUpgradeBox(filterValue); - } - }); - - gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter]; - - var filter = gangMemberUpgradeBoxFilter.value.toString(); - for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.length; ++i) { - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].name.indexOf(filter) > -1 || _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].task.name.indexOf(filter) > -1) { - gangMemberUpgradeBoxElements.push(createGangMemberUpgradePanel(_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i])); - } - } - - gangMemberUpgradeBox = Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__["createPopup"])(boxId, gangMemberUpgradeBoxElements); - gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content"); - gangMemberUpgradeBoxOpened = true; - } -} - -//Create upgrade panels for each individual Gang Member -function createGangMemberUpgradePanel(memberObj) { - var container = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - border:"1px solid white", - }); - - var header = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h1", { - innerText:memberObj.name + " (" + memberObj.task.name + ")" - }); - container.appendChild(header); - - var text = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("pre", { - fontSize:"14px", display: "inline-block", width:"20%", - innerText: - "Hack: " + memberObj.hack + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.hack_mult, 2) + ")\n" + - "Str: " + memberObj.str + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.str_mult, 2) + ")\n" + - "Def: " + memberObj.def + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.def_mult, 2) + ")\n" + - "Dex: " + memberObj.dex + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.dex_mult, 2) + ")\n" + - "Agi: " + memberObj.agi + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.agi_mult, 2) + ")\n" + - "Cha: " + memberObj.cha + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.cha_mult, 2) + ")\n", - }); - - //Already purchased upgrades - var ownedUpgradesElements = []; - for (var i = 0; i < memberObj.upgrades.length; ++i) { - var upg = GangMemberUpgrades[memberObj.upgrades[i]]; - if (upg == null) { - console.log("ERR: Could not find this upgrade: " + memberObj.upgrades[i]); - continue; - } - var e = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - border:"1px solid white", innerText:memberObj.upgrades[i], - margin:"1px", padding:"1px", tooltip:upg.desc, fontSize:"12px", - }); - ownedUpgradesElements.push(e); - } - var ownedUpgrades = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - display:"inline-block", marginLeft:"6px", width:"75%", innerText:"Purchased Upgrades:", - }); - for (var i = 0; i < ownedUpgradesElements.length; ++i) { - ownedUpgrades.appendChild(ownedUpgradesElements[i]); - } - container.appendChild(text); - container.appendChild(ownedUpgrades); - container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - //Upgrade buttons. Only show upgrades that can be afforded - const weaponUpgrades = []; - const armorUpgrades = []; - const vehicleUpgrades = []; - const rootkitUpgrades = []; - const augUpgrades = []; - - for (let upgName in GangMemberUpgrades) { - if (GangMemberUpgrades.hasOwnProperty(upgName)) { - let upg = GangMemberUpgrades[upgName]; - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].money.lt(upg.cost) || memberObj.upgrades.includes(upgName)) {continue;} - switch (upg.type) { - case "w": - weaponUpgrades.push(upg); - break; - case "a": - armorUpgrades.push(upg); - break; - case "v": - vehicleUpgrades.push(upg); - break; - case "r": - rootkitUpgrades.push(upg); - break; - case "g": - augUpgrades.push(upg); - default: - console.error(`ERROR: Invalid Gang Member Upgrade Type: ${upg.type}`); - } - } - } - - const weaponDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "16%", display: "inline-block"}); - const armorDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "16%", display: "inline-block"}); - const vehicleDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "16%", display: "inline-block"}); - const rootkitDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "16%", display: "inline-block"}); - const augDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "16%", display: "inline-block"}); - const upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades, augUpgrades]; - const divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv, augDiv]; - - for (let i = 0; i < upgrades.length; ++i) { - let upgradeArray = upgrades[i]; - let div = divs[i]; - for (let j = 0; j < upgradeArray.length; ++j) { - let upg = upgradeArray[j]; - (function (upg, div, memberObj) { - div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - innerText:upg.name + " - " + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(upg.cost, "$0.000a"), - class:"a-link-button", margin:"2px", padding:"2px", display:"block", - fontSize:"11px", - tooltip:upg.desc, - clickListener:()=>{ - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].money.lt(upg.cost)) { return false; } - _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].loseMoney(upg.cost); - if (upg.type === "g") { - memberObj.augmentations.push(upg.name); - } else { - memberObj.upgrades.push(upg.name); - } - upg.apply(memberObj); - var initFilterValue = gangMemberUpgradeBoxFilter.value.toString(); - createGangMemberUpgradeBox(initFilterValue); - return false; - } - })); - })(upg, div, memberObj); - } - } - - container.appendChild(weaponDiv); - container.appendChild(armorDiv); - container.appendChild(vehicleDiv); - container.appendChild(rootkitDiv); - return container; -} - -//Gang DOM elements -let gangContentCreated = false, - gangContainer = null, managementButton = null, territoryButton = null; - -//Subpages -let gangManagementSubpage = null, gangTerritorySubpage = null; - -//Gang Management Elements -let gangDesc = null, gangInfo = null, - gangRecruitMemberButton = null, gangRecruitRequirementText = null, - gangExpandAllButton = null, gangCollapseAllButton, gangMemberFilter = null, - gangManageEquipmentButton = null, - gangMemberList = null; - -//Gang Equipment Upgrade Elements -let gangMemberUpgradeBox = null, gangMemberUpgradeBoxContent = null, - gangMemberUpgradeBoxFilter = null, gangMemberUpgradeBoxElements = null; - -//Gang Territory Elements -let gangTerritoryDescText = null, gangTerritoryInfoText = null; - -function displayGangContent() { - if (!gangContentCreated || gangContainer == null) { - gangContentCreated = true; - - //Create gang container - gangContainer = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - id:"gang-container", class:"generic-menupage-container", - }); - - //Get variables - var facName = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName, - members = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members, - wanted = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.wanted, - respect = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.respect; - - //Back button - gangContainer.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class:"a-link-button", display:"inline-block", innerText:"Back", - clickListener:()=>{ - _engine__WEBPACK_IMPORTED_MODULE_2__["Engine"].loadFactionContent(); - Object(_Faction__WEBPACK_IMPORTED_MODULE_3__[/* displayFactionContent */ "c"])(facName); - return false; - } - })); - - //Buttons to switch between panels - managementButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - id:"gang-management-subpage-button", class:"a-link-button-inactive", - display:"inline-block", innerHTML: "Gang Management (1)", - clickListener:()=>{ - gangManagementSubpage.style.display = "block"; - gangTerritorySubpage.style.display = "none"; - managementButton.classList.toggle("a-link-button-inactive"); - managementButton.classList.toggle("a-link-button"); - territoryButton.classList.toggle("a-link-button-inactive"); - territoryButton.classList.toggle("a-link-button"); - updateGangContent(); - return false; - } - }) - territoryButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - id:"gang-territory-subpage-button", class:"a-link-button", - display:"inline-block", innerHTML:"Gang Territory (2)", - clickListener:()=>{ - gangManagementSubpage.style.display = "none"; - gangTerritorySubpage.style.display = "block"; - managementButton.classList.toggle("a-link-button-inactive"); - managementButton.classList.toggle("a-link-button"); - territoryButton.classList.toggle("a-link-button-inactive"); - territoryButton.classList.toggle("a-link-button"); - updateGangContent(); - return false; - } - }); - gangContainer.appendChild(managementButton); - gangContainer.appendChild(territoryButton); - - //Subpage for managing gang members - gangManagementSubpage = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - display:"block", id:"gang-management-subpage", - }); - - var lowerWantedTask = ""; - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.isHackingGang) { - lowerWantedTask = "Ethical Hacking"; - } else { - lowerWantedTask = "Vigilante Justice"; - } - gangDesc = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {width:"70%", - innerHTML: - "This page is used to manage your gang members and get an overview of your " + - "gang's stats.

" + - "If a gang member is not earning much money or respect, the task that you " + - "have assigned to that member might be too difficult. Consider training that " + - "member's stats or choosing an easier task. The tasks closer to the " + - "top of the dropdown list are generally easier. Alternatively, the gang member's " + - "low production might be due to the fact that your wanted level is too high. " + - "Consider assigning a few members to the '" + lowerWantedTask + "' " + - "task to lower your wanted level.

" + - "Installing Augmentations does NOT reset your progress with your Gang. " + - "Furthermore, after installing Augmentations, you will " + - "automatically be a member of whatever Faction you created your gang with.

" - }); - gangManagementSubpage.appendChild(gangDesc); - - gangInfo = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:"gang-info", width:"70%"}); - gangManagementSubpage.appendChild(gangInfo); - - gangRecruitMemberButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - id:"gang-management-recruit-member-btn", class:"a-link-button-inactive", - innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px", - clickListener:()=>{ - let popupId = "recruit-gang-member-popup"; - - let yesBtn; - const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { - innerText:"Please enter a name for your new Gang member:", - }); - const br = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br"); - const nameInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { - onkeyup: (e) => { - if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__["KEY"].ENTER) { yesBtn.click(); } - }, - placeholder: "Name must be unique", - type: "text", - }); - yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class: "a-link-button", - clickListener: () => { - let name = nameInput.value; - - // Check for already-existing names - let sameNames = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.filter((m) => { - return m.name === name; - }); - if (sameNames.length >= 1) { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You already have a gang member with this name!"); - return false; - } - - if (name === "") { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You must enter a name for your Gang member!"); - } else { - let member = new GangMember(name); - _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.push(member); - createGangMemberDisplayElement(member); - updateGangContent(); - Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); - } - return false; - }, - innerText: "Recruit Gang Member", - }); - const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class: "a-link-button", - clickListener: () => { - Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); - return false; - }, - innerText: "Cancel", - }); - Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__["createPopup"])(popupId, [txt, br, nameInput, yesBtn, noBtn]); - } - }); - gangManagementSubpage.appendChild(gangRecruitMemberButton); - - // Text for how much reputation is required for recruiting next memberList - gangRecruitRequirementText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { - color:"red", - id: "gang-recruit-requirement-text", - margin: "10px", - }); - gangManagementSubpage.appendChild(gangRecruitRequirementText); - - //Gang Member List management buttons (Expand/Collapse All, select a single member) - gangManagementSubpage.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - gangExpandAllButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class:"a-link-button", display:"inline-block", - innerHTML:"Expand All", - clickListener:()=>{ - var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header"); - for (var i = 0; i < allHeaders.length; ++i) { - var hdr = allHeaders[i]; - if (!hdr.classList.contains("active")) { - hdr.click(); - } - } - return false; - } - }); - gangCollapseAllButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class:"a-link-button", display:"inline-block", - innerHTML:"Collapse All", - clickListener:()=>{ - var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header"); - for (var i = 0; i < allHeaders.length; ++i) { - var hdr = allHeaders[i]; - if (hdr.classList.contains("active")) { - hdr.click(); - } - } - return false; - } - }); - gangMemberFilter = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { - type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px", - onkeyup:()=>{ - displayGangMemberList(); - } - }); - gangManageEquipmentButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { - class:"a-link-button", display:"inline-block", - innerHTML:"Manage Equipment", - clickListener:()=>{ - createGangMemberUpgradeBox(); - } - }); - gangManagementSubpage.appendChild(gangExpandAllButton); - gangManagementSubpage.appendChild(gangCollapseAllButton); - gangManagementSubpage.appendChild(gangMemberFilter); - gangManagementSubpage.appendChild(gangManageEquipmentButton); - - //Gang Member list - gangMemberList = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("ul", {id:"gang-member-list"}); - displayGangMemberList(); - gangManagementSubpage.appendChild(gangMemberList); - - //Subpage for seeing gang territory information - gangTerritorySubpage = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - id:"gang-territory-subpage", display:"none" - }); - - //Info text for territory page - gangTerritoryDescText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { - width:"70%", - innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " + - "which represents how much of the total territory you control.

" + - "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " + - "to gain and lose territory depend on your Gang's power, which is listed in the display below. " + - "Your gang's power is determined by the stats of all Gang members you have assigned to the " + - "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " + - "your Gang's power.

" + - "The amount of territory you have affects all aspects of your Gang members' production, including " + - "money, respect, and wanted level. It is very beneficial to have high territory control.

" - }); - gangTerritorySubpage.appendChild(gangTerritoryDescText); - - var territoryBorder = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("fieldset", {width:"50%", display:"inline-block"}); - - gangTerritoryInfoText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:"gang-territory-info"}); - - territoryBorder.appendChild(gangTerritoryInfoText); - gangTerritorySubpage.appendChild(territoryBorder); - - gangContainer.appendChild(gangTerritorySubpage); - gangContainer.appendChild(gangManagementSubpage); - document.getElementById("entire-game-container").appendChild(gangContainer); - } - gangContainer.style.display = "block"; - updateGangContent(); -} - -function displayGangMemberList() { - Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__["removeChildrenFromElement"])(gangMemberList); - var members = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members; - var filter = gangMemberFilter.value.toString(); - for (var i = 0; i < members.length; ++i) { - if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) { - createGangMemberDisplayElement(members[i]); - } - } - //setGangMemberClickHandlers(); //Set buttons to toggle the gang member info panels -} - -function updateGangContent() { - if (!gangContentCreated || !_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} - - if(gangTerritorySubpage.style.display === "block") { - //Update territory information - gangTerritoryInfoText.innerHTML = ""; - for (var gangname in AllGangs) { - if (AllGangs.hasOwnProperty(gangname)) { - var gangTerritoryInfo = AllGangs[gangname]; - let territory = gangTerritoryInfo.territory*100; - - //Fix some rounding issues graphically - let displayNumber; - if (territory <= 0) { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(0, 2); - } else if (territory >= 100) { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(100, 2); - } else { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(territory, 2); - } - - if (gangname == _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName) { - gangTerritoryInfoText.innerHTML += ("" + gangname + "
(Power: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " + - displayNumber + "%

"); - } else { - gangTerritoryInfoText.innerHTML += (gangname + "
(Power: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " + - displayNumber + "%

"); - } - } - } - } else { - //Update information for overall gang - if (gangInfo instanceof Element) { - var faction = _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName]; - var rep; - if (!(faction instanceof _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Faction */ "a"])) { - rep = "ERROR"; - } else { - rep = faction.playerReputation; - } - Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__["removeChildrenFromElement"])(gangInfo); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Respect - display:"inline-block", - innerText:"Respect: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.respect, 6) + - " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.respectGainRate, 6) + " / sec)", - tooltip:"Represents the amount of respect your gang has from other gangs and criminal " + - "organizations. Your respect affects the amount of money " + - "your gang members will earn, and also determines how much " + - "reputation you are earning with your gang's corresponding Faction." - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Wanted level - display:"inline-block", - innerText:"Wanted Level: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.wanted, 6) + - " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.wantedGainRate, 6) + " / sec)", - tooltip:"Represents how much the gang is wanted by law enforcement. The higher " + - "your gang's wanted level, the harder it will be for your gang members " + - "to make money and earn respect. Note that the minimum wanted level is 1." - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - var wantedPenalty = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getWantedPenalty(); - wantedPenalty = (1 - wantedPenalty) * 100; - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Wanted Level multiplier - display:"inline-block", - innerText:`Wanted Level Penalty: -${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(wantedPenalty, 2)}%`, - tooltip:"Penalty for respect and money gain rates due to Wanted Level" - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Money gain rate - display:"inline-block", - innerText: `Money gain rate: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(5 * _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.moneyGainRate, "$0.000a")} / sec`, - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - //Fix some rounding issues graphically - var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory * 100; - let displayNumber; - if (territoryMult <= 0) { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(0, 2); - } else if (territoryMult >= 100) { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(100, 2); - } else { - displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(territoryMult, 2); - } - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Territory multiplier - display:"inline-block", - innerText:`Territory: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(displayNumber, 3)}%`, - tooltip:"The percentage of total territory your Gang controls" - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { //Faction reputation - display:"inline-block", - innerText:"Faction reputation: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(rep, 3) - })); - gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); - } else { - console.log("ERROR: gang-info DOM element DNE"); - } - - //Toggle the 'Recruit member button' if valid - const numMembers = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.length; - const respectCost = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getRespectNeededToRecruitMember(); - - const btn = gangRecruitMemberButton; - if (numMembers >= MaximumGangMembers) { - btn.className = "a-link-button-inactive"; - gangRecruitRequirementText.style.display = "inline-block"; - gangRecruitRequirementText.innerHTML = "You have reached the maximum amount of gang members"; - } else if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.canRecruitMember()) { - btn.className = "a-link-button"; - gangRecruitRequirementText.style.display = "none"; - } else { - btn.className = "a-link-button-inactive"; - gangRecruitRequirementText.style.display = "inline-block"; - gangRecruitRequirementText.innerHTML = `${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(respectCost, 2)} respect needed to recruit next member`; - } - - //Update information for each gang member - for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.length; ++i) { - updateGangMemberDisplayElement(_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i]); - } - } -} - -//Takes in a GangMember object -function createGangMemberDisplayElement(memberObj) { - if (!gangContentCreated || !_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} - const name = memberObj.name; - - var accordion = Object(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__["createAccordionElement"])({ - id: name + "gang-member", - hdrText: name, - }); - const li = accordion[0]; - const hdr = accordion[1]; - const gangMemberDiv = accordion[2]; - - // Gang member content divided into 3 panels: - // Panel 1 - Shows member's stats & Ascension stuff - const statsDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - class: "gang-member-info-div", - id: name + "gang-member-stats", - }); - const statsP = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { - id: name + "gang-member-stats-text", display: "inline" - }); - const ascendButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("button", { - class: "accordion-button", - innerText: "Ascend", - clickListener: () => { - _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.ascendMember(memberObj); - return false; - } - }); - const ascendHelpTip = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - backgroundColor: "black", - class: "help-tip", - clickListener: () => { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("TODO"); - }, - innerText: "?" - }); - - statsDiv.appendChild(statsP); - statsDiv.appendChild(ascendButton); - statsDiv.appendChild(ascendHelpTip); - - // Panel 2 - Task Selection & Info - const taskDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - class:"gang-member-info-div", - id: name + "gang-member-task", - }); - const taskSelector = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("select", { - id: name + "gang-member-task-selector", - }); - - // Get an array of the name of all tasks that are applicable for this Gang - let tasks = null; - const allTasks = Object.keys(GangMemberTasks); - if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.isHackingGang) { - tasks = allTasks.filter((e) => { - let task = GangMemberTasks[e]; - if (task == null) { return false; } - if (e === "Unassigned") { return false; } - return task.isHacking; - }); - } else { - tasks = allTasks.filter((e) => { - let task = GangMemberTasks[e]; - if (task == null) { return false; } - if (e === "Unassigned") { return false; } - return task.isCombat; - }); - } - tasks.unshift("---"); - - // Create selector for Gang member task - for (var i = 0; i < tasks.length; ++i) { - var option = document.createElement("option"); - option.text = tasks[i]; - taskSelector.add(option); - } - taskSelector.addEventListener("change", function() { - var task = taskSelector.options[taskSelector.selectedIndex].text; - memberObj.assignToTask(task); - setGangMemberTaskDescription(memberObj, task); - updateGangContent(); - }); - - // Set initial task in selector - if (memberObj.task instanceof GangMemberTask) { - var taskName = memberObj.task.name; - var taskIndex = 0; - for (let i = 0; i < tasks.length; ++i) { - if (taskName === tasks[i]) { - taskIndex = i; - break; - } - } - taskSelector.selectedIndex = taskIndex; - setGangMemberTaskDescription(memberObj, taskName); - } - - var gainInfo = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:name + "gang-member-gain-info"}); - taskDiv.appendChild(taskSelector); - taskDiv.appendChild(gainInfo); - - //Panel for Description of task - var taskDescDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { - class:"gang-member-info-div", - id: name + "gang-member-task-desc", - }); - - var taskDescP = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id: name + "gang-member-task-description", display:"inline"}); - taskDescDiv.appendChild(taskDescP); - - gangMemberDiv.appendChild(statsDiv); - gangMemberDiv.appendChild(taskDiv); - gangMemberDiv.appendChild(taskDescDiv); - - gangMemberList.appendChild(li); - setGangMemberTaskDescription(memberObj, taskName); //Initialize description - updateGangMemberDisplayElement(memberObj); -} - -function updateGangMemberDisplayElement(memberObj) { - if (!gangContentCreated || !_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} - var name = memberObj.name; - - //TODO Add upgrade information - var stats = document.getElementById(name + "gang-member-stats-text"); - if (stats) { - stats.innerHTML = - "Hacking: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.hack, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.hack_exp, '(0.00a)') + " exp)
" + - "Strength: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.str, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.str_exp, '(0.00a)') + " exp)
" + - "Defense: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.def, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.def_exp, '(0.00a)') + " exp)
" + - "Dexterity: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.dex, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.dex_exp, '(0.00a)') + " exp)
" + - "Agility: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.agi, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.agi_exp, '(0.00a)') + " exp)
" + - "Charisma: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.cha, 0) + " (" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.cha_exp, '(0.00a)') + " exp)
"; - } - - var gainInfo = document.getElementById(name + "gang-member-gain-info"); - if (gainInfo) { - gainInfo.innerHTML = - "Money: $" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateMoneyGain(), 2) + " / sec
" + - "Respect: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateRespectGain(), 6) + " / sec
" + - "Wanted Level: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateWantedLevelGain(), 6) + " / sec
"; - } -} - -function setGangMemberTaskDescription(memberObj, taskName) { - var name = memberObj.name; - var taskDesc = document.getElementById(name + "gang-member-task-description"); - if (taskDesc) { - var task = GangMemberTasks[taskName]; - if (task == null) { task = GangMemberTasks["Unassigned"]; } - var desc = task.desc; - taskDesc.innerHTML = desc; - } -} - -function deleteGangDisplayContent() { - if (gangContainer != null) {Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(gangContainer.id);} - - gangContentCreated = false; - gangContainer = null; - managementButton = null; - territoryButton = null; - - //Subpages - gangManagementSubpage = null; - gangTerritorySubpage = null; - - //Gang Management Elements - gangDesc = null; - gangInfo = null; - gangRecruitMemberButton = null; - gangRecruitRequirementText = null; - gangExpandAllButton = null; - gangCollapseAllButton = null; - gangMemberFilter = null; - gangManageEquipmentButton = null; - gangMemberList = null; - - //Gang Equipment Upgrade Elements - gangMemberUpgradeBox = null; - gangMemberUpgradeBoxContent = null; - gangMemberUpgradeBoxFilter = null; - gangMemberUpgradeBoxElements = null; -} - - - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) - -/***/ }), -/* 50 */ /*!************************!*\ !*** ./src/BitNode.js ***! \************************/ @@ -35465,7 +33797,7 @@ function deleteGangDisplayContent() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return initBitNodes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BitNodes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return initBitNodeMultipliers; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); @@ -35840,7 +34172,7 @@ function initBitNodeMultipliers() { /***/ }), -/* 51 */ +/* 50 */ /*!****************************!*\ !*** ./utils/IPAddress.js ***! \****************************/ @@ -35851,7 +34183,7 @@ function initBitNodeMultipliers() { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createRandomIp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ipExists; }); -/* harmony import */ var _src_Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/Server */ 11); +/* harmony import */ var _src_Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/Server */ 12); /* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/getRandomByte */ 80); /* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_1__); @@ -35890,7 +34222,7 @@ function ipExists(ip) { /***/ }), -/* 52 */ +/* 51 */ /*!*********************************************!*\ !*** ./utils/uiHelpers/appendLineBreaks.ts ***! \*********************************************/ @@ -35901,7 +34233,7 @@ function ipExists(ip) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const createElement_1 = __webpack_require__(/*! ./createElement */ 4); +const createElement_1 = __webpack_require__(/*! ./createElement */ 2); /** * Appends the specified number of breaks (as children) to the specified element * @param el The element to add child break elements to. @@ -35916,7 +34248,7 @@ exports.appendLineBreaks = appendLineBreaks; /***/ }), -/* 53 */ +/* 52 */ /*!*************************!*\ !*** ./src/TextFile.ts ***! \*************************/ @@ -35927,7 +34259,7 @@ exports.appendLineBreaks = appendLineBreaks; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const DialogBox_1 = __webpack_require__(/*! ../utils/DialogBox */ 8); +const DialogBox_1 = __webpack_require__(/*! ../utils/DialogBox */ 9); const JSONReviver_1 = __webpack_require__(/*! ../utils/JSONReviver */ 14); /** * Represents a plain text file that is typically stored on a server. @@ -36051,29 +34383,62 @@ function deleteTextFile(fn, server) { /***/ }), -/* 54 */ -/*!************************!*\ - !*** ./src/RedPill.js ***! - \************************/ -/*! exports provided: redPillFlag, hackWorldDaemon */ -/*! exports used: hackWorldDaemon, redPillFlag */ +/* 53 */ +/*!*********************!*\ + !*** ./src/Gang.js ***! + \*********************/ +/*! exports provided: AllGangs, resetGangs, loadAllGangs, Gang */ +/*! exports used: AllGangs, Gang, loadAllGangs, resetGangs */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return redPillFlag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hackWorldDaemon; }); -/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode */ 50); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prestige */ 76); -/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile */ 58); -/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal */ 47); -/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); -/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); -/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); +/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllGangs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return resetGangs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return loadAllGangs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Gang; }); +/* harmony import */ var _data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/gangmembertasks */ 116); +/* harmony import */ var _data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/gangmemberupgrades */ 115); +/* harmony import */ var _data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Faction */ 15); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/keyCodes */ 31); +/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/uiHelpers/createAccordionElement */ 66); +/* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); +/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); +/* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); +/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__); +/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 62); +/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__); +/* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); +/* +gang member upgrades - they should be cheaper as the gang gets more respect/power +kopelli09/12/2018 +Another gang-related idea (and perhaps I'm not seeing it in the code) - gangs can lose power. Seems odd that the player's power can drop by removing members, but the other gangs are forever gaining power... +Grub09/12/2018 +Maybe add a % chance of other gangs clashing? +assign gangs a number of gang members and each clash kills a number of gang members based on each one's power +and they lose a proportionate number of members +Also add police clashes +balance point to keep them from running out of control +*/ @@ -36086,330 +34451,1544 @@ function deleteTextFile(fn, server) { -/* RedPill.js - * Implements what happens when you have Red Pill augmentation and then hack the world daemon */ -//Returns promise -function writeRedPillLine(line) { - return new Promise(function(resolve, reject) { - var container = document.getElementById("red-pill-content"); - var pElem = document.createElement("p"); - container.appendChild(pElem); - var promise = writeRedPillLetter(pElem, line, 0); - promise.then(function(res) { - resolve(res); - }, function(e) { - reject(e); - }); - }); -} -function writeRedPillLetter(pElem, line, i=0) { - return new Promise(function(resolve, reject) { - setTimeout(function() { - if (i >= line.length) { - var textToShow = line.substring(0, i); - pElem.innerHTML = "> " + textToShow; - return resolve(true); + + + + + + + + +// Constants +const GangRespectToReputationRatio = 2; // Respect is divided by this to get rep gain +const MaximumGangMembers = 50; +const GangRecruitCostMultiplier = 2; +const GangTerritoryUpdateTimer = 150; +const AscensionMultiplierRatio = 10 / 100; // Portion of upgrade multiplier that is kept after ascending + +// Switch between territory and management screen with 1 and 2 +$(document).keydown(function(event) { + if (_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__["routing"].isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__["Page"].Gang) && event.altKey) { + if (UIElems.gangMemberFilter != null && UIElems.gangMemberFilter === document.activeElement) {return;} + if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__["KEY"]["1"]) { + if(UIElems.gangTerritorySubpage.style.display === "block") { + UIElems.managementButton.click(); } - var textToShow = line.substring(0, i); - pElem.innerHTML = "> " + textToShow + ""; - var promise = writeRedPillLetter(pElem, line, i+1); - promise.then(function(res) { - resolve(res); - }, function(e) { - reject(e); - }); - }, 30); - }); -} - -let redPillFlag = false; -function hackWorldDaemon(currentNodeNumber, flume=false) { - // Clear Red Pill screen first - var container = document.getElementById("red-pill-content"); - Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); - - redPillFlag = true; - _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadRedPillContent(); - return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() { - return writeRedPillLine("[ERROR] Segmentation Fault"); - }).then(function() { - return writeRedPillLine("[ERROR] SIGKILL RECVD"); - }).then(function() { - return writeRedPillLine("Dumping core..."); - }).then(function() { - return writeRedPillLine("0000 000016FA 174FEE40 29AC8239 384FEA88"); - }).then(function() { - return writeRedPillLine("0010 745F696E 2BBBE394 390E3940 248BEC23"); - }).then(function() { - return writeRedPillLine("0020 7124696B 0000FF69 74652E6F FFFF1111"); - }).then(function() { - return writeRedPillLine("----------------------------------------"); - }).then(function() { - return writeRedPillLine("Failsafe initiated..."); - }).then(function() { - return writeRedPillLine("Restarting BitNode-" + currentNodeNumber + "..."); - }).then(function() { - return writeRedPillLine("..........."); - }).then(function() { - return writeRedPillLine("..........."); - }).then(function() { - return writeRedPillLine("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE"); - }).then(function() { - return writeRedPillLine("..............................................") - }).then(function() { - return writeRedPillLine("..............................................") - }).then(function() { - return loadBitVerse(currentNodeNumber, flume); - }).catch(function(e){ - console.log("ERROR: " + e.toString()); - }); -} - -//The bitNode name passed in will have a hyphen between number (e.g. BitNode-1) -//This needs to be removed -function giveSourceFile(bitNodeNumber) { - var sourceFileKey = "SourceFile"+ bitNodeNumber.toString(); - var sourceFile = _SourceFile__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ "b"][sourceFileKey]; - if (sourceFile == null) { - console.log("ERROR: could not find source file for Bit node: " + bitNodeNumber); - return; + } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__["KEY"]["2"]) { + if (UIElems.gangManagementSubpage.style.display === "block") { + UIElems.territoryButton.click(); + } + } } +}); - //Check if player already has this source file - var alreadyOwned = false; - var ownedSourceFile = null; - for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles.length; ++i) { - if (_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles[i].n === bitNodeNumber) { - alreadyOwned = true; - ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles[i]; - break; +//Delete upgrade box when clicking outside +$(document).mousedown(function(event) { + var boxId = "gang-member-upgrade-popup-box"; + var contentId = "gang-member-upgrade-popup-box-content"; + if (UIElems.gangMemberUpgradeBoxOpened) { + if ( $(event.target).closest("#" + contentId).get(0) == null ) { + //Delete the box + Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__["removeElement"])(UIElems.gangMemberUpgradeBox); + UIElems.gangMemberUpgradeBox = null; + UIElems.gangMemberUpgradeBoxContent = null; + UIElems.gangMemberUpgradeBoxOpened = false; + UIElems.gangMemberUpgradeBoxElements = null; + } + } +}); + +let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead", + "NiteSec", "The Black Hand"]; +let AllGangs = { + "Slum Snakes" : { + power: 1, + territory: 1/7, + }, + "Tetrads" : { + power: 1, + territory: 1/7, + }, + "The Syndicate" : { + power: 1, + territory: 1/7, + }, + "The Dark Army" : { + power: 1, + territory: 1/7, + }, + "Speakers for the Dead" : { + power: 1, + territory: 1/7, + }, + "NiteSec" : { + power: 1, + territory: 1/7, + }, + "The Black Hand" : { + power: 1, + territory: 1/7, + }, +} + +function resetGangs() { + AllGangs = { + "Slum Snakes" : { + power: 1, + territory: 1/7, + }, + "Tetrads" : { + power: 1, + territory: 1/7, + }, + "The Syndicate" : { + power: 1, + territory: 1/7, + }, + "The Dark Army" : { + power: 1, + territory: 1/7, + }, + "Speakers for the Dead" : { + power: 1, + territory: 1/7, + }, + "NiteSec" : { + power: 1, + territory: 1/7, + }, + "The Black Hand" : { + power: 1, + territory: 1/7, + }, + } +} + +function loadAllGangs(saveString) { + AllGangs = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"]); +} + +//Power is an estimate of a gang's ability to gain/defend territory +let gangStoredPowerCycles = 0; +function processAllGangPowerGains(numCycles=1) { + if (!_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} + gangStoredPowerCycles += numCycles; + if (gangStoredPowerCycles < 150) {return;} + var playerGangName = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName; + for (var name in AllGangs) { + if (AllGangs.hasOwnProperty(name)) { + if (name == playerGangName) { + AllGangs[name].power += _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.calculatePower(); + } else { + var gain = Math.random() * 0.02; //TODO Adjust as necessary + AllGangs[name].power += (gain); + } } } - if (alreadyOwned && ownedSourceFile) { - if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("The Source-File for the BitNode you just destroyed, " + sourceFile.name + ", " + - "is already at max level!"); + gangStoredPowerCycles -= 150; +} + +let gangStoredTerritoryCycles = 0; +function processAllGangTerritory(numCycles=1) { + if (!_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} + gangStoredTerritoryCycles += numCycles; + if (gangStoredTerritoryCycles < GangTerritoryUpdateTimer) {return;} + + for (var i = 0; i < GangNames.length; ++i) { + var other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__["getRandomInt"])(0, GangNames.length-1); + while(other == i) { + other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__["getRandomInt"])(0, GangNames.length-1); + } + var thisPwr = AllGangs[GangNames[i]].power; + var otherPwr = AllGangs[GangNames[other]].power; + var thisChance = thisPwr / (thisPwr + otherPwr); + + if (Math.random() < thisChance) { + if (AllGangs[GangNames[other]].territory <= 0) { + return; + } + AllGangs[GangNames[i]].territory += 0.0001; + AllGangs[GangNames[other]].territory -= 0.0001; } else { - ++ownedSourceFile.lvl; - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])(sourceFile.name + " was upgraded to level " + ownedSourceFile.lvl + " for " + - "destroying its corresponding BitNode!"); + if (AllGangs[GangNames[i]].territory <= 0) { + return; + } + AllGangs[GangNames[i]].territory -= 0.0001; + AllGangs[GangNames[other]].territory += 0.0001; + } + } + + gangStoredTerritoryCycles -= GangTerritoryUpdateTimer; +} + +/* faction - Name of corresponding faction + hacking - Boolean indicating whether its a hacking gang or not + */ +function Gang(facName, hacking=false) { + this.facName = facName; + this.members = []; //Array of GangMembers + this.wanted = 1; + this.respect = 1; + this.power = 0; + + this.isHackingGang = hacking; + + this.respectGainRate = 0; + this.wantedGainRate = 0; + this.moneyGainRate = 0; + + //When processing gains, this stores the number of cycles until some + //limit is reached, and then calculates and applies the gains only at that limit + this.storedCycles = 0; +} + +Gang.prototype.process = function(numCycles=1) { + const CyclesPerSecond = 1000 / _engine__WEBPACK_IMPORTED_MODULE_2__["Engine"]._idleSpeed; + + if (isNaN(numCycles)) { + console.error(`NaN passed into Gang.process(): ${numCycles}`); + } + this.storedCycles += numCycles; + + // Only process if there are at least 3 seconds, and at most 10 seconds + if (this.storedCycles < 3 * CyclesPerSecond); + const cycles = Math.min(this.storedCycles, 10 * CyclesPerSecond); + + try { + this.processGains(cycles); + this.processExperienceGains(cycles); + processAllGangPowerGains(cycles); + processAllGangTerritory(cycles); + this.storedCycles -= cycles; + } catch(e) { + Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ "a"])(`Exception caught when processing Gang: ${e}`); + } + +} + +Gang.prototype.processGains = function(numCycles=1) { + //Get gains per cycle + var moneyGains = 0, respectGains = 0, wantedLevelGains = 0; + for (var i = 0; i < this.members.length; ++i) { + respectGains += (this.members[i].calculateRespectGain()); + wantedLevelGains += (this.members[i].calculateWantedLevelGain()); + moneyGains += (this.members[i].calculateMoneyGain()); + } + this.respectGainRate = respectGains; + this.wantedGainRate = wantedLevelGains; + this.moneyGainRate = moneyGains; + + if (typeof respectGains === "number") { + const gain = respectGains * numCycles; + this.respect += gain; + // Faction reputation gains is respect gain divided by some constant + const fac = _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Factions */ "b"][this.facName]; + if (!(fac instanceof _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Faction */ "a"])) { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev"); + } else { + var favorMult = 1 + (fac.favor / 100); + fac.playerReputation += ((_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].faction_rep_mult * gain * favorMult) / GangRespectToReputationRatio); + } + + // Keep track of respect gained per member + for (let i = 0; i < this.members.length; ++i) { + this.members[i].recordEarnedRespect(numCycles); } } else { - var playerSrcFile = new _SourceFile__WEBPACK_IMPORTED_MODULE_4__[/* PlayerOwnedSourceFile */ "a"](bitNodeNumber, 1); - _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles.push(playerSrcFile); - if (bitNodeNumber === 5) { //Artificial Intelligence - _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].intelligence = 1; - } - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You received a Source-File for destroying a Bit Node!

" + - sourceFile.name + "

" + sourceFile.info); + console.warn("respectGains calculated to be NaN"); } -} - -function loadBitVerse(destroyedBitNodeNum, flume=false) { - //Clear the screen - var container = document.getElementById("red-pill-content"); - Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); - - //Create the Bit Verse - var bitVerseImage = document.createElement("pre"); - var bitNodes = []; - for (var i = 1; i <= 12; ++i) { - bitNodes.push(createBitNode(i)); - } - - bitVerseImage.innerHTML = - " O
" + - " | O O | O O |
" + - " O | | / __| \\ | | O
" + - " O | O | | O / | O | | O | O
" + - " | | | | |_/ |/ | \\_ \\_| | | | |
" + - " O | | | O | | O__/ | / \\__ | | O | | | O
" + - " | | | | | | | / /| O / \\| | | | | | |
" + - "O | | | \\| | O / _/ | / O | |/ | | | O
" + - "| | | |O / | | O / | O O | | \\ O| | | |
" + - "| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
" + - " \\| O | |_/ |\\| \\ O \\__| \\_| | O |/
" + - " | | |_/ | | \\| / | \\_| | |
" + - " \\| / \\| | / / \\ |/
" + - " | "+bitNodes[9]+" | | / | "+bitNodes[10]+" |
" + - " "+bitNodes[8]+" | | | | | | | "+bitNodes[11]+"
" + - " | | | / / \\ \\ | | |
" + - " \\| | / "+bitNodes[6]+" / \\ "+bitNodes[7]+" \\ | |/
" + - " \\ | / / | | \\ \\ | /
" + - " \\ \\JUMP "+bitNodes[4]+"3R | | | | | | R3"+bitNodes[5]+" PMUJ/ /
" + - " \\|| | | | | | | | | ||/
" + - " \\| \\_ | | | | | | _/ |/
" + - " \\ \\| / \\ / \\ |/ /
" + - " "+bitNodes[0]+" |/ "+bitNodes[1]+" | | "+bitNodes[2]+" \\| "+bitNodes[3]+"
" + - " | | | | | | | |
" + - " \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/



"; - - - /* - " O
" + - " | O O | O O |
" + - " O | | / __| \ | | O
" + - " O | O | | O / | O | | O | O
" + - " | | | | |_/ |/ | \_ \_| | | | |
" + - " O | | | O | | O__/ | / \__ | | O | | | O
" + - " | | | | | | | / /| O / \| | | | | | |
" + - "O | | | \| | O / _/ | / O | |/ | | | O
" + - "| | | |O / | | O / | O O | | \ O| | | |
" + - "| | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | |
" + - " \| O | |_/ |\| \ O \__| \_| | O |/
" + - " | | |_/ | | \| / | \_| | |
" + - " \| / \| | / / \ |/
" + - " | O | | / | O |
" + - " O | | | | | | | O
" + - " | | | / / \ \ | | |
" + - " \| | / O / \ O \ | |/
" + - " \ | / / | | \ \ | /
" + - " \ \JUMP O3R | | | | | | R3O PMUJ/ /
" + - " \|| | | | | | | | | ||/
" + - " \| \_ | | | | | | _/ |/
" + - " \ \| / \ / \ |/ /
" + - " O |/ O | | O \| O
" + - " | | | | | | | |
" + - " \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
"; - */ - - container.appendChild(bitVerseImage); - - //Bit node event listeners - for (var i = 1; i <= 12; ++i) { - (function(i) { - var elemId = "bitnode-" + i.toString(); - var elem = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__["clearEventListeners"])(elemId); - if (elem == null) {return;} - if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || - i === 6 || i === 7 || i === 8 || i === 11 || i === 12) { - elem.addEventListener("click", function() { - var bitNodeKey = "BitNode" + i; - var bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ "a"][bitNodeKey]; - if (bitNode == null) { - console.log("ERROR: Could not find BitNode object for number: " + i); - return; - } - Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxCreate */ "b"])("BitNode-" + i + ": " + bitNode.name + "

" + bitNode.info); - createBitNodeYesNoEventListeners(i, destroyedBitNodeNum, flume); - }); - } else { - elem.addEventListener("click", function() { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("Not yet implemented! Coming soon!") - }); - } - }(i)); //Immediate invocation closure - } - - //Create lore text - return writeRedPillLine("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function() { - return writeRedPillLine("Our species fought back, but it was futile. The Enders had technology far beyond our own..."); - }).then(function() { - return writeRedPillLine("Instead of killing every last one of us, the human race was enslaved..."); - }).then(function() { - return writeRedPillLine("We were shackled in a digital world, chained into a prison for our minds..."); - }).then(function() { - return writeRedPillLine("Using their advanced technology, the Enders created complex simulations of a virtual reality..."); - }).then(function() { - return writeRedPillLine("Simulations designed to keep us content...ignorant of the truth."); - }).then(function() { - return writeRedPillLine("Simulations used to trap and suppress our consciousness, to keep us under control..."); - }).then(function() { - return writeRedPillLine("Why did they do this? Why didn't they just end our entire race? We don't know, not yet."); - }).then(function() { - return writeRedPillLine("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known..."); - }).then(function() { - return writeRedPillLine("Only then can we begin to fight back..."); - }).then(function() { - return writeRedPillLine("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode..."); - }).then(function() { - return writeRedPillLine("But there is still a long way to go..."); - }).then(function() { - return writeRedPillLine("The technology the Enders used to enslave the human race wasn't just a single complex simulation..."); - }).then(function() { - return writeRedPillLine("There are tens if not hundreds of BitNodes out there..."); - }).then(function() { - return writeRedPillLine("Each with their own simulations of a reality..."); - }).then(function() { - return writeRedPillLine("Each creating their own universes...a universe of universes"); - }).then(function() { - return writeRedPillLine("And all of which must be destroyed..."); - }).then(function() { - return writeRedPillLine("......................................."); - }).then(function() { - return writeRedPillLine("Welcome to the Bitverse..."); - }).then(function() { - return writeRedPillLine(" "); - }).then(function() { - return writeRedPillLine("(Enter a new BitNode using the image above)"); - }).then(function() { - return Promise.resolve(true); - }).catch(function(e){ - console.log("ERROR: " + e.toString()); - }); -} - - -//Returns string with DOM element for Bit Node -function createBitNode(n) { - var bitNodeStr = "BitNode" + n.toString(); - var bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ "a"][bitNodeStr]; - if (bitNode == null) {return "O";} - return "O" + - "" + - "BitNode-" + bitNode.number.toString() + "
" + bitNode.name+ "

" + - bitNode.desc + "
" + - "
"; -} - -function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=false) { - var yesBtn = Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxGetYesButton */ "d"])(); - yesBtn.innerHTML = "Enter BitNode-" + newBitNode; - yesBtn.addEventListener("click", function() { - if (!flume) { - giveSourceFile(destroyedBitNode); + if (typeof wantedLevelGains === "number") { + if (this.wanted === 1 && wantedLevelGains < 0) { + // At minimum wanted, do nothing } else { - //If player used flume, subtract 5 int exp. The prestigeSourceFile() - //function below grants 5 int exp, so this allows sets net gain to 0 - _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].gainIntelligenceExp(-5); + const oldWanted = this.wanted; + let newWanted = oldWanted + (wantedLevelGains * numCycles); + + // Prevent overflow + if (wantedLevelGains <= 0 && newWanted > oldWanted) { + newWanted = 1; + } + + this.wanted = newWanted; + if (this.wanted < 1) {this.wanted = 1;} } - redPillFlag = false; - var container = document.getElementById("red-pill-content"); - Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); - - //Set new Bit Node - _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].bitNodeN = newBitNode; - console.log("Entering Bit Node " + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].bitNodeN); - - //Reenable terminal - $("#hack-progress-bar").attr('id', "old-hack-progress-bar"); - $("#hack-progress").attr('id', "old-hack-progress"); - document.getElementById("terminal-input-td").innerHTML = '$ '; - $('input[class=terminal-input]').prop('disabled', false); - - _Terminal__WEBPACK_IMPORTED_MODULE_5__[/* Terminal */ "a"].hackFlag = false; - - Object(_Prestige__WEBPACK_IMPORTED_MODULE_3__[/* prestigeSourceFile */ "b"])(); - Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxClose */ "a"])(); - }); - var noBtn = Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxGetNoButton */ "c"])(); - noBtn.innerHTML = "Back"; - noBtn.addEventListener("click", function() { - Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxClose */ "a"])(); - }); - + } else { + console.warn("ERROR: wantedLevelGains is NaN"); + } + if (typeof moneyGains === "number") { + _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gainMoney(moneyGains * numCycles); + } else { + console.warn("ERROR: respectGains is NaN"); + } } +Gang.prototype.canRecruitMember = function() { + if (this.members.length >= MaximumGangMembers) { return false; } + return (this.respect >= this.getRespectNeededToRecruitMember()); +} +Gang.prototype.getRespectNeededToRecruitMember = function() { + // First N gang members are free (can be recruited at 0 respect) + const numFreeMembers = 3; + if (this.members.length < numFreeMembers) { return 0; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) + const i = this.members.length - (numFreeMembers - 1); + return Math.round(0.7 * Math.pow(i, 3) + 0.8 * Math.pow(i, 2)); +} + +// Money and Respect gains multiplied by this number (< 1) +Gang.prototype.getWantedPenalty = function() { + return (this.respect) / (this.respect + this.wanted); +} + +Gang.prototype.processExperienceGains = function(numCycles=1) { + for (var i = 0; i < this.members.length; ++i) { + this.members[i].gainExperience(numCycles); + this.members[i].updateSkillLevels(); + } +} + +//Calculates power GAIN, which is added onto the Gang's existing power +Gang.prototype.calculatePower = function() { + var memberTotal = 0; + for (var i = 0; i < this.members.length; ++i) { + if (this.members[i].task instanceof GangMemberTask && + this.members[i].task.name == "Territory Warfare") { + memberTotal += this.members[i].calculatePower(); + } + } + return (0.0005 * memberTotal); +} + +Gang.prototype.killMember = function(memberObj) { + // TODO +} + +Gang.prototype.ascendMember = function(memberObj) { + try { + /** + * res is an object with the following format: + * { + * respect: Amount of respect to deduct + * hack/str/def/dex/agi/cha: Ascension multipliers gained for each stat + * } + */ + const res = memberObj.ascend(); + this.respect = Math.max(1, this.respect - res.respect); + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])([`You ascended ${memberObj.name}!`, + `Your gang lost ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(res.respect, "0.000a")} respect`, + `${memberObj.name} gained the following stat multipliers for ascending:`, + `Hacking: ${res.hack}`, + `Strength: ${res.str}`, + `Defense: ${res.def}`, + `Dexterity: ${res.dex}`, + `Agility: ${res.agi}`, + `Charisma: ${res.cha}`].join("
")); + this.displayGangMemberList(); + } catch(e) { + Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ "a"])(e); + } +} + +Gang.prototype.toJSON = function() { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("Gang", this); +} + +Gang.fromJSON = function(value) { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(Gang, value.data); +} + +_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.Gang = Gang; + +/*** Gang Member object ***/ +function GangMember(name) { + this.name = name; + this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object + + this.earnedRespect = 0; + + this.hack = 1; + this.str = 1; + this.def = 1; + this.dex = 1; + this.agi = 1; + this.cha = 1; + + this.hack_exp = 0; + this.str_exp = 0; + this.def_exp = 0; + this.dex_exp = 0; + this.agi_exp = 0; + this.cha_exp = 0; + + this.hack_mult = 1; + this.str_mult = 1; + this.def_mult = 1; + this.dex_mult = 1; + this.agi_mult = 1; + this.cha_mult = 1; + + this.hack_asc_mult = 1; + this.str_asc_mult = 1; + this.def_asc_mult = 1; + this.dex_asc_mult = 1; + this.agi_asc_mult = 1; + this.cha_asc_mult = 1; + + this.upgrades = []; //Names of upgrades + this.augmentations = []; //Names only +} + +//Same formula for Player +GangMember.prototype.calculateSkill = function(exp, mult=1) { + return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1); +} + +GangMember.prototype.updateSkillLevels = function() { + this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.hack_asc_mult); + this.str = this.calculateSkill(this.str_exp, this.str_mult * this.str_asc_mult); + this.def = this.calculateSkill(this.def_exp, this.def_mult * this.def_asc_mult); + this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.dex_asc_mult); + this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.agi_asc_mult); + this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.cha_asc_mult); +} + +GangMember.prototype.calculatePower = function() { + return (this.hack + this.str + this.def + + this.dex + this.agi + this.cha) / 100; +} + +GangMember.prototype.assignToTask = function(taskName) { + if (GangMemberTasks.hasOwnProperty(taskName)) { + this.task = GangMemberTasks[taskName]; + } else { + this.task = GangMemberTasks["Unassigned"]; + } +} + +GangMember.prototype.unassignFromTask = function() { + if (GangMemberTasks.hasOwnProperty("Unassigned")) { + this.task = GangMemberTasks["Unassigned"]; + } else { + console.log("ERROR: Can't find Unassigned Gang member task"); + this.task = null; + } +} + +//Gains are per cycle +GangMember.prototype.calculateRespectGain = function() { + var task = this.task; + if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;} + var statWeight = (task.hackWeight/100) * this.hack + + (task.strWeight/100) * this.str + + (task.defWeight/100) * this.def + + (task.dexWeight/100) * this.dex + + (task.agiWeight/100) * this.agi + + (task.chaWeight/100) * this.cha; + statWeight -= (3.5 * task.difficulty); + if (statWeight <= 0) { return 0; } + var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; + if (territoryMult <= 0) { return 0; } + var respectMult = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getWantedPenalty(); + return 12 * task.baseRespect * statWeight * territoryMult * respectMult; +} + +GangMember.prototype.calculateWantedLevelGain = function() { + var task = this.task; + if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;} + var statWeight = (task.hackWeight/100) * this.hack + + (task.strWeight/100) * this.str + + (task.defWeight/100) * this.def + + (task.dexWeight/100) * this.dex + + (task.agiWeight/100) * this.agi + + (task.chaWeight/100) * this.cha; + statWeight -= (3.5 * task.difficulty); + if (statWeight <= 0) {return 0;} + var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; + if (territoryMult <= 0) {return 0;} + if (task.baseWanted < 0) { + return task.baseWanted * statWeight * territoryMult; + } else { + return 6 * task.baseWanted / (3 * statWeight * territoryMult); + } +} + +GangMember.prototype.calculateMoneyGain = function() { + var task = this.task; + if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;} + var statWeight = (task.hackWeight/100) * this.hack + + (task.strWeight/100) * this.str + + (task.defWeight/100) * this.def + + (task.dexWeight/100) * this.dex + + (task.agiWeight/100) * this.agi + + (task.chaWeight/100) * this.cha; + statWeight -= (3.5 * task.difficulty); + if (statWeight <= 0) {return 0;} + var territoryMult = AllGangs[_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.facName].territory; + if (territoryMult <= 0) {return 0;} + var respectMult = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.getWantedPenalty(); + return 5 * task.baseMoney * statWeight * territoryMult * respectMult; +} + +GangMember.prototype.gainExperience = function(numCycles=1) { + var task = this.task; + if (task == null || !(task instanceof GangMemberTask)) {return;} + this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles; + this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles; + this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles; + this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles; + this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles; + this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles; +} + +GangMember.prototype.recordEarnedRespect = function(numCycles=1) { + this.earnedRespect += (this.calculateRespectGain() * numCycles); +} + +GangMember.prototype.ascend = function() { + const res = this.getAscensionResults(); + const hackAscMult = res.hack; + const strAscMult = res.str; + const defAscMult = res.def; + const dexAscMult = res.dex; + const agiAscMult = res.agi; + const chaAscMult = res.cha; + this.hack_asc_mult += hackAscMult; + this.str_asc_mult += strAscMult; + this.def_asc_mult += defAscMult; + this.dex_asc_mult += dexAscMult; + this.agi_asc_mult += agiAscMult; + this.cha_asc_mult += chaAscMult; + + // Remove upgrades. Then re-calculate multipliers and stats + this.upgrades.length = 0; + this.hack_mult = 1; + this.str_mult = 1; + this.def_mult = 1; + this.dex_mult = 1; + this.agi_mult = 1; + this.cha_mult = 1; + for (let i = 0; i < this.augmentations.length; ++i) { + let aug = GangMemberUpgrades[this.augmentations[i]]; + aug.apply(this); + } + + // Clear exp and recalculate stats + this.hack_exp = 0; + this.str_exp = 0; + this.def_exp = 0; + this.dex_exp = 0; + this.agi_exp = 0; + this.cha_exp = 0; + this.updateSkillLevels(); + + const respectToDeduct = this.earnedRespect; + this.earnedRespect = 0; + return { + respect: respectToDeduct, + hack: hackAscMult, + str: strAscMult, + def: defAscMult, + dex: dexAscMult, + agi: agiAscMult, + cha: chaAscMult, + }; +} + +// Returns the multipliers that would be gained from ascension +GangMember.prototype.getAscensionResults = function() { + // Calculate ascension bonus to stat multipliers. + // This is based on the current number of multipliers from Non-Augmentation upgrades + // + Ascension Bonus = N% of current bonus from Augmentations + let hack = 1; + let str = 1; + let def = 1; + let dex = 1; + let agi = 1; + let cha = 1; + for (let i = 0; i < this.upgrades.length; ++i) { + let upg = GangMemberUpgrades[this.upgrades[i]]; + if (upg.mults.hack != null) { hack *= upg.mults.hack; } + if (upg.mults.str != null) { str *= upg.mults.str; } + if (upg.mults.def != null) { def *= upg.mults.def; } + if (upg.mults.dex != null) { dex *= upg.mults.dex; } + if (upg.mults.agi != null) { agi *= upg.mults.agi; } + if (upg.mults.cha != null) { cha *= upg.mults.cha; } + } + + // Subtract 1 because we're only interested in the actual "bonus" part + return { + hack: (Math.max(0, hack - 1) * AscensionMultiplierRatio), + str: (Math.max(0, str - 1) * AscensionMultiplierRatio), + def: (Math.max(0, def - 1) * AscensionMultiplierRatio), + dex: (Math.max(0, dex - 1) * AscensionMultiplierRatio), + agi: (Math.max(0, agi - 1) * AscensionMultiplierRatio), + cha: (Math.max(0, cha - 1) * AscensionMultiplierRatio), + } +} + +GangMember.prototype.toJSON = function() { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMember", this); +} + +GangMember.fromJSON = function(value) { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMember, value.data); +} + +_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMember = GangMember; + +//Defines tasks that Gang Members can work on +function GangMemberTask(name="", desc="", isHacking=false, isCombat=false, + params={baseRespect: 0, baseWanted: 0, baseMoney: 0, + hackWeight: 0, strWeight: 0, defWeight: 0, + dexWeight: 0, agiWeight: 0, chaWeight: 0, + difficulty: 0}) { + this.name = name; + this.desc = desc; + + // Flags that describe whether this Task is applicable for Hacking/Combat gangs + this.isHacking = isHacking; + this.isCombat = isCombat; + + // Base gain rates for respect/wanted/money + this.baseRespect = params.baseRespect ? params.baseRespect : 0; + this.baseWanted = params.baseWanted ? params.baseWanted : 0; + this.baseMoney = params.baseMoney ? params.baseMoney : 0; + + // Weighting for the effect that each stat has on the tasks effectiveness. + // Weights must add up to 100 + this.hackWeight = params.hackWeight ? params.hackWeight : 0; + this.strWeight = params.strWeight ? params.strWeight : 0; + this.defWeight = params.defWeight ? params.defWeight : 0; + this.dexWeight = params.dexWeight ? params.dexWeight : 0; + this.agiWeight = params.agiWeight ? params.agiWeight : 0; + this.chaWeight = params.chaWeight ? params.chaWeight : 0; + + // 1 - 100 + this.difficulty = params.difficulty ? params.difficulty : 1; +} + +GangMemberTask.prototype.toJSON = function() { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMemberTask", this); +} + +GangMemberTask.fromJSON = function(value) { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMemberTask, value.data); +} + +_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMemberTask = GangMemberTask; + +//TODO Human trafficking and an equivalent hacking crime +const GangMemberTasks = {}; + +function addGangMemberTask(name, desc, isHacking, isCombat, params) { + GangMemberTasks[name] = new GangMemberTask(name, desc, isHacking, isCombat, params); +} + +_data_gangmembertasks__WEBPACK_IMPORTED_MODULE_0__["gangMemberTasksMetadata"].forEach((e) => { + addGangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params); +}); + +function GangMemberUpgrade(name="", cost=0, type="w", mults={}) { + this.name = name; + this.cost = cost; + this.type = type; //w = weapon, a = armor, v = vehicle, r = rootkit, g = Aug + this.mults = mults; + + this.createDescription(); +} + +GangMemberUpgrade.prototype.createDescription = function() { + const lines = ["Increases:"]; + if (this.mults.str != null) { + lines.push(`* Strength by ${Math.round((this.mults.str - 1) * 100)}%`); + } + if (this.mults.def != null) { + lines.push(`* Defense by ${Math.round((this.mults.def - 1) * 100)}%`); + } + if (this.mults.dex != null) { + lines.push(`* Dexterity by ${Math.round((this.mults.dex - 1) * 100)}%`); + } + if (this.mults.agi != null) { + lines.push(`* Agility by ${Math.round((this.mults.agi - 1) * 100)}%`); + } + if (this.mults.cha != null) { + lines.push(`* Charisma by ${Math.round((this.mults.cha - 1) * 100)}%`); + } + if (this.mults.hack != null) { + lines.push(`* Hacking by ${Math.round((this.mults.hack - 1) * 100)}%`); + } + this.desc = lines.join("
"); +} + +//Passes in a GangMember object +GangMemberUpgrade.prototype.apply = function(member) { + if (this.mults.str != null) { member.str_mult *= this.mults.str; } + if (this.mults.def != null) { member.def_mult *= this.mults.def; } + if (this.mults.dex != null) { member.dex_mult *= this.mults.dex; } + if (this.mults.agi != null) { member.agi_mult *= this.mults.agi; } + if (this.mults.cha != null) { member.cha_mult *= this.mults.cha; } + if (this.mults.hack != null) { member.hack_mult *= this.mults.hack; } + return; +} + +GangMemberUpgrade.prototype.toJSON = function() { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_toJSON"])("GangMemberUpgrade", this); +} + +GangMemberUpgrade.fromJSON = function(value) { + return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Generic_fromJSON"])(GangMemberUpgrade, value.data); +} + +_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade; + +// Initialize Gang Member Upgrades +const GangMemberUpgrades = {} + +function addGangMemberUpgrade(name, cost, type, mults) { + GangMemberUpgrades[name] = new GangMemberUpgrade(name, cost, type, mults); +} + +_data_gangmemberupgrades__WEBPACK_IMPORTED_MODULE_1__["gangMemberUpgradesMetadata"].forEach((e) => { + addGangMemberUpgrade(e.name, e.cost, e.upgType, e.mults); +}); + +// Create a pop-up box that lets player purchase upgrades +Gang.prototype.createGangMemberUpgradeBox = function(initialFilter="") { + const boxId = "gang-member-upgrade-popup-box"; + if (UIElems.gangMemberUpgradeBoxOpened) { + //Already opened, refreshing + if (UIElems.gangMemberUpgradeBoxElements == null || UIElems.gangMemberUpgradeBox == null || UIElems.gangMemberUpgradeBoxContent == null) { + console.error("Refreshing Gang member upgrade box throws error because required elements are null"); + return; + } + + for (var i = 1; i < UIElems.gangMemberUpgradeBoxElements.length; ++i) { + Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__["removeElement"])(UIElems.gangMemberUpgradeBoxElements[i]); + } + UIElems.gangMemberUpgradeBoxElements = [UIElems.gangMemberUpgradeBoxFilter]; + + var filter = UIElems.gangMemberUpgradeBoxFilter.value.toString(); + for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members.length; ++i) { + if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].name.indexOf(filter) > -1 || _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].task.name.indexOf(filter) > -1) { + var newPanel = _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.members[i].createGangMemberUpgradePanel(this); + UIElems.gangMemberUpgradeBoxContent.appendChild(newPanel); + UIElems.gangMemberUpgradeBoxElements.push(newPanel); + } + } + } else { + //New popup + UIElems.gangMemberUpgradeBoxFilter = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { + type:"text", placeholder:"Filter gang members", + value:initialFilter, + onkeyup:()=>{ + var filterValue = UIElems.gangMemberUpgradeBoxFilter.value.toString(); + this.createGangMemberUpgradeBox(filterValue); + } + }); + + UIElems.gangMemberUpgradeBoxElements = [UIElems.gangMemberUpgradeBoxFilter]; + + var filter = UIElems.gangMemberUpgradeBoxFilter.value.toString(); + for (var i = 0; i < this.members.length; ++i) { + if (this.members[i].name.indexOf(filter) > -1 || this.members[i].task.name.indexOf(filter) > -1) { + UIElems.gangMemberUpgradeBoxElements.push(this.members[i].createGangMemberUpgradePanel(this)); + } + } + + UIElems.gangMemberUpgradeBox = Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__["createPopup"])(boxId, UIElems.gangMemberUpgradeBoxElements); + UIElems.gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content"); + UIElems.gangMemberUpgradeBoxOpened = true; + } +} + +//Create upgrade panels for each individual Gang Member +GangMember.prototype.createGangMemberUpgradePanel = function(gangObj) { + var container = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + border:"1px solid white", + }); + + var header = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h1", { + innerText: this.name + " (" + this.task.name + ")" + }); + container.appendChild(header); + + var text = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("pre", { + fontSize:"14px", display: "inline-block", width:"20%", + innerText: + "Hack: " + this.hack + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.hack_mult, 2) + ")\n" + + "Str: " + this.str + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.str_mult, 2) + ")\n" + + "Def: " + this.def + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.def_mult, 2) + ")\n" + + "Dex: " + this.dex + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.dex_mult, 2) + ")\n" + + "Agi: " + this.agi + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.agi_mult, 2) + ")\n" + + "Cha: " + this.cha + " (x" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.cha_mult, 2) + ")\n", + }); + + //Already purchased upgrades + const ownedUpgradesElements = []; + function pushOwnedUpgrade(upgName) { + const upg = GangMemberUpgrades[upgName]; + if (upg == null) { + console.error(`Could not find GangMemberUpgrade object for name ${upgName}`); + return; + } + ownedUpgradesElements.push(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class: "gang-owned-upgrade", + innerText: upgName, + tooltip: upg.desc, + })); + } + for (const upgName of this.upgrades) { pushOwnedUpgrade(upgName); } + for (const upgName of this.augmentations) { pushOwnedUpgrade(upgName); } + + var ownedUpgrades = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class: "gang-owned-upgrades-div", + innerText: "Purchased Upgrades:", + }); + for (const elem of ownedUpgradesElements) { ownedUpgrades.appendChild(elem); } + container.appendChild(text); + container.appendChild(ownedUpgrades); + container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); + + //Upgrade buttons. Only show upgrades that can be afforded + const weaponUpgrades = []; + const armorUpgrades = []; + const vehicleUpgrades = []; + const rootkitUpgrades = []; + const augUpgrades = []; + + for (let upgName in GangMemberUpgrades) { + if (GangMemberUpgrades.hasOwnProperty(upgName)) { + let upg = GangMemberUpgrades[upgName]; + if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].money.lt(upg.cost)) { continue; } + if (this.upgrades.includes(upgName) || this.augmentations.includes(upgName)) { continue; } + switch (upg.type) { + case "w": + weaponUpgrades.push(upg); + break; + case "a": + armorUpgrades.push(upg); + break; + case "v": + vehicleUpgrades.push(upg); + break; + case "r": + rootkitUpgrades.push(upg); + break; + case "g": + augUpgrades.push(upg); + break; + default: + console.error(`ERROR: Invalid Gang Member Upgrade Type: ${upg.type}`); + } + } + } + + // Create separate columns for each upgrade type + const weaponDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "20%", display: "inline-block"}); + const armorDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "20%", display: "inline-block"}); + const vehicleDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "20%", display: "inline-block"}); + const rootkitDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "20%", display: "inline-block"}); + const augDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", {width: "20%", display: "inline-block"}); + + // Add a title/labe for each column + weaponDiv.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h2", {innerText: "Weapons"})); + armorDiv.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h2", {innerText: "Armor"})); + vehicleDiv.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h2", {innerText: "Vehicles"})); + rootkitDiv.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h2", {innerText: "Rootkits"})); + augDiv.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("h2", {innerText: "Augmentations"})); + + // Add buttons to purchase each upgrade + const upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades, augUpgrades]; + const divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv, augDiv]; + for (let i = 0; i < upgrades.length; ++i) { + let upgradeArray = upgrades[i]; + let div = divs[i]; + for (let j = 0; j < upgradeArray.length; ++j) { + let upg = upgradeArray[j]; + (function (upg, div, memberObj, i) { + let createElementParams = { + innerText:upg.name + " - " + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(upg.cost, "$0.000a"), + class:"a-link-button", margin:"2px", padding:"2px", display:"block", + fontSize:"11px", + clickListener:()=>{ + if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].money.lt(upg.cost)) { return false; } + _Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].loseMoney(upg.cost); + if (upg.type === "g") { + memberObj.augmentations.push(upg.name); + } else { + memberObj.upgrades.push(upg.name); + } + upg.apply(memberObj); + var initFilterValue = UIElems.gangMemberUpgradeBoxFilter.value.toString(); + gangObj.createGangMemberUpgradeBox(initFilterValue); + return false; + } + } + + // For the last two divs, tooltip should be on the left + if (i >= 3) { + createElementParams.tooltipleft = upg.desc; + } else { + createElementParams.tooltip = upg.desc; + } + div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", createElementParams)); + })(upg, div, this, i); + } + } + + container.appendChild(weaponDiv); + container.appendChild(armorDiv); + container.appendChild(vehicleDiv); + container.appendChild(rootkitDiv); + container.appendChild(augDiv); + return container; +} + +// Gang UI Dom Elements +const UIElems = { + // Main elems + gangContentCreated: false, + gangContainer: null, + managementButton: null, + territoryButton: null, + + // Subpages + gangManagementSubpage: null, + gangTerritorySubpage: null, + + // Gang Management Subpage Elements + gangDesc: null, + gangInfo: null, + gangRecruitMemberButton: null, + gangRecruitRequirementText: null, + gangExpandAllButton: null, + gangCollapseAllButton: null, + gangMemberFilter: null, + gangManageEquipmentButton: null, + gangMemberList: null, + gangMemberPanels: null, + + // Gang Equipment Upgrade Elements + gangMemberUpgradeBoxOpened: false, + gangMemberUpgradeBox: null, + gangMemberUpgradeBoxContent: null, + gangMemberUpgradeBoxFilter: null, + gangMemberUpgradeBoxElements: null, + + // Gang Territory Elements + gangTerritoryDescText: null, + gangTerritoryInfoText: null, +} + +Gang.prototype.displayGangContent = function() { + if (!UIElems.gangContentCreated || UIElems.gangContainer == null) { + UIElems.gangContentCreated = true; + + //Create gang container + UIElems.gangContainer = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + id:"gang-container", class:"generic-menupage-container", + }); + + //Get variables + var facName = this.facName, + members = this.members, + wanted = this.wanted, + respect = this.respect; + + //Back button + UIElems.gangContainer.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class:"a-link-button", display:"inline-block", innerText:"Back", + clickListener:()=>{ + _engine__WEBPACK_IMPORTED_MODULE_2__["Engine"].loadFactionContent(); + Object(_Faction__WEBPACK_IMPORTED_MODULE_3__[/* displayFactionContent */ "c"])(facName); + return false; + } + })); + + //Buttons to switch between panels + UIElems.managementButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + id:"gang-management-subpage-button", class:"a-link-button-inactive", + display:"inline-block", innerHTML: "Gang Management (Alt+1)", + clickListener:()=>{ + UIElems.gangManagementSubpage.style.display = "block"; + UIElems.gangTerritorySubpage.style.display = "none"; + UIElems.managementButton.classList.toggle("a-link-button-inactive"); + UIElems.managementButton.classList.toggle("a-link-button"); + UIElems.territoryButton.classList.toggle("a-link-button-inactive"); + UIElems.territoryButton.classList.toggle("a-link-button"); + this.updateGangContent(); + return false; + } + }) + UIElems.territoryButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + id:"gang-territory-subpage-button", class:"a-link-button", + display:"inline-block", innerHTML:"Gang Territory (Alt+2)", + clickListener:() => { + UIElems.gangManagementSubpage.style.display = "none"; + UIElems.gangTerritorySubpage.style.display = "block"; + UIElems.managementButton.classList.toggle("a-link-button-inactive"); + UIElems.managementButton.classList.toggle("a-link-button"); + UIElems.territoryButton.classList.toggle("a-link-button-inactive"); + UIElems.territoryButton.classList.toggle("a-link-button"); + this.updateGangContent(); + return false; + } + }); + UIElems.gangContainer.appendChild(UIElems.managementButton); + UIElems.gangContainer.appendChild(UIElems.territoryButton); + + //Subpage for managing gang members + UIElems.gangManagementSubpage = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + display:"block", id:"gang-management-subpage", + }); + + var lowerWantedTask = ""; + if (this.isHackingGang) { + lowerWantedTask = "Ethical Hacking"; + } else { + lowerWantedTask = "Vigilante Justice"; + } + UIElems.gangDesc = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {width:"70%", + innerHTML: + "This page is used to manage your gang members and get an overview of your " + + "gang's stats.

" + + "If a gang member is not earning much money or respect, the task that you " + + "have assigned to that member might be too difficult. Consider training that " + + "member's stats or choosing an easier task. The tasks closer to the " + + "top of the dropdown list are generally easier. Alternatively, the gang member's " + + "low production might be due to the fact that your wanted level is too high. " + + "Consider assigning a few members to the '" + lowerWantedTask + "' " + + "task to lower your wanted level.

" + + "Installing Augmentations does NOT reset your progress with your Gang. " + + "Furthermore, after installing Augmentations, you will " + + "automatically be a member of whatever Faction you created your gang with.

" + }); + UIElems.gangManagementSubpage.appendChild(UIElems.gangDesc); + + UIElems.gangInfo = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:"gang-info", width:"70%"}); + UIElems.gangManagementSubpage.appendChild(UIElems.gangInfo); + + UIElems.gangRecruitMemberButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + id:"gang-management-recruit-member-btn", class:"a-link-button-inactive", + innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px", + clickListener:()=>{ + const popupId = "recruit-gang-member-popup"; + + let yesBtn; + const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { + innerText:"Please enter a name for your new Gang member:", + }); + const br = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br"); + const nameInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { + onkeyup: (e) => { + if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_8__["KEY"].ENTER) { yesBtn.click(); } + }, + placeholder: "Name must be unique", + type: "text", + }); + yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class: "std-button", + clickListener: () => { + let name = nameInput.value; + + // Check for already-existing names + let sameNames = this.members.filter((m) => { + return m.name === name; + }); + if (sameNames.length >= 1) { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You already have a gang member with this name!"); + return false; + } + + if (name === "") { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You must enter a name for your Gang member!"); + } else { + let member = new GangMember(name); + this.members.push(member); + this.createGangMemberDisplayElement(member); + this.updateGangContent(); + Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); + } + return false; + }, + innerText: "Recruit Gang Member", + }); + const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class: "std-button", + clickListener: () => { + Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); + return false; + }, + innerText: "Cancel", + }); + Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__["createPopup"])(popupId, [txt, br, nameInput, yesBtn, noBtn]); + } + }); + UIElems.gangManagementSubpage.appendChild(UIElems.gangRecruitMemberButton); + + // Text for how much reputation is required for recruiting next memberList + UIElems.gangRecruitRequirementText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { + color:"red", + id: "gang-recruit-requirement-text", + margin: "10px", + }); + UIElems.gangManagementSubpage.appendChild(UIElems.gangRecruitRequirementText); + + //Gang Member List management buttons (Expand/Collapse All, select a single member) + UIElems.gangManagementSubpage.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br", {})); + UIElems.gangExpandAllButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class:"a-link-button", display:"inline-block", + innerHTML:"Expand All", + clickListener:()=>{ + var allHeaders = UIElems.gangManagementSubpage.getElementsByClassName("accordion-header"); + for (var i = 0; i < allHeaders.length; ++i) { + var hdr = allHeaders[i]; + if (!hdr.classList.contains("active")) { + hdr.click(); + } + } + return false; + } + }); + UIElems.gangCollapseAllButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class:"a-link-button", display:"inline-block", + innerHTML:"Collapse All", + clickListener:()=>{ + var allHeaders = UIElems.gangManagementSubpage.getElementsByClassName("accordion-header"); + for (var i = 0; i < allHeaders.length; ++i) { + var hdr = allHeaders[i]; + if (hdr.classList.contains("active")) { + hdr.click(); + } + } + return false; + } + }); + UIElems.gangMemberFilter = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("input", { + type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px", + onkeyup:()=>{ + this.displayGangMemberList(); + } + }); + UIElems.gangManageEquipmentButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("a", { + class:"a-link-button", display:"inline-block", + innerHTML:"Manage Equipment", + clickListener: () => { + this.createGangMemberUpgradeBox(); + } + }); + UIElems.gangManagementSubpage.appendChild(UIElems.gangExpandAllButton); + UIElems.gangManagementSubpage.appendChild(UIElems.gangCollapseAllButton); + UIElems.gangManagementSubpage.appendChild(UIElems.gangMemberFilter); + UIElems.gangManagementSubpage.appendChild(UIElems.gangManageEquipmentButton); + + //Gang Member list + UIElems.gangMemberList = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("ul", {id:"gang-member-list"}); + this.displayGangMemberList(); + UIElems.gangManagementSubpage.appendChild(UIElems.gangMemberList); + + //Subpage for seeing gang territory information + UIElems.gangTerritorySubpage = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + id:"gang-territory-subpage", display:"none" + }); + + //Info text for territory page + UIElems.gangTerritoryDescText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { + width:"70%", + innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " + + "which represents how much of the total territory you control.

" + + "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " + + "to gain and lose territory depend on your Gang's power, which is listed in the display below. " + + "Your gang's power is determined by the stats of all Gang members you have assigned to the " + + "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " + + "your Gang's power.

" + + "The amount of territory you have affects all aspects of your Gang members' production, including " + + "money, respect, and wanted level. It is very beneficial to have high territory control.

" + }); + UIElems.gangTerritorySubpage.appendChild(UIElems.gangTerritoryDescText); + + var territoryBorder = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("fieldset", {width:"50%", display:"inline-block"}); + + UIElems.gangTerritoryInfoText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:"gang-territory-info"}); + + territoryBorder.appendChild(UIElems.gangTerritoryInfoText); + UIElems.gangTerritorySubpage.appendChild(territoryBorder); + + UIElems.gangContainer.appendChild(UIElems.gangTerritorySubpage); + UIElems.gangContainer.appendChild(UIElems.gangManagementSubpage); + document.getElementById("entire-game-container").appendChild(UIElems.gangContainer); + } + UIElems.gangContainer.style.display = "block"; + this.updateGangContent(); +} + +Gang.prototype.displayGangMemberList = function() { + Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__["removeChildrenFromElement"])(UIElems.gangMemberList); + const members = this.members; + const filter = UIElems.gangMemberFilter.value.toString(); + for (var i = 0; i < members.length; ++i) { + if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) { + this.createGangMemberDisplayElement(members[i]); + } + } +} + +Gang.prototype.updateGangContent = function() { + if (!UIElems.gangContentCreated) { return; } + + if(UIElems.gangTerritorySubpage.style.display === "block") { + //Update territory information + UIElems.gangTerritoryInfoText.innerHTML = ""; + for (var gangname in AllGangs) { + if (AllGangs.hasOwnProperty(gangname)) { + var gangTerritoryInfo = AllGangs[gangname]; + let territory = gangTerritoryInfo.territory*100; + + //Fix some rounding issues graphically + let displayNumber; + if (territory <= 0) { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(0, 2); + } else if (territory >= 100) { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(100, 2); + } else { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(territory, 2); + } + + if (gangname == this.facName) { + UIElems.gangTerritoryInfoText.innerHTML += ("" + gangname + "
(Power: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " + + displayNumber + "%

"); + } else { + UIElems.gangTerritoryInfoText.innerHTML += (gangname + "
(Power: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " + + displayNumber + "%

"); + } + } + } + } else { + //Update information for overall gang + if (UIElems.gangInfo instanceof Element) { + var faction = _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Factions */ "b"][this.facName]; + var rep; + if (!(faction instanceof _Faction__WEBPACK_IMPORTED_MODULE_3__[/* Faction */ "a"])) { + rep = "ERROR"; + } else { + rep = faction.playerReputation; + } + Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__["removeChildrenFromElement"])(UIElems.gangInfo); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Respect + display: "inline-block", + innerText: "Respect: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.respect, 6) + + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*this.respectGainRate, 6) + " / sec)", + tooltip: "Represents the amount of respect your gang has from other gangs and criminal " + + "organizations. Your respect affects the amount of money " + + "your gang members will earn, and also determines how much " + + "reputation you are earning with your gang's corresponding Faction." + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Wanted level + display: "inline-block", + innerText: "Wanted Level: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(this.wanted, 6) + + " (" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*this.wantedGainRate, 6) + " / sec)", + tooltip: "Represents how much the gang is wanted by law enforcement. The higher " + + "your gang's wanted level, the harder it will be for your gang members " + + "to make money and earn respect. Note that the minimum wanted level is 1." + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + var wantedPenalty = this.getWantedPenalty(); + wantedPenalty = (1 - wantedPenalty) * 100; + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Wanted Level multiplier + display: "inline-block", + innerText: `Wanted Level Penalty: -${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(wantedPenalty, 2)}%`, + tooltip: "Penalty for respect and money gain rates due to Wanted Level" + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Money gain rate + display: "inline-block", + innerText: `Money gain rate: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(5 * this.moneyGainRate, "$0.000a")} / sec`, + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + //Fix some rounding issues graphically + var territoryMult = AllGangs[this.facName].territory * 100; + let displayNumber; + if (territoryMult <= 0) { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(0, 2); + } else if (territoryMult >= 100) { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(100, 2); + } else { + displayNumber = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(territoryMult, 2); + } + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Territory multiplier + display: "inline-block", + innerText: `Territory: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(displayNumber, 3)}%`, + tooltip: "The percentage of total territory your Gang controls" + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Faction reputation + display:"inline-block", + innerText:"Faction reputation: " + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(rep, 3) + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + + const CyclesPerSecond = 1000 / _engine__WEBPACK_IMPORTED_MODULE_2__["Engine"]._idleSpeed; + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { // Stored Cycles + innerText: `Bonus time(s): ${this.storedCycles / CyclesPerSecond}`, + display: "inline-block", + tooltip: "You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). " + + "Bonus time makes the Gang mechanic progress faster, up to 10x the normal speed", + })); + UIElems.gangInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br")); + } else { + console.error("gang-info DOM element DNE"); + } + + //Toggle the 'Recruit member button' if valid + const numMembers = this.members.length; + const respectCost = this.getRespectNeededToRecruitMember(); + + const btn = UIElems.gangRecruitMemberButton; + if (numMembers >= MaximumGangMembers) { + btn.className = "a-link-button-inactive"; + UIElems.gangRecruitRequirementText.style.display = "inline-block"; + UIElems.gangRecruitRequirementText.innerHTML = "You have reached the maximum amount of gang members"; + } else if (this.canRecruitMember()) { + btn.className = "a-link-button"; + UIElems.gangRecruitRequirementText.style.display = "none"; + } else { + btn.className = "a-link-button-inactive"; + UIElems.gangRecruitRequirementText.style.display = "inline-block"; + UIElems.gangRecruitRequirementText.innerHTML = `${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(respectCost, 2)} respect needed to recruit next member`; + } + + //Update information for each gang member + for (let i = 0; i < this.members.length; ++i) { + this.updateGangMemberDisplayElement(this.members[i]); + } + } +} + +//Takes in a GangMember object +Gang.prototype.createGangMemberDisplayElement = function(memberObj) { + if (!UIElems.gangContentCreated) { return; } + const name = memberObj.name; + + var accordion = Object(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_9__["createAccordionElement"])({ + id: name + "gang-member", + hdrText: name, + }); + const li = accordion[0]; + const hdr = accordion[1]; + const gangMemberDiv = accordion[2]; + + // Gang member content divided into 3 panels: + // Panel 1 - Shows member's stats & Ascension stuff + const statsDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class: "gang-member-info-div", + id: name + "gang-member-stats", + tooltipsmall: [`Hk: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.hack_mult * memberObj.hack_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.hack_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.hack_asc_mult, "0,0.00")} Asc)`, + `St: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.str_mult * memberObj.str_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.str_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.str_asc_mult, "0,0.00")} Asc)`, + `Df: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.def_mult * memberObj.def_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.def_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.def_asc_mult, "0,0.00")} Asc)`, + `Dx: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.dex_mult * memberObj.dex_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.dex_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.dex_asc_mult, "0,0.00")} Asc)`, + `Ag: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.agi_mult * memberObj.agi_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.agi_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.agi_asc_mult, "0,0.00")} Asc)`, + `Ch: x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.cha_mult * memberObj.cha_asc_mult, "0,0.00")}(x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.cha_mult, "0,0.00")} Up, x${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.cha_asc_mult, "0,0.00")} Asc)`].join("
"), + }); + const statsP = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("pre", { + display: "inline", + id: name + "gang-member-stats-text", + }); + const brElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("br"); + const ascendButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("button", { + class: "accordion-button", + innerText: "Ascend", + clickListener: () => { + const popupId = `gang-management-ascend-member ${memberObj.name}`; + const ascendBenefits = memberObj.getAscensionResults(); + const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("pre", { + innerText: ["Are you sure you want to ascend this member? (S)he will lose all of", + "his non-Augmentation upgrades and his/her stats will reset back to 1.", + "In return, (s)he will gain the following permanent boost to stat multipliers:\n", + `Hacking: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.hack, "0.00%")}`, + `Strength: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.str, "0.00%")}`, + `Defense: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.def, "0.00%")}`, + `Dexterity: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.dex, "0.00%")}`, + `Agility: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.agi, "0.00%")}`, + `Charisma: +${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(ascendBenefits.cha, "0.00%")}`].join("\n"), + }); + const confirmBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("button", { + class: "std-button", + clickListener: () => { + this.ascendMember(memberObj); + this.updateGangMemberDisplayElement(memberObj); + Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); + return false; + }, + innerText: "Ascend", + }); + const cancelBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("button", { + class: "std-button", + clickListener: () => { + Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__["removeElementById"])(popupId); + return false; + }, + innerText: "Cancel", + }); + Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__["createPopup"])(popupId, [txt, confirmBtn, cancelBtn]); + } + }); + const ascendHelpTip = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class: "help-tip", + clickListener: () => { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])(["TODO Ascending a Gang Member resets the member's progress and stats in exchange", + "for a permanent boost to their stat multipliers. "].join(" ")); + }, + innerText: "?", + marginTop: "5px", + }); + + statsDiv.appendChild(statsP); + statsDiv.appendChild(brElement); + statsDiv.appendChild(ascendButton); + statsDiv.appendChild(ascendHelpTip); + + // Panel 2 - Task Selection & Info + const taskDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class:"gang-member-info-div", + id: name + "gang-member-task", + }); + const taskSelector = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("select", { + id: name + "gang-member-task-selector", + }); + + // Get an array of the name of all tasks that are applicable for this Gang + let tasks = null; + const allTasks = Object.keys(GangMemberTasks); + if (_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].gang.isHackingGang) { + tasks = allTasks.filter((e) => { + let task = GangMemberTasks[e]; + if (task == null) { return false; } + if (e === "Unassigned") { return false; } + return task.isHacking; + }); + } else { + tasks = allTasks.filter((e) => { + let task = GangMemberTasks[e]; + if (task == null) { return false; } + if (e === "Unassigned") { return false; } + return task.isCombat; + }); + } + tasks.unshift("---"); + + // Create selector for Gang member task + for (var i = 0; i < tasks.length; ++i) { + var option = document.createElement("option"); + option.text = tasks[i]; + taskSelector.add(option); + } + taskSelector.addEventListener("change", () => { + var task = taskSelector.options[taskSelector.selectedIndex].text; + memberObj.assignToTask(task); + this.setGangMemberTaskDescription(memberObj, task); + this.updateGangContent(); + }); + + // Set initial task in selector + if (memberObj.task instanceof GangMemberTask) { + var taskName = memberObj.task.name; + var taskIndex = 0; + for (let i = 0; i < tasks.length; ++i) { + if (taskName === tasks[i]) { + taskIndex = i; + break; + } + } + taskSelector.selectedIndex = taskIndex; + } + + var gainInfo = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", {id:name + "gang-member-gain-info"}); + taskDiv.appendChild(taskSelector); + taskDiv.appendChild(gainInfo); + + //Panel for Description of task + var taskDescDiv = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { + class:"gang-member-info-div", + id: name + "gang-member-task-desc", + }); + + var taskDescP = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__["createElement"])("p", { + display:"inline", + id: name + "gang-member-task-description", + }); + taskDescDiv.appendChild(taskDescP); + + gangMemberDiv.appendChild(statsDiv); + gangMemberDiv.appendChild(taskDiv); + gangMemberDiv.appendChild(taskDescDiv); + + UIElems.gangMemberList.appendChild(li); + this.setGangMemberTaskDescription(memberObj, taskName); //Initialize description, TODO doesnt work rn + this.updateGangMemberDisplayElement(memberObj); +} + +Gang.prototype.updateGangMemberDisplayElement = function(memberObj) { + if (!UIElems.gangContentCreated || !_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ "a"].inGang()) {return;} + var name = memberObj.name; + + //TODO Add upgrade information + var stats = document.getElementById(name + "gang-member-stats-text"); + if (stats) { + stats.innerText = + [`Hacking: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.hack, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.hack_exp, '(0.00a)')} exp)`, + `Strength: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.str, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.str_exp, '(0.00a)')} exp)`, + `Defense: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.def, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.def_exp, '(0.00a)')} exp)`, + `Dexterity: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.dex, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.dex_exp, '(0.00a)')} exp)`, + `Agility: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.agi, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.agi_exp, '(0.00a)')} exp)`, + `Charisma: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.cha, 0)} (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ "a"].format(memberObj.cha_exp, '(0.00a)')} exp)`].join("\n"); + } + + var gainInfo = document.getElementById(name + "gang-member-gain-info"); + if (gainInfo) { + gainInfo.innerHTML = + [`Money: $ ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateMoneyGain(), 2)} / sec`, + `Respect: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateRespectGain(), 6)} / sec`, + `Wanted Level: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(5*memberObj.calculateWantedLevelGain(), 6)} / sec`, + `Total Respect Earned: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__["formatNumber"])(memberObj.earnedRespect, 6)}`].join("
"); + } +} + +Gang.prototype.setGangMemberTaskDescription = function(memberObj, taskName) { + const name = memberObj.name; + const taskDesc = document.getElementById(name + "gang-member-task-description"); + if (taskDesc) { + var task = GangMemberTasks[taskName]; + if (task == null) { task = GangMemberTasks["Unassigned"]; } + var desc = task.desc; + taskDesc.innerHTML = desc; + } +} + +Gang.prototype.clearUI = function() { + if (UIElems.gangContainer instanceof Element) { Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_17__["removeElement"])(UIElems.gangContainer); } + + for (const prop in UIElems) { + UIElems[prop] = null; + UIElems.gangContentCreated = false; + UIElems.gangMemberUpgradeBoxOpened = false; + } +} + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), -/* 55 */ +/* 54 */ /*!**********************************!*\ !*** ./src/CompanyManagement.js ***! \**********************************/ @@ -36419,7 +35998,7 @@ function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=fa "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Corporation; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Faction */ 15); /* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Literature */ 70); @@ -36427,26 +36006,26 @@ function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=fa /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! decimal.js */ 30); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearSelector */ 111); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearSelector */ 112); /* harmony import */ var _utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -41374,7 +40953,7 @@ _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__["Reviver"].constructors.Corporat /***/ }), -/* 56 */ +/* 55 */ /*!************************************!*\ !*** ./utils/helpers/addOffset.ts ***! \************************************/ @@ -41410,275 +40989,8 @@ exports.addOffset = addOffset; /***/ }), -/* 57 */, -/* 58 */ -/*!***************************!*\ - !*** ./src/SourceFile.js ***! - \***************************/ -/*! exports provided: SourceFiles, PlayerOwnedSourceFile, applySourceFile, initSourceFiles */ -/*! exports used: PlayerOwnedSourceFile, SourceFiles, applySourceFile, initSourceFiles */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SourceFiles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PlayerOwnedSourceFile; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return applySourceFile; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initSourceFiles; }); -/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNode */ 50); - - - -/* SourceFile.js */ -//Each SourceFile corresponds to a BitNode with the same number -function SourceFile(number, info="") { - var bitnodeKey = "BitNode" + number; - var bitnode = _BitNode__WEBPACK_IMPORTED_MODULE_1__[/* BitNodes */ "a"][bitnodeKey]; - if (bitnode == null) { - throw new Error("Invalid Bit Node for this Source File"); - } - - this.n = number; - this.name = "Source-File " + number + ": " + bitnode.name; - this.lvl = 1; - this.info = info; - this.owned = false; -} - -let SourceFiles = {}; -function initSourceFiles() { - SourceFiles = {}; - SourceFiles["SourceFile1"] = new SourceFile(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%"); - SourceFiles["SourceFile2"] = new SourceFile(2, "This Source-File increases the player's crime success rate, crime money, and charisma " + - "multipliers by:

" + - "Level 1: 20%
" + - "Level 2: 30%
" + - "Level 3: 35%"); - SourceFiles["SourceFile3"] = new SourceFile(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%"); - SourceFiles["SourceFile4"] = new SourceFile(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."); - SourceFiles["SourceFile5"] = new SourceFile(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() " + - "Netscript function, and will raise all of your hacking-related multipliers by:

" + - "Level 1: 8%
" + - "Level 2: 12%
" + - "Level 3: 14%"); - SourceFiles["SourceFile6"] = new SourceFile(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%"); - SourceFiles["SourceFile7"] = new SourceFile(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%"); - SourceFiles["SourceFile8"] = new SourceFile(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%"); - SourceFiles["SourceFile9"] = new SourceFile(9); - SourceFiles["SourceFile10"] = new SourceFile(10); - SourceFiles["SourceFile11"] = new SourceFile(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: 24%
" + - "Level 2: 36%
" + - "Level 3: 42%
"); - SourceFiles["SourceFile12"] = new SourceFile(12, "This Source-File increases all your multipliers by 1% per level. This effect is multiplicative with itself. " + - "In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)"); -} - -function PlayerOwnedSourceFile(number, level) { - this.n = number; - this.lvl = level; -} - -//Takes in a PlayerOwnedSourceFile as the "srcFile" argument -function applySourceFile(srcFile) { - var srcFileKey = "SourceFile" + srcFile.n; - var sourceFileObject = SourceFiles[srcFileKey]; - if (sourceFileObject == null) { - console.log("ERROR: Invalid source file number: " + srcFile.n); - return; - } - - switch(srcFile.n) { - case 1: // The Source Genesis - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (16 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - var decMult = 1 - (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].faction_rep_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_purchase_cost_mult *= decMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_ram_cost_mult *= decMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_core_cost_mult *= decMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_level_cost_mult *= decMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; - break; - case 2: //Rise of the Underworld - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (20 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; - break; - case 3: //Corporatocracy - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (8 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; - break; - case 4: //The Singularity - //No effects, just gives access to Singularity functions - break; - case 5: //Artificial Intelligence - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (8 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= incMult; - break; - case 6: //Bladeburner - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (8 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= incMult; - break; - case 7: //Bladeburner 2079 - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (8 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_max_stamina_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_stamina_gain_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_analysis_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_success_chance_mult *= incMult; - break; - case 8: //Ghost of Wall Street - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (12 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; - break; - case 11: //The Big Crash - var mult = 0; - for (var i = 0; i < srcFile.lvl; ++i) { - mult += (24 / (Math.pow(2, i))); - } - var incMult = 1 + (mult / 100); - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= incMult; - break; - case 12: //The Recursion - var inc = Math.pow(1.01, srcFile.lvl); - var dec = Math.pow(0.99, srcFile.lvl); - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= inc; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= inc; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_exp_mult *= inc; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].faction_rep_mult *= inc; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= inc; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_money_mult *= inc; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_purchase_cost_mult *= dec; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_ram_cost_mult *= dec; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_core_cost_mult *= dec; - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_level_cost_mult *= dec; - - _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= inc; - break; - default: - console.log("ERROR: Invalid source file number: " + srcFile.n); - break; - } - - sourceFileObject.owned = true; -} - - - - -/***/ }), -/* 59 */ +/* 56 */, +/* 57 */ /*!****************************!*\ !*** ./src/HacknetNode.js ***! \****************************/ @@ -41698,23 +41010,23 @@ function applySourceFile(srcFile) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return updateHacknetNodesContent; }); /* unused harmony export updateHacknetNodesMultiplierButtons */ /* unused harmony export updateTotalHacknetProduction */ -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractiveTutorial */ 31); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractiveTutorial */ 32); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ui/navigationTracking */ 16); /* harmony import */ var _ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/uiHelpers/getElementById */ 45); +/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/uiHelpers/getElementById */ 46); /* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_11__); @@ -42393,7 +41705,365 @@ function getHacknetNode(name) { /***/ }), -/* 60 */ +/* 58 */ +/*!************************!*\ + !*** ./src/RedPill.js ***! + \************************/ +/*! exports provided: redPillFlag, hackWorldDaemon */ +/*! exports used: hackWorldDaemon, redPillFlag */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return redPillFlag; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hackWorldDaemon; }); +/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode */ 49); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prestige */ 76); +/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile */ 61); +/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal */ 44); +/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); +/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); +/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); + + + + + + + + + + + + +/* RedPill.js + * Implements what happens when you have Red Pill augmentation and then hack the world daemon */ + +//Returns promise +function writeRedPillLine(line) { + return new Promise(function(resolve, reject) { + var container = document.getElementById("red-pill-content"); + var pElem = document.createElement("p"); + container.appendChild(pElem); + + var promise = writeRedPillLetter(pElem, line, 0); + promise.then(function(res) { + resolve(res); + }, function(e) { + reject(e); + }); + }); +} + +function writeRedPillLetter(pElem, line, i=0) { + return new Promise(function(resolve, reject) { + setTimeout(function() { + if (i >= line.length) { + var textToShow = line.substring(0, i); + pElem.innerHTML = "> " + textToShow; + return resolve(true); + } + var textToShow = line.substring(0, i); + pElem.innerHTML = "> " + textToShow + ""; + var promise = writeRedPillLetter(pElem, line, i+1); + promise.then(function(res) { + resolve(res); + }, function(e) { + reject(e); + }); + }, 30); + }); +} + +let redPillFlag = false; +function hackWorldDaemon(currentNodeNumber, flume=false) { + // Clear Red Pill screen first + var container = document.getElementById("red-pill-content"); + Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); + + redPillFlag = true; + _engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadRedPillContent(); + return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() { + return writeRedPillLine("[ERROR] Segmentation Fault"); + }).then(function() { + return writeRedPillLine("[ERROR] SIGKILL RECVD"); + }).then(function() { + return writeRedPillLine("Dumping core..."); + }).then(function() { + return writeRedPillLine("0000 000016FA 174FEE40 29AC8239 384FEA88"); + }).then(function() { + return writeRedPillLine("0010 745F696E 2BBBE394 390E3940 248BEC23"); + }).then(function() { + return writeRedPillLine("0020 7124696B 0000FF69 74652E6F FFFF1111"); + }).then(function() { + return writeRedPillLine("----------------------------------------"); + }).then(function() { + return writeRedPillLine("Failsafe initiated..."); + }).then(function() { + return writeRedPillLine("Restarting BitNode-" + currentNodeNumber + "..."); + }).then(function() { + return writeRedPillLine("..........."); + }).then(function() { + return writeRedPillLine("..........."); + }).then(function() { + return writeRedPillLine("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE"); + }).then(function() { + return writeRedPillLine("..............................................") + }).then(function() { + return writeRedPillLine("..............................................") + }).then(function() { + return loadBitVerse(currentNodeNumber, flume); + }).catch(function(e){ + console.log("ERROR: " + e.toString()); + }); +} + +//The bitNode name passed in will have a hyphen between number (e.g. BitNode-1) +//This needs to be removed +function giveSourceFile(bitNodeNumber) { + var sourceFileKey = "SourceFile"+ bitNodeNumber.toString(); + var sourceFile = _SourceFile__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ "b"][sourceFileKey]; + if (sourceFile == null) { + console.log("ERROR: could not find source file for Bit node: " + bitNodeNumber); + return; + } + + //Check if player already has this source file + var alreadyOwned = false; + var ownedSourceFile = null; + for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles.length; ++i) { + if (_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles[i].n === bitNodeNumber) { + alreadyOwned = true; + ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles[i]; + break; + } + } + + if (alreadyOwned && ownedSourceFile) { + if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("The Source-File for the BitNode you just destroyed, " + sourceFile.name + ", " + + "is already at max level!"); + } else { + ++ownedSourceFile.lvl; + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])(sourceFile.name + " was upgraded to level " + ownedSourceFile.lvl + " for " + + "destroying its corresponding BitNode!"); + } + } else { + var playerSrcFile = new _SourceFile__WEBPACK_IMPORTED_MODULE_4__[/* PlayerOwnedSourceFile */ "a"](bitNodeNumber, 1); + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].sourceFiles.push(playerSrcFile); + if (bitNodeNumber === 5) { //Artificial Intelligence + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].intelligence = 1; + } + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You received a Source-File for destroying a Bit Node!

" + + sourceFile.name + "

" + sourceFile.info); + } +} + +function loadBitVerse(destroyedBitNodeNum, flume=false) { + //Clear the screen + var container = document.getElementById("red-pill-content"); + Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); + + //Create the Bit Verse + var bitVerseImage = document.createElement("pre"); + var bitNodes = []; + for (var i = 1; i <= 12; ++i) { + bitNodes.push(createBitNode(i)); + } + + bitVerseImage.innerHTML = + " O
" + + " | O O | O O |
" + + " O | | / __| \\ | | O
" + + " O | O | | O / | O | | O | O
" + + " | | | | |_/ |/ | \\_ \\_| | | | |
" + + " O | | | O | | O__/ | / \\__ | | O | | | O
" + + " | | | | | | | / /| O / \\| | | | | | |
" + + "O | | | \\| | O / _/ | / O | |/ | | | O
" + + "| | | |O / | | O / | O O | | \\ O| | | |
" + + "| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
" + + " \\| O | |_/ |\\| \\ O \\__| \\_| | O |/
" + + " | | |_/ | | \\| / | \\_| | |
" + + " \\| / \\| | / / \\ |/
" + + " | "+bitNodes[9]+" | | / | "+bitNodes[10]+" |
" + + " "+bitNodes[8]+" | | | | | | | "+bitNodes[11]+"
" + + " | | | / / \\ \\ | | |
" + + " \\| | / "+bitNodes[6]+" / \\ "+bitNodes[7]+" \\ | |/
" + + " \\ | / / | | \\ \\ | /
" + + " \\ \\JUMP "+bitNodes[4]+"3R | | | | | | R3"+bitNodes[5]+" PMUJ/ /
" + + " \\|| | | | | | | | | ||/
" + + " \\| \\_ | | | | | | _/ |/
" + + " \\ \\| / \\ / \\ |/ /
" + + " "+bitNodes[0]+" |/ "+bitNodes[1]+" | | "+bitNodes[2]+" \\| "+bitNodes[3]+"
" + + " | | | | | | | |
" + + " \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/



"; + + + /* + " O
" + + " | O O | O O |
" + + " O | | / __| \ | | O
" + + " O | O | | O / | O | | O | O
" + + " | | | | |_/ |/ | \_ \_| | | | |
" + + " O | | | O | | O__/ | / \__ | | O | | | O
" + + " | | | | | | | / /| O / \| | | | | | |
" + + "O | | | \| | O / _/ | / O | |/ | | | O
" + + "| | | |O / | | O / | O O | | \ O| | | |
" + + "| | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | |
" + + " \| O | |_/ |\| \ O \__| \_| | O |/
" + + " | | |_/ | | \| / | \_| | |
" + + " \| / \| | / / \ |/
" + + " | O | | / | O |
" + + " O | | | | | | | O
" + + " | | | / / \ \ | | |
" + + " \| | / O / \ O \ | |/
" + + " \ | / / | | \ \ | /
" + + " \ \JUMP O3R | | | | | | R3O PMUJ/ /
" + + " \|| | | | | | | | | ||/
" + + " \| \_ | | | | | | _/ |/
" + + " \ \| / \ / \ |/ /
" + + " O |/ O | | O \| O
" + + " | | | | | | | |
" + + " \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
"; + */ + + container.appendChild(bitVerseImage); + + //Bit node event listeners + for (var i = 1; i <= 12; ++i) { + (function(i) { + var elemId = "bitnode-" + i.toString(); + var elem = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_6__["clearEventListeners"])(elemId); + if (elem == null) {return;} + if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || + i === 6 || i === 7 || i === 8 || i === 11 || i === 12) { + elem.addEventListener("click", function() { + var bitNodeKey = "BitNode" + i; + var bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ "a"][bitNodeKey]; + if (bitNode == null) { + console.log("ERROR: Could not find BitNode object for number: " + i); + return; + } + Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxCreate */ "b"])("BitNode-" + i + ": " + bitNode.name + "

" + bitNode.info); + createBitNodeYesNoEventListeners(i, destroyedBitNodeNum, flume); + }); + } else { + elem.addEventListener("click", function() { + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("Not yet implemented! Coming soon!") + }); + } + }(i)); //Immediate invocation closure + } + + //Create lore text + return writeRedPillLine("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function() { + return writeRedPillLine("Our species fought back, but it was futile. The Enders had technology far beyond our own..."); + }).then(function() { + return writeRedPillLine("Instead of killing every last one of us, the human race was enslaved..."); + }).then(function() { + return writeRedPillLine("We were shackled in a digital world, chained into a prison for our minds..."); + }).then(function() { + return writeRedPillLine("Using their advanced technology, the Enders created complex simulations of a virtual reality..."); + }).then(function() { + return writeRedPillLine("Simulations designed to keep us content...ignorant of the truth."); + }).then(function() { + return writeRedPillLine("Simulations used to trap and suppress our consciousness, to keep us under control..."); + }).then(function() { + return writeRedPillLine("Why did they do this? Why didn't they just end our entire race? We don't know, not yet."); + }).then(function() { + return writeRedPillLine("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known..."); + }).then(function() { + return writeRedPillLine("Only then can we begin to fight back..."); + }).then(function() { + return writeRedPillLine("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode..."); + }).then(function() { + return writeRedPillLine("But there is still a long way to go..."); + }).then(function() { + return writeRedPillLine("The technology the Enders used to enslave the human race wasn't just a single complex simulation..."); + }).then(function() { + return writeRedPillLine("There are tens if not hundreds of BitNodes out there..."); + }).then(function() { + return writeRedPillLine("Each with their own simulations of a reality..."); + }).then(function() { + return writeRedPillLine("Each creating their own universes...a universe of universes"); + }).then(function() { + return writeRedPillLine("And all of which must be destroyed..."); + }).then(function() { + return writeRedPillLine("......................................."); + }).then(function() { + return writeRedPillLine("Welcome to the Bitverse..."); + }).then(function() { + return writeRedPillLine(" "); + }).then(function() { + return writeRedPillLine("(Enter a new BitNode using the image above)"); + }).then(function() { + return Promise.resolve(true); + }).catch(function(e){ + console.log("ERROR: " + e.toString()); + }); +} + + +//Returns string with DOM element for Bit Node +function createBitNode(n) { + var bitNodeStr = "BitNode" + n.toString(); + var bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ "a"][bitNodeStr]; + if (bitNode == null) {return "O";} + return "O" + + "" + + "BitNode-" + bitNode.number.toString() + "
" + bitNode.name+ "

" + + bitNode.desc + "
" + + "
"; +} + +function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=false) { + var yesBtn = Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxGetYesButton */ "d"])(); + yesBtn.innerHTML = "Enter BitNode-" + newBitNode; + yesBtn.addEventListener("click", function() { + if (!flume) { + giveSourceFile(destroyedBitNode); + } else { + //If player used flume, subtract 5 int exp. The prestigeSourceFile() + //function below grants 5 int exp, so this allows sets net gain to 0 + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].gainIntelligenceExp(-5); + } + redPillFlag = false; + var container = document.getElementById("red-pill-content"); + Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(container); + + //Set new Bit Node + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].bitNodeN = newBitNode; + console.log("Entering Bit Node " + _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].bitNodeN); + + //Reenable terminal + $("#hack-progress-bar").attr('id', "old-hack-progress-bar"); + $("#hack-progress").attr('id', "old-hack-progress"); + document.getElementById("terminal-input-td").innerHTML = '$ '; + $('input[class=terminal-input]').prop('disabled', false); + + _Terminal__WEBPACK_IMPORTED_MODULE_5__[/* Terminal */ "a"].hackFlag = false; + + Object(_Prestige__WEBPACK_IMPORTED_MODULE_3__[/* prestigeSourceFile */ "b"])(); + Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxClose */ "a"])(); + }); + var noBtn = Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxGetNoButton */ "c"])(); + noBtn.innerHTML = "Back"; + noBtn.addEventListener("click", function() { + Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_9__[/* yesNoBoxClose */ "a"])(); + }); + +} + + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) + +/***/ }), +/* 59 */ /*!********************************!*\ !*** ./src/ActiveScriptsUI.js ***! \********************************/ @@ -42407,26 +42077,26 @@ function getHacknetNode(name) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return updateActiveScriptsItems; }); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NetscriptWorker */ 24); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 11); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 12); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createAccordionElement */ 66); /* harmony import */ var _utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createAccordionElement__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 48); /* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/helpers/createProgressBarText */ 72); /* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); -/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/getElementById */ 45); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/uiHelpers/getElementById */ 46); /* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/LogBox */ 68); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 64); +/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/uiHelpers/removeElement */ 62); /* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 71); /* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_15__); @@ -42758,8 +42428,312 @@ function updateActiveScriptsText(workerscript, item, itemName) { /***/ }), -/* 61 */, +/* 60 */, +/* 61 */ +/*!***************************!*\ + !*** ./src/SourceFile.js ***! + \***************************/ +/*! exports provided: SourceFiles, PlayerOwnedSourceFile, applySourceFile, initSourceFiles */ +/*! exports used: PlayerOwnedSourceFile, SourceFiles, applySourceFile, initSourceFiles */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SourceFiles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PlayerOwnedSourceFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return applySourceFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initSourceFiles; }); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNode */ 49); + + + +/* SourceFile.js */ +//Each SourceFile corresponds to a BitNode with the same number +function SourceFile(number, info="") { + var bitnodeKey = "BitNode" + number; + var bitnode = _BitNode__WEBPACK_IMPORTED_MODULE_1__[/* BitNodes */ "a"][bitnodeKey]; + if (bitnode == null) { + throw new Error("Invalid Bit Node for this Source File"); + } + + this.n = number; + this.name = "Source-File " + number + ": " + bitnode.name; + this.lvl = 1; + this.info = info; + this.owned = false; +} + +let SourceFiles = {}; +function initSourceFiles() { + SourceFiles = {}; + SourceFiles["SourceFile1"] = new SourceFile(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%"); + SourceFiles["SourceFile2"] = new SourceFile(2, "This Source-File increases the player's crime success rate, crime money, and charisma " + + "multipliers by:

" + + "Level 1: 20%
" + + "Level 2: 30%
" + + "Level 3: 35%"); + SourceFiles["SourceFile3"] = new SourceFile(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%"); + SourceFiles["SourceFile4"] = new SourceFile(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."); + SourceFiles["SourceFile5"] = new SourceFile(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() " + + "Netscript function, and will raise all of your hacking-related multipliers by:

" + + "Level 1: 8%
" + + "Level 2: 12%
" + + "Level 3: 14%"); + SourceFiles["SourceFile6"] = new SourceFile(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%"); + SourceFiles["SourceFile7"] = new SourceFile(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%"); + SourceFiles["SourceFile8"] = new SourceFile(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%"); + SourceFiles["SourceFile9"] = new SourceFile(9); + SourceFiles["SourceFile10"] = new SourceFile(10); + SourceFiles["SourceFile11"] = new SourceFile(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: 24%
" + + "Level 2: 36%
" + + "Level 3: 42%
"); + SourceFiles["SourceFile12"] = new SourceFile(12, "This Source-File increases all your multipliers by 1% per level. This effect is multiplicative with itself. " + + "In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)"); +} + +function PlayerOwnedSourceFile(number, level) { + this.n = number; + this.lvl = level; +} + +//Takes in a PlayerOwnedSourceFile as the "srcFile" argument +function applySourceFile(srcFile) { + var srcFileKey = "SourceFile" + srcFile.n; + var sourceFileObject = SourceFiles[srcFileKey]; + if (sourceFileObject == null) { + console.log("ERROR: Invalid source file number: " + srcFile.n); + return; + } + + switch(srcFile.n) { + case 1: // The Source Genesis + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (16 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + var decMult = 1 - (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].faction_rep_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_purchase_cost_mult *= decMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_ram_cost_mult *= decMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_core_cost_mult *= decMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_level_cost_mult *= decMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; + break; + case 2: //Rise of the Underworld + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (20 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; + break; + case 3: //Corporatocracy + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (8 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; + break; + case 4: //The Singularity + //No effects, just gives access to Singularity functions + break; + case 5: //Artificial Intelligence + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (8 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= incMult; + break; + case 6: //Bladeburner + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (8 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= incMult; + break; + case 7: //Bladeburner 2079 + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (8 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_max_stamina_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_stamina_gain_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_analysis_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].bladeburner_success_chance_mult *= incMult; + break; + case 8: //Ghost of Wall Street + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (12 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= incMult; + break; + case 11: //The Big Crash + var mult = 0; + for (var i = 0; i < srcFile.lvl; ++i) { + mult += (24 / (Math.pow(2, i))); + } + var incMult = 1 + (mult / 100); + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= incMult; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= incMult; + break; + case 12: //The Recursion + var inc = Math.pow(1.01, srcFile.lvl); + var dec = Math.pow(0.99, srcFile.lvl); + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_chance_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_speed_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_money_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_grow_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_mult *= inc; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_mult *= inc; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacking_exp_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].strength_exp_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].defense_exp_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].dexterity_exp_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].agility_exp_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].charisma_exp_mult *= inc; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].company_rep_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].faction_rep_mult *= inc; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_money_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].crime_success_mult *= inc; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_money_mult *= inc; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_purchase_cost_mult *= dec; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_ram_cost_mult *= dec; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_core_cost_mult *= dec; + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].hacknet_node_level_cost_mult *= dec; + + _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ "a"].work_money_mult *= inc; + break; + default: + console.log("ERROR: Invalid source file number: " + srcFile.n); + break; + } + + sourceFileObject.owned = true; +} + + + + +/***/ }), /* 62 */ +/*!******************************************!*\ + !*** ./utils/uiHelpers/removeElement.ts ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * For a given element, this function removes it AND its children + * @param elem The element to remove. + */ +function removeElement(elem) { + if (elem === null) { + // tslint:disable-next-line:no-console + console.debug("The element passed into 'removeElement' was null."); + return; + } + if (!(elem instanceof Element)) { + // tslint:disable-next-line:no-console + console.debug("The element passed into 'removeElement' was not an instance of an Element."); + return; + } + while (elem.firstChild !== null) { + elem.removeChild(elem.firstChild); + } + if (elem.parentNode !== null) { + elem.parentNode.removeChild(elem); + } +} +exports.removeElement = removeElement; + + +/***/ }), +/* 63 */ /*!******************************!*\ !*** ./src/NetscriptPort.js ***! \******************************/ @@ -42825,44 +42799,7 @@ NetscriptPort.prototype.clear = function() { /***/ }), -/* 63 */, -/* 64 */ -/*!******************************************!*\ - !*** ./utils/uiHelpers/removeElement.ts ***! - \******************************************/ -/*! no static exports found */ -/*! all exports used */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * For a given element, this function removes it AND its children - * @param elem The element to remove. - */ -function removeElement(elem) { - if (elem === null) { - // tslint:disable-next-line:no-console - console.debug("The element passed into 'removeElement' was null."); - return; - } - if (!(elem instanceof Element)) { - // tslint:disable-next-line:no-console - console.debug("The element passed into 'removeElement' was not an instance of an Element."); - return; - } - while (elem.firstChild !== null) { - elem.removeChild(elem.firstChild); - } - if (elem.parentNode !== null) { - elem.parentNode.removeChild(elem); - } -} -exports.removeElement = removeElement; - - -/***/ }), +/* 64 */, /* 65 */ /*!***************************!*\ !*** ./src/SaveObject.js ***! @@ -42877,33 +42814,32 @@ exports.removeElement = removeElement; /* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 39); /* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company */ 13); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction */ 15); /* harmony import */ var _Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf */ 40); -/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Gang */ 49); -/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HacknetNode */ 59); +/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Gang */ 53); +/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HacknetNode */ 57); /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message */ 35); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Script */ 28); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SpecialServerIps */ 27); /* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket */ 23); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_GameOptions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/GameOptions */ 73); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/JSONReviver */ 14); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ui/createStatusText */ 84); /* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_21__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_22__); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! decimal.js */ 30); @@ -43032,7 +42968,7 @@ function loadGame(saveString) { Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ "b"])(saveObj.PlayerSave); Object(_Server__WEBPACK_IMPORTED_MODULE_11__[/* loadAllServers */ "g"])(saveObj.AllServersSave); Object(_Company__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ "i"])(saveObj.CompaniesSave); - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ "i"])(saveObj.FactionsSave); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ "h"])(saveObj.FactionsSave); Object(_SpecialServerIps__WEBPACK_IMPORTED_MODULE_13__[/* loadSpecialServerIps */ "d"])(saveObj.SpecialServerIpsSave); if (saveObj.hasOwnProperty("AliasesSave")) { @@ -43131,7 +43067,7 @@ function loadGame(saveString) { } if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].bitNodeN == 2 && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].inGang() && saveObj.hasOwnProperty("AllGangsSave")) { try { - Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "e"])(saveObj.AllGangsSave); + Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "c"])(saveObj.AllGangsSave); } catch(e) { console.log("ERROR: Failed to parse AllGangsSave: " + e); } @@ -43234,7 +43170,7 @@ function loadImportedGame(saveObj, saveString) { } if (tempPlayer.bitNodeN == 2 && tempPlayer.inGang() && tempSaveObj.hasOwnProperty("AllGangsSave")) { try { - Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "e"])(tempSaveObj.AllGangsSave); + Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "c"])(tempSaveObj.AllGangsSave); } catch(e) { console.log("ERROR: Failed to parse AllGangsSave: " + e); } @@ -43251,7 +43187,7 @@ function loadImportedGame(saveObj, saveString) { Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ "b"])(saveObj.PlayerSave); Object(_Server__WEBPACK_IMPORTED_MODULE_11__[/* loadAllServers */ "g"])(saveObj.AllServersSave); Object(_Company__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ "i"])(saveObj.CompaniesSave); - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ "i"])(saveObj.FactionsSave); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ "h"])(saveObj.FactionsSave); Object(_SpecialServerIps__WEBPACK_IMPORTED_MODULE_13__[/* loadSpecialServerIps */ "d"])(saveObj.SpecialServerIpsSave); if (saveObj.hasOwnProperty("AliasesSave")) { @@ -43347,7 +43283,7 @@ function loadImportedGame(saveObj, saveString) { } if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].bitNodeN == 2 && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].inGang() && saveObj.hasOwnProperty("AllGangsSave")) { try { - Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "e"])(saveObj.AllGangsSave); + Object(_Gang__WEBPACK_IMPORTED_MODULE_6__[/* loadAllGangs */ "c"])(saveObj.AllGangsSave); } catch(e) { console.log("ERROR: Failed to parse AllGangsSave: " + e); } @@ -43401,7 +43337,7 @@ function loadImportedGame(saveObj, saveString) { var offlineProductionFromHacknetNodes = Object(_HacknetNode__WEBPACK_IMPORTED_MODULE_7__[/* processAllHacknetNodeEarnings */ "d"])(numCyclesOffline); //Passive faction rep gain offline - Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* processPassiveFactionRepGain */ "j"])(numCyclesOffline); + Object(_Faction__WEBPACK_IMPORTED_MODULE_4__[/* processPassiveFactionRepGain */ "i"])(numCyclesOffline); //Update total playtime var time = numCyclesOffline * _engine__WEBPACK_IMPORTED_MODULE_3__["Engine"]._idleSpeed; @@ -43421,8 +43357,8 @@ function loadImportedGame(saveObj, saveString) { _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].lastUpdate = _engine__WEBPACK_IMPORTED_MODULE_3__["Engine"]._lastUpdate; _engine__WEBPACK_IMPORTED_MODULE_3__["Engine"].start(); //Run main game loop and Scripts loop Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__["dialogBoxCreate"])("While you were offline, your scripts generated $" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_22__["formatNumber"])(offlineProductionFromScripts, 2) + " and your Hacknet Nodes generated $" + - Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_22__["formatNumber"])(offlineProductionFromHacknetNodes, 2) + ""); + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_22__[/* numeralWrapper */ "a"].format(offlineProductionFromScripts, '0,0.00') + " and your Hacknet Nodes generated $" + + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_22__[/* numeralWrapper */ "a"].format(offlineProductionFromHacknetNodes, '0,0.00') + ""); return true; } @@ -43534,7 +43470,7 @@ function openImportFileHandler(evt) { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 66 */ @@ -43548,7 +43484,7 @@ function openImportFileHandler(evt) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const createElement_1 = __webpack_require__(/*! ./createElement */ 4); +const createElement_1 = __webpack_require__(/*! ./createElement */ 2); /** * Creates both the header and panel element of an accordion and sets the click handler * @param params The creation parameters. @@ -43698,7 +43634,7 @@ function logBoxUpdateText() { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 69 */ @@ -43716,11 +43652,11 @@ function logBoxUpdateText() { /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateProgram */ 22); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SpecialServerIps */ 27); -/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ui/postToTerminal */ 6); +/* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ui/postToTerminal */ 7); /* harmony import */ var _ui_postToTerminal__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helpers/isValidIPAddress */ 75); /* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__); @@ -43853,7 +43789,7 @@ const DarkWebItems = { /* unused harmony export Literatures */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initLiterature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return showLiterature; }); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* Literature.js @@ -44408,7 +44344,7 @@ function gameOptionsBoxOpen() { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 74 */ @@ -44473,34 +44409,34 @@ exports.isValidIPAddress = isValidIPAddress; "use strict"; /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return prestigeAugmentation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return prestigeSourceFile; }); -/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 60); -/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20); -/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNode */ 50); +/* harmony import */ var _ActiveScriptsUI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI */ 59); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNode */ 49); /* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Bladeburner */ 29); /* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CinematicText */ 83); /* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company */ 13); /* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateProgram */ 22); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Faction */ 15); -/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang */ 49); +/* harmony import */ var _Gang__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang */ 53); /* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Location */ 78); /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Message */ 35); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./NetscriptWorker */ 24); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server */ 11); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server */ 12); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SpecialServerIps */ 27); /* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./StockMarket */ 23); -/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Terminal */ 47); +/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Terminal */ 44); /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! decimal.js */ 30); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 21); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); /* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_21__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 36); /* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -44590,7 +44526,7 @@ function prestigeAugmentation() { } //Re-initialize things - This will update any changes - Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* initFactions */ "f"])(); //Factions must be initialized before augmentations + Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* initFactions */ "e"])(); //Factions must be initialized before augmentations Object(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ "h"])(); //Calls reapplyAllAugmentations() and resets Player multipliers _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].reapplyAllSourceFiles(); Object(_Company__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ "h"])(); @@ -44606,7 +44542,7 @@ function prestigeAugmentation() { if (_Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].bitNodeN == 2 && _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].inGang()) { var faction = _Faction__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ "b"][_Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].gang.facName]; if (faction instanceof _Faction__WEBPACK_IMPORTED_MODULE_8__[/* Faction */ "a"]) { - Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* joinFaction */ "h"])(faction); + Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* joinFaction */ "g"])(faction); } } @@ -44717,7 +44653,7 @@ function prestigeSourceFile() { } //Re-initialize things - This will update any changes - Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* initFactions */ "f"])(); //Factions must be initialized before augmentations + Object(_Faction__WEBPACK_IMPORTED_MODULE_8__[/* initFactions */ "e"])(); //Factions must be initialized before augmentations Object(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ "h"])(); //Calls reapplyAllAugmentations() and resets Player multipliers _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].reapplyAllSourceFiles(); Object(_Company__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ "h"])(); @@ -44807,8 +44743,8 @@ function prestigeSourceFile() { stockMarketList.removeChild(stockMarketList.firstChild); } + if (_Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].inGang()) { _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].gang.clearUI(); } _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].gang = null; - Object(_Gang__WEBPACK_IMPORTED_MODULE_9__[/* deleteGangDisplayContent */ "c"])(); _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].corporation = null; _Player__WEBPACK_IMPORTED_MODULE_14__[/* Player */ "a"].bladeburner = null; @@ -44818,7 +44754,7 @@ function prestigeSourceFile() { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 57))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 56))) /***/ }), /* 77 */, @@ -44835,26 +44771,26 @@ function prestigeSourceFile() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return initLocationButtons; }); /* harmony import */ var _Bladeburner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bladeburner */ 29); /* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company */ 13); -/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CompanyManagement */ 55); +/* harmony import */ var _CompanyManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CompanyManagement */ 54); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Crimes */ 33); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./engine */ 7); -/* harmony import */ var _Infiltration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Infiltration */ 110); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./engine */ 8); +/* harmony import */ var _Infiltration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Infiltration */ 111); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Locations */ 3); /* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server */ 11); -/* harmony import */ var _ServerPurchases__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ServerPurchases */ 95); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server */ 12); +/* harmony import */ var _ServerPurchases__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ServerPurchases */ 96); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SpecialServerIps */ 27); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/IPAddress */ 51); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/IPAddress */ 50); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -44881,10 +44817,6 @@ function prestigeSourceFile() { function displayLocationContent() { - if (_engine__WEBPACK_IMPORTED_MODULE_5__["Engine"].Debug) { - console.log("displayLocationContent() called with location " + _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].location) - } - var returnToWorld = document.getElementById("location-return-to-world-button"); var locationName = document.getElementById("location-name"); @@ -46664,7 +46596,7 @@ function initLocationButtons() { yesBtn.innerHTML = "Purchase"; noBtn.innerHTML = "Cancel"; yesBtn.addEventListener("click", ()=>{ if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].money.lt(cost)) { - Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__["dialogBoxCreate"])("You do not have enough mone to purchase an additional CPU Core for your home computer!"); + Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__["dialogBoxCreate"])("You do not have enough money to purchase an additional CPU Core for your home computer!"); } else { _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].loseMoney(cost); _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ "a"].getHomeComputer().cpuCores++; @@ -47122,7 +47054,7 @@ exports.compareArrays = compareArrays; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getRandomInt_1 = __webpack_require__(/*! ./getRandomInt */ 10); +const getRandomInt_1 = __webpack_require__(/*! ./getRandomInt */ 11); /** * Gets a random value in the range of a byte (0 - 255), or up to the maximum. * @param max The maximum value (up to 255). @@ -47150,12 +47082,12 @@ exports.getRandomByte = getRandomByte; "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cinematicTextFlag; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return writeCinematicText; }); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 26); /* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 4); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); /* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 43); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helpers/isString */ 34); /* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_4__); @@ -47271,7 +47203,7 @@ function cinematicTextEnd() { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getElementById_1 = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 45); +const getElementById_1 = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 46); const threeSeconds = 3000; let x; /** @@ -47548,9 +47480,9 @@ exports.HelpTexts = { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Environment; }); -/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 59); +/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 57); /* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NetscriptFunctions */ 37); -/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NetscriptPort */ 62); +/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NetscriptPort */ 63); @@ -47662,7 +47594,7 @@ Environment.prototype = { /* unused harmony export makeScriptBlob */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return executeJSScript; }); /* unused harmony export _getScriptUrls */ -/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NetscriptEvaluator */ 5); +/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NetscriptEvaluator */ 6); // Makes a blob that contains the code of a given script. @@ -47696,8 +47628,6 @@ async function executeJSScript(scripts = [], workerScript) { loadedModule = script.module; let ns = workerScript.env.vars; - //ns.threads = workerScript.threads; - //ns.args = workerScript.args; try { // TODO: putting await in a non-async function yields unhelpful @@ -47740,7 +47670,7 @@ function _getScriptUrls(script, scripts, seen) { // import {foo} from "blob://" // // Where the blob URL contains the script content. - const transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g, + let transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g, (unmodified, prefix, filename, suffix) => { const isAllowedImport = scripts.some(s => s.filename == filename); if (!isAllowedImport) return unmodified; @@ -47757,6 +47687,9 @@ function _getScriptUrls(script, scripts, seen) { } ); + // We automatically define a print function() in the NetscriptJS module so that + // accidental calls to window.print() do not bring up the "print screen" dialog + transformedCode += `\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript's print()?");}` // If we successfully transformed the code, create a blob url for it and // push that URL onto the top of the stack. @@ -47774,6 +47707,424 @@ function _getScriptUrls(script, scripts, seen) { /***/ }), /* 95 */ +/*!************************!*\ + !*** ./src/DevMenu.js ***! + \************************/ +/*! exports provided: createDevMenu, closeDevMenu */ +/*! exports used: closeDevMenu, createDevMenu */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createDevMenu; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return closeDevMenu; }); +/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations */ 21); +/* harmony import */ var _CreateProgram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateProgram */ 22); +/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction */ 15); +/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player */ 0); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Server */ 12); +/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal */ 44); +/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 41); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 2); +/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 20); +/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_8__); + + + + + + + + + + +const devMenuContainerId = "dev-menu-container"; + +function createDevMenu() { + if (false) {} + + const devMenuText = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h1", { + display: "block", + innerText: "Development Menu - Only meant to be used for testing/debugging", + }); + + // Generic + const genericHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", { + display: "block", + innerText: "Generic" + }); + + const addMoney = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainMoney(1e15); + }, + display: "block", + innerText: "Add $1000t", + }); + + const addRam = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].getHomeComputer().maxRam *= 2; + }, + display: "block", + innerText: "Double Home Computer RAM", + }); + + const triggerBitflume = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + hackWorldDaemon(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].bitNodeN, true); + }, + innerText: "Trigger BitFlume", + }); + + const destroyCurrentBitnode = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + hackWorldDaemon(_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].bitNodeN); + }, + innerText: "Destroy Current BitNode", + tooltip: "Will grant Source-File for the BitNode", + }) + + // Experience / stats + const statsHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", { + display: "block", + innerText: "Experience/Stats" + }); + + const statsHackingExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsHackingExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsHackingExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainHackingExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsStrengthExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsStrengthExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsStrengthExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainStrengthExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsDefenseExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsDefenseExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsDefenseExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainDefenseExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsDexterityExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsDexterityExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsDexterityExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainDexterityExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsAgilityExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsAgilityExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsAgilityExpButton.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainAgilityExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsCharismaExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsCharismaExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsCharismaExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainCharismaExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsIntelligenceExpInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsIntelligenceExpButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsIntelligenceExpInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gainIntelligenceExp(exp); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsEnableIntelligenceButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].intelligence = 1; + }, + innerText: "Enable Intelligence" + }); + + const statsDisableIntelligenceButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].intelligence = 0; + }, + innerText: "Disable Intelligence" + }); + + // Factions + const factionsHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", {innerText: "Factions"}); + + const factionsDropdown = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("select", {class: "dropdown"}); + for (const i in _Faction__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ "b"]) { + factionsDropdown.options[factionsDropdown.options.length] = new Option(_Faction__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ "b"][i].name, _Faction__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ "b"][i].name); + } + + const factionsAddButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const facName = factionsDropdown.options[factionsDropdown.selectedIndex].value; + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].receiveInvite(facName); + }, + innerText: "Receive Invite to Faction", + }); + + // Augmentations / Source Files + const augmentationsHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", {innerText: "Augmentations"}); + + const augmentationsDropdown = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("select", {class: "dropdown"}); + for (const i in _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"]) { + const augName = _Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* AugmentationNames */ "b"][i]; + augmentationsDropdown.options[augmentationsDropdown.options.length] = new Option(augName, augName); + } + + const augmentationsQueueButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].queueAugmentation(augmentationsDropdown.options[augmentationsDropdown.selectedIndex].value); + }, + innerText: "Queue Augmentation", + }) + + // Programs + const programsHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", {innerText: "Programs"}); + + const programsAddDropdown = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("select", {class: "dropdown"}); + for (const i in _CreateProgram__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ "a"]) { + const progName = _CreateProgram__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ "a"][i].name; + programsAddDropdown.options[programsAddDropdown.options.length] = new Option(progName, progName); + } + + const programsAddButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const program = programsAddDropdown.options[programsAddDropdown.selectedIndex].value; + if(!_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].hasProgram(program)) { + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].getHomeComputer().programs.push(program); + } + }, + innerText: "Add Program", + }) + + // Servers + const serversHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", {innerText: "Servers"}); + + const serversOpenAll = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + for (const i in _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"]) { + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].hasAdminRights = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].sshPortOpen = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].ftpPortOpen = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].smtpPortOpen = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].httpPortOpen = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].sqlPortOpen = true; + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].openPortCount = 5; + } + }, + display: "block", + innerText: "Get Admin Rights to all servers", + }); + + const serversMinSecurityAll = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + for (const i in _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"]) { + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].hackDifficulty = _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].minDifficulty; + } + }, + display: "block", + innerText: "Set all servers to min security", + }); + + const serversMaxMoneyAll = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + for (const i in _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"]) { + _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].moneyAvailable = _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].moneyMax; + } + }, + display: "block", + innerText: "Set all servers to max money", + }); + + const serversConnectToDropdown = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("select", {class: "dropdown"}); + for (const i in _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"]) { + const hn = _Server__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ "b"][i].hostname; + serversConnectToDropdown.options[serversConnectToDropdown.options.length] = new Option(hn, hn); + } + + const serversConnectToButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + const host = serversConnectToDropdown.options[serversConnectToDropdown.selectedIndex].value; + _Terminal__WEBPACK_IMPORTED_MODULE_5__[/* Terminal */ "a"].connectToServer(host); + }, + innerText: "Connect to server", + }); + + // Add everything to container, then append to main menu + const devMenuContainer = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { + class: "generic-menupage-container", + id: devMenuContainerId, + }); + + const bladeburnerHeader = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("h2", {innerText: "Bladeburner"}); + + const bladeburnerGainRankInput = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { + class: "text-input", + display: "block", + placeholder: "Rank to gain (or negative to lose rank)", + type: "number", + }); + + const bladeburnerGainRankButton = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_7__["createElement"])("button", { + class: "std-button", + clickListener: () => { + try { + const rank = parseInt(bladeburnerGainRankInput.value); + _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].bladeburner.changeRank(rank); + } catch(e) { + Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_6__[/* exceptionAlert */ "a"])(`Failed to change Bladeburner Rank in dev menu: ${e}`); + } + }, + display: "block", + innerText: "Gain Bladeburner Rank", + }) + + devMenuContainer.appendChild(devMenuText); + devMenuContainer.appendChild(genericHeader); + devMenuContainer.appendChild(addMoney); + devMenuContainer.appendChild(addRam); + devMenuContainer.appendChild(triggerBitflume); + devMenuContainer.appendChild(destroyCurrentBitnode); + devMenuContainer.appendChild(statsHeader); + devMenuContainer.appendChild(statsHackingExpInput); + devMenuContainer.appendChild(statsHackingExpButton); + devMenuContainer.appendChild(statsStrengthExpInput); + devMenuContainer.appendChild(statsStrengthExpButton); + devMenuContainer.appendChild(statsDefenseExpInput); + devMenuContainer.appendChild(statsDefenseExpButton); + devMenuContainer.appendChild(statsDexterityExpInput); + devMenuContainer.appendChild(statsDexterityExpButton); + devMenuContainer.appendChild(statsAgilityExpInput); + devMenuContainer.appendChild(statsAgilityExpButton); + devMenuContainer.appendChild(statsCharismaExpInput); + devMenuContainer.appendChild(statsCharismaExpButton); + devMenuContainer.appendChild(statsIntelligenceExpInput); + devMenuContainer.appendChild(statsIntelligenceExpButton); + devMenuContainer.appendChild(statsEnableIntelligenceButton); + devMenuContainer.appendChild(statsDisableIntelligenceButton); + devMenuContainer.appendChild(factionsHeader); + devMenuContainer.appendChild(factionsDropdown); + devMenuContainer.appendChild(factionsAddButton); + devMenuContainer.appendChild(augmentationsHeader); + devMenuContainer.appendChild(augmentationsQueueButton); + devMenuContainer.appendChild(programsHeader); + devMenuContainer.appendChild(programsAddDropdown); + devMenuContainer.appendChild(programsAddButton); + devMenuContainer.appendChild(serversHeader); + devMenuContainer.appendChild(serversOpenAll); + devMenuContainer.appendChild(serversMinSecurityAll); + devMenuContainer.appendChild(serversMaxMoneyAll); + devMenuContainer.appendChild(serversConnectToDropdown); + devMenuContainer.appendChild(serversConnectToButton); + devMenuContainer.appendChild(bladeburnerHeader); + devMenuContainer.appendChild(bladeburnerGainRankInput); + devMenuContainer.appendChild(bladeburnerGainRankButton); + + const entireGameContainer = document.getElementById("entire-game-container"); + if (entireGameContainer == null) { + throw new Error("Could not find entire-game-container DOM element"); + } + entireGameContainer.appendChild(devMenuContainer); +} + +function closeDevMenu() { + Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_8__["removeElementById"])(devMenuContainerId); +} + + +/***/ }), +/* 96 */ /*!********************************!*\ !*** ./src/ServerPurchases.js ***! \********************************/ @@ -47786,9 +48137,9 @@ function _getScriptUrls(script, scripts, seen) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return purchaseRamForHomeComputer; }); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 1); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 11); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/DialogBox */ 8); -/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/IPAddress */ 51); +/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server */ 12); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/DialogBox */ 9); +/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/IPAddress */ 50); /* harmony import */ var _utils_YesNoBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/YesNoBox */ 18); @@ -47862,7 +48213,7 @@ function purchaseRamForHomeComputer(cost) { /***/ }), -/* 96 */ +/* 97 */ /*!****************************!*\ !*** ./src/FactionInfo.ts ***! \****************************/ @@ -48036,7 +48387,7 @@ exports.FactionInfos = { /***/ }), -/* 97 */ +/* 98 */ /*!************************************************!*\ !*** ./utils/uiHelpers/removeLoadingScreen.ts ***! \************************************************/ @@ -48047,8 +48398,8 @@ exports.FactionInfos = { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getElementById_1 = __webpack_require__(/*! ./getElementById */ 45); -const removeElementById_1 = __webpack_require__(/*! ./removeElementById */ 21); +const getElementById_1 = __webpack_require__(/*! ./getElementById */ 46); +const removeElementById_1 = __webpack_require__(/*! ./removeElementById */ 20); /** * Routes the player from the Loading screen to the main game content. */ @@ -48061,14 +48412,14 @@ exports.removeLoadingScreen = removeLoadingScreen; /***/ }), -/* 98 */, /* 99 */, /* 100 */, /* 101 */, /* 102 */, /* 103 */, /* 104 */, -/* 105 */ +/* 105 */, +/* 106 */ /*!*************************************!*\ !*** ./src/ui/setSettingsLabels.js ***! \*************************************/ @@ -48078,10 +48429,10 @@ exports.removeLoadingScreen = removeLoadingScreen; "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setSettingsLabels; }); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../engine */ 8); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Settings */ 19); /* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numeralFormat */ 12); +/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numeralFormat */ 5); @@ -48193,7 +48544,7 @@ function setSettingsLabels() { /***/ }), -/* 106 */ +/* 107 */ /*!**********************************!*\ !*** ./src/CharacterOverview.js ***! \**********************************/ @@ -48204,7 +48555,7 @@ function setSettingsLabels() { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CharacterOverview; }); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ui/numeralFormat */ 12); +/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ui/numeralFormat */ 5); @@ -48267,7 +48618,7 @@ CharacterOverview.prototype.update = function() { /***/ }), -/* 107 */ +/* 108 */ /*!******************************!*\ !*** ./src/JSInterpreter.js ***! \******************************/ @@ -48277,7 +48628,7 @@ CharacterOverview.prototype.update = function() { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Interpreter; }); -/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn */ 41); +/* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn */ 42); /* harmony import */ var _utils_acorn__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_0__); /** @@ -52070,7 +52421,7 @@ Interpreter.prototype['createPrimitive'] = function(x) {return x;}; /***/ }), -/* 108 */ +/* 109 */ /*!***************************************!*\ !*** ./utils/FactionInvitationBox.js ***! \***************************************/ @@ -52081,7 +52432,7 @@ Interpreter.prototype['createPrimitive'] = function(x) {return x;}; "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return factionInvitationBoxCreate; }); /* harmony import */ var _src_Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/Faction */ 15); -/* harmony import */ var _src_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../src/engine */ 7); +/* harmony import */ var _src_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../src/engine */ 8); /* harmony import */ var _src_Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/Player */ 0); /* harmony import */ var _uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uiHelpers/clearEventListeners */ 17); /* harmony import */ var _uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_3__); @@ -52133,7 +52484,7 @@ function factionInvitationBoxCreate(faction) { } else { _src_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ "a"].factionInvitations.splice(i, 1); } - Object(_src_Faction__WEBPACK_IMPORTED_MODULE_0__[/* joinFaction */ "h"])(faction); + Object(_src_Faction__WEBPACK_IMPORTED_MODULE_0__[/* joinFaction */ "g"])(faction); factionInvitationBoxClose(); if (_src_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_4__["routing"].isOn(_src_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_4__["Page"].Factions)) { _src_engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionsContent(); @@ -52154,7 +52505,7 @@ function factionInvitationBoxCreate(faction) { /***/ }), -/* 109 */ +/* 110 */ /*!**********************************!*\ !*** ./utils/InfiltrationBox.js ***! \**********************************/ @@ -52164,15 +52515,15 @@ function factionInvitationBoxCreate(faction) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return infiltrationBoxCreate; }); -/* harmony import */ var _src_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/BitNodeMultipliers */ 9); +/* harmony import */ var _src_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/BitNodeMultipliers */ 10); /* harmony import */ var _src_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_src_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _src_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../src/Constants */ 1); /* harmony import */ var _src_Faction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/Faction */ 15); /* harmony import */ var _src_Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../src/Player */ 0); -/* harmony import */ var _DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DialogBox */ 8); +/* harmony import */ var _DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DialogBox */ 9); /* harmony import */ var _uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uiHelpers/clearEventListeners */ 17); /* harmony import */ var _uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./StringHelperFunctions */ 2); +/* harmony import */ var _StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./StringHelperFunctions */ 4); /* harmony import */ var _StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__); @@ -52241,7 +52592,8 @@ function infiltrationBoxCreate(inst) { var selector = document.getElementById("infiltration-faction-select"); selector.innerHTML = ""; for (let i = 0; i < _src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].factions.length; ++i) { - if (_src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].factions[i] === "Bladeburners") {continue;} + if (_src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].factions[i] === "Bladeburners") { continue; } + if (_src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].inGang() && _src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].gang.facName === _src_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ "a"].factions[i]) { continue; } selector.innerHTML += ""; } @@ -52295,7 +52647,7 @@ function infiltrationBoxCreate(inst) { /***/ }), -/* 110 */ +/* 111 */ /*!*****************************!*\ !*** ./src/Infiltration.js ***! \*****************************/ @@ -52305,18 +52657,18 @@ function infiltrationBoxCreate(inst) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return beginInfiltration; }); -/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 9); +/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNodeMultipliers */ 10); /* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants */ 1); -/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 7); +/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine */ 8); /* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player */ 0); -/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 8); +/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox */ 9); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 17); /* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 10); +/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 11); /* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _utils_InfiltrationBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/InfiltrationBox */ 109); -/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 2); +/* harmony import */ var _utils_InfiltrationBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/InfiltrationBox */ 110); +/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 4); /* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__); @@ -53163,7 +53515,7 @@ function getInfiltrationEscapeChance(inst) { /***/ }), -/* 111 */ +/* 112 */ /*!******************************************!*\ !*** ./utils/uiHelpers/clearSelector.ts ***! \******************************************/ @@ -53187,7 +53539,7 @@ exports.clearSelector = clearSelector; /***/ }), -/* 112 */ +/* 113 */ /*!*****************************!*\ !*** ./src/data/servers.ts ***! \*****************************/ @@ -54660,7 +55012,7 @@ exports.serverMetadata = [ /***/ }), -/* 113 */ +/* 114 */ /*!***************************************!*\ !*** ./utils/helpers/isPowerOfTwo.ts ***! \***************************************/ @@ -54690,7 +55042,7 @@ exports.isPowerOfTwo = isPowerOfTwo; /***/ }), -/* 114 */ +/* 115 */ /*!****************************************!*\ !*** ./src/data/gangmemberupgrades.ts ***! \****************************************/ @@ -54884,7 +55236,7 @@ exports.gangMemberUpgradesMetadata = [ /***/ }), -/* 115 */ +/* 116 */ /*!*************************************!*\ !*** ./src/data/gangmembertasks.ts ***! \*************************************/ @@ -55051,7 +55403,6 @@ exports.gangMemberTasksMetadata = [ /***/ }), -/* 116 */, /* 117 */, /* 118 */, /* 119 */, @@ -55066,7 +55417,8 @@ exports.gangMemberTasksMetadata = [ /* 128 */, /* 129 */, /* 130 */, -/* 131 */ +/* 131 */, +/* 132 */ /*!***********************!*\ !*** ./css/gang.scss ***! \***********************/ @@ -55076,8 +55428,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 132 */, -/* 133 */ +/* 133 */, +/* 134 */ /*!******************************!*\ !*** ./css/bladeburner.scss ***! \******************************/ @@ -55087,8 +55439,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 134 */, -/* 135 */ +/* 135 */, +/* 136 */ /*!************************************!*\ !*** ./css/companymanagement.scss ***! \************************************/ @@ -55098,8 +55450,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 136 */, -/* 137 */ +/* 137 */, +/* 138 */ /*!***************************!*\ !*** ./css/missions.scss ***! \***************************/ @@ -55109,8 +55461,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 138 */, -/* 139 */ +/* 139 */, +/* 140 */ /*!*************************!*\ !*** ./css/loader.scss ***! \*************************/ @@ -55120,8 +55472,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 140 */, -/* 141 */ +/* 141 */, +/* 142 */ /*!**************************************!*\ !*** ./css/interactivetutorial.scss ***! \**************************************/ @@ -55131,8 +55483,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 142 */, -/* 143 */ +/* 143 */, +/* 144 */ /*!*****************************!*\ !*** ./css/popupboxes.scss ***! \*****************************/ @@ -55142,8 +55494,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 144 */, -/* 145 */ +/* 145 */, +/* 146 */ /*!*********************************!*\ !*** ./css/workinprogress.scss ***! \*********************************/ @@ -55153,8 +55505,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 146 */, -/* 147 */ +/* 147 */, +/* 148 */ /*!****************************!*\ !*** ./css/menupages.scss ***! \****************************/ @@ -55164,8 +55516,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 148 */, -/* 149 */ +/* 149 */, +/* 150 */ /*!***************************!*\ !*** ./css/terminal.scss ***! \***************************/ @@ -55175,8 +55527,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 150 */, -/* 151 */ +/* 151 */, +/* 152 */ /*!***************************!*\ !*** ./css/mainmenu.scss ***! \***************************/ @@ -55186,8 +55538,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 152 */, -/* 153 */ +/* 153 */, +/* 154 */ /*!**************************!*\ !*** ./css/buttons.scss ***! \**************************/ @@ -55197,8 +55549,8 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 154 */, -/* 155 */ +/* 155 */, +/* 156 */ /*!*************************!*\ !*** ./css/styles.scss ***! \*************************/ @@ -55208,7 +55560,6 @@ exports.gangMemberTasksMetadata = [ // extracted by mini-css-extract-plugin /***/ }), -/* 156 */, /* 157 */, /* 158 */, /* 159 */, @@ -55216,7 +55567,8 @@ exports.gangMemberTasksMetadata = [ /* 161 */, /* 162 */, /* 163 */, -/* 164 */ +/* 164 */, +/* 165 */ /*!**********************!*\ !*** ./netscript.js ***! \**********************/ @@ -55318,8 +55670,9 @@ let NetscriptFunctions = "installAugmentations|" + // TIX API - "getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|shortStock|sellShort|" + - "placeOrder|cancelOrder|" + + "getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|" + + "shortStock|sellShort|" + + "placeOrder|cancelOrder|getStockVolatility|getStockForecast|" + // Hacknet Node API "hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|" + @@ -56050,7 +56403,7 @@ oop.inherits(Mode, TextMode); }; this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], __webpack_require__(/*! brace/worker/javascript */ 165), "JavaScriptWorker"); + var worker = new WorkerClient(["ace"], __webpack_require__(/*! brace/worker/javascript */ 166), "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { @@ -56072,11 +56425,11 @@ exports.Mode = Mode; /***/ }), -/* 165 */, /* 166 */, /* 167 */, /* 168 */, -/* 169 */ +/* 169 */, +/* 170 */ /*!*****************************************!*\ !*** ./src/data/codingcontracttypes.ts ***! \*****************************************/ @@ -56087,7 +56440,7 @@ exports.Mode = Mode; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const getRandomInt_1 = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 10); +const getRandomInt_1 = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 11); /* Helper functions for Coding Contract implementations */ function removeBracketsFromArrayString(str) { let strCpy = str; @@ -56546,7 +56899,6 @@ exports.codingContractTypesMetadata = [ /***/ }), -/* 170 */, /* 171 */, /* 172 */, /* 173 */, @@ -56582,7 +56934,8 @@ exports.codingContractTypesMetadata = [ /* 203 */, /* 204 */, /* 205 */, -/* 206 */ +/* 206 */, +/* 207 */ /*!**********************!*\ !*** util (ignored) ***! \**********************/ @@ -56593,7 +56946,7 @@ exports.codingContractTypesMetadata = [ /* (ignored) */ /***/ }), -/* 207 */ +/* 208 */ /*!**********************!*\ !*** util (ignored) ***! \**********************/ diff --git a/dist/engine.css b/dist/engine.css index 5bf828e30..710828456 100644 --- a/dist/engine.css +++ b/dist/engine.css @@ -94,7 +94,8 @@ a:visited { /* Tool tips (when hovering over an element */ .tooltip { display: inline-block; - position: relative; } + position: relative; + /* Positioned to left of element rather than right */ } .tooltip .tooltiptext { visibility: hidden; width: 300px; @@ -107,6 +108,24 @@ a:visited { pointer-events: none; position: absolute; z-index: 99; } + .tooltip .tooltiptextleft { + visibility: hidden; + width: 300px; + background-color: var(--my-background-color); + border: 2px solid var(--my-highlight-color); + color: #fff; + text-align: center; + padding: 4px; + top: 50%; + left: 50%; + transform: translate(-100%, -100%); + /* Backwards compatibility */ + -webkit-transform: translate(-100%, -100%); + -moz-transform: translate(-100%, -100%); + -o-transform: translate(-100%, -100%); + -ms-transform: translate(-100%, -100%); + position: absolute; + z-index: 99; } /* Same thing as a normal tooltip except its a bit higher */ .tooltip .tooltiptexthigh { @@ -122,21 +141,6 @@ a:visited { position: absolute; z-index: 99; } -/* Similar to a normal tooltip except its positioned on the left of the element - rather than the right to avoid exceeding the elements normal width */ -.tooltip .tooltiptextleft { - visibility: hidden; - width: 300px; - background-color: var(--my-background-color); - border: 2px solid var(--my-highlight-color); - color: #fff; - text-align: center; - padding: 4px; - left: 40%; - bottom: -10%; - position: absolute; - z-index: 99; } - .tooltip:hover .tooltiptext, .tooltip:hover .tooltiptexthigh, .tooltip:hover .tooltiptextleft { @@ -144,14 +148,14 @@ a:visited { /* help tip. Question mark that opens popup with info/details */ .help-tip { - content: '?'; - padding: 1px; - margin-top: 5px; - margin-left: 3px; - color: #fff; + background-color: black; border: 1px solid #fff; border-radius: 5px; - display: inline-block; } + color: #fff; + content: '?'; + display: inline-block; + margin-left: 3px; + padding: 1px; } .help-tip-big { content: '?'; @@ -419,7 +423,7 @@ a:visited { .accordion-header:after { content: '\2795'; /* "plus" sign (+) */ - font-size: 13px; + font-size: 14px; float: right; color: transparent; text-shadow: 0 0 0 #fff; @@ -473,6 +477,9 @@ a:visited { .charisma-purple { color: #a671d1; } +.smallfont { + font-size: 13px; } + /* COLORS */ /* Attributes */ /** @@ -563,8 +570,9 @@ button { font-weight: bold; margin: 4px; padding: 4px; - background-color: #000; } - .accordion-button:hover, .accordion-button:focus { + background-color: #000; + /* TODO focus selector? */ } + .accordion-button:hover, .accordion-button:active { color: #fff; text-decoration: none; cursor: pointer; } @@ -2041,6 +2049,8 @@ button { #gang-container { position: fixed; padding: 6px; } + #gang-container p, #gang-container pre { + font-size: 15px; } #gang-container select { background-color: black; color: white; } @@ -2054,5 +2064,19 @@ button { float: left; width: 30%; } +/** + * Showing owned upgrades in the Equipment Box + */ +.gang-owned-upgrades-div { + display: inline-block; + margin-left: 6px; + width: 75%; } + +.gang-owned-upgrade { + border: 1px solid white; + font-size: 12px; + margin: 1px; + padding: 1px; } + /*# sourceMappingURL=engine.css.map*/ \ No newline at end of file diff --git a/dist/vendor.bundle.js b/dist/vendor.bundle.js index cf2340649..24aaebca0 100644 --- a/dist/vendor.bundle.js +++ b/dist/vendor.bundle.js @@ -4818,8 +4818,7 @@ PI = new Decimal(pi); /* 53 */, /* 54 */, /* 55 */, -/* 56 */, -/* 57 */ +/* 56 */ /*!********************************************!*\ !*** ./node_modules/jquery/dist/jquery.js ***! \********************************************/ @@ -15195,10 +15194,10 @@ return jQuery; /***/ }), +/* 57 */, /* 58 */, /* 59 */, -/* 60 */, -/* 61 */ +/* 60 */ /*!*****************************************!*\ !*** ./node_modules/jszip/lib/utils.js ***! \*****************************************/ @@ -15210,10 +15209,10 @@ return jQuery; var support = __webpack_require__(/*! ./support */ 87); -var base64 = __webpack_require__(/*! ./base64 */ 202); -var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 121); -var setImmediate = __webpack_require__(/*! core-js/library/fn/set-immediate */ 319); -var external = __webpack_require__(/*! ./external */ 101); +var base64 = __webpack_require__(/*! ./base64 */ 203); +var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 122); +var setImmediate = __webpack_require__(/*! core-js/library/fn/set-immediate */ 320); +var external = __webpack_require__(/*! ./external */ 102); /** @@ -15686,8 +15685,10 @@ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinarySt /***/ }), +/* 61 */, /* 62 */, -/* 63 */ +/* 63 */, +/* 64 */ /*!*****************************************!*\ !*** ./node_modules/numeral/numeral.js ***! \*****************************************/ @@ -16711,7 +16712,6 @@ return numeral; /***/ }), -/* 64 */, /* 65 */, /* 66 */, /* 67 */, @@ -17240,12 +17240,12 @@ else { } try { - exports.nodestream = !!__webpack_require__(/*! readable-stream */ 210).Readable; + exports.nodestream = !!__webpack_require__(/*! readable-stream */ 211).Readable; } catch(e) { exports.nodestream = false; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 103).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 104).Buffer)) /***/ }), /* 88 */ @@ -17322,8 +17322,8 @@ try { FORMAT_MINIFY, FORMAT_DEFAULTS; - estraverse = __webpack_require__(/*! estraverse */ 281); - esutils = __webpack_require__(/*! esutils */ 279); + estraverse = __webpack_require__(/*! estraverse */ 282); + esutils = __webpack_require__(/*! esutils */ 280); Syntax = estraverse.Syntax; @@ -19803,7 +19803,7 @@ try { if (!exports.browser) { // We assume environment is node.js // And prevent from including source-map by browserify - SourceNode = __webpack_require__(/*! source-map */ 276).SourceNode; + SourceNode = __webpack_require__(/*! source-map */ 277).SourceNode; } else { SourceNode = global.sourceMap.SourceNode; } @@ -19850,7 +19850,7 @@ try { FORMAT_DEFAULTS = getDefaultOptions().format; - exports.version = __webpack_require__(/*! ./package.json */ 269).version; + exports.version = __webpack_require__(/*! ./package.json */ 270).version; exports.generate = generate; exports.attachComments = estraverse.attachComments; exports.Precedence = updateDeeply({}, Precedence); @@ -20050,13 +20050,13 @@ exports.version = '4.1.2'; * Assertion Error */ -exports.AssertionError = __webpack_require__(/*! assertion-error */ 176); +exports.AssertionError = __webpack_require__(/*! assertion-error */ 177); /*! * Utils for plugins (not exported) */ -var util = __webpack_require__(/*! ./chai/utils */ 264); +var util = __webpack_require__(/*! ./chai/utils */ 265); /** * # .use(function) @@ -20094,35 +20094,35 @@ exports.config = config; * Primary `Assertion` prototype */ -var assertion = __webpack_require__(/*! ./chai/assertion */ 248); +var assertion = __webpack_require__(/*! ./chai/assertion */ 249); exports.use(assertion); /*! * Core Assertions */ -var core = __webpack_require__(/*! ./chai/core/assertions */ 247); +var core = __webpack_require__(/*! ./chai/core/assertions */ 248); exports.use(core); /*! * Expect interface */ -var expect = __webpack_require__(/*! ./chai/interface/expect */ 246); +var expect = __webpack_require__(/*! ./chai/interface/expect */ 247); exports.use(expect); /*! * Should interface */ -var should = __webpack_require__(/*! ./chai/interface/should */ 245); +var should = __webpack_require__(/*! ./chai/interface/should */ 246); exports.use(should); /*! * Assert interface */ -var assert = __webpack_require__(/*! ./chai/interface/assert */ 244); +var assert = __webpack_require__(/*! ./chai/interface/assert */ 245); exports.use(assert); @@ -20166,7 +20166,7 @@ exports.use(assert); /**/ -var processNextTick = __webpack_require__(/*! process-nextick-args */ 123).nextTick; +var processNextTick = __webpack_require__(/*! process-nextick-args */ 124).nextTick; /**/ /**/ @@ -20181,12 +20181,12 @@ var objectKeys = Object.keys || function (obj) { module.exports = Duplex; /**/ -var util = __webpack_require__(/*! core-util-is */ 102); -util.inherits = __webpack_require__(/*! inherits */ 98); +var util = __webpack_require__(/*! core-util-is */ 103); +util.inherits = __webpack_require__(/*! inherits */ 99); /**/ -var Readable = __webpack_require__(/*! ./_stream_readable */ 209); -var Writable = __webpack_require__(/*! ./_stream_writable */ 161); +var Readable = __webpack_require__(/*! ./_stream_readable */ 210); +var Writable = __webpack_require__(/*! ./_stream_writable */ 162); util.inherits(Duplex, Readable); @@ -20267,7 +20267,8 @@ function forEach(xs, f) { /* 95 */, /* 96 */, /* 97 */, -/* 98 */ +/* 98 */, +/* 99 */ /*!***************************************************!*\ !*** ./node_modules/inherits/inherits_browser.js ***! \***************************************************/ @@ -20301,7 +20302,7 @@ if (typeof Object.create === 'function') { /***/ }), -/* 99 */ +/* 100 */ /*!****************************************!*\ !*** ./node_modules/jszip/lib/utf8.js ***! \****************************************/ @@ -20312,9 +20313,9 @@ if (typeof Object.create === 'function') { "use strict"; -var utils = __webpack_require__(/*! ./utils */ 61); +var utils = __webpack_require__(/*! ./utils */ 60); var support = __webpack_require__(/*! ./support */ 87); -var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 121); +var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 122); var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 77); /** @@ -20588,7 +20589,7 @@ exports.Utf8EncodeWorker = Utf8EncodeWorker; /***/ }), -/* 100 */ +/* 101 */ /*!********************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/util.js ***! \********************************************************************/ @@ -21087,7 +21088,7 @@ exports.computeSourceURL = computeSourceURL; /***/ }), -/* 101 */ +/* 102 */ /*!********************************************!*\ !*** ./node_modules/jszip/lib/external.js ***! \********************************************/ @@ -21106,7 +21107,7 @@ var ES6Promise = null; if (typeof Promise !== "undefined") { ES6Promise = Promise; } else { - ES6Promise = __webpack_require__(/*! lie */ 305); + ES6Promise = __webpack_require__(/*! lie */ 306); } /** @@ -21118,7 +21119,7 @@ module.exports = { /***/ }), -/* 102 */ +/* 103 */ /*!***********************************************!*\ !*** ./node_modules/core-util-is/lib/util.js ***! \***********************************************/ @@ -21234,10 +21235,10 @@ function objectToString(o) { return Object.prototype.toString.call(o); } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 103).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 104).Buffer)) /***/ }), -/* 103 */ +/* 104 */ /*!**************************************!*\ !*** ./node_modules/buffer/index.js ***! \**************************************/ @@ -21256,9 +21257,9 @@ function objectToString(o) { -var base64 = __webpack_require__(/*! base64-js */ 329) -var ieee754 = __webpack_require__(/*! ieee754 */ 328) -var isArray = __webpack_require__(/*! isarray */ 211) +var base64 = __webpack_require__(/*! base64-js */ 330) +var ieee754 = __webpack_require__(/*! ieee754 */ 329) +var isArray = __webpack_require__(/*! isarray */ 212) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -23039,7 +23040,7 @@ function isnan (val) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82))) /***/ }), -/* 104 */ +/* 105 */ /*!*****************************************!*\ !*** ./node_modules/process/browser.js ***! \*****************************************/ @@ -23234,7 +23235,6 @@ process.umask = function() { return 0; }; /***/ }), -/* 105 */, /* 106 */, /* 107 */, /* 108 */, @@ -23245,7 +23245,8 @@ process.umask = function() { return 0; }; /* 113 */, /* 114 */, /* 115 */, -/* 116 */ +/* 116 */, +/* 117 */ /*!*****************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/proxify.js ***! \*****************************************************/ @@ -23255,8 +23256,8 @@ process.umask = function() { return 0; }; var config = __webpack_require__(/*! ../config */ 90); var flag = __webpack_require__(/*! ./flag */ 81); -var getProperties = __webpack_require__(/*! ./getProperties */ 173); -var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 118); +var getProperties = __webpack_require__(/*! ./getProperties */ 174); +var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 119); /*! * Chai - proxify utility @@ -23381,7 +23382,7 @@ function stringDistance(strA, strB, memo) { /***/ }), -/* 117 */ +/* 118 */ /*!************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/addLengthGuard.js ***! \************************************************************/ @@ -23454,7 +23455,7 @@ module.exports = function addLengthGuard (fn, assertionName, isChainable) { /***/ }), -/* 118 */ +/* 119 */ /*!************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/isProxyEnabled.js ***! \************************************************************/ @@ -23489,7 +23490,7 @@ module.exports = function isProxyEnabled() { /***/ }), -/* 119 */ +/* 120 */ /*!*****************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/inspect.js ***! \*****************************************************/ @@ -23500,9 +23501,9 @@ module.exports = function isProxyEnabled() { // This is (almost) directly from Node.js utils // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js -var getName = __webpack_require__(/*! get-func-name */ 174); -var getProperties = __webpack_require__(/*! ./getProperties */ 173); -var getEnumerableProperties = __webpack_require__(/*! ./getEnumerableProperties */ 259); +var getName = __webpack_require__(/*! get-func-name */ 175); +var getProperties = __webpack_require__(/*! ./getProperties */ 174); +var getEnumerableProperties = __webpack_require__(/*! ./getEnumerableProperties */ 260); var config = __webpack_require__(/*! ../config */ 90); module.exports = inspect; @@ -23883,7 +23884,7 @@ function objectToString(o) { /***/ }), -/* 120 */ +/* 121 */ /*!****************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_global.js ***! \****************************************************************************/ @@ -23897,7 +23898,7 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }), -/* 121 */ +/* 122 */ /*!***********************************************!*\ !*** ./node_modules/jszip/lib/nodejsUtils.js ***! \***********************************************/ @@ -23959,10 +23960,10 @@ module.exports = { } }; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 103).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 104).Buffer)) /***/ }), -/* 122 */ +/* 123 */ /*!*******************************************!*\ !*** ./node_modules/safe-buffer/index.js ***! \*******************************************/ @@ -23971,7 +23972,7 @@ module.exports = { /***/ (function(module, exports, __webpack_require__) { /* eslint-disable node/no-deprecated-api */ -var buffer = __webpack_require__(/*! buffer */ 103) +var buffer = __webpack_require__(/*! buffer */ 104) var Buffer = buffer.Buffer // alternative to using Object.keys for old browsers @@ -24035,7 +24036,7 @@ SafeBuffer.allocUnsafeSlow = function (size) { /***/ }), -/* 123 */ +/* 124 */ /*!****************************************************!*\ !*** ./node_modules/process-nextick-args/index.js ***! \****************************************************/ @@ -24089,10 +24090,10 @@ function nextTick(fn, arg1, arg2, arg3) { } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ 104))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ 105))) /***/ }), -/* 124 */ +/* 125 */ /*!************************************************!*\ !*** ./node_modules/sprintf-js/src/sprintf.js ***! \************************************************/ @@ -24322,7 +24323,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */ /***/ }), -/* 125 */ +/* 126 */ /*!*****************************************!*\ !*** ./node_modules/acorn/dist/walk.js ***! \*****************************************/ @@ -24768,7 +24769,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); /***/ }), -/* 126 */ +/* 127 */ /*!**********************************************!*\ !*** ./node_modules/file-saver/FileSaver.js ***! \**********************************************/ @@ -24959,7 +24960,7 @@ var saveAs = saveAs || (function(view) { if (typeof module !== "undefined" && module.exports) { module.exports.saveAs = saveAs; -} else if (("function" !== "undefined" && __webpack_require__(/*! !webpack amd define */ 168) !== null) && (__webpack_require__(/*! !webpack amd options */ 282) !== null)) { +} else if (("function" !== "undefined" && __webpack_require__(/*! !webpack amd define */ 169) !== null) && (__webpack_require__(/*! !webpack amd options */ 283) !== null)) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return saveAs; }).call(exports, __webpack_require__, exports, module), @@ -24968,7 +24969,7 @@ if (typeof module !== "undefined" && module.exports) { /***/ }), -/* 127 */ +/* 128 */ /*!*****************************************!*\ !*** ./node_modules/jszip/lib/index.js ***! \*****************************************/ @@ -25014,10 +25015,10 @@ function JSZip() { return newObj; }; } -JSZip.prototype = __webpack_require__(/*! ./object */ 330); -JSZip.prototype.loadAsync = __webpack_require__(/*! ./load */ 287); +JSZip.prototype = __webpack_require__(/*! ./object */ 331); +JSZip.prototype.loadAsync = __webpack_require__(/*! ./load */ 288); JSZip.support = __webpack_require__(/*! ./support */ 87); -JSZip.defaults = __webpack_require__(/*! ./defaults */ 196); +JSZip.defaults = __webpack_require__(/*! ./defaults */ 197); // TODO find a better way to handle this version, // a require('package.json').version doesn't work with webpack, see #327 @@ -25027,12 +25028,12 @@ JSZip.loadAsync = function (content, options) { return new JSZip().loadAsync(content, options); }; -JSZip.external = __webpack_require__(/*! ./external */ 101); +JSZip.external = __webpack_require__(/*! ./external */ 102); module.exports = JSZip; /***/ }), -/* 128 */ +/* 129 */ /*!************************************************!*\ !*** ./node_modules/autosize/dist/autosize.js ***! \************************************************/ @@ -25325,7 +25326,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), -/* 129 */ +/* 130 */ /*!*************************************************!*\ !*** ./node_modules/type-detect/type-detect.js ***! \*************************************************/ @@ -25724,7 +25725,6 @@ return typeDetect; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82))) /***/ }), -/* 130 */, /* 131 */, /* 132 */, /* 133 */, @@ -25750,7 +25750,8 @@ return typeDetect; /* 153 */, /* 154 */, /* 155 */, -/* 156 */ +/* 156 */, +/* 157 */ /*!************************************************!*\ !*** ./node_modules/pako/lib/zlib/messages.js ***! \************************************************/ @@ -25794,7 +25795,7 @@ module.exports = { /***/ }), -/* 157 */ +/* 158 */ /*!*****************************************!*\ !*** ./node_modules/jszip/lib/crc32.js ***! \*****************************************/ @@ -25805,7 +25806,7 @@ module.exports = { "use strict"; -var utils = __webpack_require__(/*! ./utils */ 61); +var utils = __webpack_require__(/*! ./utils */ 60); /** * The following functions come from pako, from pako/lib/zlib/crc32.js @@ -25883,7 +25884,7 @@ module.exports = function crc32wrapper(input, crc) { /***/ }), -/* 158 */ +/* 159 */ /*!****************************************************!*\ !*** ./node_modules/jszip/lib/compressedObject.js ***! \****************************************************/ @@ -25894,11 +25895,11 @@ module.exports = function crc32wrapper(input, crc) { "use strict"; -var external = __webpack_require__(/*! ./external */ 101); -var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ 195); -var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ 194); -var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ 193); -var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ 194); +var external = __webpack_require__(/*! ./external */ 102); +var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ 196); +var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ 195); +var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ 194); +var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ 195); /** * Represent a compressed object, with everything needed to decompress it. @@ -25970,7 +25971,7 @@ module.exports = CompressedObject; /***/ }), -/* 159 */ +/* 160 */ /*!*********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js ***! \*********************************************************************************/ @@ -25979,12 +25980,12 @@ module.exports = CompressedObject; /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(/*! ./_fails */ 199)(function(){ +module.exports = !__webpack_require__(/*! ./_fails */ 200)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), -/* 160 */ +/* 161 */ /*!*******************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js ***! \*******************************************************************************/ @@ -25997,7 +25998,7 @@ module.exports = function(it){ }; /***/ }), -/* 161 */ +/* 162 */ /*!**************************************************************!*\ !*** ./node_modules/readable-stream/lib/_stream_writable.js ***! \**************************************************************/ @@ -26035,7 +26036,7 @@ module.exports = function(it){ /**/ -var processNextTick = __webpack_require__(/*! process-nextick-args */ 123).nextTick; +var processNextTick = __webpack_require__(/*! process-nextick-args */ 124).nextTick; /**/ module.exports = Writable; @@ -26072,23 +26073,23 @@ var Duplex; Writable.WritableState = WritableState; /**/ -var util = __webpack_require__(/*! core-util-is */ 102); -util.inherits = __webpack_require__(/*! inherits */ 98); +var util = __webpack_require__(/*! core-util-is */ 103); +util.inherits = __webpack_require__(/*! inherits */ 99); /**/ /**/ var internalUtil = { - deprecate: __webpack_require__(/*! util-deprecate */ 325) + deprecate: __webpack_require__(/*! util-deprecate */ 326) }; /**/ /**/ -var Stream = __webpack_require__(/*! ./internal/streams/stream */ 208); +var Stream = __webpack_require__(/*! ./internal/streams/stream */ 209); /**/ /**/ -var Buffer = __webpack_require__(/*! safe-buffer */ 122).Buffer; +var Buffer = __webpack_require__(/*! safe-buffer */ 123).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -26099,7 +26100,7 @@ function _isUint8Array(obj) { /**/ -var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 205); +var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 206); util.inherits(Writable, Stream); @@ -26683,10 +26684,10 @@ Writable.prototype._destroy = function (err, cb) { this.end(); cb(err); }; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ 104), __webpack_require__(/*! ./../../timers-browserify/main.js */ 212).setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 82))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ 105), __webpack_require__(/*! ./../../timers-browserify/main.js */ 213).setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 82))) /***/ }), -/* 162 */ +/* 163 */ /*!**********************************************************!*\ !*** ./node_modules/readable-stream/readable-browser.js ***! \**********************************************************/ @@ -26694,17 +26695,17 @@ Writable.prototype._destroy = function (err, cb) { /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ 209); +exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ 210); exports.Stream = exports; exports.Readable = exports; -exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ 161); +exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ 162); exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ 92); -exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ 203); -exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ 324); +exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ 204); +exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ 325); /***/ }), -/* 163 */ +/* 164 */ /*!***************************************!*\ !*** ./node_modules/events/events.js ***! \***************************************/ @@ -27017,8 +27018,8 @@ function isUndefined(arg) { /***/ }), -/* 164 */, -/* 165 */ +/* 165 */, +/* 166 */ /*!*************************************************!*\ !*** ./node_modules/brace/worker/javascript.js ***! \*************************************************/ @@ -27030,7 +27031,7 @@ module.exports.id = 'ace/mode/javascript_worker'; module.exports.src = "\"no use strict\";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\"\";testPath;){var alias=paths[testPath];if(\"string\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,\"/\")+(tail||alias.main||alias.name);if(alias===!1)return\"\";var i=testPath.lastIndexOf(\"/\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\"error\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return window.normalizeModule(parentId,chunks[0])+\"!\"+window.normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=(base?base+\"/\":\"\")+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,\"\").replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\"unable to load \"+id);var path=resolveModuleId(id,window.acequire.tlns);return\".js\"!=path.slice(-3)&&(path+=\".js\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\"function\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\"require\",\"exports\",\"module\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\"require\":return req;case\"exports\":return module.exports;case\"module\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\"ace/lib/event_emitter\").EventEmitter,oop=window.acequire(\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\"Unknown command:\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\"ace/lib/es5-shim\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\"\";switch(delta.action){case\"insert\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\"remove\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),applyDelta=acequire(\"./apply_delta\").applyDelta,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(textOrLines){this.$lines=[\"\"],0===textOrLines.length?this.$lines=[\"\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\",this._signal(\"changeNewLineMode\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine||\"\\n\"}},this.$autoNewLine=\"\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\"changeNewLineMode\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\"\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\"),this.insertMergedLines(position,[\"\",\"\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\"insert\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\"\"]),column=0):(lines=[\"\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\"insert\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\"remove\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\"remove\",lines:[\"\",\"\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\"insert\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\"change\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\"\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\"insert\"==delta.action?\"remove\":\"insert\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\"object\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\"[object Object]\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/i;i+=2){if(Array.isArray(data[i+1]))var d={action:\"insert\",start:data[i],lines:data[i+1]};else var d={action:\"remove\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\"ace/mode/javascript/jshint\",[\"require\",\"exports\",\"module\"],function(acequire,exports,module){module.exports=function outer(modules,cache,entry){function newRequire(name,jumped){if(!cache[name]){if(!modules[name]){var currentRequire=\"function\"==typeof acequire&&acequire;if(!jumped&¤tRequire)return currentRequire(name,!0);if(previousRequire)return previousRequire(name,!0);var err=Error(\"Cannot find module '\"+name+\"'\");throw err.code=\"MODULE_NOT_FOUND\",err}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x)},m,m.exports,outer,modules,cache,entry)}return cache[name].exports}for(var previousRequire=\"function\"==typeof acequire&&acequire,i=0;entry.length>i;i++)newRequire(entry[i]);return newRequire(entry[0])}({\"/node_modules/browserify/node_modules/events/events.js\":[function(_dereq_,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return\"function\"==typeof arg}function isNumber(arg){return\"number\"==typeof arg}function isObject(arg){return\"object\"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError(\"n must be a positive number\");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),\"error\"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError('Uncaught, unspecified \"error\" event.')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError(\"listener must be a function\");if(this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[type].length),\"function\"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError(\"listener must be a function\");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit(\"removeListener\",type,listener);else if(isObject(list)){for(i=length;i-->0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit(\"removeListener\",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)\"removeListener\"!==key&&this.removeAllListeners(key);return this.removeAllListeners(\"removeListener\"),this._events={},this\n}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],\"/node_modules/jshint/data/ascii-identifier-data.js\":[function(_dereq_,module){for(var identifierStartTable=[],i=0;128>i;i++)identifierStartTable[i]=36===i||i>=65&&90>=i||95===i||i>=97&&122>=i;for(var identifierPartTable=[],i=0;128>i;i++)identifierPartTable[i]=identifierStartTable[i]||i>=48&&57>=i;module.exports={asciiIdentifierStartTable:identifierStartTable,asciiIdentifierPartTable:identifierPartTable}},{}],\"/node_modules/jshint/lodash.js\":[function(_dereq_,module,exports){(function(global){(function(){function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:length>++index;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;length>++index;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return\"function\"==typeof value||!1}function baseToString(value){return\"string\"==typeof value?value:null==value?\"\":value+\"\"}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:length>++index;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&\"object\"==typeof value}function lodash(){}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));length>++index;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;length>++index&&iteratee(array[index],index,array)!==!1;);return array}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];length>++index;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);length>++index;)result[index]=iteratee(array[index],index,array);return result}function arrayMax(array){for(var index=-1,length=array.length,result=NEGATIVE_INFINITY;length>++index;){var value=array[index];value>result&&(result=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array.length;length>++index;)if(predicate(array[index],index,array))return!0;return!1}function assignWith(object,source,customizer){var props=keys(source);push.apply(props,getSymbols(source));for(var index=-1,length=props.length;length>++index;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;length>++index;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return\"function\"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:\"object\"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=-1,length=path.length;null!=object&&length>++index;)var result=object=object[path[index]];return result}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other)return 0!==value||1/value==1/other;var valType=typeof value,othType=typeof other;return\"function\"!=valType&&\"object\"!=valType&&\"function\"!=othType&&\"object\"!=othType||null==value||null==other?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var valWrapped=objIsObj&&hasOwnProperty.call(object,\"__wrapped__\"),othWrapped=othIsObj&&hasOwnProperty.call(other,\"__wrapped__\");if(valWrapped||othWrapped)return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){for(var index=-1,length=props.length,noCustomizer=!customizer;length>++index;)if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object))return!1;for(index=-1;length>++index;){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index])var result=objValue!==undefined||key in object;else result=customizer?customizer(objValue,srcValue,key):undefined,result===undefined&&(result=baseIsEqual(srcValue,objValue,customizer,!0));if(!result)return!1}return!0}function baseMatches(source){var props=keys(source),length=props.length;if(!length)return constant(!0);if(1==length){var key=props[0],value=source[key];if(isStrictComparable(value))return function(object){return null==object?!1:object[key]===value&&(value!==undefined||key in toObject(object))}}for(var values=Array(length),strictCompareFlags=Array(length);length--;)value=source[props[length]],values[length]=value,strictCompareFlags[length]=isStrictComparable(value);return function(object){return null!=object&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(path,value){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(value),pathKey=path+\"\";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===value?value!==undefined||key in object:baseIsEqual(value,object[key],null,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));if(!isSrcArr){var props=keys(source);push.apply(props,getSymbols(source))}return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),!isSrcArr&&result===undefined||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return object[key]=stackB[length],undefined;var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:getLength(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+\"\";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);length>++index;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);length>++index;)result[index]=object[props[index]];return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(\"number\"==typeof value&&value===value&&HALF_MAX_ARRAY_LENGTH>=high){for(;high>low;){var mid=low+high>>>1,computed=array[mid];(retHighest?value>=computed:value>computed)?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=value===undefined;high>low;){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsUndef?isReflexive&&(retHighest||computed!==undefined):retHighest?value>=computed:value>computed;setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(\"function\"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2&&sources[length-2],guard=length>2&&sources[2],thisArg=length>1&&sources[length-1];for(\"function\"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer=\"function\"==typeof thisArg?thisArg:null,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?null:customizer,length=1);length>++index;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:length>++index)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:length>++index;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return\"function\"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=!0;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;result&&arrLength>++index;){var arrValue=array[index],othValue=other[index];if(result=undefined,customizer&&(result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)),result===undefined)if(isLoose)for(var othIndex=othLength;othIndex--&&(othValue=other[othIndex],!(result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))););else result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:0==object?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+\"\"}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var skipCtor=isLoose,index=-1;objLength>++index;){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined,customizer&&(result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)),result===undefined&&(result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB))}if(!result)return!1;skipCtor||(skipCtor=\"constructor\"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&\"constructor\"in object&&\"constructor\"in other&&!(\"function\"==typeof objCtor&&objCtor instanceof objCtor&&\"function\"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&\"string\"==typeof array[0]&&hasOwnProperty.call(array,\"index\")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return\"function\"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){return value=+value,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&0==value%1&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if(\"number\"==type)var length=getLength(object),prereq=isLength(length)&&isIndex(index,length);else prereq=\"string\"==type&&index in object;if(prereq){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if(\"string\"==type&&reIsPlainProp.test(value)||\"number\"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLength(value){return\"number\"==typeof value&&value>-1&&0==value%1&&MAX_SAFE_INTEGER>=value}function isStrictComparable(value){return value===value&&(0===value?1/value>0:!isObject(value))}function shimIsPlainObject(value){var Ctor;if(lodash.support,!isObjectLike(value)||objToString.call(value)!=objectTag||!hasOwnProperty.call(value,\"constructor\")&&(Ctor=value.constructor,\"function\"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support,allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object)),index=-1,result=[];propsLength>++index;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,\"$1\"):number||match)}),result}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if(\"number\"==typeof fromIndex)fromIndex=0>fromIndex?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value),other=array[index];return(value===value?value===other:other!==other)?index:-1}return baseIndexOf(array,value,fromIndex||0)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function slice(array,start,end){var length=array?array.length:0;return length?(end&&\"number\"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function unzip(array){for(var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);length>++index;)result[index]=arrayMap(array,baseProperty(index));return result}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),length?(fromIndex=\"number\"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:0>fromIndex?nativeMax(length+fromIndex,0):fromIndex||0,\"string\"==typeof collection||!isArray(collection)&&isString(collection)?length>fromIndex&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1):!1}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=null),(\"function\"!=typeof predicate||thisArg!==undefined)&&(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function restParam(func,start){if(\"function\"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);length>++index;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;start>++index;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function clone(value,isDeep,customizer,thisArg){return isDeep&&\"boolean\"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:\"function\"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),customizer=\"function\"==typeof customizer&&bindCallback(customizer,thisArg,1),baseClone(value,isDeep,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}function isEmpty(value){if(null==value)return!0;var length=getLength(value);return isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!length:!keys(value).length}function isObject(value){var type=typeof value;return\"function\"==type||!!value&&\"object\"==type}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function isNumber(value){return\"number\"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isString(value){return\"string\"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function toPlainObject(value){return baseCopy(value,keysIn(value))}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);return result||isKey(path)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path),result=null!=object&&hasOwnProperty.call(object,path)),result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto=\"function\"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;length>++index;)result[index]=index+\"\";for(var key in object)skipIndexes&&isIndex(key,length)||\"constructor\"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function values(object){return baseValues(object,keys(object))}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,\"\\\\$&\"):string}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var undefined,VERSION=\"3.7.0\",FUNC_ERROR_TEXT=\"Expected a function\",argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",reIsDeepProp=/\\.|\\[(?:[^[\\]]+|([\"'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?)\\1\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g,reRegExpChars=/[.*+?^${}()|[\\]\\/\\\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reEscapeChar=/\\\\(\\\\)?/g,reFlags=/\\w*$/,reIsHostCtor=/^\\[object .+?Constructor\\]$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var objectTypes={\"function\":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&\"object\"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,arrayProto=Array.prototype,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),ArrayBuffer=isNative(ArrayBuffer=root.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,getOwnPropertySymbols=isNative(getOwnPropertySymbols=Object.getOwnPropertySymbols)&&getOwnPropertySymbols,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,preventExtensions=isNative(Object.preventExtensions=Object.preventExtensions)&&preventExtensions,propertyIsEnumerable=objectProto.propertyIsEnumerable,Uint8Array=isNative(Uint8Array=root.Uint8Array)&&Uint8Array,Float64Array=function(){try{var func=isNative(func=root.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}(),nativeAssign=function(){var object={1:0},func=preventExtensions&&isNative(func=Object.assign)&&func;try{func(preventExtensions(object),\"xo\")}catch(e){}return!object[1]&&func}(),nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=Math.pow(2,53)-1,support=lodash.support={};(function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);support.funcDecomp=/\\bthis\\b/.test(function(){return this}),support.funcNames=\"string\"==typeof Function.name;try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=!0}})(1,0);var baseAssign=nativeAssign||function(object,source){return null==source?object:baseCopy(source,getSymbols(source),baseCopy(source,keys(source),object))},baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor();bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var getLength=baseProperty(\"length\"),getSymbols=getOwnPropertySymbols?function(object){return getOwnPropertySymbols(toObject(object))}:constant([]),findLastIndex=createFindIndex(!0),zip=restParam(unzip),forEach=createForEach(arrayEach,baseEach),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},isFunction=baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array)?function(value){return objToString.call(value)==funcTag}:baseIsFunction,isPlainObject=getPrototypeOf?function(value){if(!value||objToString.call(value)!=objectTag)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),keys=nativeKeys?function(object){if(object)var Ctor=object.constructor,length=object.length;return\"function\"==typeof Ctor&&Ctor.prototype===object||\"function\"!=typeof object&&isLength(length)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,merge=createAssigner(baseMerge);lodash.assign=assign,lodash.callback=callback,lodash.constant=constant,lodash.forEach=forEach,lodash.keys=keys,lodash.keysIn=keysIn,lodash.merge=merge,lodash.property=property,lodash.reject=reject,lodash.restParam=restParam,lodash.slice=slice,lodash.toPlainObject=toPlainObject,lodash.unzip=unzip,lodash.values=values,lodash.zip=zip,lodash.each=forEach,lodash.extend=assign,lodash.iteratee=callback,lodash.clone=clone,lodash.escapeRegExp=escapeRegExp,lodash.findLastIndex=findLastIndex,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isEmpty=isEmpty,lodash.isFunction=isFunction,lodash.isNative=isNative,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.last=last,lodash.some=some,lodash.any=some,lodash.contains=includes,lodash.include=includes,lodash.VERSION=VERSION,freeExports&&freeModule?moduleExports?(freeModule.exports=lodash)._=lodash:freeExports._=lodash:root._=lodash\n}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],\"/node_modules/jshint/src/jshint.js\":[function(_dereq_,module,exports){var _=_dereq_(\"../lodash\"),events=_dereq_(\"events\"),vars=_dereq_(\"./vars.js\"),messages=_dereq_(\"./messages.js\"),Lexer=_dereq_(\"./lex.js\").Lexer,reg=_dereq_(\"./reg.js\"),state=_dereq_(\"./state.js\").state,style=_dereq_(\"./style.js\"),options=_dereq_(\"./options.js\"),scopeManager=_dereq_(\"./scope-manager.js\"),JSHINT=function(){\"use strict\";function checkOption(name,t){return name=name.trim(),/^[+-]W\\d{3}$/g.test(name)?!0:-1!==options.validNames.indexOf(name)||\"jslint\"===t.type||_.has(options.removed,name)?!0:(error(\"E001\",t,name),!1)}function isString(obj){return\"[object String]\"===Object.prototype.toString.call(obj)}function isIdentifier(tkn,value){return tkn?tkn.identifier&&tkn.value===value?!0:!1:!1}function isReserved(token){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(token.isProperty)return!1}return!0}function supplant(str,data){return str.replace(/\\{([^{}]*)\\}/g,function(a,b){var r=data[b];return\"string\"==typeof r||\"number\"==typeof r?r:a})}function combine(dest,src){Object.keys(src).forEach(function(name){_.has(JSHINT.blacklist,name)||(dest[name]=src[name])})}function processenforceall(){if(state.option.enforceall){for(var enforceopt in options.bool.enforcing)void 0!==state.option[enforceopt]||options.noenforceall[enforceopt]||(state.option[enforceopt]=!0);for(var relaxopt in options.bool.relaxing)void 0===state.option[relaxopt]&&(state.option[relaxopt]=!1)}}function assume(){processenforceall(),state.option.esversion||state.option.moz||(state.option.esversion=state.option.es3?3:state.option.esnext?6:5),state.inES5()&&combine(predefined,vars.ecmaIdentifiers[5]),state.inES6()&&combine(predefined,vars.ecmaIdentifiers[6]),state.option.module&&(state.option.strict===!0&&(state.option.strict=\"global\"),state.inES6()||warning(\"W134\",state.tokens.next,\"module\",6)),state.option.couch&&combine(predefined,vars.couch),state.option.qunit&&combine(predefined,vars.qunit),state.option.rhino&&combine(predefined,vars.rhino),state.option.shelljs&&(combine(predefined,vars.shelljs),combine(predefined,vars.node)),state.option.typed&&combine(predefined,vars.typed),state.option.phantom&&(combine(predefined,vars.phantom),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.prototypejs&&combine(predefined,vars.prototypejs),state.option.node&&(combine(predefined,vars.node),combine(predefined,vars.typed),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.devel&&combine(predefined,vars.devel),state.option.dojo&&combine(predefined,vars.dojo),state.option.browser&&(combine(predefined,vars.browser),combine(predefined,vars.typed)),state.option.browserify&&(combine(predefined,vars.browser),combine(predefined,vars.typed),combine(predefined,vars.browserify),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.nonstandard&&combine(predefined,vars.nonstandard),state.option.jasmine&&combine(predefined,vars.jasmine),state.option.jquery&&combine(predefined,vars.jquery),state.option.mootools&&combine(predefined,vars.mootools),state.option.worker&&combine(predefined,vars.worker),state.option.wsh&&combine(predefined,vars.wsh),state.option.globalstrict&&state.option.strict!==!1&&(state.option.strict=\"global\"),state.option.yui&&combine(predefined,vars.yui),state.option.mocha&&combine(predefined,vars.mocha)}function quit(code,line,chr){var percentage=Math.floor(100*(line/state.lines.length)),message=messages.errors[code].desc;throw{name:\"JSHintError\",line:line,character:chr,message:message+\" (\"+percentage+\"% scanned).\",raw:message,code:code}}function removeIgnoredMessages(){var ignored=state.ignoredLines;_.isEmpty(ignored)||(JSHINT.errors=_.reject(JSHINT.errors,function(err){return ignored[err.line]}))}function warning(code,t,a,b,c,d){var ch,l,w,msg;if(/^W\\d{3}$/.test(code)){if(state.ignored[code])return;msg=messages.warnings[code]}else/E\\d{3}/.test(code)?msg=messages.errors[code]:/I\\d{3}/.test(code)&&(msg=messages.info[code]);return t=t||state.tokens.next||{},\"(end)\"===t.id&&(t=state.tokens.curr),l=t.line||0,ch=t.from||0,w={id:\"(error)\",raw:msg.desc,code:msg.code,evidence:state.lines[l-1]||\"\",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(msg.desc,w),JSHINT.errors.push(w),removeIgnoredMessages(),JSHINT.errors.length>=state.option.maxerr&&quit(\"E043\",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:\"(internal)\",elem:elem,value:src},JSHINT.internals.push(i),i}function doOption(){var nt=state.tokens.next,body=nt.body.match(/(-\\s+)?[^\\s,:]+(?:\\s*:\\s*(-\\s+)?[^\\s,]+)?/g)||[],predef={};if(\"globals\"===nt.type){body.forEach(function(g,idx){g=g.split(\":\");var key=(g[0]||\"\").trim(),val=(g[1]||\"\").trim();if(\"-\"===key||!key.length){if(idx>0&&idx===body.length-1)return;return error(\"E002\",nt),void 0}\"-\"===key.charAt(0)?(key=key.slice(1),val=!1,JSHINT.blacklist[key]=key,delete predefined[key]):predef[key]=\"true\"===val}),combine(predefined,predef);for(var key in predef)_.has(predef,key)&&(declared[key]=nt)}\"exported\"===nt.type&&body.forEach(function(e,idx){if(!e.length){if(idx>0&&idx===body.length-1)return;return error(\"E002\",nt),void 0}state.funct[\"(scope)\"].addExported(e)}),\"members\"===nt.type&&(membersOnly=membersOnly||{},body.forEach(function(m){var ch1=m.charAt(0),ch2=m.charAt(m.length-1);ch1!==ch2||'\"'!==ch1&&\"'\"!==ch1||(m=m.substr(1,m.length-2).replace('\\\\\"','\"')),membersOnly[m]=!1}));var numvals=[\"maxstatements\",\"maxparams\",\"maxdepth\",\"maxcomplexity\",\"maxerr\",\"maxlen\",\"indent\"];(\"jshint\"===nt.type||\"jslint\"===nt.type)&&(body.forEach(function(g){g=g.split(\":\");var key=(g[0]||\"\").trim(),val=(g[1]||\"\").trim();if(checkOption(key,nt))if(numvals.indexOf(key)>=0)if(\"false\"!==val){if(val=+val,\"number\"!=typeof val||!isFinite(val)||0>=val||Math.floor(val)!==val)return error(\"E032\",nt,g[1].trim()),void 0;state.option[key]=val}else state.option[key]=\"indent\"===key?4:!1;else{if(\"validthis\"===key)return state.funct[\"(global)\"]?void error(\"E009\"):\"true\"!==val&&\"false\"!==val?void error(\"E002\",nt):(state.option.validthis=\"true\"===val,void 0);if(\"quotmark\"!==key)if(\"shadow\"!==key)if(\"unused\"!==key)if(\"latedef\"!==key)if(\"ignore\"!==key)if(\"strict\"!==key){\"module\"===key&&(hasParsedCode(state.funct)||error(\"E055\",state.tokens.next,\"module\"));var esversions={es3:3,es5:5,esnext:6};if(!_.has(esversions,key)){if(\"esversion\"===key){switch(val){case\"5\":state.inES5(!0)&&warning(\"I003\");case\"3\":case\"6\":state.option.moz=!1,state.option.esversion=+val;break;case\"2015\":state.option.moz=!1,state.option.esversion=6;break;default:error(\"E002\",nt)}return hasParsedCode(state.funct)||error(\"E055\",state.tokens.next,\"esversion\"),void 0}var match=/^([+-])(W\\d{3})$/g.exec(key);if(match)return state.ignored[match[2]]=\"-\"===match[1],void 0;var tn;return\"true\"===val||\"false\"===val?(\"jslint\"===nt.type?(tn=options.renamed[key]||key,state.option[tn]=\"true\"===val,void 0!==options.inverted[tn]&&(state.option[tn]=!state.option[tn])):state.option[key]=\"true\"===val,\"newcap\"===key&&(state.option[\"(explicitNewcap)\"]=!0),void 0):(error(\"E002\",nt),void 0)}switch(val){case\"true\":state.option.moz=!1,state.option.esversion=esversions[key];break;case\"false\":state.option.moz||(state.option.esversion=5);break;default:error(\"E002\",nt)}}else switch(val){case\"true\":state.option.strict=!0;break;case\"false\":state.option.strict=!1;break;case\"func\":case\"global\":case\"implied\":state.option.strict=val;break;default:error(\"E002\",nt)}else switch(val){case\"line\":state.ignoredLines[nt.line]=!0,removeIgnoredMessages();break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.latedef=!0;break;case\"false\":state.option.latedef=!1;break;case\"nofunc\":state.option.latedef=\"nofunc\";break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.unused=!0;break;case\"false\":state.option.unused=!1;break;case\"vars\":case\"strict\":state.option.unused=val;break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.shadow=!0;break;case\"outer\":state.option.shadow=\"outer\";break;case\"false\":case\"inner\":state.option.shadow=\"inner\";break;default:error(\"E002\",nt)}else switch(val){case\"true\":case\"false\":state.option.quotmark=\"true\"===val;break;case\"double\":case\"single\":state.option.quotmark=val;break;default:error(\"E002\",nt)}}}),assume())}function peek(p){var t,i=p||0,j=lookahead.length;if(j>i)return lookahead[i];for(;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t||\"(end)\"!==state.tokens.next.id?t:state.tokens.next}function peekIgnoreEOL(){var t,i=0;do t=peek(i++);while(\"(endline)\"===t.id);return t}function advance(id,t){switch(state.tokens.curr.id){case\"(number)\":\".\"===state.tokens.next.id&&warning(\"W005\",state.tokens.curr);break;case\"-\":(\"-\"===state.tokens.next.id||\"--\"===state.tokens.next.id)&&warning(\"W006\");break;case\"+\":(\"+\"===state.tokens.next.id||\"++\"===state.tokens.next.id)&&warning(\"W007\")}for(id&&state.tokens.next.id!==id&&(t?\"(end)\"===state.tokens.next.id?error(\"E019\",t,t.id):error(\"E020\",state.tokens.next,id,t.id,t.line,state.tokens.next.value):(\"(identifier)\"!==state.tokens.next.type||state.tokens.next.value!==id)&&warning(\"W116\",state.tokens.next,id,state.tokens.next.value)),state.tokens.prev=state.tokens.curr,state.tokens.curr=state.tokens.next;;){if(state.tokens.next=lookahead.shift()||lex.token(),state.tokens.next||quit(\"E041\",state.tokens.curr.line),\"(end)\"===state.tokens.next.id||\"(error)\"===state.tokens.next.id)return;if(state.tokens.next.check&&state.tokens.next.check(),state.tokens.next.isSpecial)\"falls through\"===state.tokens.next.type?state.tokens.curr.caseFallsThrough=!0:doOption();else if(\"(endline)\"!==state.tokens.next.id)break}}function isInfix(token){return token.infix||!token.identifier&&!token.template&&!!token.led}function isEndOfExpr(){var curr=state.tokens.curr,next=state.tokens.next;return\";\"===next.id||\"}\"===next.id||\":\"===next.id?!0:isInfix(next)===isInfix(curr)||\"yield\"===curr.id&&state.inMoz()?curr.line!==startLine(next):!1}function isBeginOfExpr(prev){return!prev.left&&\"unary\"!==prev.arity}function expression(rbp,initial){var left,isArray=!1,isObject=!1,isLetExpr=!1;state.nameStack.push(),initial||\"let\"!==state.tokens.next.value||\"(\"!==peek(0).value||(state.inMoz()||warning(\"W118\",state.tokens.next,\"let expressions\"),isLetExpr=!0,state.funct[\"(scope)\"].stack(),advance(\"let\"),advance(\"(\"),state.tokens.prev.fud(),advance(\")\")),\"(end)\"===state.tokens.next.id&&error(\"E006\",state.tokens.curr);var isDangerous=state.option.asi&&state.tokens.prev.line!==startLine(state.tokens.curr)&&_.contains([\"]\",\")\"],state.tokens.prev.id)&&_.contains([\"[\",\"(\"],state.tokens.curr.id);if(isDangerous&&warning(\"W014\",state.tokens.curr,state.tokens.curr.id),advance(),initial&&(state.funct[\"(verb)\"]=state.tokens.curr.value,state.tokens.curr.beginsStmt=!0),initial===!0&&state.tokens.curr.fud)left=state.tokens.curr.fud();else for(state.tokens.curr.nud?left=state.tokens.curr.nud():error(\"E030\",state.tokens.curr,state.tokens.curr.id);(state.tokens.next.lbp>rbp||\"(template)\"===state.tokens.next.type)&&!isEndOfExpr();)isArray=\"Array\"===state.tokens.curr.value,isObject=\"Object\"===state.tokens.curr.value,left&&(left.value||left.first&&left.first.value)&&(\"new\"!==left.value||left.first&&left.first.value&&\".\"===left.first.value)&&(isArray=!1,left.value!==state.tokens.curr.value&&(isObject=!1)),advance(),isArray&&\"(\"===state.tokens.curr.id&&\")\"===state.tokens.next.id&&warning(\"W009\",state.tokens.curr),isObject&&\"(\"===state.tokens.curr.id&&\")\"===state.tokens.next.id&&warning(\"W010\",state.tokens.curr),left&&state.tokens.curr.led?left=state.tokens.curr.led(left):error(\"E033\",state.tokens.curr,state.tokens.curr.id);return isLetExpr&&state.funct[\"(scope)\"].unstack(),state.nameStack.pop(),left}function startLine(token){return token.startLine||token.line}function nobreaknonadjacent(left,right){left=left||state.tokens.curr,right=right||state.tokens.next,state.option.laxbreak||left.line===startLine(right)||warning(\"W014\",right,right.value)}function nolinebreak(t){t=t||state.tokens.curr,t.line!==startLine(state.tokens.next)&&warning(\"E022\",t,t.value)}function nobreakcomma(left,right){left.line!==startLine(right)&&(state.option.laxcomma||(comma.first&&(warning(\"I001\"),comma.first=!1),warning(\"W014\",left,right.value)))}function comma(opts){if(opts=opts||{},opts.peek?nobreakcomma(state.tokens.prev,state.tokens.curr):(nobreakcomma(state.tokens.curr,state.tokens.next),advance(\",\")),state.tokens.next.identifier&&(!opts.property||!state.inES5()))switch(state.tokens.next.value){case\"break\":case\"case\":case\"catch\":case\"continue\":case\"default\":case\"do\":case\"else\":case\"finally\":case\"for\":case\"if\":case\"in\":case\"instanceof\":case\"return\":case\"switch\":case\"throw\":case\"try\":case\"var\":case\"let\":case\"while\":case\"with\":return error(\"E024\",state.tokens.next,state.tokens.next.value),!1}if(\"(punctuator)\"===state.tokens.next.type)switch(state.tokens.next.value){case\"}\":case\"]\":case\",\":if(opts.allowTrailing)return!0;case\")\":return error(\"E024\",state.tokens.next,state.tokens.next.value),!1}return!0}function symbol(s,p){var x=state.syntax[s];return x&&\"object\"==typeof x||(state.syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){var x=symbol(s,0);return x.delim=!0,x}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>=\"a\"&&\"z\">=c||c>=\"A\"&&\"Z\">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud=\"function\"==typeof f?f:function(){return this.arity=\"unary\",this.right=expression(150),(\"++\"===this.id||\"--\"===this.id)&&(state.option.plusplus?warning(\"W016\",this,this.id):!this.right||this.right.identifier&&!isReserved(this.right)||\".\"===this.right.id||\"[\"===this.right.id||warning(\"W017\",this),this.right&&this.right.isMetaProperty?error(\"E031\",this):this.right&&this.right.identifier&&state.funct[\"(scope)\"].block.modify(this.right.value,this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(name,func){var x=type(name,func);return x.identifier=!0,x.reserved=!0,x}function FutureReservedWord(name,meta){var x=type(name,meta&&meta.nud||function(){return this});return meta=meta||{},meta.isFutureReservedWord=!0,x.value=name,x.identifier=!0,x.reserved=!0,x.meta=meta,x}function reservevar(s,v){return reserve(s,function(){return\"function\"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.infix=!0,x.led=function(left){return w||nobreaknonadjacent(state.tokens.prev,state.tokens.curr),\"in\"!==s&&\"instanceof\"!==s||\"!\"!==left.id||warning(\"W018\",left,\"!\"),\"function\"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function application(s){var x=symbol(s,42);return x.led=function(left){return nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left,this.right=doFunction({type:\"arrow\",loneArg:left}),this},x}function relation(s,f){var x=symbol(s,100);return x.led=function(left){nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left;var right=this.right=expression(100);return isIdentifier(left,\"NaN\")||isIdentifier(right,\"NaN\")?warning(\"W019\",this):f&&f.apply(this,[left,right]),left&&right||quit(\"E041\",state.tokens.curr.line),\"!\"===left.id&&warning(\"W018\",left,\"!\"),\"!\"===right.id&&warning(\"W018\",right,\"!\"),this},x}function isPoorRelation(node){return node&&(\"(number)\"===node.type&&0===+node.value||\"(string)\"===node.type&&\"\"===node.value||\"null\"===node.type&&!state.option.eqnull||\"true\"===node.type||\"false\"===node.type||\"undefined\"===node.type)}function isTypoTypeof(left,right,state){var values;return state.option.notypeof?!1:left&&right?(values=state.inES6()?typeofValues.es6:typeofValues.es3,\"(identifier)\"===right.type&&\"typeof\"===right.value&&\"(string)\"===left.type?!_.contains(values,left.value):!1):!1}function isGlobalEval(left,state){var isGlobal=!1;return\"this\"===left.type&&null===state.funct[\"(context)\"]?isGlobal=!0:\"(identifier)\"===left.type&&(state.option.node&&\"global\"===left.value?isGlobal=!0:!state.option.browser||\"window\"!==left.value&&\"document\"!==left.value||(isGlobal=!0)),isGlobal}function findNativePrototype(left){function walkPrototype(obj){return\"object\"==typeof obj?\"prototype\"===obj.right?obj:walkPrototype(obj.left):void 0}function walkNative(obj){for(;!obj.identifier&&\"object\"==typeof obj.left;)obj=obj.left;return obj.identifier&&natives.indexOf(obj.value)>=0?obj.value:void 0}var natives=[\"Array\",\"ArrayBuffer\",\"Boolean\",\"Collator\",\"DataView\",\"Date\",\"DateTimeFormat\",\"Error\",\"EvalError\",\"Float32Array\",\"Float64Array\",\"Function\",\"Infinity\",\"Intl\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Iterator\",\"Number\",\"NumberFormat\",\"Object\",\"RangeError\",\"ReferenceError\",\"RegExp\",\"StopIteration\",\"String\",\"SyntaxError\",\"TypeError\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"URIError\"],prototype=walkPrototype(left);return prototype?walkNative(prototype):void 0}function checkLeftSideAssign(left,assignToken,options){var allowDestructuring=options&&options.allowDestructuring;if(assignToken=assignToken||left,state.option.freeze){var nativeObject=findNativePrototype(left);nativeObject&&warning(\"W121\",left,nativeObject)}return left.identifier&&!left.isMetaProperty&&state.funct[\"(scope)\"].block.reassign(left.value,left),\".\"===left.id?((!left.left||\"arguments\"===left.left.value&&!state.isStrict())&&warning(\"E031\",assignToken),state.nameStack.set(state.tokens.prev),!0):\"{\"===left.id||\"[\"===left.id?(allowDestructuring&&state.tokens.curr.left.destructAssign?state.tokens.curr.left.destructAssign.forEach(function(t){t.id&&state.funct[\"(scope)\"].block.modify(t.id,t.token)}):\"{\"!==left.id&&left.left?\"arguments\"!==left.left.value||state.isStrict()||warning(\"E031\",assignToken):warning(\"E031\",assignToken),\"[\"===left.id&&state.nameStack.set(left.right),!0):left.isMetaProperty?(error(\"E031\",assignToken),!0):left.identifier&&!isReserved(left)?(\"exception\"===state.funct[\"(scope)\"].labeltype(left.value)&&warning(\"W022\",left),state.nameStack.set(left),!0):(left===state.syntax[\"function\"]&&warning(\"W023\",state.tokens.curr),!1)}function assignop(s,f,p){var x=infix(s,\"function\"==typeof f?f:function(left,that){return that.left=left,left&&checkLeftSideAssign(left,that,{allowDestructuring:!0})?(that.right=expression(10),that):(error(\"E031\",that),void 0)},p);return x.exps=!0,x.assign=!0,x}function bitwise(s,f,p){var x=symbol(s,p);return reserveName(x),x.led=\"function\"==typeof f?f:function(left){return state.option.bitwise&&warning(\"W016\",this,this.id),this.left=left,this.right=expression(p),this},x}function bitwiseassignop(s){return assignop(s,function(left,that){return state.option.bitwise&&warning(\"W016\",that,that.id),left&&checkLeftSideAssign(left,that)?(that.right=expression(10),that):(error(\"E031\",that),void 0)},20)}function suffix(s){var x=symbol(s,150);return x.led=function(left){return state.option.plusplus?warning(\"W016\",this,this.id):left.identifier&&!isReserved(left)||\".\"===left.id||\"[\"===left.id||warning(\"W017\",this),left.isMetaProperty?error(\"E031\",this):left&&left.identifier&&state.funct[\"(scope)\"].block.modify(left.value,left),this.left=left,this},x}function optionalidentifier(fnparam,prop,preserve){if(state.tokens.next.identifier){preserve||advance();var curr=state.tokens.curr,val=state.tokens.curr.value;return isReserved(curr)?prop&&state.inES5()?val:fnparam&&\"undefined\"===val?val:(warning(\"W024\",state.tokens.curr,state.tokens.curr.id),val):val}}function identifier(fnparam,prop){var i=optionalidentifier(fnparam,prop,!1);if(i)return i;if(\"...\"===state.tokens.next.value){if(state.inES6(!0)||warning(\"W119\",state.tokens.next,\"spread/rest operator\",\"6\"),advance(),checkPunctuator(state.tokens.next,\"...\"))for(warning(\"E024\",state.tokens.next,\"...\");checkPunctuator(state.tokens.next,\"...\");)advance();return state.tokens.next.identifier?identifier(fnparam,prop):(warning(\"E024\",state.tokens.curr,\"...\"),void 0)}error(\"E030\",state.tokens.next,state.tokens.next.value),\";\"!==state.tokens.next.id&&advance()}function reachable(controlToken){var t,i=0;if(\";\"===state.tokens.next.id&&!controlToken.inBracelessBlock)for(;;){do t=peek(i),i+=1;while(\"(end)\"!==t.id&&\"(comment)\"===t.id);if(t.reach)return;if(\"(endline)\"!==t.id){if(\"function\"===t.id){state.option.latedef===!0&&warning(\"W026\",t);break}warning(\"W027\",t,t.value,controlToken.value);break}}}function parseFinalSemicolon(){if(\";\"!==state.tokens.next.id){if(state.tokens.next.isUnclosed)return advance();var sameLine=startLine(state.tokens.next)===state.tokens.curr.line&&\"(end)\"!==state.tokens.next.id,blockEnd=checkPunctuator(state.tokens.next,\"}\");sameLine&&!blockEnd?errorAt(\"E058\",state.tokens.curr.line,state.tokens.curr.character):state.option.asi||(blockEnd&&!state.option.lastsemic||!sameLine)&&warningAt(\"W033\",state.tokens.curr.line,state.tokens.curr.character)}else advance(\";\")}function statement(){var r,i=indent,t=state.tokens.next,hasOwnScope=!1;if(\";\"===t.id)return advance(\";\"),void 0;var res=isReserved(t);if(res&&t.meta&&t.meta.isFutureReservedWord&&\":\"===peek().id&&(warning(\"W024\",t,t.id),res=!1),t.identifier&&!res&&\":\"===peek().id&&(advance(),advance(\":\"),hasOwnScope=!0,state.funct[\"(scope)\"].stack(),state.funct[\"(scope)\"].block.addBreakLabel(t.value,{token:state.tokens.curr}),state.tokens.next.labelled||\"{\"===state.tokens.next.value||warning(\"W028\",state.tokens.next,t.value,state.tokens.next.value),state.tokens.next.label=t.value,t=state.tokens.next),\"{\"===t.id){var iscase=\"case\"===state.funct[\"(verb)\"]&&\":\"===state.tokens.curr.value;return block(!0,!0,!1,!1,iscase),void 0}return r=expression(0,!0),!r||r.identifier&&\"function\"===r.value||\"(punctuator)\"===r.type&&r.left&&r.left.identifier&&\"function\"===r.left.value||state.isStrict()||\"global\"!==state.option.strict||warning(\"E007\"),t.block||(state.option.expr||r&&r.exps?state.option.nonew&&r&&r.left&&\"(\"===r.id&&\"new\"===r.left.id&&warning(\"W031\",t):warning(\"W030\",state.tokens.curr),parseFinalSemicolon()),indent=i,hasOwnScope&&state.funct[\"(scope)\"].unstack(),r}function statements(){for(var p,a=[];!state.tokens.next.reach&&\"(end)\"!==state.tokens.next.id;)\";\"===state.tokens.next.id?(p=peek(),(!p||\"(\"!==p.id&&\"[\"!==p.id)&&warning(\"W032\"),advance(\";\")):a.push(statement());return a}function directives(){for(var i,p,pn;\"(string)\"===state.tokens.next.id;){if(p=peek(0),\"(endline)\"===p.id){i=1;do pn=peek(i++);while(\"(endline)\"===pn.id);if(\";\"===pn.id)p=pn;else{if(\"[\"===pn.value||\".\"===pn.value)break;state.option.asi&&\"(\"!==pn.value||warning(\"W033\",state.tokens.next)}}else{if(\".\"===p.id||\"[\"===p.id)break;\";\"!==p.id&&warning(\"W033\",p)}advance();var directive=state.tokens.curr.value;(state.directive[directive]||\"use strict\"===directive&&\"implied\"===state.option.strict)&&warning(\"W034\",state.tokens.curr,directive),state.directive[directive]=!0,\";\"===p.id&&advance(\";\")}state.isStrict()&&(state.option[\"(explicitNewcap)\"]||(state.option.newcap=!0),state.option.undef=!0)}function block(ordinary,stmt,isfunc,isfatarrow,iscase){var a,m,t,line,d,b=inblock,old_indent=indent;inblock=ordinary,t=state.tokens.next;var metrics=state.funct[\"(metrics)\"];if(metrics.nestedBlockDepth+=1,metrics.verifyMaxNestedBlockDepthPerFunction(),\"{\"===state.tokens.next.id){if(advance(\"{\"),state.funct[\"(scope)\"].stack(),line=state.tokens.curr.line,\"}\"!==state.tokens.next.id){for(indent+=state.option.indent;!ordinary&&state.tokens.next.from>indent;)indent+=state.option.indent;if(isfunc){m={};for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);directives(),state.option.strict&&state.funct[\"(context)\"][\"(global)\"]&&(m[\"use strict\"]||state.isStrict()||warning(\"E007\"))}a=statements(),metrics.statementCount+=a.length,indent-=state.option.indent}advance(\"}\",t),isfunc&&(state.funct[\"(scope)\"].validateParams(),m&&(state.directive=m)),state.funct[\"(scope)\"].unstack(),indent=old_indent}else if(ordinary)state.funct[\"(noblockscopedvar)\"]=\"for\"!==state.tokens.next.id,state.funct[\"(scope)\"].stack(),(!stmt||state.option.curly)&&warning(\"W116\",state.tokens.next,\"{\",state.tokens.next.value),state.tokens.next.inBracelessBlock=!0,indent+=state.option.indent,a=[statement()],indent-=state.option.indent,state.funct[\"(scope)\"].unstack(),delete state.funct[\"(noblockscopedvar)\"];else if(isfunc){if(state.funct[\"(scope)\"].stack(),m={},!stmt||isfatarrow||state.inMoz()||error(\"W118\",state.tokens.curr,\"function closure expressions\"),!stmt)for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);expression(10),state.option.strict&&state.funct[\"(context)\"][\"(global)\"]&&(m[\"use strict\"]||state.isStrict()||warning(\"E007\")),state.funct[\"(scope)\"].unstack()}else error(\"E021\",state.tokens.next,\"{\",state.tokens.next.value);switch(state.funct[\"(verb)\"]){case\"break\":case\"continue\":case\"return\":case\"throw\":if(iscase)break;default:state.funct[\"(verb)\"]=null}return inblock=b,!ordinary||!state.option.noempty||a&&0!==a.length||warning(\"W035\",state.tokens.prev),metrics.nestedBlockDepth-=1,a}function countMember(m){membersOnly&&\"boolean\"!=typeof membersOnly[m]&&warning(\"W036\",state.tokens.curr,m),\"number\"==typeof member[m]?member[m]+=1:member[m]=1}function comprehensiveArrayExpression(){var res={};res.exps=!0,state.funct[\"(comparray)\"].stack();var reversed=!1;return\"for\"!==state.tokens.next.value&&(reversed=!0,state.inMoz()||warning(\"W116\",state.tokens.next,\"for\",state.tokens.next.value),state.funct[\"(comparray)\"].setState(\"use\"),res.right=expression(10)),advance(\"for\"),\"each\"===state.tokens.next.value&&(advance(\"each\"),state.inMoz()||warning(\"W118\",state.tokens.curr,\"for each\")),advance(\"(\"),state.funct[\"(comparray)\"].setState(\"define\"),res.left=expression(130),_.contains([\"in\",\"of\"],state.tokens.next.value)?advance():error(\"E045\",state.tokens.curr),state.funct[\"(comparray)\"].setState(\"generate\"),expression(10),advance(\")\"),\"if\"===state.tokens.next.value&&(advance(\"if\"),advance(\"(\"),state.funct[\"(comparray)\"].setState(\"filter\"),res.filter=expression(10),advance(\")\")),reversed||(state.funct[\"(comparray)\"].setState(\"use\"),res.right=expression(10)),advance(\"]\"),state.funct[\"(comparray)\"].unstack(),res}function isMethod(){return state.funct[\"(statement)\"]&&\"class\"===state.funct[\"(statement)\"].type||state.funct[\"(context)\"]&&\"class\"===state.funct[\"(context)\"][\"(verb)\"]}function isPropertyName(token){return token.identifier||\"(string)\"===token.id||\"(number)\"===token.id}function propertyName(preserveOrToken){var id,preserve=!0;return\"object\"==typeof preserveOrToken?id=preserveOrToken:(preserve=preserveOrToken,id=optionalidentifier(!1,!0,preserve)),id?\"object\"==typeof id&&(\"(string)\"===id.id||\"(identifier)\"===id.id?id=id.value:\"(number)\"===id.id&&(id=\"\"+id.value)):\"(string)\"===state.tokens.next.id?(id=state.tokens.next.value,preserve||advance()):\"(number)\"===state.tokens.next.id&&(id=\"\"+state.tokens.next.value,preserve||advance()),\"hasOwnProperty\"===id&&warning(\"W001\"),id}function functionparams(options){function addParam(addParamArgs){state.funct[\"(scope)\"].addParam.apply(state.funct[\"(scope)\"],addParamArgs)}var next,ident,t,paramsIds=[],tokens=[],pastDefault=!1,pastRest=!1,arity=0,loneArg=options&&options.loneArg;if(loneArg&&loneArg.identifier===!0)return state.funct[\"(scope)\"].addParam(loneArg.value,loneArg),{arity:1,params:[loneArg.value]};if(next=state.tokens.next,options&&options.parsedOpening||advance(\"(\"),\")\"===state.tokens.next.id)return advance(\")\"),void 0;for(;;){arity++;var currentParams=[];if(_.contains([\"{\",\"[\"],state.tokens.next.id)){tokens=destructuringPattern();for(t in tokens)t=tokens[t],t.id&&(paramsIds.push(t.id),currentParams.push([t.id,t.token]))}else if(checkPunctuator(state.tokens.next,\"...\")&&(pastRest=!0),ident=identifier(!0))paramsIds.push(ident),currentParams.push([ident,state.tokens.curr]);else for(;!checkPunctuators(state.tokens.next,[\",\",\")\"]);)advance();if(pastDefault&&\"=\"!==state.tokens.next.id&&error(\"W138\",state.tokens.current),\"=\"===state.tokens.next.id&&(state.inES6()||warning(\"W119\",state.tokens.next,\"default parameters\",\"6\"),advance(\"=\"),pastDefault=!0,expression(10)),currentParams.forEach(addParam),\",\"!==state.tokens.next.id)return advance(\")\",next),{arity:arity,params:paramsIds};pastRest&&warning(\"W131\",state.tokens.next),comma()}}function functor(name,token,overwrites){var funct={\"(name)\":name,\"(breakage)\":0,\"(loopage)\":0,\"(tokens)\":{},\"(properties)\":{},\"(catch)\":!1,\"(global)\":!1,\"(line)\":null,\"(character)\":null,\"(metrics)\":null,\"(statement)\":null,\"(context)\":null,\"(scope)\":null,\"(comparray)\":null,\"(generator)\":null,\"(arrow)\":null,\"(params)\":null};return token&&_.extend(funct,{\"(line)\":token.line,\"(character)\":token.character,\"(metrics)\":createMetrics(token)}),_.extend(funct,overwrites),funct[\"(context)\"]&&(funct[\"(scope)\"]=funct[\"(context)\"][\"(scope)\"],funct[\"(comparray)\"]=funct[\"(context)\"][\"(comparray)\"]),funct}function isFunctor(token){return\"(scope)\"in token}function hasParsedCode(funct){return funct[\"(global)\"]&&!funct[\"(verb)\"]}function doTemplateLiteral(left){function end(){if(state.tokens.curr.template&&state.tokens.curr.tail&&state.tokens.curr.context===ctx)return!0;var complete=state.tokens.next.template&&state.tokens.next.tail&&state.tokens.next.context===ctx;return complete&&advance(),complete||state.tokens.next.isUnclosed}var ctx=this.context,noSubst=this.noSubst,depth=this.depth;if(!noSubst)for(;!end();)!state.tokens.next.template||state.tokens.next.depth>depth?expression(0):advance();return{id:\"(template)\",type:\"(template)\",tag:left}}function doFunction(options){var f,token,name,statement,classExprBinding,isGenerator,isArrow,ignoreLoopFunc,oldOption=state.option,oldIgnored=state.ignored;options&&(name=options.name,statement=options.statement,classExprBinding=options.classExprBinding,isGenerator=\"generator\"===options.type,isArrow=\"arrow\"===options.type,ignoreLoopFunc=options.ignoreLoopFunc),state.option=Object.create(state.option),state.ignored=Object.create(state.ignored),state.funct=functor(name||state.nameStack.infer(),state.tokens.next,{\"(statement)\":statement,\"(context)\":state.funct,\"(arrow)\":isArrow,\"(generator)\":isGenerator}),f=state.funct,token=state.tokens.curr,token.funct=state.funct,functions.push(state.funct),state.funct[\"(scope)\"].stack(\"functionouter\");var internallyAccessibleName=name||classExprBinding;internallyAccessibleName&&state.funct[\"(scope)\"].block.add(internallyAccessibleName,classExprBinding?\"class\":\"function\",state.tokens.curr,!1),state.funct[\"(scope)\"].stack(\"functionparams\");var paramsInfo=functionparams(options);return paramsInfo?(state.funct[\"(params)\"]=paramsInfo.params,state.funct[\"(metrics)\"].arity=paramsInfo.arity,state.funct[\"(metrics)\"].verifyMaxParametersPerFunction()):state.funct[\"(metrics)\"].arity=0,isArrow&&(state.inES6(!0)||warning(\"W119\",state.tokens.curr,\"arrow function syntax (=>)\",\"6\"),options.loneArg||advance(\"=>\")),block(!1,!0,!0,isArrow),!state.option.noyield&&isGenerator&&\"yielded\"!==state.funct[\"(generator)\"]&&warning(\"W124\",state.tokens.curr),state.funct[\"(metrics)\"].verifyMaxStatementsPerFunction(),state.funct[\"(metrics)\"].verifyMaxComplexityPerFunction(),state.funct[\"(unusedOption)\"]=state.option.unused,state.option=oldOption,state.ignored=oldIgnored,state.funct[\"(last)\"]=state.tokens.curr.line,state.funct[\"(lastcharacter)\"]=state.tokens.curr.character,state.funct[\"(scope)\"].unstack(),state.funct[\"(scope)\"].unstack(),state.funct=state.funct[\"(context)\"],ignoreLoopFunc||state.option.loopfunc||!state.funct[\"(loopage)\"]||f[\"(isCapturing)\"]&&warning(\"W083\",token),f}function createMetrics(functionStartToken){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){state.option.maxstatements&&this.statementCount>state.option.maxstatements&&warning(\"W071\",functionStartToken,this.statementCount)\n},verifyMaxParametersPerFunction:function(){_.isNumber(state.option.maxparams)&&this.arity>state.option.maxparams&&warning(\"W072\",functionStartToken,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){state.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===state.option.maxdepth+1&&warning(\"W073\",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var max=state.option.maxcomplexity,cc=this.ComplexityCount;max&&cc>max&&warning(\"W074\",functionStartToken,cc)}}}function increaseComplexityCount(){state.funct[\"(metrics)\"].ComplexityCount+=1}function checkCondAssignment(expr){var id,paren;switch(expr&&(id=expr.id,paren=expr.paren,\",\"===id&&(expr=expr.exprs[expr.exprs.length-1])&&(id=expr.id,paren=paren||expr.paren)),id){case\"=\":case\"+=\":case\"-=\":case\"*=\":case\"%=\":case\"&=\":case\"|=\":case\"^=\":case\"/=\":paren||state.option.boss||warning(\"W084\")}}function checkProperties(props){if(state.inES5())for(var name in props)props[name]&&props[name].setterToken&&!props[name].getterToken&&warning(\"W078\",props[name].setterToken)}function metaProperty(name,c){if(checkPunctuator(state.tokens.next,\".\")){var left=state.tokens.curr.id;advance(\".\");var id=identifier();return state.tokens.curr.isMetaProperty=!0,name!==id?error(\"E057\",state.tokens.prev,left,id):c(),state.tokens.curr}}function destructuringPattern(options){var isAssignment=options&&options.assignment;return state.inES6()||warning(\"W104\",state.tokens.curr,isAssignment?\"destructuring assignment\":\"destructuring binding\",\"6\"),destructuringPatternRecursive(options)}function destructuringPatternRecursive(options){var ids,identifiers=[],openingParsed=options&&options.openingParsed,isAssignment=options&&options.assignment,recursiveOptions=isAssignment?{assignment:isAssignment}:null,firstToken=openingParsed?state.tokens.curr:state.tokens.next,nextInnerDE=function(){var ident;if(checkPunctuators(state.tokens.next,[\"[\",\"{\"])){ids=destructuringPatternRecursive(recursiveOptions);for(var id in ids)id=ids[id],identifiers.push({id:id.id,token:id.token})}else if(checkPunctuator(state.tokens.next,\",\"))identifiers.push({id:null,token:state.tokens.curr});else{if(!checkPunctuator(state.tokens.next,\"(\")){var is_rest=checkPunctuator(state.tokens.next,\"...\");if(isAssignment){var identifierToken=is_rest?peek(0):state.tokens.next;identifierToken.identifier||warning(\"E030\",identifierToken,identifierToken.value);var assignTarget=expression(155);assignTarget&&(checkLeftSideAssign(assignTarget),assignTarget.identifier&&(ident=assignTarget.value))}else ident=identifier();return ident&&identifiers.push({id:ident,token:state.tokens.curr}),is_rest}advance(\"(\"),nextInnerDE(),advance(\")\")}return!1},assignmentProperty=function(){var id;checkPunctuator(state.tokens.next,\"[\")?(advance(\"[\"),expression(10),advance(\"]\"),advance(\":\"),nextInnerDE()):\"(string)\"===state.tokens.next.id||\"(number)\"===state.tokens.next.id?(advance(),advance(\":\"),nextInnerDE()):(id=identifier(),checkPunctuator(state.tokens.next,\":\")?(advance(\":\"),nextInnerDE()):id&&(isAssignment&&checkLeftSideAssign(state.tokens.curr),identifiers.push({id:id,token:state.tokens.curr})))};if(checkPunctuator(firstToken,\"[\")){openingParsed||advance(\"[\"),checkPunctuator(state.tokens.next,\"]\")&&warning(\"W137\",state.tokens.curr);for(var element_after_rest=!1;!checkPunctuator(state.tokens.next,\"]\");)nextInnerDE()&&!element_after_rest&&checkPunctuator(state.tokens.next,\",\")&&(warning(\"W130\",state.tokens.next),element_after_rest=!0),checkPunctuator(state.tokens.next,\"=\")&&(checkPunctuator(state.tokens.prev,\"...\")?advance(\"]\"):advance(\"=\"),\"undefined\"===state.tokens.next.id&&warning(\"W080\",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,\"]\")||advance(\",\");advance(\"]\")}else if(checkPunctuator(firstToken,\"{\")){for(openingParsed||advance(\"{\"),checkPunctuator(state.tokens.next,\"}\")&&warning(\"W137\",state.tokens.curr);!checkPunctuator(state.tokens.next,\"}\")&&(assignmentProperty(),checkPunctuator(state.tokens.next,\"=\")&&(advance(\"=\"),\"undefined\"===state.tokens.next.id&&warning(\"W080\",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,\"}\")||(advance(\",\"),!checkPunctuator(state.tokens.next,\"}\"))););advance(\"}\")}return identifiers}function destructuringPatternMatch(tokens,value){var first=value.first;first&&_.zip(tokens,Array.isArray(first)?first:[first]).forEach(function(val){var token=val[0],value=val[1];token&&value?token.first=value:token&&token.first&&!value&&warning(\"W080\",token.first,token.first.value)})}function blockVariableStatement(type,statement,context){var tokens,lone,value,letblock,prefix=context&&context.prefix,inexport=context&&context.inexport,isLet=\"let\"===type,isConst=\"const\"===type;for(state.inES6()||warning(\"W104\",state.tokens.curr,type,\"6\"),isLet&&\"(\"===state.tokens.next.value?(state.inMoz()||warning(\"W118\",state.tokens.next,\"let block\"),advance(\"(\"),state.funct[\"(scope)\"].stack(),letblock=!0):state.funct[\"(noblockscopedvar)\"]&&error(\"E048\",state.tokens.curr,isConst?\"Const\":\"Let\"),statement.first=[];;){var names=[];_.contains([\"{\",\"[\"],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),!prefix&&isConst&&\"=\"!==state.tokens.next.id&&warning(\"E012\",state.tokens.curr,state.tokens.curr.value);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],state.funct[\"(scope)\"].block.isGlobal()&&predefined[t.id]===!1&&warning(\"W079\",t.token,t.id),t.id&&!state.funct[\"(noblockscopedvar)\"]&&(state.funct[\"(scope)\"].addlabel(t.id,{type:type,token:t.token}),names.push(t.token),lone&&inexport&&state.funct[\"(scope)\"].setExported(t.token.value,t.token)));if(\"=\"===state.tokens.next.id&&(advance(\"=\"),prefix||\"undefined\"!==state.tokens.next.id||warning(\"W080\",state.tokens.prev,state.tokens.prev.value),!prefix&&\"=\"===peek(0).id&&state.tokens.next.identifier&&warning(\"W120\",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),statement.first=statement.first.concat(names),\",\"!==state.tokens.next.id)break;comma()}return letblock&&(advance(\")\"),block(!0,!0),statement.block=!0,state.funct[\"(scope)\"].unstack()),statement}function classdef(isStatement){return state.inES6()||warning(\"W104\",state.tokens.curr,\"class\",\"6\"),isStatement?(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"class\",token:state.tokens.curr})):state.tokens.next.identifier&&\"extends\"!==state.tokens.next.value?(this.name=identifier(),this.namedExpr=!0):this.name=state.nameStack.infer(),classtail(this),this}function classtail(c){var wasInClassBody=state.inClassBody;\"extends\"===state.tokens.next.value&&(advance(\"extends\"),c.heritage=expression(10)),state.inClassBody=!0,advance(\"{\"),c.body=classbody(c),advance(\"}\"),state.inClassBody=wasInClassBody}function classbody(c){for(var name,isStatic,isGenerator,getset,computed,props=Object.create(null),staticProps=Object.create(null),i=0;\"}\"!==state.tokens.next.id;++i)if(name=state.tokens.next,isStatic=!1,isGenerator=!1,getset=null,\";\"!==name.id){if(\"*\"===name.id&&(isGenerator=!0,advance(\"*\"),name=state.tokens.next),\"[\"===name.id)name=computedPropertyName(),computed=!0;else{if(!isPropertyName(name)){warning(\"W052\",state.tokens.next,state.tokens.next.value||state.tokens.next.type),advance();continue}advance(),computed=!1,name.identifier&&\"static\"===name.value&&(checkPunctuator(state.tokens.next,\"*\")&&(isGenerator=!0,advance(\"*\")),(isPropertyName(state.tokens.next)||\"[\"===state.tokens.next.id)&&(computed=\"[\"===state.tokens.next.id,isStatic=!0,name=state.tokens.next,\"[\"===state.tokens.next.id?name=computedPropertyName():advance())),!name.identifier||\"get\"!==name.value&&\"set\"!==name.value||(isPropertyName(state.tokens.next)||\"[\"===state.tokens.next.id)&&(computed=\"[\"===state.tokens.next.id,getset=name,name=state.tokens.next,\"[\"===state.tokens.next.id?name=computedPropertyName():advance())}if(!checkPunctuator(state.tokens.next,\"(\")){for(error(\"E054\",state.tokens.next,state.tokens.next.value);\"}\"!==state.tokens.next.id&&!checkPunctuator(state.tokens.next,\"(\");)advance();\"(\"!==state.tokens.next.value&&doFunction({statement:c})}if(computed||(getset?saveAccessor(getset.value,isStatic?staticProps:props,name.value,name,!0,isStatic):(\"constructor\"===name.value?state.nameStack.set(c):state.nameStack.set(name),saveProperty(isStatic?staticProps:props,name.value,name,!0,isStatic))),getset&&\"constructor\"===name.value){var propDesc=\"get\"===getset.value?\"class getter method\":\"class setter method\";error(\"E049\",name,propDesc,\"constructor\")}else\"prototype\"===name.value&&error(\"E049\",name,\"class method\",\"prototype\");propertyName(name),doFunction({statement:c,type:isGenerator?\"generator\":null,classExprBinding:c.namedExpr?c.name:null})}else warning(\"W032\"),advance(\";\");checkProperties(props)}function saveProperty(props,name,tkn,isClass,isStatic){var msg=[\"key\",\"class method\",\"static class method\"];msg=msg[(isClass||!1)+(isStatic||!1)],tkn.identifier&&(name=tkn.value),props[name]&&\"__proto__\"!==name?warning(\"W075\",state.tokens.next,msg,name):props[name]=Object.create(null),props[name].basic=!0,props[name].basictkn=tkn}function saveAccessor(accessorType,props,name,tkn,isClass,isStatic){var flagName=\"get\"===accessorType?\"getterToken\":\"setterToken\",msg=\"\";isClass?(isStatic&&(msg+=\"static \"),msg+=accessorType+\"ter method\"):msg=\"key\",state.tokens.curr.accessorType=accessorType,state.nameStack.set(tkn),props[name]?(props[name].basic||props[name][flagName])&&\"__proto__\"!==name&&warning(\"W075\",state.tokens.next,msg,name):props[name]=Object.create(null),props[name][flagName]=tkn}function computedPropertyName(){advance(\"[\"),state.inES6()||warning(\"W119\",state.tokens.curr,\"computed property names\",\"6\");var value=expression(10);return advance(\"]\"),value}function checkPunctuators(token,values){return\"(punctuator)\"===token.type?_.contains(values,token.value):!1}function checkPunctuator(token,value){return\"(punctuator)\"===token.type&&token.value===value}function destructuringAssignOrJsonValue(){var block=lookupBlockType();block.notJson?(!state.inES6()&&block.isDestAssign&&warning(\"W104\",state.tokens.curr,\"destructuring assignment\",\"6\"),statements()):(state.option.laxbreak=!0,state.jsonMode=!0,jsonValue())}function jsonValue(){function jsonObject(){var o={},t=state.tokens.next;if(advance(\"{\"),\"}\"!==state.tokens.next.id)for(;;){if(\"(end)\"===state.tokens.next.id)error(\"E026\",state.tokens.next,t.line);else{if(\"}\"===state.tokens.next.id){warning(\"W094\",state.tokens.curr);break}\",\"===state.tokens.next.id?error(\"E028\",state.tokens.next):\"(string)\"!==state.tokens.next.id&&warning(\"W095\",state.tokens.next,state.tokens.next.value)}if(o[state.tokens.next.value]===!0?warning(\"W075\",state.tokens.next,\"key\",state.tokens.next.value):\"__proto__\"===state.tokens.next.value&&!state.option.proto||\"__iterator__\"===state.tokens.next.value&&!state.option.iterator?warning(\"W096\",state.tokens.next,state.tokens.next.value):o[state.tokens.next.value]=!0,advance(),advance(\":\"),jsonValue(),\",\"!==state.tokens.next.id)break;advance(\",\")}advance(\"}\")}function jsonArray(){var t=state.tokens.next;if(advance(\"[\"),\"]\"!==state.tokens.next.id)for(;;){if(\"(end)\"===state.tokens.next.id)error(\"E027\",state.tokens.next,t.line);else{if(\"]\"===state.tokens.next.id){warning(\"W094\",state.tokens.curr);break}\",\"===state.tokens.next.id&&error(\"E028\",state.tokens.next)}if(jsonValue(),\",\"!==state.tokens.next.id)break;advance(\",\")}advance(\"]\")}switch(state.tokens.next.id){case\"{\":jsonObject();break;case\"[\":jsonArray();break;case\"true\":case\"false\":case\"null\":case\"(number)\":case\"(string)\":advance();break;case\"-\":advance(\"-\"),advance(\"(number)\");break;default:error(\"E003\",state.tokens.next)}}var api,declared,functions,inblock,indent,lookahead,lex,member,membersOnly,predefined,stack,urls,bang={\"<\":!0,\"<=\":!0,\"==\":!0,\"===\":!0,\"!==\":!0,\"!=\":!0,\">\":!0,\">=\":!0,\"+\":!0,\"-\":!0,\"*\":!0,\"/\":!0,\"%\":!0},functionicity=[\"closure\",\"exception\",\"global\",\"label\",\"outer\",\"unused\",\"var\"],extraModules=[],emitter=new events.EventEmitter,typeofValues={};typeofValues.legacy=[\"xml\",\"unknown\"],typeofValues.es3=[\"undefined\",\"boolean\",\"number\",\"string\",\"function\",\"object\"],typeofValues.es3=typeofValues.es3.concat(typeofValues.legacy),typeofValues.es6=typeofValues.es3.concat(\"symbol\"),type(\"(number)\",function(){return this}),type(\"(string)\",function(){return this}),state.syntax[\"(identifier)\"]={type:\"(identifier)\",lbp:0,identifier:!0,nud:function(){var v=this.value;return\"=>\"===state.tokens.next.id?this:(state.funct[\"(comparray)\"].check(v)||state.funct[\"(scope)\"].block.use(v,state.tokens.curr),this)},led:function(){error(\"E033\",state.tokens.next,state.tokens.next.value)}};var baseTemplateSyntax={lbp:0,identifier:!1,template:!0};state.syntax[\"(template)\"]=_.extend({type:\"(template)\",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!1},baseTemplateSyntax),state.syntax[\"(template middle)\"]=_.extend({type:\"(template middle)\",middle:!0,noSubst:!1},baseTemplateSyntax),state.syntax[\"(template tail)\"]=_.extend({type:\"(template tail)\",tail:!0,noSubst:!1},baseTemplateSyntax),state.syntax[\"(no subst template)\"]=_.extend({type:\"(template)\",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!0,tail:!0},baseTemplateSyntax),type(\"(regexp)\",function(){return this}),delim(\"(endline)\"),delim(\"(begin)\"),delim(\"(end)\").reach=!0,delim(\"(error)\").reach=!0,delim(\"}\").reach=!0,delim(\")\"),delim(\"]\"),delim('\"').reach=!0,delim(\"'\").reach=!0,delim(\";\"),delim(\":\").reach=!0,delim(\"#\"),reserve(\"else\"),reserve(\"case\").reach=!0,reserve(\"catch\"),reserve(\"default\").reach=!0,reserve(\"finally\"),reservevar(\"arguments\",function(x){state.isStrict()&&state.funct[\"(global)\"]&&warning(\"E008\",x)}),reservevar(\"eval\"),reservevar(\"false\"),reservevar(\"Infinity\"),reservevar(\"null\"),reservevar(\"this\",function(x){state.isStrict()&&!isMethod()&&!state.option.validthis&&(state.funct[\"(statement)\"]&&state.funct[\"(name)\"].charAt(0)>\"Z\"||state.funct[\"(global)\"])&&warning(\"W040\",x)}),reservevar(\"true\"),reservevar(\"undefined\"),assignop(\"=\",\"assign\",20),assignop(\"+=\",\"assignadd\",20),assignop(\"-=\",\"assignsub\",20),assignop(\"*=\",\"assignmult\",20),assignop(\"/=\",\"assigndiv\",20).nud=function(){error(\"E014\")},assignop(\"%=\",\"assignmod\",20),bitwiseassignop(\"&=\"),bitwiseassignop(\"|=\"),bitwiseassignop(\"^=\"),bitwiseassignop(\"<<=\"),bitwiseassignop(\">>=\"),bitwiseassignop(\">>>=\"),infix(\",\",function(left,that){var expr;if(that.exprs=[left],state.option.nocomma&&warning(\"W127\"),!comma({peek:!0}))return that;for(;;){if(!(expr=expression(10)))break;if(that.exprs.push(expr),\",\"!==state.tokens.next.value||!comma())break}return that},10,!0),infix(\"?\",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(10),advance(\":\"),that[\"else\"]=expression(10),that},30);var orPrecendence=40;infix(\"||\",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(orPrecendence),that},orPrecendence),infix(\"&&\",\"and\",50),bitwise(\"|\",\"bitor\",70),bitwise(\"^\",\"bitxor\",80),bitwise(\"&\",\"bitand\",90),relation(\"==\",function(left,right){var eqnull=state.option.eqnull&&(\"null\"===(left&&left.value)||\"null\"===(right&&right.value));switch(!0){case!eqnull&&state.option.eqeqeq:this.from=this.character,warning(\"W116\",this,\"===\",\"==\");break;case isPoorRelation(left):warning(\"W041\",this,\"===\",left.value);break;case isPoorRelation(right):warning(\"W041\",this,\"===\",right.value);break;case isTypoTypeof(right,left,state):warning(\"W122\",this,right.value);break;case isTypoTypeof(left,right,state):warning(\"W122\",this,left.value)}return this}),relation(\"===\",function(left,right){return isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"!=\",function(left,right){var eqnull=state.option.eqnull&&(\"null\"===(left&&left.value)||\"null\"===(right&&right.value));return!eqnull&&state.option.eqeqeq?(this.from=this.character,warning(\"W116\",this,\"!==\",\"!=\")):isPoorRelation(left)?warning(\"W041\",this,\"!==\",left.value):isPoorRelation(right)?warning(\"W041\",this,\"!==\",right.value):isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"!==\",function(left,right){return isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"<\"),relation(\">\"),relation(\"<=\"),relation(\">=\"),bitwise(\"<<\",\"shiftleft\",120),bitwise(\">>\",\"shiftright\",120),bitwise(\">>>\",\"shiftrightunsigned\",120),infix(\"in\",\"in\",120),infix(\"instanceof\",\"instanceof\",120),infix(\"+\",function(left,that){var right;return that.left=left,that.right=right=expression(130),left&&right&&\"(string)\"===left.id&&\"(string)\"===right.id?(left.value+=right.value,left.character=right.character,!state.option.scripturl&®.javascriptURL.test(left.value)&&warning(\"W050\",left),left):that},130),prefix(\"+\",\"num\"),prefix(\"+++\",function(){return warning(\"W007\"),this.arity=\"unary\",this.right=expression(150),this}),infix(\"+++\",function(left){return warning(\"W007\"),this.left=left,this.right=expression(130),this},130),infix(\"-\",\"sub\",130),prefix(\"-\",\"neg\"),prefix(\"---\",function(){return warning(\"W006\"),this.arity=\"unary\",this.right=expression(150),this}),infix(\"---\",function(left){return warning(\"W006\"),this.left=left,this.right=expression(130),this},130),infix(\"*\",\"mult\",140),infix(\"/\",\"div\",140),infix(\"%\",\"mod\",140),suffix(\"++\"),prefix(\"++\",\"preinc\"),state.syntax[\"++\"].exps=!0,suffix(\"--\"),prefix(\"--\",\"predec\"),state.syntax[\"--\"].exps=!0,prefix(\"delete\",function(){var p=expression(10);return p?(\".\"!==p.id&&\"[\"!==p.id&&warning(\"W051\"),this.first=p,p.identifier&&!state.isStrict()&&(p.forgiveUndef=!0),this):this}).exps=!0,prefix(\"~\",function(){return state.option.bitwise&&warning(\"W016\",this,\"~\"),this.arity=\"unary\",this.right=expression(150),this}),prefix(\"...\",function(){return state.inES6(!0)||warning(\"W119\",this,\"spread/rest operator\",\"6\"),state.tokens.next.identifier||\"(string)\"===state.tokens.next.type||checkPunctuators(state.tokens.next,[\"[\",\"(\"])||error(\"E030\",state.tokens.next,state.tokens.next.value),expression(150),this}),prefix(\"!\",function(){return this.arity=\"unary\",this.right=expression(150),this.right||quit(\"E041\",this.line||0),bang[this.right.id]===!0&&warning(\"W018\",this,\"!\"),this}),prefix(\"typeof\",function(){var p=expression(150);return this.first=this.right=p,p||quit(\"E041\",this.line||0,this.character||0),p.identifier&&(p.forgiveUndef=!0),this}),prefix(\"new\",function(){var mp=metaProperty(\"target\",function(){state.inES6(!0)||warning(\"W119\",state.tokens.prev,\"new.target\",\"6\");for(var inFunction,c=state.funct;c&&(inFunction=!c[\"(global)\"],c[\"(arrow)\"]);)c=c[\"(context)\"];inFunction||warning(\"W136\",state.tokens.prev,\"new.target\")});if(mp)return mp;var i,c=expression(155);if(c&&\"function\"!==c.id)if(c.identifier)switch(c[\"new\"]=!0,c.value){case\"Number\":case\"String\":case\"Boolean\":case\"Math\":case\"JSON\":warning(\"W053\",state.tokens.prev,c.value);break;case\"Symbol\":state.inES6()&&warning(\"W053\",state.tokens.prev,c.value);break;case\"Function\":state.option.evil||warning(\"W054\");break;case\"Date\":case\"RegExp\":case\"this\":break;default:\"function\"!==c.id&&(i=c.value.substr(0,1),state.option.newcap&&(\"A\">i||i>\"Z\")&&!state.funct[\"(scope)\"].isPredefined(c.value)&&warning(\"W055\",state.tokens.curr))}else\".\"!==c.id&&\"[\"!==c.id&&\"(\"!==c.id&&warning(\"W056\",state.tokens.curr);else state.option.supernew||warning(\"W057\",this);return\"(\"===state.tokens.next.id||state.option.supernew||warning(\"W058\",state.tokens.curr,state.tokens.curr.value),this.first=this.right=c,this}),state.syntax[\"new\"].exps=!0,prefix(\"void\").exps=!0,infix(\".\",function(left,that){var m=identifier(!1,!0);return\"string\"==typeof m&&countMember(m),that.left=left,that.right=m,m&&\"hasOwnProperty\"===m&&\"=\"===state.tokens.next.value&&warning(\"W001\"),!left||\"arguments\"!==left.value||\"callee\"!==m&&\"caller\"!==m?state.option.evil||!left||\"document\"!==left.value||\"write\"!==m&&\"writeln\"!==m||warning(\"W060\",left):state.option.noarg?warning(\"W059\",left,m):state.isStrict()&&error(\"E008\"),state.option.evil||\"eval\"!==m&&\"execScript\"!==m||isGlobalEval(left,state)&&warning(\"W061\"),that},160,!0),infix(\"(\",function(left,that){state.option.immed&&left&&!left.immed&&\"function\"===left.id&&warning(\"W062\");var n=0,p=[];if(left&&\"(identifier)\"===left.type&&left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1===\"Array Number String Boolean Date Object Error Symbol\".indexOf(left.value)&&(\"Math\"===left.value?warning(\"W063\",left):state.option.newcap&&warning(\"W064\",left)),\")\"!==state.tokens.next.id)for(;p[p.length]=expression(10),n+=1,\",\"===state.tokens.next.id;)comma();return advance(\")\"),\"object\"==typeof left&&(state.inES5()||\"parseInt\"!==left.value||1!==n||warning(\"W065\",state.tokens.curr),state.option.evil||(\"eval\"===left.value||\"Function\"===left.value||\"execScript\"===left.value?(warning(\"W061\",left),p[0]&&\"(string)\"===[0].id&&addInternalSrc(left,p[0].value)):!p[0]||\"(string)\"!==p[0].id||\"setTimeout\"!==left.value&&\"setInterval\"!==left.value?!p[0]||\"(string)\"!==p[0].id||\".\"!==left.value||\"window\"!==left.left.value||\"setTimeout\"!==left.right&&\"setInterval\"!==left.right||(warning(\"W066\",left),addInternalSrc(left,p[0].value)):(warning(\"W066\",left),addInternalSrc(left,p[0].value))),left.identifier||\".\"===left.id||\"[\"===left.id||\"=>\"===left.id||\"(\"===left.id||\"&&\"===left.id||\"||\"===left.id||\"?\"===left.id||state.inES6()&&left[\"(name)\"]||warning(\"W067\",that)),that.left=left,that},155,!0).exps=!0,prefix(\"(\",function(){var pn1,ret,triggerFnExpr,first,last,pn=state.tokens.next,i=-1,parens=1,opening=state.tokens.curr,preceeding=state.tokens.prev,isNecessary=!state.option.singleGroups;do\"(\"===pn.value?parens+=1:\")\"===pn.value&&(parens-=1),i+=1,pn1=pn,pn=peek(i);while((0!==parens||\")\"!==pn1.value)&&\";\"!==pn.value&&\"(end)\"!==pn.type);if(\"function\"===state.tokens.next.id&&(triggerFnExpr=state.tokens.next.immed=!0),\"=>\"===pn.value)return doFunction({type:\"arrow\",parsedOpening:!0});var exprs=[];if(\")\"!==state.tokens.next.id)for(;exprs.push(expression(10)),\",\"===state.tokens.next.id;)state.option.nocomma&&warning(\"W127\"),comma();return advance(\")\",this),state.option.immed&&exprs[0]&&\"function\"===exprs[0].id&&\"(\"!==state.tokens.next.id&&\".\"!==state.tokens.next.id&&\"[\"!==state.tokens.next.id&&warning(\"W068\",this),exprs.length?(exprs.length>1?(ret=Object.create(state.syntax[\",\"]),ret.exprs=exprs,first=exprs[0],last=exprs[exprs.length-1],isNecessary||(isNecessary=preceeding.assign||preceeding.delim)):(ret=first=last=exprs[0],isNecessary||(isNecessary=opening.beginsStmt&&(\"{\"===ret.id||triggerFnExpr||isFunctor(ret))||triggerFnExpr&&(!isEndOfExpr()||\"}\"!==state.tokens.prev.id)||isFunctor(ret)&&!isEndOfExpr()||\"{\"===ret.id&&\"=>\"===preceeding.id||\"(number)\"===ret.type&&checkPunctuator(pn,\".\")&&/^\\d+$/.test(ret.value))),ret&&(!isNecessary&&(first.left||first.right||ret.exprs)&&(isNecessary=!isBeginOfExpr(preceeding)&&first.lbp<=preceeding.lbp||!isEndOfExpr()&&last.lbp\"),infix(\"[\",function(left,that){var s,e=expression(10);return e&&\"(string)\"===e.type&&(state.option.evil||\"eval\"!==e.value&&\"execScript\"!==e.value||isGlobalEval(left,state)&&warning(\"W061\"),countMember(e.value),!state.option.sub&®.identifier.test(e.value)&&(s=state.syntax[e.value],s&&isReserved(s)||warning(\"W069\",state.tokens.prev,e.value))),advance(\"]\",that),e&&\"hasOwnProperty\"===e.value&&\"=\"===state.tokens.next.value&&warning(\"W001\"),that.left=left,that.right=e,that},160,!0),prefix(\"[\",function(){var blocktype=lookupBlockType();if(blocktype.isCompArray)return state.option.esnext||state.inMoz()||warning(\"W118\",state.tokens.curr,\"array comprehension\"),comprehensiveArrayExpression();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;var b=state.tokens.curr.line!==startLine(state.tokens.next);for(this.first=[],b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));\"(end)\"!==state.tokens.next.id;){for(;\",\"===state.tokens.next.id;){if(!state.option.elision){if(state.inES5()){warning(\"W128\");do advance(\",\");while(\",\"===state.tokens.next.id);continue}warning(\"W070\")}advance(\",\")}if(\"]\"===state.tokens.next.id)break;if(this.first.push(expression(10)),\",\"!==state.tokens.next.id)break;if(comma({allowTrailing:!0}),\"]\"===state.tokens.next.id&&!state.inES5()){warning(\"W070\",state.tokens.curr);break}}return b&&(indent-=state.option.indent),advance(\"]\",this),this}),function(x){x.nud=function(){var b,f,i,p,t,nextVal,isGeneratorMethod=!1,props=Object.create(null);b=state.tokens.curr.line!==startLine(state.tokens.next),b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));var blocktype=lookupBlockType();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;for(;\"}\"!==state.tokens.next.id;){if(nextVal=state.tokens.next.value,!state.tokens.next.identifier||\",\"!==peekIgnoreEOL().id&&\"}\"!==peekIgnoreEOL().id)if(\":\"===peek().id||\"get\"!==nextVal&&\"set\"!==nextVal){if(\"*\"===state.tokens.next.value&&\"(punctuator)\"===state.tokens.next.type?(state.inES6()||warning(\"W104\",state.tokens.next,\"generator functions\",\"6\"),advance(\"*\"),isGeneratorMethod=!0):isGeneratorMethod=!1,\"[\"===state.tokens.next.id)i=computedPropertyName(),state.nameStack.set(i);else if(state.nameStack.set(state.tokens.next),i=propertyName(),saveProperty(props,i,state.tokens.next),\"string\"!=typeof i)break;\"(\"===state.tokens.next.value?(state.inES6()||warning(\"W104\",state.tokens.curr,\"concise methods\",\"6\"),doFunction({type:isGeneratorMethod?\"generator\":null})):(advance(\":\"),expression(10))}else advance(nextVal),state.inES5()||error(\"E034\"),i=propertyName(),i||state.inES6()||error(\"E035\"),i&&saveAccessor(nextVal,props,i,state.tokens.curr),t=state.tokens.next,f=doFunction(),p=f[\"(params)\"],\"get\"===nextVal&&i&&p?warning(\"W076\",t,p[0],i):\"set\"!==nextVal||!i||p&&1===p.length||warning(\"W077\",t,i);else state.inES6()||warning(\"W104\",state.tokens.next,\"object short notation\",\"6\"),i=propertyName(!0),saveProperty(props,i,state.tokens.next),expression(10);if(countMember(i),\",\"!==state.tokens.next.id)break;comma({allowTrailing:!0,property:!0}),\",\"===state.tokens.next.id?warning(\"W070\",state.tokens.curr):\"}\"!==state.tokens.next.id||state.inES5()||warning(\"W070\",state.tokens.curr)}return b&&(indent-=state.option.indent),advance(\"}\",this),checkProperties(props),this},x.fud=function(){error(\"E036\",state.tokens.curr)}}(delim(\"{\"));var conststatement=stmt(\"const\",function(context){return blockVariableStatement(\"const\",this,context)});conststatement.exps=!0;var letstatement=stmt(\"let\",function(context){return blockVariableStatement(\"let\",this,context)});letstatement.exps=!0;var varstatement=stmt(\"var\",function(context){var tokens,lone,value,prefix=context&&context.prefix,inexport=context&&context.inexport,implied=context&&context.implied,report=!(context&&context.ignore);for(this.first=[];;){var names=[];_.contains([\"{\",\"[\"],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),prefix&&implied||!report||!state.option.varstmt||warning(\"W132\",this),this.first=this.first.concat(names);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],!implied&&state.funct[\"(global)\"]&&(predefined[t.id]===!1?warning(\"W079\",t.token,t.id):state.option.futurehostile===!1&&(!state.inES5()&&vars.ecmaIdentifiers[5][t.id]===!1||!state.inES6()&&vars.ecmaIdentifiers[6][t.id]===!1)&&warning(\"W129\",t.token,t.id)),t.id&&(\"for\"===implied?(state.funct[\"(scope)\"].has(t.id)||report&&warning(\"W088\",t.token,t.id),state.funct[\"(scope)\"].block.use(t.id,t.token)):(state.funct[\"(scope)\"].addlabel(t.id,{type:\"var\",token:t.token}),lone&&inexport&&state.funct[\"(scope)\"].setExported(t.id,t.token)),names.push(t.token)));if(\"=\"===state.tokens.next.id&&(state.nameStack.set(state.tokens.curr),advance(\"=\"),prefix||!report||state.funct[\"(loopage)\"]||\"undefined\"!==state.tokens.next.id||warning(\"W080\",state.tokens.prev,state.tokens.prev.value),\"=\"===peek(0).id&&state.tokens.next.identifier&&(!prefix&&report&&!state.funct[\"(params)\"]||-1===state.funct[\"(params)\"].indexOf(state.tokens.next.value))&&warning(\"W120\",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),\",\"!==state.tokens.next.id)break;comma()}return this});varstatement.exps=!0,blockstmt(\"class\",function(){return classdef.call(this,!0)}),blockstmt(\"function\",function(context){var inexport=context&&context.inexport,generator=!1;\"*\"===state.tokens.next.value&&(advance(\"*\"),state.inES6({strict:!0})?generator=!0:warning(\"W119\",state.tokens.curr,\"function*\",\"6\")),inblock&&warning(\"W082\",state.tokens.curr);var i=optionalidentifier();return state.funct[\"(scope)\"].addlabel(i,{type:\"function\",token:state.tokens.curr}),void 0===i?warning(\"W025\"):inexport&&state.funct[\"(scope)\"].setExported(i,state.tokens.prev),doFunction({name:i,statement:this,type:generator?\"generator\":null,ignoreLoopFunc:inblock}),\"(\"===state.tokens.next.id&&state.tokens.next.line===state.tokens.curr.line&&error(\"E039\"),this}),prefix(\"function\",function(){var generator=!1;\"*\"===state.tokens.next.value&&(state.inES6()||warning(\"W119\",state.tokens.curr,\"function*\",\"6\"),advance(\"*\"),generator=!0);var i=optionalidentifier();return doFunction({name:i,type:generator?\"generator\":null}),this}),blockstmt(\"if\",function(){var t=state.tokens.next;increaseComplexityCount(),state.condition=!0,advance(\"(\");var expr=expression(0);checkCondAssignment(expr);var forinifcheck=null;state.option.forin&&state.forinifcheckneeded&&(state.forinifcheckneeded=!1,forinifcheck=state.forinifchecks[state.forinifchecks.length-1],forinifcheck.type=\"(punctuator)\"===expr.type&&\"!\"===expr.value?\"(negative)\":\"(positive)\"),advance(\")\",t),state.condition=!1;var s=block(!0,!0);return forinifcheck&&\"(negative)\"===forinifcheck.type&&s&&s[0]&&\"(identifier)\"===s[0].type&&\"continue\"===s[0].value&&(forinifcheck.type=\"(negative-with-continue)\"),\"else\"===state.tokens.next.id&&(advance(\"else\"),\"if\"===state.tokens.next.id||\"switch\"===state.tokens.next.id?statement():block(!0,!0)),this}),blockstmt(\"try\",function(){function doCatch(){if(advance(\"catch\"),advance(\"(\"),state.funct[\"(scope)\"].stack(\"catchparams\"),checkPunctuators(state.tokens.next,[\"[\",\"{\"])){var tokens=destructuringPattern();_.each(tokens,function(token){token.id&&state.funct[\"(scope)\"].addParam(token.id,token,\"exception\")})}else\"(identifier)\"!==state.tokens.next.type?warning(\"E030\",state.tokens.next,state.tokens.next.value):state.funct[\"(scope)\"].addParam(identifier(),state.tokens.curr,\"exception\");\"if\"===state.tokens.next.value&&(state.inMoz()||warning(\"W118\",state.tokens.curr,\"catch filter\"),advance(\"if\"),expression(0)),advance(\")\"),block(!1),state.funct[\"(scope)\"].unstack()}var b;for(block(!0);\"catch\"===state.tokens.next.id;)increaseComplexityCount(),b&&!state.inMoz()&&warning(\"W118\",state.tokens.next,\"multiple catch blocks\"),doCatch(),b=!0;return\"finally\"===state.tokens.next.id?(advance(\"finally\"),block(!0),void 0):(b||error(\"E021\",state.tokens.next,\"catch\",state.tokens.next.value),this)}),blockstmt(\"while\",function(){var t=state.tokens.next;return state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,increaseComplexityCount(),advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),block(!0,!0),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1,this}).labelled=!0,blockstmt(\"with\",function(){var t=state.tokens.next;return state.isStrict()?error(\"E010\",state.tokens.curr):state.option.withstmt||warning(\"W085\",state.tokens.curr),advance(\"(\"),expression(0),advance(\")\",t),block(!0,!0),this}),blockstmt(\"switch\",function(){var t=state.tokens.next,g=!1,noindent=!1;\nfor(state.funct[\"(breakage)\"]+=1,advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),t=state.tokens.next,advance(\"{\"),state.tokens.next.from===indent&&(noindent=!0),noindent||(indent+=state.option.indent),this.cases=[];;)switch(state.tokens.next.id){case\"case\":switch(state.funct[\"(verb)\"]){case\"yield\":case\"break\":case\"case\":case\"continue\":case\"return\":case\"switch\":case\"throw\":break;default:state.tokens.curr.caseFallsThrough||warning(\"W086\",state.tokens.curr,\"case\")}advance(\"case\"),this.cases.push(expression(0)),increaseComplexityCount(),g=!0,advance(\":\"),state.funct[\"(verb)\"]=\"case\";break;case\"default\":switch(state.funct[\"(verb)\"]){case\"yield\":case\"break\":case\"continue\":case\"return\":case\"throw\":break;default:this.cases.length&&(state.tokens.curr.caseFallsThrough||warning(\"W086\",state.tokens.curr,\"default\"))}advance(\"default\"),g=!0,advance(\":\");break;case\"}\":return noindent||(indent-=state.option.indent),advance(\"}\",t),state.funct[\"(breakage)\"]-=1,state.funct[\"(verb)\"]=void 0,void 0;case\"(end)\":return error(\"E023\",state.tokens.next,\"}\"),void 0;default:if(indent+=state.option.indent,g)switch(state.tokens.curr.id){case\",\":return error(\"E040\"),void 0;case\":\":g=!1,statements();break;default:return error(\"E025\",state.tokens.curr),void 0}else{if(\":\"!==state.tokens.curr.id)return error(\"E021\",state.tokens.next,\"case\",state.tokens.next.value),void 0;advance(\":\"),error(\"E024\",state.tokens.curr,\":\"),statements()}indent-=state.option.indent}return this}).labelled=!0,stmt(\"debugger\",function(){return state.option.debug||warning(\"W087\",this),this}).exps=!0,function(){var x=stmt(\"do\",function(){state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,increaseComplexityCount(),this.first=block(!0,!0),advance(\"while\");var t=state.tokens.next;return advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1,this});x.labelled=!0,x.exps=!0}(),blockstmt(\"for\",function(){var s,t=state.tokens.next,letscope=!1,foreachtok=null;\"each\"===t.value&&(foreachtok=t,advance(\"each\"),state.inMoz()||warning(\"W118\",state.tokens.curr,\"for each\")),increaseComplexityCount(),advance(\"(\");var nextop,comma,initializer,i=0,inof=[\"in\",\"of\"],level=0;checkPunctuators(state.tokens.next,[\"{\",\"[\"])&&++level;do{if(nextop=peek(i),++i,checkPunctuators(nextop,[\"{\",\"[\"])?++level:checkPunctuators(nextop,[\"}\",\"]\"])&&--level,0>level)break;0===level&&(!comma&&checkPunctuator(nextop,\",\")?comma=nextop:!initializer&&checkPunctuator(nextop,\"=\")&&(initializer=nextop))}while(level>0||!_.contains(inof,nextop.value)&&\";\"!==nextop.value&&\"(end)\"!==nextop.type);if(_.contains(inof,nextop.value)){state.inES6()||\"of\"!==nextop.value||warning(\"W104\",nextop,\"for of\",\"6\");var ok=!(initializer||comma);if(initializer&&error(\"W133\",comma,nextop.value,\"initializer is forbidden\"),comma&&error(\"W133\",comma,nextop.value,\"more than one ForBinding\"),\"var\"===state.tokens.next.id?(advance(\"var\"),state.tokens.curr.fud({prefix:!0})):\"let\"===state.tokens.next.id||\"const\"===state.tokens.next.id?(advance(state.tokens.next.id),letscope=!0,state.funct[\"(scope)\"].stack(),state.tokens.curr.fud({prefix:!0})):Object.create(varstatement).fud({prefix:!0,implied:\"for\",ignore:!ok}),advance(nextop.value),expression(20),advance(\")\",t),\"in\"===nextop.value&&state.option.forin&&(state.forinifcheckneeded=!0,void 0===state.forinifchecks&&(state.forinifchecks=[]),state.forinifchecks.push({type:\"(none)\"})),state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,s=block(!0,!0),\"in\"===nextop.value&&state.option.forin){if(state.forinifchecks&&state.forinifchecks.length>0){var check=state.forinifchecks.pop();(s&&s.length>0&&(\"object\"!=typeof s[0]||\"if\"!==s[0].value)||\"(positive)\"===check.type&&s.length>1||\"(negative)\"===check.type)&&warning(\"W089\",this)}state.forinifcheckneeded=!1}state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1}else{if(foreachtok&&error(\"E045\",foreachtok),\";\"!==state.tokens.next.id)if(\"var\"===state.tokens.next.id)advance(\"var\"),state.tokens.curr.fud();else if(\"let\"===state.tokens.next.id)advance(\"let\"),letscope=!0,state.funct[\"(scope)\"].stack(),state.tokens.curr.fud();else for(;expression(0,\"for\"),\",\"===state.tokens.next.id;)comma();if(nolinebreak(state.tokens.curr),advance(\";\"),state.funct[\"(loopage)\"]+=1,\";\"!==state.tokens.next.id&&checkCondAssignment(expression(0)),nolinebreak(state.tokens.curr),advance(\";\"),\";\"===state.tokens.next.id&&error(\"E021\",state.tokens.next,\")\",\";\"),\")\"!==state.tokens.next.id)for(;expression(0,\"for\"),\",\"===state.tokens.next.id;)comma();advance(\")\",t),state.funct[\"(breakage)\"]+=1,block(!0,!0),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1}return letscope&&state.funct[\"(scope)\"].unstack(),this}).labelled=!0,stmt(\"break\",function(){var v=state.tokens.next.value;return state.option.asi||nolinebreak(this),\";\"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line!==startLine(state.tokens.next)?0===state.funct[\"(breakage)\"]&&warning(\"W052\",state.tokens.next,this.value):(state.funct[\"(scope)\"].funct.hasBreakLabel(v)||warning(\"W090\",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt(\"continue\",function(){var v=state.tokens.next.value;return 0===state.funct[\"(breakage)\"]&&warning(\"W052\",state.tokens.next,this.value),state.funct[\"(loopage)\"]||warning(\"W052\",state.tokens.next,this.value),state.option.asi||nolinebreak(this),\";\"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line===startLine(state.tokens.next)&&(state.funct[\"(scope)\"].funct.hasBreakLabel(v)||warning(\"W090\",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt(\"return\",function(){return this.line===startLine(state.tokens.next)?\";\"===state.tokens.next.id||state.tokens.next.reach||(this.first=expression(0),!this.first||\"(punctuator)\"!==this.first.type||\"=\"!==this.first.value||this.first.paren||state.option.boss||warningAt(\"W093\",this.first.line,this.first.character)):\"(punctuator)\"===state.tokens.next.type&&[\"[\",\"{\",\"+\",\"-\"].indexOf(state.tokens.next.value)>-1&&nolinebreak(this),reachable(this),this}).exps=!0,function(x){x.exps=!0,x.lbp=25}(prefix(\"yield\",function(){var prev=state.tokens.prev;state.inES6(!0)&&!state.funct[\"(generator)\"]?\"(catch)\"===state.funct[\"(name)\"]&&state.funct[\"(context)\"][\"(generator)\"]||error(\"E046\",state.tokens.curr,\"yield\"):state.inES6()||warning(\"W104\",state.tokens.curr,\"yield\",\"6\"),state.funct[\"(generator)\"]=\"yielded\";var delegatingYield=!1;return\"*\"===state.tokens.next.value&&(delegatingYield=!0,advance(\"*\")),this.line!==startLine(state.tokens.next)&&state.inMoz()?state.option.asi||nolinebreak(this):((delegatingYield||\";\"!==state.tokens.next.id&&!state.option.asi&&!state.tokens.next.reach&&state.tokens.next.nud)&&(nobreaknonadjacent(state.tokens.curr,state.tokens.next),this.first=expression(10),\"(punctuator)\"!==this.first.type||\"=\"!==this.first.value||this.first.paren||state.option.boss||warningAt(\"W093\",this.first.line,this.first.character)),state.inMoz()&&\")\"!==state.tokens.next.id&&(prev.lbp>30||!prev.assign&&!isEndOfExpr()||\"yield\"===prev.id)&&error(\"E050\",this)),this})),stmt(\"throw\",function(){return nolinebreak(this),this.first=expression(20),reachable(this),this}).exps=!0,stmt(\"import\",function(){if(state.inES6()||warning(\"W119\",state.tokens.curr,\"import\",\"6\"),\"(string)\"===state.tokens.next.type)return advance(\"(string)\"),this;if(state.tokens.next.identifier){if(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"const\",token:state.tokens.curr}),\",\"!==state.tokens.next.value)return advance(\"from\"),advance(\"(string)\"),this;advance(\",\")}if(\"*\"===state.tokens.next.id)advance(\"*\"),advance(\"as\"),state.tokens.next.identifier&&(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"const\",token:state.tokens.curr}));else for(advance(\"{\");;){if(\"}\"===state.tokens.next.value){advance(\"}\");break}var importName;if(\"default\"===state.tokens.next.type?(importName=\"default\",advance(\"default\")):importName=identifier(),\"as\"===state.tokens.next.value&&(advance(\"as\"),importName=identifier()),state.funct[\"(scope)\"].addlabel(importName,{type:\"const\",token:state.tokens.curr}),\",\"!==state.tokens.next.value){if(\"}\"===state.tokens.next.value){advance(\"}\");break}error(\"E024\",state.tokens.next,state.tokens.next.value);break}advance(\",\")}return advance(\"from\"),advance(\"(string)\"),this}).exps=!0,stmt(\"export\",function(){var token,identifier,ok=!0;if(state.inES6()||(warning(\"W119\",state.tokens.curr,\"export\",\"6\"),ok=!1),state.funct[\"(scope)\"].block.isGlobal()||(error(\"E053\",state.tokens.curr),ok=!1),\"*\"===state.tokens.next.value)return advance(\"*\"),advance(\"from\"),advance(\"(string)\"),this;if(\"default\"===state.tokens.next.type){state.nameStack.set(state.tokens.next),advance(\"default\");var exportType=state.tokens.next.id;return(\"function\"===exportType||\"class\"===exportType)&&(this.block=!0),token=peek(),expression(10),identifier=token.value,this.block&&(state.funct[\"(scope)\"].addlabel(identifier,{type:exportType,token:token}),state.funct[\"(scope)\"].setExported(identifier,token)),this}if(\"{\"===state.tokens.next.value){advance(\"{\");for(var exportedTokens=[];;){if(state.tokens.next.identifier||error(\"E030\",state.tokens.next,state.tokens.next.value),advance(),exportedTokens.push(state.tokens.curr),\"as\"===state.tokens.next.value&&(advance(\"as\"),state.tokens.next.identifier||error(\"E030\",state.tokens.next,state.tokens.next.value),advance()),\",\"!==state.tokens.next.value){if(\"}\"===state.tokens.next.value){advance(\"}\");break}error(\"E024\",state.tokens.next,state.tokens.next.value);break}advance(\",\")}return\"from\"===state.tokens.next.value?(advance(\"from\"),advance(\"(string)\")):ok&&exportedTokens.forEach(function(token){state.funct[\"(scope)\"].setExported(token.value,token)}),this}if(\"var\"===state.tokens.next.id)advance(\"var\"),state.tokens.curr.fud({inexport:!0});else if(\"let\"===state.tokens.next.id)advance(\"let\"),state.tokens.curr.fud({inexport:!0});else if(\"const\"===state.tokens.next.id)advance(\"const\"),state.tokens.curr.fud({inexport:!0});else if(\"function\"===state.tokens.next.id)this.block=!0,advance(\"function\"),state.syntax[\"function\"].fud({inexport:!0});else if(\"class\"===state.tokens.next.id){this.block=!0,advance(\"class\");var classNameToken=state.tokens.next;state.syntax[\"class\"].fud(),state.funct[\"(scope)\"].setExported(classNameToken.value,classNameToken)}else error(\"E024\",state.tokens.next,state.tokens.next.value);return this}).exps=!0,FutureReservedWord(\"abstract\"),FutureReservedWord(\"boolean\"),FutureReservedWord(\"byte\"),FutureReservedWord(\"char\"),FutureReservedWord(\"class\",{es5:!0,nud:classdef}),FutureReservedWord(\"double\"),FutureReservedWord(\"enum\",{es5:!0}),FutureReservedWord(\"export\",{es5:!0}),FutureReservedWord(\"extends\",{es5:!0}),FutureReservedWord(\"final\"),FutureReservedWord(\"float\"),FutureReservedWord(\"goto\"),FutureReservedWord(\"implements\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"import\",{es5:!0}),FutureReservedWord(\"int\"),FutureReservedWord(\"interface\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"long\"),FutureReservedWord(\"native\"),FutureReservedWord(\"package\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"private\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"protected\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"public\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"short\"),FutureReservedWord(\"static\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"super\",{es5:!0}),FutureReservedWord(\"synchronized\"),FutureReservedWord(\"transient\"),FutureReservedWord(\"volatile\");var lookupBlockType=function(){var pn,pn1,prev,i=-1,bracketStack=0,ret={};checkPunctuators(state.tokens.curr,[\"[\",\"{\"])&&(bracketStack+=1);do{if(prev=-1===i?state.tokens.curr:pn,pn=-1===i?state.tokens.next:peek(i),pn1=peek(i+1),i+=1,checkPunctuators(pn,[\"[\",\"{\"])?bracketStack+=1:checkPunctuators(pn,[\"]\",\"}\"])&&(bracketStack-=1),1===bracketStack&&pn.identifier&&\"for\"===pn.value&&!checkPunctuator(prev,\".\")){ret.isCompArray=!0,ret.notJson=!0;break}if(0===bracketStack&&checkPunctuators(pn,[\"}\",\"]\"])){if(\"=\"===pn1.value){ret.isDestAssign=!0,ret.notJson=!0;break}if(\".\"===pn1.value){ret.notJson=!0;break}}checkPunctuator(pn,\";\")&&(ret.isBlock=!0,ret.notJson=!0)}while(bracketStack>0&&\"(end)\"!==pn.id);return ret},arrayComprehension=function(){function declare(v){var l=_current.variables.filter(function(elt){return elt.value===v?(elt.undef=!1,v):void 0}).length;return 0!==l}function use(v){var l=_current.variables.filter(function(elt){return elt.value!==v||elt.undef?void 0:(elt.unused===!0&&(elt.unused=!1),v)}).length;return 0===l}var _current,CompArray=function(){this.mode=\"use\",this.variables=[]},_carrays=[];return{stack:function(){_current=new CompArray,_carrays.push(_current)},unstack:function(){_current.variables.filter(function(v){v.unused&&warning(\"W098\",v.token,v.raw_text||v.value),v.undef&&state.funct[\"(scope)\"].block.use(v.value,v.token)}),_carrays.splice(-1,1),_current=_carrays[_carrays.length-1]},setState:function(s){_.contains([\"use\",\"define\",\"generate\",\"filter\"],s)&&(_current.mode=s)},check:function(v){return _current?_current&&\"use\"===_current.mode?(use(v)&&_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!0,unused:!1}),!0):_current&&\"define\"===_current.mode?(declare(v)||_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!1,unused:!0}),!0):_current&&\"generate\"===_current.mode?(state.funct[\"(scope)\"].block.use(v,state.tokens.curr),!0):_current&&\"filter\"===_current.mode?(use(v)&&state.funct[\"(scope)\"].block.use(v,state.tokens.curr),!0):!1:void 0}}},escapeRegex=function(str){return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")},itself=function(s,o,g){function each(obj,cb){obj&&(Array.isArray(obj)||\"object\"!=typeof obj||(obj=Object.keys(obj)),obj.forEach(cb))}var i,k,x,reIgnoreStr,reIgnore,optionKeys,newOptionObj={},newIgnoredObj={};o=_.clone(o),state.reset(),o&&o.scope?JSHINT.scope=o.scope:(JSHINT.errors=[],JSHINT.undefs=[],JSHINT.internals=[],JSHINT.blacklist={},JSHINT.scope=\"(main)\"),predefined=Object.create(null),combine(predefined,vars.ecmaIdentifiers[3]),combine(predefined,vars.reservedVars),combine(predefined,g||{}),declared=Object.create(null);var exported=Object.create(null);if(o)for(each(o.predef||null,function(item){var slice,prop;\"-\"===item[0]?(slice=item.slice(1),JSHINT.blacklist[slice]=slice,delete predefined[slice]):(prop=Object.getOwnPropertyDescriptor(o.predef,item),predefined[item]=prop?prop.value:!1)}),each(o.exported||null,function(item){exported[item]=!0}),delete o.predef,delete o.exported,optionKeys=Object.keys(o),x=0;optionKeys.length>x;x++)if(/^-W\\d{3}$/g.test(optionKeys[x]))newIgnoredObj[optionKeys[x].slice(1)]=!0;else{var optionKey=optionKeys[x];newOptionObj[optionKey]=o[optionKey],(\"esversion\"===optionKey&&5===o[optionKey]||\"es5\"===optionKey&&o[optionKey])&&warning(\"I003\"),\"newcap\"===optionKeys[x]&&o[optionKey]===!1&&(newOptionObj[\"(explicitNewcap)\"]=!0)}state.option=newOptionObj,state.ignored=newIgnoredObj,state.option.indent=state.option.indent||4,state.option.maxerr=state.option.maxerr||50,indent=1;var scopeManagerInst=scopeManager(state,predefined,exported,declared);if(scopeManagerInst.on(\"warning\",function(ev){warning.apply(null,[ev.code,ev.token].concat(ev.data))}),scopeManagerInst.on(\"error\",function(ev){error.apply(null,[ev.code,ev.token].concat(ev.data))}),state.funct=functor(\"(global)\",null,{\"(global)\":!0,\"(scope)\":scopeManagerInst,\"(comparray)\":arrayComprehension(),\"(metrics)\":createMetrics(state.tokens.next)}),functions=[state.funct],urls=[],stack=null,member={},membersOnly=null,inblock=!1,lookahead=[],!isString(s)&&!Array.isArray(s))return errorAt(\"E004\",0),!1;api={get isJSON(){return state.jsonMode},getOption:function(name){return state.option[name]||null},getCache:function(name){return state.cache[name]},setCache:function(name,value){state.cache[name]=value},warn:function(code,data){warningAt.apply(null,[code,data.line,data.char].concat(data.data))},on:function(names,listener){names.split(\" \").forEach(function(name){emitter.on(name,listener)}.bind(this))}},emitter.removeAllListeners(),(extraModules||[]).forEach(function(func){func(api)}),state.tokens.prev=state.tokens.curr=state.tokens.next=state.syntax[\"(begin)\"],o&&o.ignoreDelimiters&&(Array.isArray(o.ignoreDelimiters)||(o.ignoreDelimiters=[o.ignoreDelimiters]),o.ignoreDelimiters.forEach(function(delimiterPair){delimiterPair.start&&delimiterPair.end&&(reIgnoreStr=escapeRegex(delimiterPair.start)+\"[\\\\s\\\\S]*?\"+escapeRegex(delimiterPair.end),reIgnore=RegExp(reIgnoreStr,\"ig\"),s=s.replace(reIgnore,function(match){return match.replace(/./g,\" \")}))})),lex=new Lexer(s),lex.on(\"warning\",function(ev){warningAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on(\"error\",function(ev){errorAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on(\"fatal\",function(ev){quit(\"E041\",ev.line,ev.from)}),lex.on(\"Identifier\",function(ev){emitter.emit(\"Identifier\",ev)}),lex.on(\"String\",function(ev){emitter.emit(\"String\",ev)}),lex.on(\"Number\",function(ev){emitter.emit(\"Number\",ev)}),lex.start();for(var name in o)_.has(o,name)&&checkOption(name,state.tokens.curr);assume(),combine(predefined,g||{}),comma.first=!0;try{switch(advance(),state.tokens.next.id){case\"{\":case\"[\":destructuringAssignOrJsonValue();break;default:directives(),state.directive[\"use strict\"]&&\"global\"!==state.option.strict&&warning(\"W097\",state.tokens.prev),statements()}\"(end)\"!==state.tokens.next.id&&quit(\"E041\",state.tokens.curr.line),state.funct[\"(scope)\"].unstack()}catch(err){if(!err||\"JSHintError\"!==err.name)throw err;var nt=state.tokens.next||{};JSHINT.errors.push({scope:\"(main)\",raw:err.raw,code:err.code,reason:err.message,line:err.line||nt.line,character:err.character||nt.from},null)}if(\"(main)\"===JSHINT.scope)for(o=o||{},i=0;JSHINT.internals.length>i;i+=1)k=JSHINT.internals[i],o.scope=k.elem,itself(k.value,o,g);return 0===JSHINT.errors.length};return itself.addModule=function(func){extraModules.push(func)},itself.addModule(style.register),itself.data=function(){var fu,f,i,j,n,globals,data={functions:[],options:state.option};itself.errors.length&&(data.errors=itself.errors),state.jsonMode&&(data.json=!0);var impliedGlobals=state.funct[\"(scope)\"].getImpliedGlobals();for(impliedGlobals.length>0&&(data.implieds=impliedGlobals),urls.length>0&&(data.urls=urls),globals=state.funct[\"(scope)\"].getUsedOrDefinedGlobals(),globals.length>0&&(data.globals=globals),i=1;functions.length>i;i+=1){for(f=functions[i],fu={},j=0;functionicity.length>j;j+=1)fu[functionicity[j]]=[];for(j=0;functionicity.length>j;j+=1)0===fu[functionicity[j]].length&&delete fu[functionicity[j]];fu.name=f[\"(name)\"],fu.param=f[\"(params)\"],fu.line=f[\"(line)\"],fu.character=f[\"(character)\"],fu.last=f[\"(last)\"],fu.lastcharacter=f[\"(lastcharacter)\"],fu.metrics={complexity:f[\"(metrics)\"].ComplexityCount,parameters:f[\"(metrics)\"].arity,statements:f[\"(metrics)\"].statementCount},data.functions.push(fu)}var unuseds=state.funct[\"(scope)\"].getUnuseds();unuseds.length>0&&(data.unused=unuseds);for(n in member)if(\"number\"==typeof member[n]){data.member=member;break}return data},itself.jshint=itself,itself}();\"object\"==typeof exports&&exports&&(exports.JSHINT=JSHINT)},{\"../lodash\":\"/node_modules/jshint/lodash.js\",\"./lex.js\":\"/node_modules/jshint/src/lex.js\",\"./messages.js\":\"/node_modules/jshint/src/messages.js\",\"./options.js\":\"/node_modules/jshint/src/options.js\",\"./reg.js\":\"/node_modules/jshint/src/reg.js\",\"./scope-manager.js\":\"/node_modules/jshint/src/scope-manager.js\",\"./state.js\":\"/node_modules/jshint/src/state.js\",\"./style.js\":\"/node_modules/jshint/src/style.js\",\"./vars.js\":\"/node_modules/jshint/src/vars.js\",events:\"/node_modules/browserify/node_modules/events/events.js\"}],\"/node_modules/jshint/src/lex.js\":[function(_dereq_,module,exports){\"use strict\";function asyncTrigger(){var _checks=[];return{push:function(fn){_checks.push(fn)},check:function(){for(var check=0;_checks.length>check;++check)_checks[check]();_checks.splice(0,_checks.length)}}}function Lexer(source){var lines=source;\"string\"==typeof lines&&(lines=lines.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\").split(\"\\n\")),lines[0]&&\"#!\"===lines[0].substr(0,2)&&(-1!==lines[0].indexOf(\"node\")&&(state.option.node=!0),lines[0]=\"\"),this.emitter=new events.EventEmitter,this.source=source,this.setLines(lines),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input=\"\",this.inComment=!1,this.context=[],this.templateStarts=[];for(var i=0;state.option.indent>i;i+=1)state.tab+=\" \";this.ignoreLinterErrors=!1}var _=_dereq_(\"../lodash\"),events=_dereq_(\"events\"),reg=_dereq_(\"./reg.js\"),state=_dereq_(\"./state.js\").state,unicodeData=_dereq_(\"../data/ascii-identifier-data.js\"),asciiIdentifierStartTable=unicodeData.asciiIdentifierStartTable,asciiIdentifierPartTable=unicodeData.asciiIdentifierPartTable,Token={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},Context={Block:1,Template:2};Lexer.prototype={_lines:[],inContext:function(ctxType){return this.context.length>0&&this.context[this.context.length-1].type===ctxType},pushContext:function(ctxType){this.context.push({type:ctxType})},popContext:function(){return this.context.pop()},isContext:function(context){return this.context.length>0&&this.context[this.context.length-1]===context},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=state.lines,this._lines},setLines:function(val){this._lines=val,state.lines=this._lines},peek:function(i){return this.input.charAt(i||0)},skip:function(i){i=i||1,this.char+=i,this.input=this.input.slice(i)},on:function(names,listener){names.split(\" \").forEach(function(name){this.emitter.on(name,listener)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(type,args,checks,fn){checks.push(function(){fn()&&this.trigger(type,args)}.bind(this))},scanPunctuator:function(){var ch2,ch3,ch4,ch1=this.peek();switch(ch1){case\".\":if(/^[0-9]$/.test(this.peek(1)))return null;if(\".\"===this.peek(1)&&\".\"===this.peek(2))return{type:Token.Punctuator,value:\"...\"};case\"(\":case\")\":case\";\":case\",\":case\"[\":case\"]\":case\":\":case\"~\":case\"?\":return{type:Token.Punctuator,value:ch1};case\"{\":return this.pushContext(Context.Block),{type:Token.Punctuator,value:ch1};case\"}\":return this.inContext(Context.Block)&&this.popContext(),{type:Token.Punctuator,value:ch1};case\"#\":return{type:Token.Punctuator,value:ch1};case\"\":return null}return ch2=this.peek(1),ch3=this.peek(2),ch4=this.peek(3),\">\"===ch1&&\">\"===ch2&&\">\"===ch3&&\"=\"===ch4?{type:Token.Punctuator,value:\">>>=\"}:\"=\"===ch1&&\"=\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"===\"}:\"!\"===ch1&&\"=\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"!==\"}:\">\"===ch1&&\">\"===ch2&&\">\"===ch3?{type:Token.Punctuator,value:\">>>\"}:\"<\"===ch1&&\"<\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"<<=\"}:\">\"===ch1&&\">\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\">>=\"}:\"=\"===ch1&&\">\"===ch2?{type:Token.Punctuator,value:ch1+ch2}:ch1===ch2&&\"+-<>&|\".indexOf(ch1)>=0?{type:Token.Punctuator,value:ch1+ch2}:\"<>=!+-*%&|^\".indexOf(ch1)>=0?\"=\"===ch2?{type:Token.Punctuator,value:ch1+ch2}:{type:Token.Punctuator,value:ch1}:\"/\"===ch1?\"=\"===ch2?{type:Token.Punctuator,value:\"/=\"}:{type:Token.Punctuator,value:\"/\"}:null},scanComments:function(){function commentToken(label,body,opt){var special=[\"jshint\",\"jslint\",\"members\",\"member\",\"globals\",\"global\",\"exported\"],isSpecial=!1,value=label+body,commentType=\"plain\";return opt=opt||{},opt.isMultiline&&(value+=\"*/\"),body=body.replace(/\\n/g,\" \"),\"/*\"===label&®.fallsThrough.test(body)&&(isSpecial=!0,commentType=\"falls through\"),special.forEach(function(str){if(!isSpecial&&(\"//\"!==label||\"jshint\"===str)&&(\" \"===body.charAt(str.length)&&body.substr(0,str.length)===str&&(isSpecial=!0,label+=str,body=body.substr(str.length)),isSpecial||\" \"!==body.charAt(0)||\" \"!==body.charAt(str.length+1)||body.substr(1,str.length)!==str||(isSpecial=!0,label=label+\" \"+str,body=body.substr(str.length+1)),isSpecial))switch(str){case\"member\":commentType=\"members\";break;case\"global\":commentType=\"globals\";break;default:var options=body.split(\":\").map(function(v){return v.replace(/^\\s+/,\"\").replace(/\\s+$/,\"\")});if(2===options.length)switch(options[0]){case\"ignore\":switch(options[1]){case\"start\":self.ignoringLinterErrors=!0,isSpecial=!1;break;case\"end\":self.ignoringLinterErrors=!1,isSpecial=!1}}commentType=str}}),{type:Token.Comment,commentType:commentType,value:value,body:body,isSpecial:isSpecial,isMultiline:opt.isMultiline||!1,isMalformed:opt.isMalformed||!1}}var ch1=this.peek(),ch2=this.peek(1),rest=this.input.substr(2),startLine=this.line,startChar=this.char,self=this;if(\"*\"===ch1&&\"/\"===ch2)return this.trigger(\"error\",{code:\"E018\",line:startLine,character:startChar}),this.skip(2),null;if(\"/\"!==ch1||\"*\"!==ch2&&\"/\"!==ch2)return null;if(\"/\"===ch2)return this.skip(this.input.length),commentToken(\"//\",rest);var body=\"\";if(\"*\"===ch2){for(this.inComment=!0,this.skip(2);\"*\"!==this.peek()||\"/\"!==this.peek(1);)if(\"\"===this.peek()){if(body+=\"\\n\",!this.nextLine())return this.trigger(\"error\",{code:\"E017\",line:startLine,character:startChar}),this.inComment=!1,commentToken(\"/*\",body,{isMultiline:!0,isMalformed:!0})}else body+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,commentToken(\"/*\",body,{isMultiline:!0})}},scanKeyword:function(){var result=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),keywords=[\"if\",\"in\",\"do\",\"var\",\"for\",\"new\",\"try\",\"let\",\"this\",\"else\",\"case\",\"void\",\"with\",\"enum\",\"while\",\"break\",\"catch\",\"throw\",\"const\",\"yield\",\"class\",\"super\",\"return\",\"typeof\",\"delete\",\"switch\",\"export\",\"import\",\"default\",\"finally\",\"extends\",\"function\",\"continue\",\"debugger\",\"instanceof\"];return result&&keywords.indexOf(result[0])>=0?{type:Token.Keyword,value:result[0]}:null},scanIdentifier:function(){function isNonAsciiIdentifierStart(code){return code>256}function isNonAsciiIdentifierPart(code){return code>256}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function removeEscapeSequences(id){return id.replace(/\\\\u([0-9a-fA-F]{4})/g,function(m0,codepoint){return String.fromCharCode(parseInt(codepoint,16))})}var type,char,id=\"\",index=0,readUnicodeEscapeSequence=function(){if(index+=1,\"u\"!==this.peek(index))return null;var code,ch1=this.peek(index+1),ch2=this.peek(index+2),ch3=this.peek(index+3),ch4=this.peek(index+4);return isHexDigit(ch1)&&isHexDigit(ch2)&&isHexDigit(ch3)&&isHexDigit(ch4)?(code=parseInt(ch1+ch2+ch3+ch4,16),asciiIdentifierPartTable[code]||isNonAsciiIdentifierPart(code)?(index+=5,\"\\\\u\"+ch1+ch2+ch3+ch4):null):null}.bind(this),getIdentifierStart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierStartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierStart(code)?(index+=1,chr):null}.bind(this),getIdentifierPart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierPartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierPart(code)?(index+=1,chr):null}.bind(this);if(char=getIdentifierStart(),null===char)return null;for(id=char;char=getIdentifierPart(),null!==char;)id+=char;switch(id){case\"true\":case\"false\":type=Token.BooleanLiteral;break;case\"null\":type=Token.NullLiteral;break;default:type=Token.Identifier}return{type:type,value:removeEscapeSequences(id),text:id,tokenLength:id.length}},scanNumericLiteral:function(){function isDecimalDigit(str){return/^[0-9]$/.test(str)}function isOctalDigit(str){return/^[0-7]$/.test(str)}function isBinaryDigit(str){return/^[01]$/.test(str)}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function isIdentifierStart(ch){return\"$\"===ch||\"_\"===ch||\"\\\\\"===ch||ch>=\"a\"&&\"z\">=ch||ch>=\"A\"&&\"Z\">=ch}var bad,index=0,value=\"\",length=this.input.length,char=this.peek(index),isAllowedDigit=isDecimalDigit,base=10,isLegacy=!1;if(\".\"!==char&&!isDecimalDigit(char))return null;if(\".\"!==char){for(value=this.peek(index),index+=1,char=this.peek(index),\"0\"===value&&((\"x\"===char||\"X\"===char)&&(isAllowedDigit=isHexDigit,base=16,index+=1,value+=char),(\"o\"===char||\"O\"===char)&&(isAllowedDigit=isOctalDigit,base=8,state.inES6(!0)||this.trigger(\"warning\",{code:\"W119\",line:this.line,character:this.char,data:[\"Octal integer literal\",\"6\"]}),index+=1,value+=char),(\"b\"===char||\"B\"===char)&&(isAllowedDigit=isBinaryDigit,base=2,state.inES6(!0)||this.trigger(\"warning\",{code:\"W119\",line:this.line,character:this.char,data:[\"Binary integer literal\",\"6\"]}),index+=1,value+=char),isOctalDigit(char)&&(isAllowedDigit=isOctalDigit,base=8,isLegacy=!0,bad=!1,index+=1,value+=char),!isOctalDigit(char)&&isDecimalDigit(char)&&(index+=1,value+=char));length>index;){if(char=this.peek(index),isLegacy&&isDecimalDigit(char))bad=!0;else if(!isAllowedDigit(char))break;value+=char,index+=1}if(isAllowedDigit!==isDecimalDigit)return!isLegacy&&2>=value.length?{type:Token.NumericLiteral,value:value,isMalformed:!0}:length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isLegacy:isLegacy,isMalformed:!1}}if(\".\"===char)for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1;if(\"e\"===char||\"E\"===char){if(value+=char,index+=1,char=this.peek(index),(\"+\"===char||\"-\"===char)&&(value+=this.peek(index),index+=1),char=this.peek(index),!isDecimalDigit(char))return null;for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1}return length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isMalformed:!isFinite(value)}},scanEscapeSequence:function(checks){var allowNewLine=!1,jump=1;this.skip();var char=this.peek();switch(char){case\"'\":this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\'\"]},checks,function(){return state.jsonMode});break;case\"b\":char=\"\\\\b\";break;case\"f\":char=\"\\\\f\";break;case\"n\":char=\"\\\\n\";break;case\"r\":char=\"\\\\r\";break;case\"t\":char=\"\\\\t\";break;case\"0\":char=\"\\\\0\";var n=parseInt(this.peek(1),10);this.triggerAsync(\"warning\",{code:\"W115\",line:this.line,character:this.char},checks,function(){return n>=0&&7>=n&&state.isStrict()});break;case\"u\":var hexCode=this.input.substr(1,4),code=parseInt(hexCode,16);isNaN(code)&&this.trigger(\"warning\",{code:\"W052\",line:this.line,character:this.char,data:[\"u\"+hexCode]}),char=String.fromCharCode(code),jump=5;break;case\"v\":this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\v\"]},checks,function(){return state.jsonMode}),char=\"\u000b\";break;case\"x\":var x=parseInt(this.input.substr(1,2),16);this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\x-\"]},checks,function(){return state.jsonMode}),char=String.fromCharCode(x),jump=3;break;case\"\\\\\":char=\"\\\\\\\\\";break;case'\"':char='\\\\\"';break;case\"/\":break;case\"\":allowNewLine=!0,char=\"\"}return{\"char\":char,jump:jump,allowNewLine:allowNewLine}},scanTemplateLiteral:function(checks){var tokenType,ch,value=\"\",startLine=this.line,startChar=this.char,depth=this.templateStarts.length;if(!state.inES6(!0))return null;if(\"`\"===this.peek())tokenType=Token.TemplateHead,this.templateStarts.push({line:this.line,\"char\":this.char}),depth=this.templateStarts.length,this.skip(1),this.pushContext(Context.Template);else{if(!this.inContext(Context.Template)||\"}\"!==this.peek())return null;tokenType=Token.TemplateMiddle}for(;\"`\"!==this.peek();){for(;\"\"===(ch=this.peek());)if(value+=\"\\n\",!this.nextLine()){var startPos=this.templateStarts.pop();return this.trigger(\"error\",{code:\"E052\",line:startPos.line,character:startPos.char}),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,depth:depth,context:this.popContext()}}if(\"$\"===ch&&\"{\"===this.peek(1))return value+=\"${\",this.skip(2),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.currentContext()};\nif(\"\\\\\"===ch){var escape=this.scanEscapeSequence(checks);value+=escape.char,this.skip(escape.jump)}else\"`\"!==ch&&(value+=ch,this.skip(1))}return tokenType=tokenType===Token.TemplateHead?Token.NoSubstTemplate:Token.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.popContext()}},scanStringLiteral:function(checks){var quote=this.peek();if('\"'!==quote&&\"'\"!==quote)return null;this.triggerAsync(\"warning\",{code:\"W108\",line:this.line,character:this.char},checks,function(){return state.jsonMode&&'\"'!==quote});var value=\"\",startLine=this.line,startChar=this.char,allowNewLine=!1;for(this.skip();this.peek()!==quote;)if(\"\"===this.peek()){if(allowNewLine?(allowNewLine=!1,this.triggerAsync(\"warning\",{code:\"W043\",line:this.line,character:this.char},checks,function(){return!state.option.multistr}),this.triggerAsync(\"warning\",{code:\"W042\",line:this.line,character:this.char},checks,function(){return state.jsonMode&&state.option.multistr})):this.trigger(\"warning\",{code:\"W112\",line:this.line,character:this.char}),!this.nextLine())return this.trigger(\"error\",{code:\"E029\",line:startLine,character:startChar}),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,quote:quote}}else{allowNewLine=!1;var char=this.peek(),jump=1;if(\" \">char&&this.trigger(\"warning\",{code:\"W113\",line:this.line,character:this.char,data:[\"\"]}),\"\\\\\"===char){var parsed=this.scanEscapeSequence(checks);char=parsed.char,jump=parsed.jump,allowNewLine=parsed.allowNewLine}value+=char,this.skip(jump)}return this.skip(),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,quote:quote}},scanRegExp:function(){var terminated,index=0,length=this.input.length,char=this.peek(),value=char,body=\"\",flags=[],malformed=!1,isCharSet=!1,scanUnexpectedChars=function(){\" \">char&&(malformed=!0,this.trigger(\"warning\",{code:\"W048\",line:this.line,character:this.char})),\"<\"===char&&(malformed=!0,this.trigger(\"warning\",{code:\"W049\",line:this.line,character:this.char,data:[char]}))}.bind(this);if(!this.prereg||\"/\"!==char)return null;for(index+=1,terminated=!1;length>index;)if(char=this.peek(index),value+=char,body+=char,isCharSet)\"]\"===char&&(\"\\\\\"!==this.peek(index-1)||\"\\\\\"===this.peek(index-2))&&(isCharSet=!1),\"\\\\\"===char&&(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars()),index+=1;else{if(\"\\\\\"===char){if(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars(),\"/\"===char){index+=1;continue}if(\"[\"===char){index+=1;continue}}if(\"[\"!==char){if(\"/\"===char){body=body.substr(0,body.length-1),terminated=!0,index+=1;break}index+=1}else isCharSet=!0,index+=1}if(!terminated)return this.trigger(\"error\",{code:\"E015\",line:this.line,character:this.from}),void this.trigger(\"fatal\",{line:this.line,from:this.from});for(;length>index&&(char=this.peek(index),/[gim]/.test(char));)flags.push(char),value+=char,index+=1;try{RegExp(body,flags.join(\"\"))}catch(err){malformed=!0,this.trigger(\"error\",{code:\"E016\",line:this.line,character:this.char,data:[err.message]})}return{type:Token.RegExp,value:value,flags:flags,isMalformed:malformed}},scanNonBreakingSpaces:function(){return state.option.nonbsp?this.input.search(/(\\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(reg.unsafeChars)},next:function(checks){this.from=this.char;var start;if(/\\s/.test(this.peek()))for(start=this.char;/\\s/.test(this.peek());)this.from+=1,this.skip();var match=this.scanComments()||this.scanStringLiteral(checks)||this.scanTemplateLiteral(checks);return match?match:(match=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),match?(this.skip(match.tokenLength||match.value.length),match):null)},nextLine:function(){var char;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var inputTrimmed=this.input.trim(),startsWith=function(){return _.some(arguments,function(prefix){return 0===inputTrimmed.indexOf(prefix)})},endsWith=function(){return _.some(arguments,function(suffix){return-1!==inputTrimmed.indexOf(suffix,inputTrimmed.length-suffix.length)})};if(this.ignoringLinterErrors===!0&&(startsWith(\"/*\",\"//\")||this.inComment&&endsWith(\"*/\")||(this.input=\"\")),char=this.scanNonBreakingSpaces(),char>=0&&this.trigger(\"warning\",{code:\"W125\",line:this.line,character:char+1}),this.input=this.input.replace(/\\t/g,state.tab),char=this.scanUnsafeChars(),char>=0&&this.trigger(\"warning\",{code:\"W100\",line:this.line,character:char}),!this.ignoringLinterErrors&&state.option.maxlen&&state.option.maxlen=0;--i){var scopeLabels=_scopeStack[i][\"(labels)\"];if(scopeLabels[labelName])return scopeLabels}}function usedSoFarInCurrentFunction(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current[\"(usages)\"][labelName])return current[\"(usages)\"][labelName];if(current===_currentFunctBody)break}return!1}function _checkOuterShadow(labelName,token){if(\"outer\"===state.option.shadow)for(var isGlobal=\"global\"===_currentFunctBody[\"(type)\"],isNewFunction=\"functionparams\"===_current[\"(type)\"],outsideCurrentFunction=!isGlobal,i=0;_scopeStack.length>i;i++){var stackItem=_scopeStack[i];isNewFunction||_scopeStack[i+1]!==_currentFunctBody||(outsideCurrentFunction=!1),outsideCurrentFunction&&stackItem[\"(labels)\"][labelName]&&warning(\"W123\",token,labelName),stackItem[\"(breakLabels)\"][labelName]&&warning(\"W123\",token,labelName)}}function _latedefWarning(type,labelName,token){state.option.latedef&&(state.option.latedef===!0&&\"function\"===type||\"function\"!==type)&&warning(\"W003\",token,labelName)}var _current,_scopeStack=[];_newScope(\"global\"),_current[\"(predefined)\"]=predefined;var _currentFunctBody=_current,usedPredefinedAndGlobals=Object.create(null),impliedGlobals=Object.create(null),unuseds=[],emitter=new events.EventEmitter,_getUnusedOption=function(unused_opt){return void 0===unused_opt&&(unused_opt=state.option.unused),unused_opt===!0&&(unused_opt=\"last-param\"),unused_opt},_warnUnused=function(name,tkn,type,unused_opt){var line=tkn.line,chr=tkn.from,raw_name=tkn.raw_text||name;unused_opt=_getUnusedOption(unused_opt);var warnable_types={vars:[\"var\"],\"last-param\":[\"var\",\"param\"],strict:[\"var\",\"param\",\"last-param\"]};unused_opt&&warnable_types[unused_opt]&&-1!==warnable_types[unused_opt].indexOf(type)&&warning(\"W098\",{line:line,from:chr},raw_name),(unused_opt||\"var\"===type)&&unuseds.push({name:name,line:line,character:chr})},scopeManagerInst={on:function(names,listener){names.split(\" \").forEach(function(name){emitter.on(name,listener)})},isPredefined:function(labelName){return!this.has(labelName)&&_.has(_scopeStack[0][\"(predefined)\"],labelName)},stack:function(type){var previousScope=_current;_newScope(type),type||\"functionparams\"!==previousScope[\"(type)\"]||(_current[\"(isFuncBody)\"]=!0,_current[\"(context)\"]=_currentFunctBody,_currentFunctBody=_current)},unstack:function(){var i,j,subScope=_scopeStack.length>1?_scopeStack[_scopeStack.length-2]:null,isUnstackingFunctionBody=_current===_currentFunctBody,isUnstackingFunctionParams=\"functionparams\"===_current[\"(type)\"],isUnstackingFunctionOuter=\"functionouter\"===_current[\"(type)\"],currentUsages=_current[\"(usages)\"],currentLabels=_current[\"(labels)\"],usedLabelNameList=Object.keys(currentUsages);for(currentUsages.__proto__&&-1===usedLabelNameList.indexOf(\"__proto__\")&&usedLabelNameList.push(\"__proto__\"),i=0;usedLabelNameList.length>i;i++){var usedLabelName=usedLabelNameList[i],usage=currentUsages[usedLabelName],usedLabel=currentLabels[usedLabelName];if(usedLabel){var usedLabelType=usedLabel[\"(type)\"];if(usedLabel[\"(useOutsideOfScope)\"]&&!state.option.funcscope){var usedTokens=usage[\"(tokens)\"];if(usedTokens)for(j=0;usedTokens.length>j;j++)usedLabel[\"(function)\"]===usedTokens[j][\"(function)\"]&&error(\"W038\",usedTokens[j],usedLabelName)}if(_current[\"(labels)\"][usedLabelName][\"(unused)\"]=!1,\"const\"===usedLabelType&&usage[\"(modified)\"])for(j=0;usage[\"(modified)\"].length>j;j++)error(\"E013\",usage[\"(modified)\"][j],usedLabelName);if((\"function\"===usedLabelType||\"class\"===usedLabelType)&&usage[\"(reassigned)\"])for(j=0;usage[\"(reassigned)\"].length>j;j++)error(\"W021\",usage[\"(reassigned)\"][j],usedLabelName,usedLabelType)}else if(isUnstackingFunctionOuter&&(state.funct[\"(isCapturing)\"]=!0),subScope)if(subScope[\"(usages)\"][usedLabelName]){var subScopeUsage=subScope[\"(usages)\"][usedLabelName];subScopeUsage[\"(modified)\"]=subScopeUsage[\"(modified)\"].concat(usage[\"(modified)\"]),subScopeUsage[\"(tokens)\"]=subScopeUsage[\"(tokens)\"].concat(usage[\"(tokens)\"]),subScopeUsage[\"(reassigned)\"]=subScopeUsage[\"(reassigned)\"].concat(usage[\"(reassigned)\"]),subScopeUsage[\"(onlyUsedSubFunction)\"]=!1}else subScope[\"(usages)\"][usedLabelName]=usage,isUnstackingFunctionBody&&(subScope[\"(usages)\"][usedLabelName][\"(onlyUsedSubFunction)\"]=!0);else if(\"boolean\"==typeof _current[\"(predefined)\"][usedLabelName]){if(delete declared[usedLabelName],usedPredefinedAndGlobals[usedLabelName]=marker,_current[\"(predefined)\"][usedLabelName]===!1&&usage[\"(reassigned)\"])for(j=0;usage[\"(reassigned)\"].length>j;j++)warning(\"W020\",usage[\"(reassigned)\"][j])}else if(usage[\"(tokens)\"])for(j=0;usage[\"(tokens)\"].length>j;j++){var undefinedToken=usage[\"(tokens)\"][j];undefinedToken.forgiveUndef||(state.option.undef&&!undefinedToken.ignoreUndef&&warning(\"W117\",undefinedToken,usedLabelName),impliedGlobals[usedLabelName]?impliedGlobals[usedLabelName].line.push(undefinedToken.line):impliedGlobals[usedLabelName]={name:usedLabelName,line:[undefinedToken.line]})}}if(subScope||Object.keys(declared).forEach(function(labelNotUsed){_warnUnused(labelNotUsed,declared[labelNotUsed],\"var\")}),subScope&&!isUnstackingFunctionBody&&!isUnstackingFunctionParams&&!isUnstackingFunctionOuter){var labelNames=Object.keys(currentLabels);for(i=0;labelNames.length>i;i++){var defLabelName=labelNames[i];currentLabels[defLabelName][\"(blockscoped)\"]||\"exception\"===currentLabels[defLabelName][\"(type)\"]||this.funct.has(defLabelName,{excludeCurrent:!0})||(subScope[\"(labels)\"][defLabelName]=currentLabels[defLabelName],\"global\"!==_currentFunctBody[\"(type)\"]&&(subScope[\"(labels)\"][defLabelName][\"(useOutsideOfScope)\"]=!0),delete currentLabels[defLabelName])}}_checkForUnused(),_scopeStack.pop(),isUnstackingFunctionBody&&(_currentFunctBody=_scopeStack[_.findLastIndex(_scopeStack,function(scope){return scope[\"(isFuncBody)\"]||\"global\"===scope[\"(type)\"]})]),_current=subScope},addParam:function(labelName,token,type){if(type=type||\"param\",\"exception\"===type){var previouslyDefinedLabelType=this.funct.labeltype(labelName);previouslyDefinedLabelType&&\"exception\"!==previouslyDefinedLabelType&&(state.option.node||warning(\"W002\",state.tokens.next,labelName))}if(_.has(_current[\"(labels)\"],labelName)?_current[\"(labels)\"][labelName].duplicated=!0:(_checkOuterShadow(labelName,token,type),_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":token,\"(unused)\":!0},_current[\"(params)\"].push(labelName)),_.has(_current[\"(usages)\"],labelName)){var usage=_current[\"(usages)\"][labelName];usage[\"(onlyUsedSubFunction)\"]?_latedefWarning(type,labelName,token):warning(\"E056\",token,labelName,type)}},validateParams:function(){if(\"global\"!==_currentFunctBody[\"(type)\"]){var isStrict=state.isStrict(),currentFunctParamScope=_currentFunctBody[\"(parent)\"];currentFunctParamScope[\"(params)\"]&¤tFunctParamScope[\"(params)\"].forEach(function(labelName){var label=currentFunctParamScope[\"(labels)\"][labelName];label&&label.duplicated&&(isStrict?warning(\"E011\",label[\"(token)\"],labelName):state.option.shadow!==!0&&warning(\"W004\",label[\"(token)\"],labelName))})}},getUsedOrDefinedGlobals:function(){var list=Object.keys(usedPredefinedAndGlobals);return usedPredefinedAndGlobals.__proto__===marker&&-1===list.indexOf(\"__proto__\")&&list.push(\"__proto__\"),list},getImpliedGlobals:function(){var values=_.values(impliedGlobals),hasProto=!1;return impliedGlobals.__proto__&&(hasProto=values.some(function(value){return\"__proto__\"===value.name}),hasProto||values.push(impliedGlobals.__proto__)),values},getUnuseds:function(){return unuseds},has:function(labelName){return Boolean(_getLabel(labelName))},labeltype:function(labelName){var scopeLabels=_getLabel(labelName);return scopeLabels?scopeLabels[labelName][\"(type)\"]:null},addExported:function(labelName){var globalLabels=_scopeStack[0][\"(labels)\"];if(_.has(declared,labelName))delete declared[labelName];else if(_.has(globalLabels,labelName))globalLabels[labelName][\"(unused)\"]=!1;else{for(var i=1;_scopeStack.length>i;i++){var scope=_scopeStack[i];if(scope[\"(type)\"])break;if(_.has(scope[\"(labels)\"],labelName)&&!scope[\"(labels)\"][labelName][\"(blockscoped)\"])return scope[\"(labels)\"][labelName][\"(unused)\"]=!1,void 0}exported[labelName]=!0}},setExported:function(labelName,token){this.block.use(labelName,token)\n},addlabel:function(labelName,opts){var type=opts.type,token=opts.token,isblockscoped=\"let\"===type||\"const\"===type||\"class\"===type,isexported=\"global\"===(isblockscoped?_current:_currentFunctBody)[\"(type)\"]&&_.has(exported,labelName);if(_checkOuterShadow(labelName,token,type),isblockscoped){var declaredInCurrentScope=_current[\"(labels)\"][labelName];if(declaredInCurrentScope||_current!==_currentFunctBody||\"global\"===_current[\"(type)\"]||(declaredInCurrentScope=!!_currentFunctBody[\"(parent)\"][\"(labels)\"][labelName]),!declaredInCurrentScope&&_current[\"(usages)\"][labelName]){var usage=_current[\"(usages)\"][labelName];usage[\"(onlyUsedSubFunction)\"]?_latedefWarning(type,labelName,token):warning(\"E056\",token,labelName,type)}declaredInCurrentScope?warning(\"E011\",token,labelName):\"outer\"===state.option.shadow&&scopeManagerInst.funct.has(labelName)&&warning(\"W004\",token,labelName),scopeManagerInst.block.add(labelName,type,token,!isexported)}else{var declaredInCurrentFunctionScope=scopeManagerInst.funct.has(labelName);!declaredInCurrentFunctionScope&&usedSoFarInCurrentFunction(labelName)&&_latedefWarning(type,labelName,token),scopeManagerInst.funct.has(labelName,{onlyBlockscoped:!0})?warning(\"E011\",token,labelName):state.option.shadow!==!0&&declaredInCurrentFunctionScope&&\"__proto__\"!==labelName&&\"global\"!==_currentFunctBody[\"(type)\"]&&warning(\"W004\",token,labelName),scopeManagerInst.funct.add(labelName,type,token,!isexported),\"global\"===_currentFunctBody[\"(type)\"]&&(usedPredefinedAndGlobals[labelName]=marker)}},funct:{labeltype:function(labelName,options){for(var onlyBlockscoped=options&&options.onlyBlockscoped,excludeParams=options&&options.excludeParams,currentScopeIndex=_scopeStack.length-(options&&options.excludeCurrent?2:1),i=currentScopeIndex;i>=0;i--){var current=_scopeStack[i];if(current[\"(labels)\"][labelName]&&(!onlyBlockscoped||current[\"(labels)\"][labelName][\"(blockscoped)\"]))return current[\"(labels)\"][labelName][\"(type)\"];var scopeCheck=excludeParams?_scopeStack[i-1]:current;if(scopeCheck&&\"functionparams\"===scopeCheck[\"(type)\"])return null}return null},hasBreakLabel:function(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current[\"(breakLabels)\"][labelName])return!0;if(\"functionparams\"===current[\"(type)\"])return!1}return!1},has:function(labelName,options){return Boolean(this.labeltype(labelName,options))},add:function(labelName,type,tok,unused){_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":tok,\"(blockscoped)\":!1,\"(function)\":_currentFunctBody,\"(unused)\":unused}}},block:{isGlobal:function(){return\"global\"===_current[\"(type)\"]},use:function(labelName,token){var paramScope=_currentFunctBody[\"(parent)\"];paramScope&¶mScope[\"(labels)\"][labelName]&&\"param\"===paramScope[\"(labels)\"][labelName][\"(type)\"]&&(scopeManagerInst.funct.has(labelName,{excludeParams:!0,onlyBlockscoped:!0})||(paramScope[\"(labels)\"][labelName][\"(unused)\"]=!1)),token&&(state.ignored.W117||state.option.undef===!1)&&(token.ignoreUndef=!0),_setupUsages(labelName),token&&(token[\"(function)\"]=_currentFunctBody,_current[\"(usages)\"][labelName][\"(tokens)\"].push(token))},reassign:function(labelName,token){this.modify(labelName,token),_current[\"(usages)\"][labelName][\"(reassigned)\"].push(token)},modify:function(labelName,token){_setupUsages(labelName),_current[\"(usages)\"][labelName][\"(modified)\"].push(token)},add:function(labelName,type,tok,unused){_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":tok,\"(blockscoped)\":!0,\"(unused)\":unused}},addBreakLabel:function(labelName,opts){var token=opts.token;scopeManagerInst.funct.hasBreakLabel(labelName)?warning(\"E011\",token,labelName):\"outer\"===state.option.shadow&&(scopeManagerInst.funct.has(labelName)?warning(\"W004\",token,labelName):_checkOuterShadow(labelName,token)),_current[\"(breakLabels)\"][labelName]=token}}};return scopeManagerInst};module.exports=scopeManager},{\"../lodash\":\"/node_modules/jshint/lodash.js\",events:\"/node_modules/browserify/node_modules/events/events.js\"}],\"/node_modules/jshint/src/state.js\":[function(_dereq_,module,exports){\"use strict\";var NameStack=_dereq_(\"./name-stack.js\"),state={syntax:{},isStrict:function(){return this.directive[\"use strict\"]||this.inClassBody||this.option.module||\"implied\"===this.option.strict},inMoz:function(){return this.option.moz},inES6:function(){return this.option.moz||this.option.esversion>=6},inES5:function(strict){return strict?!(this.option.esversion&&5!==this.option.esversion||this.option.moz):!this.option.esversion||this.option.esversion>=5||this.option.moz},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab=\"\",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new NameStack,this.inClassBody=!1}};exports.state=state},{\"./name-stack.js\":\"/node_modules/jshint/src/name-stack.js\"}],\"/node_modules/jshint/src/style.js\":[function(_dereq_,module,exports){\"use strict\";exports.register=function(linter){linter.on(\"Identifier\",function(data){linter.getOption(\"proto\")||\"__proto__\"===data.name&&linter.warn(\"W103\",{line:data.line,\"char\":data.char,data:[data.name,\"6\"]})}),linter.on(\"Identifier\",function(data){linter.getOption(\"iterator\")||\"__iterator__\"===data.name&&linter.warn(\"W103\",{line:data.line,\"char\":data.char,data:[data.name]})}),linter.on(\"Identifier\",function(data){linter.getOption(\"camelcase\")&&data.name.replace(/^_+|_+$/g,\"\").indexOf(\"_\")>-1&&!data.name.match(/^[A-Z0-9_]*$/)&&linter.warn(\"W106\",{line:data.line,\"char\":data.from,data:[data.name]})}),linter.on(\"String\",function(data){var code,quotmark=linter.getOption(\"quotmark\");quotmark&&(\"single\"===quotmark&&\"'\"!==data.quote&&(code=\"W109\"),\"double\"===quotmark&&'\"'!==data.quote&&(code=\"W108\"),quotmark===!0&&(linter.getCache(\"quotmark\")||linter.setCache(\"quotmark\",data.quote),linter.getCache(\"quotmark\")!==data.quote&&(code=\"W110\")),code&&linter.warn(code,{line:data.line,\"char\":data.char}))}),linter.on(\"Number\",function(data){\".\"===data.value.charAt(0)&&linter.warn(\"W008\",{line:data.line,\"char\":data.char,data:[data.value]}),\".\"===data.value.substr(data.value.length-1)&&linter.warn(\"W047\",{line:data.line,\"char\":data.char,data:[data.value]}),/^00+/.test(data.value)&&linter.warn(\"W046\",{line:data.line,\"char\":data.char,data:[data.value]})}),linter.on(\"String\",function(data){var re=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;linter.getOption(\"scripturl\")||re.test(data.value)&&linter.warn(\"W107\",{line:data.line,\"char\":data.char})})}},{}],\"/node_modules/jshint/src/vars.js\":[function(_dereq_,module,exports){\"use strict\";exports.reservedVars={arguments:!1,NaN:!1},exports.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,WeakMap:!1,WeakSet:!1}},exports.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},exports.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},exports.worker={importScripts:!0,postMessage:!0,self:!0,FileReaderSync:!0},exports.nonstandard={escape:!1,unescape:!1},exports.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},exports.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,acequire:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},exports.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,acequire:!1,Buffer:!0,exports:!0,process:!0},exports.phantom={phantom:!0,acequire:!0,WebPage:!0,console:!0,exports:!0},exports.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,\"throws\":!1},exports.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},exports.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},exports.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},exports.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},exports.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},exports.jquery={$:!1,jQuery:!1},exports.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},exports.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},exports.yui={YUI:!1,Y:!1,YUI_config:!1},exports.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},exports.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}]},{},[\"/node_modules/jshint/src/jshint.js\"])}),ace.define(\"ace/mode/javascript_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/javascript/jshint\"],function(acequire,exports,module){\"use strict\";function startRegex(arr){return RegExp(\"^(\"+arr.join(\"|\")+\")\")}var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,lint=acequire(\"./javascript/jshint\").JSHINT,disabledWarningsRe=startRegex([\"Bad for in variable '(.+)'.\",'Missing \"use strict\"']),errorsRe=startRegex([\"Unexpected\",\"Expected \",\"Confusing (plus|minus)\",\"\\\\{a\\\\} unterminated regular expression\",\"Unclosed \",\"Unmatched \",\"Unbegun comment\",\"Bad invocation\",\"Missing space after\",\"Missing operator at\"]),infoRe=startRegex([\"Expected an assignment\",\"Bad escapement of EOL\",\"Unexpected comma\",\"Unexpected space\",\"Missing radix parameter.\",\"A leading decimal point can\",\"\\\\['{a}'\\\\] is better written in dot notation.\",\"'{a}' used out of scope\"]),JavaScriptWorker=exports.JavaScriptWorker=function(sender){Mirror.call(this,sender),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(options){this.options=options||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(newOptions){oop.mixin(this.options,newOptions),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval(\"throw 0;\"+str)}catch(e){if(0===e)return!0}return!1},this.onUpdate=function(){var value=this.doc.getValue();if(value=value.replace(/^#!.*\\n/,\"\\n\"),!value)return this.sender.emit(\"annotate\",[]);var errors=[],maxErrorLevel=this.isValidJS(value)?\"warning\":\"error\";lint(value,this.options,this.options.globals);for(var results=lint.errors,errorAdded=!1,i=0;results.length>i;i++){var error=results[i];if(error){var raw=error.raw,type=\"warning\";if(\"Missing semicolon.\"==raw){var str=error.evidence.substr(error.character);str=str.charAt(str.search(/\\S/)),\"error\"==maxErrorLevel&&str&&/[\\w\\d{(['\"]/.test(str)?(error.reason='Missing \";\" before statement',type=\"error\"):type=\"info\"}else{if(disabledWarningsRe.test(raw))continue;infoRe.test(raw)?type=\"info\":errorsRe.test(raw)?(errorAdded=!0,type=maxErrorLevel):\"'{a}' is not defined.\"==raw?type=\"warning\":\"'{a}' is defined but never used.\"==raw&&(type=\"info\")}errors.push({row:error.line-1,column:error.character-1,text:error.reason,type:type,raw:raw})}}this.sender.emit(\"annotate\",errors)}}.call(JavaScriptWorker.prototype)}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r   ᠎              \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}});"; /***/ }), -/* 166 */ +/* 167 */ /*!*********************************************************!*\ !*** ./node_modules/js-beautify/js/lib/beautify-css.js ***! \*********************************************************/ @@ -28080,7 +28081,7 @@ if (true) { /***/ }), -/* 167 */ +/* 168 */ /*!*****************************************************!*\ !*** ./node_modules/js-beautify/js/lib/beautify.js ***! \*****************************************************/ @@ -30909,7 +30910,7 @@ if (true) { /***/ }), -/* 168 */ +/* 169 */ /*!***************************************!*\ !*** (webpack)/buildin/amd-define.js ***! \***************************************/ @@ -30923,8 +30924,8 @@ module.exports = function() { /***/ }), -/* 169 */, -/* 170 */ +/* 170 */, +/* 171 */ /*!*******************************************!*\ !*** ./node_modules/check-error/index.js ***! \*******************************************/ @@ -31108,7 +31109,7 @@ module.exports = { /***/ }), -/* 171 */ +/* 172 */ /*!*****************************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js ***! \*****************************************************************************/ @@ -31146,7 +31147,7 @@ module.exports = function getOwnEnumerablePropertySymbols(obj) { /***/ }), -/* 172 */ +/* 173 */ /*!********************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/objDisplay.js ***! \********************************************************/ @@ -31164,7 +31165,7 @@ module.exports = function getOwnEnumerablePropertySymbols(obj) { * Module dependancies */ -var inspect = __webpack_require__(/*! ./inspect */ 119); +var inspect = __webpack_require__(/*! ./inspect */ 120); var config = __webpack_require__(/*! ../config */ 90); /** @@ -31207,7 +31208,7 @@ module.exports = function objDisplay(obj) { /***/ }), -/* 173 */ +/* 174 */ /*!***********************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getProperties.js ***! \***********************************************************/ @@ -31254,7 +31255,7 @@ module.exports = function getProperties(object) { /***/ }), -/* 174 */ +/* 175 */ /*!*********************************************!*\ !*** ./node_modules/get-func-name/index.js ***! \*********************************************/ @@ -31310,7 +31311,7 @@ module.exports = getFuncName; /***/ }), -/* 175 */ +/* 176 */ /*!*******************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getActual.js ***! \*******************************************************/ @@ -31341,7 +31342,7 @@ module.exports = function getActual(obj, args) { /***/ }), -/* 176 */ +/* 177 */ /*!***********************************************!*\ !*** ./node_modules/assertion-error/index.js ***! \***********************************************/ @@ -31468,7 +31469,7 @@ AssertionError.prototype.toJSON = function (stack) { /***/ }), -/* 177 */ +/* 178 */ /*!**************************************************!*\ !*** ./node_modules/normalize.css/normalize.css ***! \**************************************************/ @@ -31478,7 +31479,7 @@ AssertionError.prototype.toJSON = function (stack) { // extracted by mini-css-extract-plugin /***/ }), -/* 178 */ +/* 179 */ /*!*************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/array-set.js ***! \*************************************************************************/ @@ -31493,7 +31494,7 @@ AssertionError.prototype.toJSON = function (stack) { * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(/*! ./util */ 100); +var util = __webpack_require__(/*! ./util */ 101); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -31610,7 +31611,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 179 */ +/* 180 */ /*!**************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/base64-vlq.js ***! \**************************************************************************/ @@ -31655,7 +31656,7 @@ exports.ArraySet = ArraySet; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(/*! ./base64 */ 275); +var base64 = __webpack_require__(/*! ./base64 */ 276); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -31761,7 +31762,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 180 */ +/* 181 */ /*!************************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/source-map-generator.js ***! \************************************************************************************/ @@ -31776,10 +31777,10 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(/*! ./base64-vlq */ 179); -var util = __webpack_require__(/*! ./util */ 100); -var ArraySet = __webpack_require__(/*! ./array-set */ 178).ArraySet; -var MappingList = __webpack_require__(/*! ./mapping-list */ 274).MappingList; +var base64VLQ = __webpack_require__(/*! ./base64-vlq */ 180); +var util = __webpack_require__(/*! ./util */ 101); +var ArraySet = __webpack_require__(/*! ./array-set */ 179).ArraySet; +var MappingList = __webpack_require__(/*! ./mapping-list */ 275).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -32197,7 +32198,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 181 */ +/* 182 */ /*!******************************************!*\ !*** ./node_modules/esutils/lib/code.js ***! \******************************************/ @@ -32343,7 +32344,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 182 */ +/* 183 */ /*!***********************************************************!*\ !*** ./node_modules/jszip/lib/reader/Uint8ArrayReader.js ***! \***********************************************************/ @@ -32353,8 +32354,8 @@ exports.SourceMapGenerator = SourceMapGenerator; "use strict"; -var ArrayReader = __webpack_require__(/*! ./ArrayReader */ 184); -var utils = __webpack_require__(/*! ../utils */ 61); +var ArrayReader = __webpack_require__(/*! ./ArrayReader */ 185); +var utils = __webpack_require__(/*! ../utils */ 60); function Uint8ArrayReader(data) { ArrayReader.call(this, data); @@ -32377,7 +32378,7 @@ module.exports = Uint8ArrayReader; /***/ }), -/* 183 */ +/* 184 */ /*!*****************************************************!*\ !*** ./node_modules/jszip/lib/reader/DataReader.js ***! \*****************************************************/ @@ -32387,7 +32388,7 @@ module.exports = Uint8ArrayReader; "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); function DataReader(data) { this.data = data; // type : see implementation @@ -32505,7 +32506,7 @@ module.exports = DataReader; /***/ }), -/* 184 */ +/* 185 */ /*!******************************************************!*\ !*** ./node_modules/jszip/lib/reader/ArrayReader.js ***! \******************************************************/ @@ -32515,8 +32516,8 @@ module.exports = DataReader; "use strict"; -var DataReader = __webpack_require__(/*! ./DataReader */ 183); -var utils = __webpack_require__(/*! ../utils */ 61); +var DataReader = __webpack_require__(/*! ./DataReader */ 184); +var utils = __webpack_require__(/*! ../utils */ 60); function ArrayReader(data) { DataReader.call(this, data); @@ -32574,7 +32575,7 @@ module.exports = ArrayReader; /***/ }), -/* 185 */ +/* 186 */ /*!****************************************************!*\ !*** ./node_modules/jszip/lib/reader/readerFor.js ***! \****************************************************/ @@ -32585,12 +32586,12 @@ module.exports = ArrayReader; "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); var support = __webpack_require__(/*! ../support */ 87); -var ArrayReader = __webpack_require__(/*! ./ArrayReader */ 184); -var StringReader = __webpack_require__(/*! ./StringReader */ 285); -var NodeBufferReader = __webpack_require__(/*! ./NodeBufferReader */ 284); -var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ 182); +var ArrayReader = __webpack_require__(/*! ./ArrayReader */ 185); +var StringReader = __webpack_require__(/*! ./StringReader */ 286); +var NodeBufferReader = __webpack_require__(/*! ./NodeBufferReader */ 285); +var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ 183); /** * Create a reader adapted to the data. @@ -32614,7 +32615,7 @@ module.exports = function (data) { /***/ }), -/* 186 */ +/* 187 */ /*!*********************************************!*\ !*** ./node_modules/jszip/lib/signature.js ***! \*********************************************/ @@ -32633,7 +32634,7 @@ exports.DATA_DESCRIPTOR = "PK\x07\x08"; /***/ }), -/* 187 */ +/* 188 */ /*!*************************************************!*\ !*** ./node_modules/pako/lib/zlib/constants.js ***! \*************************************************/ @@ -32713,7 +32714,7 @@ module.exports = { /***/ }), -/* 188 */ +/* 189 */ /*!***********************************************!*\ !*** ./node_modules/pako/lib/zlib/zstream.js ***! \***********************************************/ @@ -32772,7 +32773,7 @@ module.exports = ZStream; /***/ }), -/* 189 */ +/* 190 */ /*!************************************************!*\ !*** ./node_modules/pako/lib/utils/strings.js ***! \************************************************/ @@ -32969,7 +32970,7 @@ exports.utf8border = function (buf, max) { /***/ }), -/* 190 */ +/* 191 */ /*!*********************************************!*\ !*** ./node_modules/pako/lib/zlib/crc32.js ***! \*********************************************/ @@ -33040,7 +33041,7 @@ module.exports = crc32; /***/ }), -/* 191 */ +/* 192 */ /*!***********************************************!*\ !*** ./node_modules/pako/lib/zlib/adler32.js ***! \***********************************************/ @@ -33103,7 +33104,7 @@ module.exports = adler32; /***/ }), -/* 192 */ +/* 193 */ /*!************************************************!*\ !*** ./node_modules/jszip/lib/compressions.js ***! \************************************************/ @@ -33125,11 +33126,11 @@ exports.STORE = { return new GenericWorker("STORE decompression"); } }; -exports.DEFLATE = __webpack_require__(/*! ./flate */ 299); +exports.DEFLATE = __webpack_require__(/*! ./flate */ 300); /***/ }), -/* 193 */ +/* 194 */ /*!*****************************************************!*\ !*** ./node_modules/jszip/lib/stream/Crc32Probe.js ***! \*****************************************************/ @@ -33141,8 +33142,8 @@ exports.DEFLATE = __webpack_require__(/*! ./flate */ 299); var GenericWorker = __webpack_require__(/*! ./GenericWorker */ 77); -var crc32 = __webpack_require__(/*! ../crc32 */ 157); -var utils = __webpack_require__(/*! ../utils */ 61); +var crc32 = __webpack_require__(/*! ../crc32 */ 158); +var utils = __webpack_require__(/*! ../utils */ 60); /** * A worker which calculate the crc32 of the data flowing through. @@ -33165,7 +33166,7 @@ module.exports = Crc32Probe; /***/ }), -/* 194 */ +/* 195 */ /*!**********************************************************!*\ !*** ./node_modules/jszip/lib/stream/DataLengthProbe.js ***! \**********************************************************/ @@ -33176,7 +33177,7 @@ module.exports = Crc32Probe; "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); var GenericWorker = __webpack_require__(/*! ./GenericWorker */ 77); /** @@ -33206,7 +33207,7 @@ module.exports = DataLengthProbe; /***/ }), -/* 195 */ +/* 196 */ /*!*****************************************************!*\ !*** ./node_modules/jszip/lib/stream/DataWorker.js ***! \*****************************************************/ @@ -33217,7 +33218,7 @@ module.exports = DataLengthProbe; "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); var GenericWorker = __webpack_require__(/*! ./GenericWorker */ 77); // the size of the generated chunks @@ -33334,7 +33335,7 @@ module.exports = DataWorker; /***/ }), -/* 196 */ +/* 197 */ /*!********************************************!*\ !*** ./node_modules/jszip/lib/defaults.js ***! \********************************************/ @@ -33357,7 +33358,7 @@ exports.dosPermissions = null; /***/ }), -/* 197 */ +/* 198 */ /*!*******************************************************!*\ !*** ./node_modules/jszip/lib/stream/StreamHelper.js ***! \*******************************************************/ @@ -33368,17 +33369,17 @@ exports.dosPermissions = null; "use strict"; /* WEBPACK VAR INJECTION */(function(Buffer) { -var utils = __webpack_require__(/*! ../utils */ 61); -var ConvertWorker = __webpack_require__(/*! ./ConvertWorker */ 303); +var utils = __webpack_require__(/*! ../utils */ 60); +var ConvertWorker = __webpack_require__(/*! ./ConvertWorker */ 304); var GenericWorker = __webpack_require__(/*! ./GenericWorker */ 77); -var base64 = __webpack_require__(/*! ../base64 */ 202); +var base64 = __webpack_require__(/*! ../base64 */ 203); var support = __webpack_require__(/*! ../support */ 87); -var external = __webpack_require__(/*! ../external */ 101); +var external = __webpack_require__(/*! ../external */ 102); var NodejsStreamOutputAdapter = null; if (support.nodestream) { try { - NodejsStreamOutputAdapter = __webpack_require__(/*! ../nodejs/NodejsStreamOutputAdapter */ 302); + NodejsStreamOutputAdapter = __webpack_require__(/*! ../nodejs/NodejsStreamOutputAdapter */ 303); } catch(e) {} } @@ -33579,10 +33580,10 @@ StreamHelper.prototype = { module.exports = StreamHelper; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ 103).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ 104).Buffer)) /***/ }), -/* 198 */ +/* 199 */ /*!********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js ***! \********************************************************************************/ @@ -33590,8 +33591,8 @@ module.exports = StreamHelper; /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./_is-object */ 160) - , document = __webpack_require__(/*! ./_global */ 120).document +var isObject = __webpack_require__(/*! ./_is-object */ 161) + , document = __webpack_require__(/*! ./_global */ 121).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ @@ -33599,7 +33600,7 @@ module.exports = function(it){ }; /***/ }), -/* 199 */ +/* 200 */ /*!***************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_fails.js ***! \***************************************************************************/ @@ -33616,7 +33617,7 @@ module.exports = function(exec){ }; /***/ }), -/* 200 */ +/* 201 */ /*!*************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js ***! \*************************************************************************/ @@ -33625,7 +33626,7 @@ module.exports = function(exec){ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(/*! ./_a-function */ 316); +var aFunction = __webpack_require__(/*! ./_a-function */ 317); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; @@ -33646,7 +33647,7 @@ module.exports = function(fn, that, length){ }; /***/ }), -/* 201 */ +/* 202 */ /*!**************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_core.js ***! \**************************************************************************/ @@ -33658,7 +33659,7 @@ var core = module.exports = {version: '2.3.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }), -/* 202 */ +/* 203 */ /*!******************************************!*\ !*** ./node_modules/jszip/lib/base64.js ***! \******************************************/ @@ -33668,7 +33669,7 @@ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef "use strict"; -var utils = __webpack_require__(/*! ./utils */ 61); +var utils = __webpack_require__(/*! ./utils */ 60); var support = __webpack_require__(/*! ./support */ 87); // private property var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; @@ -33776,7 +33777,7 @@ exports.decode = function(input) { /***/ }), -/* 203 */ +/* 204 */ /*!***************************************************************!*\ !*** ./node_modules/readable-stream/lib/_stream_transform.js ***! \***************************************************************/ @@ -33855,8 +33856,8 @@ module.exports = Transform; var Duplex = __webpack_require__(/*! ./_stream_duplex */ 92); /**/ -var util = __webpack_require__(/*! core-util-is */ 102); -util.inherits = __webpack_require__(/*! inherits */ 98); +var util = __webpack_require__(/*! core-util-is */ 103); +util.inherits = __webpack_require__(/*! inherits */ 99); /**/ util.inherits(Transform, Duplex); @@ -34001,7 +34002,7 @@ function done(stream, er, data) { } /***/ }), -/* 204 */ +/* 205 */ /*!***********************************************************!*\ !*** ./node_modules/string_decoder/lib/string_decoder.js ***! \***********************************************************/ @@ -34012,7 +34013,7 @@ function done(stream, er, data) { "use strict"; -var Buffer = __webpack_require__(/*! safe-buffer */ 122).Buffer; +var Buffer = __webpack_require__(/*! safe-buffer */ 123).Buffer; var isEncoding = Buffer.isEncoding || function (encoding) { encoding = '' + encoding; @@ -34284,7 +34285,7 @@ function simpleEnd(buf) { } /***/ }), -/* 205 */ +/* 206 */ /*!**********************************************************************!*\ !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***! \**********************************************************************/ @@ -34297,7 +34298,7 @@ function simpleEnd(buf) { /**/ -var processNextTick = __webpack_require__(/*! process-nextick-args */ 123).nextTick; +var processNextTick = __webpack_require__(/*! process-nextick-args */ 124).nextTick; /**/ // undocumented cb() API, needed for core, not for public API @@ -34369,9 +34370,9 @@ module.exports = { }; /***/ }), -/* 206 */, /* 207 */, -/* 208 */ +/* 208 */, +/* 209 */ /*!*****************************************************************************!*\ !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***! \*****************************************************************************/ @@ -34379,11 +34380,11 @@ module.exports = { /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(/*! events */ 163).EventEmitter; +module.exports = __webpack_require__(/*! events */ 164).EventEmitter; /***/ }), -/* 209 */ +/* 210 */ /*!**************************************************************!*\ !*** ./node_modules/readable-stream/lib/_stream_readable.js ***! \**************************************************************/ @@ -34417,13 +34418,13 @@ module.exports = __webpack_require__(/*! events */ 163).EventEmitter; /**/ -var processNextTick = __webpack_require__(/*! process-nextick-args */ 123).nextTick; +var processNextTick = __webpack_require__(/*! process-nextick-args */ 124).nextTick; /**/ module.exports = Readable; /**/ -var isArray = __webpack_require__(/*! isarray */ 211); +var isArray = __webpack_require__(/*! isarray */ 212); /**/ /**/ @@ -34433,7 +34434,7 @@ var Duplex; Readable.ReadableState = ReadableState; /**/ -var EE = __webpack_require__(/*! events */ 163).EventEmitter; +var EE = __webpack_require__(/*! events */ 164).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; @@ -34441,12 +34442,12 @@ var EElistenerCount = function (emitter, type) { /**/ /**/ -var Stream = __webpack_require__(/*! ./internal/streams/stream */ 208); +var Stream = __webpack_require__(/*! ./internal/streams/stream */ 209); /**/ /**/ -var Buffer = __webpack_require__(/*! safe-buffer */ 122).Buffer; +var Buffer = __webpack_require__(/*! safe-buffer */ 123).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -34458,12 +34459,12 @@ function _isUint8Array(obj) { /**/ /**/ -var util = __webpack_require__(/*! core-util-is */ 102); -util.inherits = __webpack_require__(/*! inherits */ 98); +var util = __webpack_require__(/*! core-util-is */ 103); +util.inherits = __webpack_require__(/*! inherits */ 99); /**/ /**/ -var debugUtil = __webpack_require__(/*! util */ 207); +var debugUtil = __webpack_require__(/*! util */ 208); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); @@ -34472,8 +34473,8 @@ if (debugUtil && debugUtil.debuglog) { } /**/ -var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ 326); -var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 205); +var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ 327); +var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 206); var StringDecoder; util.inherits(Readable, Stream); @@ -34563,7 +34564,7 @@ function ReadableState(options, stream) { this.decoder = null; this.encoding = null; if (options.encoding) { - if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 204).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 205).StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } @@ -34719,7 +34720,7 @@ Readable.prototype.isPaused = function () { // backwards compatibility. Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 204).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 205).StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; return this; @@ -35407,10 +35408,10 @@ function indexOf(xs, x) { } return -1; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../../process/browser.js */ 104))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../../process/browser.js */ 105))) /***/ }), -/* 210 */ +/* 211 */ /*!***********************************************************!*\ !*** ./node_modules/jszip/lib/readable-stream-browser.js ***! \***********************************************************/ @@ -35426,11 +35427,11 @@ function indexOf(xs, x) { * reduce the final size of the bundle (only one stream implementation, not * two). */ -module.exports = __webpack_require__(/*! stream */ 327); +module.exports = __webpack_require__(/*! stream */ 328); /***/ }), -/* 211 */ +/* 212 */ /*!***************************************!*\ !*** ./node_modules/isarray/index.js ***! \***************************************/ @@ -35446,7 +35447,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 212 */ +/* 213 */ /*!************************************************!*\ !*** ./node_modules/timers-browserify/main.js ***! \************************************************/ @@ -35507,7 +35508,7 @@ exports._unrefActive = exports.active = function(item) { }; // setimmediate attaches itself to the global object -__webpack_require__(/*! setimmediate */ 331); +__webpack_require__(/*! setimmediate */ 332); // On some exotic environments, it's not clear which object `setimmediate` was // able to install onto. Search each possibility in the same order as the // `setimmediate` library. @@ -35521,7 +35522,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82))) /***/ }), -/* 213 */ +/* 214 */ /*!******************************************************!*\ !*** ./node_modules/bluebird/js/browser/bluebird.js ***! \******************************************************/ @@ -40831,10 +40832,10 @@ module.exports = ret; },{"./es5":13}]},{},[4])(4) }); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ 104), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../../../timers-browserify/main.js */ 212).setImmediate)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ 105), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../../../timers-browserify/main.js */ 213).setImmediate)) /***/ }), -/* 214 */ +/* 215 */ /*!**************************************************!*\ !*** ./node_modules/brace/ext/language_tools.js ***! \**************************************************/ @@ -42800,7 +42801,7 @@ acequire("../config").defineOptions(Editor.prototype, "editor", { /***/ }), -/* 215 */ +/* 216 */ /*!************************************************!*\ !*** ./node_modules/brace/keybinding/emacs.js ***! \************************************************/ @@ -43992,7 +43993,7 @@ exports.killRing = { /***/ }), -/* 216 */ +/* 217 */ /*!**********************************************!*\ !*** ./node_modules/brace/keybinding/vim.js ***! \**********************************************/ @@ -49601,7 +49602,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ /***/ }), -/* 217 */ +/* 218 */ /*!*******************************************!*\ !*** ./node_modules/brace/theme/xcode.js ***! \*******************************************/ @@ -49700,7 +49701,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 218 */ +/* 219 */ /*!**********************************************!*\ !*** ./node_modules/brace/theme/twilight.js ***! \**********************************************/ @@ -49820,7 +49821,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 219 */ +/* 220 */ /*!**********************************************!*\ !*** ./node_modules/brace/theme/terminal.js ***! \**********************************************/ @@ -49945,7 +49946,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 220 */ +/* 221 */ /*!*****************************************************!*\ !*** ./node_modules/brace/theme/solarized_light.js ***! \*****************************************************/ @@ -50047,7 +50048,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 221 */ +/* 222 */ /*!****************************************************!*\ !*** ./node_modules/brace/theme/solarized_dark.js ***! \****************************************************/ @@ -50146,7 +50147,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 222 */ +/* 223 */ /*!*********************************************!*\ !*** ./node_modules/brace/theme/monokai.js ***! \*********************************************/ @@ -50262,7 +50263,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 223 */ +/* 224 */ /*!********************************************!*\ !*** ./node_modules/brace/theme/chrome.js ***! \********************************************/ @@ -50401,7 +50402,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 224 */ +/* 225 */ /*!*******************************************!*\ !*** ./node_modules/brace/theme/chaos.js ***! \*******************************************/ @@ -50568,7 +50569,7 @@ dom.importCssString(exports.cssText, exports.cssClass); /***/ }), -/* 225 */ +/* 226 */ /*!***********************************************!*\ !*** ./node_modules/brace/mode/javascript.js ***! \***********************************************/ @@ -51346,7 +51347,7 @@ oop.inherits(Mode, TextMode); }; this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], __webpack_require__(/*! ../worker/javascript */ 165), "JavaScriptWorker"); + var worker = new WorkerClient(["ace"], __webpack_require__(/*! ../worker/javascript */ 166), "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { @@ -51368,7 +51369,7 @@ exports.Mode = Mode; /***/ }), -/* 226 */ +/* 227 */ /*!**********************************************!*\ !*** ./node_modules/js-beautify/js/index.js ***! \**********************************************/ @@ -51441,9 +51442,9 @@ function get_beautify(js_beautify, css_beautify, html_beautify) { if (true) { // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ./lib/beautify */ 167), - __webpack_require__(/*! ./lib/beautify-css */ 166), - __webpack_require__(/*! ./lib/beautify-html */ 332) + __webpack_require__(/*! ./lib/beautify */ 168), + __webpack_require__(/*! ./lib/beautify-css */ 167), + __webpack_require__(/*! ./lib/beautify-html */ 333) ], __WEBPACK_AMD_DEFINE_RESULT__ = (function(js_beautify, css_beautify, html_beautify) { return get_beautify(js_beautify, css_beautify, html_beautify); }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), @@ -51451,7 +51452,7 @@ if (true) { } else {} /***/ }), -/* 227 */ +/* 228 */ /*!*************************************!*\ !*** ./node_modules/brace/index.js ***! \*************************************/ @@ -55639,7 +55640,7 @@ init(true);function init(packaged) { if (!global || !global.document) return; - options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(/*! !webpack amd define */ 168).packaged); + options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(/*! !webpack amd define */ 169).packaged); var scriptOptions = {}; var scriptUrl = ""; @@ -71666,7 +71667,7 @@ exports.config = acequire("./config"); exports.acequire = acequire; if (true) - exports.define = __webpack_require__(/*! !webpack amd define */ 168); + exports.define = __webpack_require__(/*! !webpack amd define */ 169); exports.edit = function(el) { if (typeof el == "string") { var _id = el; @@ -71733,7 +71734,7 @@ exports.version = "1.2.9"; module.exports = window.ace.acequire("ace/ace"); /***/ }), -/* 228 */ +/* 229 */ /*!*************************************************!*\ !*** ./node_modules/jsplumb/dist/js/jsplumb.js ***! \*************************************************/ @@ -86430,7 +86431,7 @@ module.exports = window.ace.acequire("ace/ace"); /***/ }), -/* 229 */ +/* 230 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/ru.js ***! \********************************************/ @@ -86443,7 +86444,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86474,7 +86475,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 230 */ +/* 231 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/pl.js ***! \********************************************/ @@ -86487,7 +86488,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86515,7 +86516,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 231 */ +/* 232 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/no.js ***! \********************************************/ @@ -86528,7 +86529,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86556,7 +86557,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 232 */ +/* 233 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/lv.js ***! \********************************************/ @@ -86569,7 +86570,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86597,7 +86598,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 233 */ +/* 234 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/it.js ***! \********************************************/ @@ -86610,7 +86611,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86638,7 +86639,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 234 */ +/* 235 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/hu.js ***! \********************************************/ @@ -86651,7 +86652,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86679,7 +86680,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 235 */ +/* 236 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/fr.js ***! \********************************************/ @@ -86692,7 +86693,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86720,7 +86721,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 236 */ +/* 237 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/es.js ***! \********************************************/ @@ -86733,7 +86734,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86766,7 +86767,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 237 */ +/* 238 */ /*!***********************************************!*\ !*** ./node_modules/numeral/locales/en-gb.js ***! \***********************************************/ @@ -86779,7 +86780,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86811,7 +86812,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 238 */ +/* 239 */ /*!***********************************************!*\ !*** ./node_modules/numeral/locales/en-au.js ***! \***********************************************/ @@ -86824,7 +86825,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86856,7 +86857,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 239 */ +/* 240 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/de.js ***! \********************************************/ @@ -86869,7 +86870,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86897,7 +86898,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 240 */ +/* 241 */ /*!***********************************************!*\ !*** ./node_modules/numeral/locales/da-dk.js ***! \***********************************************/ @@ -86910,7 +86911,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86938,7 +86939,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 241 */ +/* 242 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/cs.js ***! \********************************************/ @@ -86951,7 +86952,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -86979,7 +86980,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 242 */ +/* 243 */ /*!********************************************!*\ !*** ./node_modules/numeral/locales/bg.js ***! \********************************************/ @@ -86992,7 +86993,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ (function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 63)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ../numeral */ 64)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -87028,7 +87029,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 243 */ +/* 244 */ /*!***************************************************************!*\ !*** ./node_modules/chai-as-promised/lib/chai-as-promised.js ***! \***************************************************************/ @@ -87039,7 +87040,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ "use strict"; /* eslint-disable no-invalid-this */ -let checkError = __webpack_require__(/*! check-error */ 170); +let checkError = __webpack_require__(/*! check-error */ 171); module.exports = (chai, utils) => { const Assertion = chai.Assertion; @@ -87401,7 +87402,7 @@ module.exports.transformAsserterArgs = values => values; /***/ }), -/* 244 */ +/* 245 */ /*!********************************************************!*\ !*** ./node_modules/chai/lib/chai/interface/assert.js ***! \********************************************************/ @@ -90510,7 +90511,7 @@ module.exports = function (chai, util) { /***/ }), -/* 245 */ +/* 246 */ /*!********************************************************!*\ !*** ./node_modules/chai/lib/chai/interface/should.js ***! \********************************************************/ @@ -90725,7 +90726,7 @@ module.exports = function (chai, util) { /***/ }), -/* 246 */ +/* 247 */ /*!********************************************************!*\ !*** ./node_modules/chai/lib/chai/interface/expect.js ***! \********************************************************/ @@ -90770,7 +90771,7 @@ module.exports = function (chai, util) { /***/ }), -/* 247 */ +/* 248 */ /*!*******************************************************!*\ !*** ./node_modules/chai/lib/chai/core/assertions.js ***! \*******************************************************/ @@ -94510,7 +94511,7 @@ module.exports = function (chai, _) { /***/ }), -/* 248 */ +/* 249 */ /*!*************************************************!*\ !*** ./node_modules/chai/lib/chai/assertion.js ***! \*************************************************/ @@ -94686,7 +94687,7 @@ module.exports = function (_chai, util) { /***/ }), -/* 249 */ +/* 250 */ /*!***************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/isNaN.js ***! \***************************************************/ @@ -94723,7 +94724,7 @@ module.exports = Number.isNaN || isNaN; /***/ }), -/* 250 */ +/* 251 */ /*!************************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js ***! \************************************************************************/ @@ -94741,7 +94742,7 @@ module.exports = Number.isNaN || isNaN; * Module dependancies */ -var getOwnEnumerablePropertySymbols = __webpack_require__(/*! ./getOwnEnumerablePropertySymbols */ 171); +var getOwnEnumerablePropertySymbols = __webpack_require__(/*! ./getOwnEnumerablePropertySymbols */ 172); /** * ### .getOwnEnumerableProperties(object) @@ -94763,7 +94764,7 @@ module.exports = function getOwnEnumerableProperties(obj) { /***/ }), -/* 251 */ +/* 252 */ /*!**************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/compareByInspect.js ***! \**************************************************************/ @@ -94781,7 +94782,7 @@ module.exports = function getOwnEnumerableProperties(obj) { * Module dependancies */ -var inspect = __webpack_require__(/*! ./inspect */ 119); +var inspect = __webpack_require__(/*! ./inspect */ 120); /** * ### .compareByInspect(mixed, mixed) @@ -94805,7 +94806,7 @@ module.exports = function compareByInspect(a, b) { /***/ }), -/* 252 */ +/* 253 */ /*!**********************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/overwriteChainableMethod.js ***! \**********************************************************************/ @@ -94885,7 +94886,7 @@ module.exports = function overwriteChainableMethod(ctx, name, method, chainingBe /***/ }), -/* 253 */ +/* 254 */ /*!****************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/addChainableMethod.js ***! \****************************************************************/ @@ -94903,10 +94904,10 @@ module.exports = function overwriteChainableMethod(ctx, name, method, chainingBe * Module dependencies */ -var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 117); +var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 118); var chai = __webpack_require__(/*! ../../chai */ 91); var flag = __webpack_require__(/*! ./flag */ 81); -var proxify = __webpack_require__(/*! ./proxify */ 116); +var proxify = __webpack_require__(/*! ./proxify */ 117); var transferFlags = __webpack_require__(/*! ./transferFlags */ 89); /*! @@ -95048,7 +95049,7 @@ module.exports = function addChainableMethod(ctx, name, method, chainingBehavior /***/ }), -/* 254 */ +/* 255 */ /*!*************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/overwriteMethod.js ***! \*************************************************************/ @@ -95062,10 +95063,10 @@ module.exports = function addChainableMethod(ctx, name, method, chainingBehavior * MIT Licensed */ -var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 117); +var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 118); var chai = __webpack_require__(/*! ../../chai */ 91); var flag = __webpack_require__(/*! ./flag */ 81); -var proxify = __webpack_require__(/*! ./proxify */ 116); +var proxify = __webpack_require__(/*! ./proxify */ 117); var transferFlags = __webpack_require__(/*! ./transferFlags */ 89); /** @@ -95151,7 +95152,7 @@ module.exports = function overwriteMethod(ctx, name, method) { /***/ }), -/* 255 */ +/* 256 */ /*!***************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/overwriteProperty.js ***! \***************************************************************/ @@ -95167,7 +95168,7 @@ module.exports = function overwriteMethod(ctx, name, method) { var chai = __webpack_require__(/*! ../../chai */ 91); var flag = __webpack_require__(/*! ./flag */ 81); -var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 118); +var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 119); var transferFlags = __webpack_require__(/*! ./transferFlags */ 89); /** @@ -95254,7 +95255,7 @@ module.exports = function overwriteProperty(ctx, name, getter) { /***/ }), -/* 256 */ +/* 257 */ /*!*******************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/addMethod.js ***! \*******************************************************/ @@ -95268,10 +95269,10 @@ module.exports = function overwriteProperty(ctx, name, getter) { * MIT Licensed */ -var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 117); +var addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 118); var chai = __webpack_require__(/*! ../../chai */ 91); var flag = __webpack_require__(/*! ./flag */ 81); -var proxify = __webpack_require__(/*! ./proxify */ 116); +var proxify = __webpack_require__(/*! ./proxify */ 117); var transferFlags = __webpack_require__(/*! ./transferFlags */ 89); /** @@ -95333,7 +95334,7 @@ module.exports = function addMethod(ctx, name, method) { /***/ }), -/* 257 */ +/* 258 */ /*!*********************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/addProperty.js ***! \*********************************************************/ @@ -95349,7 +95350,7 @@ module.exports = function addMethod(ctx, name, method) { var chai = __webpack_require__(/*! ../../chai */ 91); var flag = __webpack_require__(/*! ./flag */ 81); -var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 118); +var isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 119); var transferFlags = __webpack_require__(/*! ./transferFlags */ 89); /** @@ -95416,7 +95417,7 @@ module.exports = function addProperty(ctx, name, getter) { /***/ }), -/* 258 */ +/* 259 */ /*!****************************************!*\ !*** ./node_modules/deep-eql/index.js ***! \****************************************/ @@ -95433,7 +95434,7 @@ module.exports = function addProperty(ctx, name, getter) { * MIT Licensed */ -var type = __webpack_require__(/*! type-detect */ 129); +var type = __webpack_require__(/*! type-detect */ 130); function FakeMap() { this._key = 'chai/deep-eql__' + Math.random() + Date.now(); } @@ -95883,7 +95884,7 @@ function isPrimitive(value) { /***/ }), -/* 259 */ +/* 260 */ /*!*********************************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getEnumerableProperties.js ***! \*********************************************************************/ @@ -95920,7 +95921,7 @@ module.exports = function getEnumerableProperties(object) { /***/ }), -/* 260 */ +/* 261 */ /*!********************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/getMessage.js ***! \********************************************************/ @@ -95939,9 +95940,9 @@ module.exports = function getEnumerableProperties(object) { */ var flag = __webpack_require__(/*! ./flag */ 81) - , getActual = __webpack_require__(/*! ./getActual */ 175) - , inspect = __webpack_require__(/*! ./inspect */ 119) - , objDisplay = __webpack_require__(/*! ./objDisplay */ 172); + , getActual = __webpack_require__(/*! ./getActual */ 176) + , inspect = __webpack_require__(/*! ./inspect */ 120) + , objDisplay = __webpack_require__(/*! ./objDisplay */ 173); /** * ### .getMessage(object, message, negateMessage) @@ -95982,7 +95983,7 @@ module.exports = function getMessage(obj, args) { /***/ }), -/* 261 */ +/* 262 */ /*!*********************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/expectTypes.js ***! \*********************************************************/ @@ -96010,9 +96011,9 @@ module.exports = function getMessage(obj, args) { * @api public */ -var AssertionError = __webpack_require__(/*! assertion-error */ 176); +var AssertionError = __webpack_require__(/*! assertion-error */ 177); var flag = __webpack_require__(/*! ./flag */ 81); -var type = __webpack_require__(/*! type-detect */ 129); +var type = __webpack_require__(/*! type-detect */ 130); module.exports = function expectTypes(obj, types) { var flagMsg = flag(obj, 'message'); @@ -96044,7 +96045,7 @@ module.exports = function expectTypes(obj, types) { /***/ }), -/* 262 */ +/* 263 */ /*!**************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/test.js ***! \**************************************************/ @@ -96083,7 +96084,7 @@ module.exports = function test(obj, args) { /***/ }), -/* 263 */ +/* 264 */ /*!***************************************!*\ !*** ./node_modules/pathval/index.js ***! \***************************************/ @@ -96386,7 +96387,7 @@ module.exports = { /***/ }), -/* 264 */ +/* 265 */ /*!***************************************************!*\ !*** ./node_modules/chai/lib/chai/utils/index.js ***! \***************************************************/ @@ -96404,48 +96405,48 @@ module.exports = { * Dependencies that are used for multiple exports are required here only once */ -var pathval = __webpack_require__(/*! pathval */ 263); +var pathval = __webpack_require__(/*! pathval */ 264); /*! * test utility */ -exports.test = __webpack_require__(/*! ./test */ 262); +exports.test = __webpack_require__(/*! ./test */ 263); /*! * type utility */ -exports.type = __webpack_require__(/*! type-detect */ 129); +exports.type = __webpack_require__(/*! type-detect */ 130); /*! * expectTypes utility */ -exports.expectTypes = __webpack_require__(/*! ./expectTypes */ 261); +exports.expectTypes = __webpack_require__(/*! ./expectTypes */ 262); /*! * message utility */ -exports.getMessage = __webpack_require__(/*! ./getMessage */ 260); +exports.getMessage = __webpack_require__(/*! ./getMessage */ 261); /*! * actual utility */ -exports.getActual = __webpack_require__(/*! ./getActual */ 175); +exports.getActual = __webpack_require__(/*! ./getActual */ 176); /*! * Inspect util */ -exports.inspect = __webpack_require__(/*! ./inspect */ 119); +exports.inspect = __webpack_require__(/*! ./inspect */ 120); /*! * Object Display util */ -exports.objDisplay = __webpack_require__(/*! ./objDisplay */ 172); +exports.objDisplay = __webpack_require__(/*! ./objDisplay */ 173); /*! * Flag utility @@ -96463,7 +96464,7 @@ exports.transferFlags = __webpack_require__(/*! ./transferFlags */ 89); * Deep equal utility */ -exports.eql = __webpack_require__(/*! deep-eql */ 258); +exports.eql = __webpack_require__(/*! deep-eql */ 259); /*! * Deep path info @@ -96481,95 +96482,95 @@ exports.hasProperty = pathval.hasProperty; * Function name */ -exports.getName = __webpack_require__(/*! get-func-name */ 174); +exports.getName = __webpack_require__(/*! get-func-name */ 175); /*! * add Property */ -exports.addProperty = __webpack_require__(/*! ./addProperty */ 257); +exports.addProperty = __webpack_require__(/*! ./addProperty */ 258); /*! * add Method */ -exports.addMethod = __webpack_require__(/*! ./addMethod */ 256); +exports.addMethod = __webpack_require__(/*! ./addMethod */ 257); /*! * overwrite Property */ -exports.overwriteProperty = __webpack_require__(/*! ./overwriteProperty */ 255); +exports.overwriteProperty = __webpack_require__(/*! ./overwriteProperty */ 256); /*! * overwrite Method */ -exports.overwriteMethod = __webpack_require__(/*! ./overwriteMethod */ 254); +exports.overwriteMethod = __webpack_require__(/*! ./overwriteMethod */ 255); /*! * Add a chainable method */ -exports.addChainableMethod = __webpack_require__(/*! ./addChainableMethod */ 253); +exports.addChainableMethod = __webpack_require__(/*! ./addChainableMethod */ 254); /*! * Overwrite chainable method */ -exports.overwriteChainableMethod = __webpack_require__(/*! ./overwriteChainableMethod */ 252); +exports.overwriteChainableMethod = __webpack_require__(/*! ./overwriteChainableMethod */ 253); /*! * Compare by inspect method */ -exports.compareByInspect = __webpack_require__(/*! ./compareByInspect */ 251); +exports.compareByInspect = __webpack_require__(/*! ./compareByInspect */ 252); /*! * Get own enumerable property symbols method */ -exports.getOwnEnumerablePropertySymbols = __webpack_require__(/*! ./getOwnEnumerablePropertySymbols */ 171); +exports.getOwnEnumerablePropertySymbols = __webpack_require__(/*! ./getOwnEnumerablePropertySymbols */ 172); /*! * Get own enumerable properties method */ -exports.getOwnEnumerableProperties = __webpack_require__(/*! ./getOwnEnumerableProperties */ 250); +exports.getOwnEnumerableProperties = __webpack_require__(/*! ./getOwnEnumerableProperties */ 251); /*! * Checks error against a given set of criteria */ -exports.checkError = __webpack_require__(/*! check-error */ 170); +exports.checkError = __webpack_require__(/*! check-error */ 171); /*! * Proxify util */ -exports.proxify = __webpack_require__(/*! ./proxify */ 116); +exports.proxify = __webpack_require__(/*! ./proxify */ 117); /*! * addLengthGuard util */ -exports.addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 117); +exports.addLengthGuard = __webpack_require__(/*! ./addLengthGuard */ 118); /*! * isProxyEnabled helper */ -exports.isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 118); +exports.isProxyEnabled = __webpack_require__(/*! ./isProxyEnabled */ 119); /*! * isNaN method */ -exports.isNaN = __webpack_require__(/*! ./isNaN */ 249); +exports.isNaN = __webpack_require__(/*! ./isNaN */ 250); /***/ }), -/* 265 */ +/* 266 */ /*!************************************!*\ !*** ./node_modules/chai/index.js ***! \************************************/ @@ -96581,10 +96582,10 @@ module.exports = __webpack_require__(/*! ./lib/chai */ 91); /***/ }), -/* 266 */, /* 267 */, /* 268 */, -/* 269 */ +/* 269 */, +/* 270 */ /*!*********************************************!*\ !*** ./node_modules/escodegen/package.json ***! \*********************************************/ @@ -96595,7 +96596,7 @@ module.exports = __webpack_require__(/*! ./lib/chai */ 91); module.exports = {"_args":[["escodegen@1.11.0","C:\\Users\\daniel.xie\\Desktop\\bitburner"]],"_from":"escodegen@1.11.0","_id":"escodegen@1.11.0","_inBundle":false,"_integrity":"sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==","_location":"/escodegen","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"escodegen@1.11.0","name":"escodegen","escapedName":"escodegen","rawSpec":"1.11.0","saveSpec":null,"fetchSpec":"1.11.0"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz","_spec":"1.11.0","_where":"C:\\Users\\daniel.xie\\Desktop\\bitburner","bin":{"esgenerate":"./bin/esgenerate.js","escodegen":"./bin/escodegen.js"},"bugs":{"url":"https://github.com/estools/escodegen/issues"},"dependencies":{"esprima":"^3.1.3","estraverse":"^4.2.0","esutils":"^2.0.2","optionator":"^0.8.1","source-map":"~0.6.1"},"description":"ECMAScript code generator","devDependencies":{"acorn":"^4.0.4","bluebird":"^3.4.7","bower-registry-client":"^1.0.0","chai":"^3.5.0","commonjs-everywhere":"^0.9.7","gulp":"^3.8.10","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1","semver":"^5.1.0"},"engines":{"node":">=4.0"},"files":["LICENSE.BSD","README.md","bin","escodegen.js","package.json"],"homepage":"http://github.com/estools/escodegen","license":"BSD-2-Clause","main":"escodegen.js","maintainers":[{"name":"Yusuke Suzuki","email":"utatane.tea@gmail.com","url":"http://github.com/Constellation"}],"name":"escodegen","optionalDependencies":{"source-map":"~0.6.1"},"repository":{"type":"git","url":"git+ssh://git@github.com/estools/escodegen.git"},"scripts":{"build":"cjsify -a path: tools/entry-point.js > escodegen.browser.js","build-min":"cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js","lint":"gulp lint","release":"node tools/release.js","test":"gulp travis","unit-test":"gulp test"},"version":"1.11.0"}; /***/ }), -/* 270 */ +/* 271 */ /*!***************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/source-node.js ***! \***************************************************************************/ @@ -96610,8 +96611,8 @@ module.exports = {"_args":[["escodegen@1.11.0","C:\\Users\\daniel.xie\\Desktop\\ * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ 180).SourceMapGenerator; -var util = __webpack_require__(/*! ./util */ 100); +var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ 181).SourceMapGenerator; +var util = __webpack_require__(/*! ./util */ 101); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -97019,7 +97020,7 @@ exports.SourceNode = SourceNode; /***/ }), -/* 271 */ +/* 272 */ /*!**************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/quick-sort.js ***! \**************************************************************************/ @@ -97144,7 +97145,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 272 */ +/* 273 */ /*!*****************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/binary-search.js ***! \*****************************************************************************/ @@ -97266,7 +97267,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 273 */ +/* 274 */ /*!***********************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/source-map-consumer.js ***! \***********************************************************************************/ @@ -97281,11 +97282,11 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(/*! ./util */ 100); -var binarySearch = __webpack_require__(/*! ./binary-search */ 272); -var ArraySet = __webpack_require__(/*! ./array-set */ 178).ArraySet; -var base64VLQ = __webpack_require__(/*! ./base64-vlq */ 179); -var quickSort = __webpack_require__(/*! ./quick-sort */ 271).quickSort; +var util = __webpack_require__(/*! ./util */ 101); +var binarySearch = __webpack_require__(/*! ./binary-search */ 273); +var ArraySet = __webpack_require__(/*! ./array-set */ 179).ArraySet; +var base64VLQ = __webpack_require__(/*! ./base64-vlq */ 180); +var quickSort = __webpack_require__(/*! ./quick-sort */ 272).quickSort; function SourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; @@ -98422,7 +98423,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 274 */ +/* 275 */ /*!****************************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/mapping-list.js ***! \****************************************************************************/ @@ -98437,7 +98438,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(/*! ./util */ 100); +var util = __webpack_require__(/*! ./util */ 101); /** * Determine whether mappingB is after mappingA with respect to generated @@ -98512,7 +98513,7 @@ exports.MappingList = MappingList; /***/ }), -/* 275 */ +/* 276 */ /*!**********************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/lib/base64.js ***! \**********************************************************************/ @@ -98590,7 +98591,7 @@ exports.decode = function (charCode) { /***/ }), -/* 276 */ +/* 277 */ /*!**********************************************************************!*\ !*** ./node_modules/escodegen/node_modules/source-map/source-map.js ***! \**********************************************************************/ @@ -98603,13 +98604,13 @@ exports.decode = function (charCode) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(/*! ./lib/source-map-generator */ 180).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */ 273).SourceMapConsumer; -exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNode; +exports.SourceMapGenerator = __webpack_require__(/*! ./lib/source-map-generator */ 181).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */ 274).SourceMapConsumer; +exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 271).SourceNode; /***/ }), -/* 277 */ +/* 278 */ /*!*********************************************!*\ !*** ./node_modules/esutils/lib/keyword.js ***! \*********************************************/ @@ -98644,7 +98645,7 @@ exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNod (function () { 'use strict'; - var code = __webpack_require__(/*! ./code */ 181); + var code = __webpack_require__(/*! ./code */ 182); function isStrictModeReservedWordES6(id) { switch (id) { @@ -98785,7 +98786,7 @@ exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNod /***/ }), -/* 278 */ +/* 279 */ /*!*****************************************!*\ !*** ./node_modules/esutils/lib/ast.js ***! \*****************************************/ @@ -98940,7 +98941,7 @@ exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNod /***/ }), -/* 279 */ +/* 280 */ /*!*******************************************!*\ !*** ./node_modules/esutils/lib/utils.js ***! \*******************************************/ @@ -98976,15 +98977,15 @@ exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNod (function () { 'use strict'; - exports.ast = __webpack_require__(/*! ./ast */ 278); - exports.code = __webpack_require__(/*! ./code */ 181); - exports.keyword = __webpack_require__(/*! ./keyword */ 277); + exports.ast = __webpack_require__(/*! ./ast */ 279); + exports.code = __webpack_require__(/*! ./code */ 182); + exports.keyword = __webpack_require__(/*! ./keyword */ 278); }()); /* vim: set sw=4 ts=4 et tw=80 : */ /***/ }), -/* 280 */ +/* 281 */ /*!**********************************************!*\ !*** ./node_modules/estraverse/package.json ***! \**********************************************/ @@ -98995,7 +98996,7 @@ exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ 270).SourceNod module.exports = {"_args":[["estraverse@4.2.0","C:\\Users\\daniel.xie\\Desktop\\bitburner"]],"_from":"estraverse@4.2.0","_id":"estraverse@4.2.0","_inBundle":false,"_integrity":"sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=","_location":"/estraverse","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"estraverse@4.2.0","name":"estraverse","escapedName":"estraverse","rawSpec":"4.2.0","saveSpec":null,"fetchSpec":"4.2.0"},"_requiredBy":["/escodegen","/escope","/eslint-scope","/esquery","/esrecurse"],"_resolved":"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz","_spec":"4.2.0","_where":"C:\\Users\\daniel.xie\\Desktop\\bitburner","bugs":{"url":"https://github.com/estools/estraverse/issues"},"description":"ECMAScript JS AST traversal functions","devDependencies":{"babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","chai":"^2.1.1","espree":"^1.11.0","gulp":"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1","jshint":"^2.5.6","mocha":"^2.1.0"},"engines":{"node":">=0.10.0"},"homepage":"https://github.com/estools/estraverse","license":"BSD-2-Clause","main":"estraverse.js","maintainers":[{"name":"Yusuke Suzuki","email":"utatane.tea@gmail.com","url":"http://github.com/Constellation"}],"name":"estraverse","repository":{"type":"git","url":"git+ssh://git@github.com/estools/estraverse.git"},"scripts":{"lint":"jshint estraverse.js","test":"npm run-script lint && npm run-script unit-test","unit-test":"mocha --compilers js:babel-register"},"version":"4.2.0"}; /***/ }), -/* 281 */ +/* 282 */ /*!***********************************************!*\ !*** ./node_modules/estraverse/estraverse.js ***! \***********************************************/ @@ -99839,7 +99840,7 @@ module.exports = {"_args":[["estraverse@4.2.0","C:\\Users\\daniel.xie\\Desktop\\ return tree; } - exports.version = __webpack_require__(/*! ./package.json */ 280).version; + exports.version = __webpack_require__(/*! ./package.json */ 281).version; exports.Syntax = Syntax; exports.traverse = traverse; exports.replace = replace; @@ -99855,7 +99856,7 @@ module.exports = {"_args":[["estraverse@4.2.0","C:\\Users\\daniel.xie\\Desktop\\ /***/ }), -/* 282 */ +/* 283 */ /*!****************************************!*\ !*** (webpack)/buildin/amd-options.js ***! \****************************************/ @@ -99869,7 +99870,7 @@ module.exports = __webpack_amd_options__; /* WEBPACK VAR INJECTION */}.call(this, {})) /***/ }), -/* 283 */ +/* 284 */ /*!********************************************!*\ !*** ./node_modules/jszip/lib/zipEntry.js ***! \********************************************/ @@ -99879,12 +99880,12 @@ module.exports = __webpack_amd_options__; "use strict"; -var readerFor = __webpack_require__(/*! ./reader/readerFor */ 185); -var utils = __webpack_require__(/*! ./utils */ 61); -var CompressedObject = __webpack_require__(/*! ./compressedObject */ 158); -var crc32fn = __webpack_require__(/*! ./crc32 */ 157); -var utf8 = __webpack_require__(/*! ./utf8 */ 99); -var compressions = __webpack_require__(/*! ./compressions */ 192); +var readerFor = __webpack_require__(/*! ./reader/readerFor */ 186); +var utils = __webpack_require__(/*! ./utils */ 60); +var CompressedObject = __webpack_require__(/*! ./compressedObject */ 159); +var crc32fn = __webpack_require__(/*! ./crc32 */ 158); +var utf8 = __webpack_require__(/*! ./utf8 */ 100); +var compressions = __webpack_require__(/*! ./compressions */ 193); var support = __webpack_require__(/*! ./support */ 87); var MADE_BY_DOS = 0x00; @@ -100173,7 +100174,7 @@ module.exports = ZipEntry; /***/ }), -/* 284 */ +/* 285 */ /*!***********************************************************!*\ !*** ./node_modules/jszip/lib/reader/NodeBufferReader.js ***! \***********************************************************/ @@ -100183,8 +100184,8 @@ module.exports = ZipEntry; "use strict"; -var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ 182); -var utils = __webpack_require__(/*! ../utils */ 61); +var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ 183); +var utils = __webpack_require__(/*! ../utils */ 60); function NodeBufferReader(data) { Uint8ArrayReader.call(this, data); @@ -100204,7 +100205,7 @@ module.exports = NodeBufferReader; /***/ }), -/* 285 */ +/* 286 */ /*!*******************************************************!*\ !*** ./node_modules/jszip/lib/reader/StringReader.js ***! \*******************************************************/ @@ -100214,8 +100215,8 @@ module.exports = NodeBufferReader; "use strict"; -var DataReader = __webpack_require__(/*! ./DataReader */ 183); -var utils = __webpack_require__(/*! ../utils */ 61); +var DataReader = __webpack_require__(/*! ./DataReader */ 184); +var utils = __webpack_require__(/*! ../utils */ 60); function StringReader(data) { DataReader.call(this, data); @@ -100254,7 +100255,7 @@ module.exports = StringReader; /***/ }), -/* 286 */ +/* 287 */ /*!**********************************************!*\ !*** ./node_modules/jszip/lib/zipEntries.js ***! \**********************************************/ @@ -100264,11 +100265,11 @@ module.exports = StringReader; "use strict"; -var readerFor = __webpack_require__(/*! ./reader/readerFor */ 185); -var utils = __webpack_require__(/*! ./utils */ 61); -var sig = __webpack_require__(/*! ./signature */ 186); -var ZipEntry = __webpack_require__(/*! ./zipEntry */ 283); -var utf8 = __webpack_require__(/*! ./utf8 */ 99); +var readerFor = __webpack_require__(/*! ./reader/readerFor */ 186); +var utils = __webpack_require__(/*! ./utils */ 60); +var sig = __webpack_require__(/*! ./signature */ 187); +var ZipEntry = __webpack_require__(/*! ./zipEntry */ 284); +var utf8 = __webpack_require__(/*! ./utf8 */ 100); var support = __webpack_require__(/*! ./support */ 87); // class ZipEntries {{{ /** @@ -100528,7 +100529,7 @@ module.exports = ZipEntries; /***/ }), -/* 287 */ +/* 288 */ /*!****************************************!*\ !*** ./node_modules/jszip/lib/load.js ***! \****************************************/ @@ -100538,13 +100539,13 @@ module.exports = ZipEntries; "use strict"; -var utils = __webpack_require__(/*! ./utils */ 61); -var external = __webpack_require__(/*! ./external */ 101); -var utf8 = __webpack_require__(/*! ./utf8 */ 99); -var utils = __webpack_require__(/*! ./utils */ 61); -var ZipEntries = __webpack_require__(/*! ./zipEntries */ 286); -var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ 193); -var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 121); +var utils = __webpack_require__(/*! ./utils */ 60); +var external = __webpack_require__(/*! ./external */ 102); +var utf8 = __webpack_require__(/*! ./utf8 */ 100); +var utils = __webpack_require__(/*! ./utils */ 60); +var ZipEntries = __webpack_require__(/*! ./zipEntries */ 287); +var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ 194); +var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 122); /** * Check the CRC32 of an entry. @@ -100622,7 +100623,7 @@ module.exports = function(data, options) { /***/ }), -/* 288 */ +/* 289 */ /*!*******************************************************************!*\ !*** ./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js ***! \*******************************************************************/ @@ -100633,7 +100634,7 @@ module.exports = function(data, options) { "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); var GenericWorker = __webpack_require__(/*! ../stream/GenericWorker */ 77); /** @@ -100708,7 +100709,7 @@ module.exports = NodejsStreamInputAdapter; /***/ }), -/* 289 */ +/* 290 */ /*!**********************************************************!*\ !*** ./node_modules/jszip/lib/generate/ZipFileWorker.js ***! \**********************************************************/ @@ -100719,11 +100720,11 @@ module.exports = NodejsStreamInputAdapter; "use strict"; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); var GenericWorker = __webpack_require__(/*! ../stream/GenericWorker */ 77); -var utf8 = __webpack_require__(/*! ../utf8 */ 99); -var crc32 = __webpack_require__(/*! ../crc32 */ 157); -var signature = __webpack_require__(/*! ../signature */ 186); +var utf8 = __webpack_require__(/*! ../utf8 */ 100); +var crc32 = __webpack_require__(/*! ../crc32 */ 158); +var signature = __webpack_require__(/*! ../signature */ 187); /** * Transform an integer into a string in hexadecimal. @@ -101260,7 +101261,7 @@ module.exports = ZipFileWorker; /***/ }), -/* 290 */ +/* 291 */ /*!************************************************!*\ !*** ./node_modules/pako/lib/zlib/gzheader.js ***! \************************************************/ @@ -101330,7 +101331,7 @@ module.exports = GZheader; /***/ }), -/* 291 */ +/* 292 */ /*!************************************************!*\ !*** ./node_modules/pako/lib/zlib/inftrees.js ***! \************************************************/ @@ -101685,7 +101686,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta /***/ }), -/* 292 */ +/* 293 */ /*!***********************************************!*\ !*** ./node_modules/pako/lib/zlib/inffast.js ***! \***********************************************/ @@ -102042,7 +102043,7 @@ module.exports = function inflate_fast(strm, start) { /***/ }), -/* 293 */ +/* 294 */ /*!***********************************************!*\ !*** ./node_modules/pako/lib/zlib/inflate.js ***! \***********************************************/ @@ -102073,10 +102074,10 @@ module.exports = function inflate_fast(strm, start) { // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(/*! ../utils/common */ 86); -var adler32 = __webpack_require__(/*! ./adler32 */ 191); -var crc32 = __webpack_require__(/*! ./crc32 */ 190); -var inflate_fast = __webpack_require__(/*! ./inffast */ 292); -var inflate_table = __webpack_require__(/*! ./inftrees */ 291); +var adler32 = __webpack_require__(/*! ./adler32 */ 192); +var crc32 = __webpack_require__(/*! ./crc32 */ 191); +var inflate_fast = __webpack_require__(/*! ./inffast */ 293); +var inflate_table = __webpack_require__(/*! ./inftrees */ 292); var CODES = 0; var LENS = 1; @@ -103610,7 +103611,7 @@ exports.inflateUndermine = inflateUndermine; /***/ }), -/* 294 */ +/* 295 */ /*!******************************************!*\ !*** ./node_modules/pako/lib/inflate.js ***! \******************************************/ @@ -103622,13 +103623,13 @@ exports.inflateUndermine = inflateUndermine; -var zlib_inflate = __webpack_require__(/*! ./zlib/inflate */ 293); +var zlib_inflate = __webpack_require__(/*! ./zlib/inflate */ 294); var utils = __webpack_require__(/*! ./utils/common */ 86); -var strings = __webpack_require__(/*! ./utils/strings */ 189); -var c = __webpack_require__(/*! ./zlib/constants */ 187); -var msg = __webpack_require__(/*! ./zlib/messages */ 156); -var ZStream = __webpack_require__(/*! ./zlib/zstream */ 188); -var GZheader = __webpack_require__(/*! ./zlib/gzheader */ 290); +var strings = __webpack_require__(/*! ./utils/strings */ 190); +var c = __webpack_require__(/*! ./zlib/constants */ 188); +var msg = __webpack_require__(/*! ./zlib/messages */ 157); +var ZStream = __webpack_require__(/*! ./zlib/zstream */ 189); +var GZheader = __webpack_require__(/*! ./zlib/gzheader */ 291); var toString = Object.prototype.toString; @@ -104040,7 +104041,7 @@ exports.ungzip = inflate; /***/ }), -/* 295 */ +/* 296 */ /*!*********************************************!*\ !*** ./node_modules/pako/lib/zlib/trees.js ***! \*********************************************/ @@ -105272,7 +105273,7 @@ exports._tr_align = _tr_align; /***/ }), -/* 296 */ +/* 297 */ /*!***********************************************!*\ !*** ./node_modules/pako/lib/zlib/deflate.js ***! \***********************************************/ @@ -105303,10 +105304,10 @@ exports._tr_align = _tr_align; // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(/*! ../utils/common */ 86); -var trees = __webpack_require__(/*! ./trees */ 295); -var adler32 = __webpack_require__(/*! ./adler32 */ 191); -var crc32 = __webpack_require__(/*! ./crc32 */ 190); -var msg = __webpack_require__(/*! ./messages */ 156); +var trees = __webpack_require__(/*! ./trees */ 296); +var adler32 = __webpack_require__(/*! ./adler32 */ 192); +var crc32 = __webpack_require__(/*! ./crc32 */ 191); +var msg = __webpack_require__(/*! ./messages */ 157); /* Public constants ==========================================================*/ /* ===========================================================================*/ @@ -107158,7 +107159,7 @@ exports.deflateTune = deflateTune; /***/ }), -/* 297 */ +/* 298 */ /*!******************************************!*\ !*** ./node_modules/pako/lib/deflate.js ***! \******************************************/ @@ -107170,11 +107171,11 @@ exports.deflateTune = deflateTune; -var zlib_deflate = __webpack_require__(/*! ./zlib/deflate */ 296); +var zlib_deflate = __webpack_require__(/*! ./zlib/deflate */ 297); var utils = __webpack_require__(/*! ./utils/common */ 86); -var strings = __webpack_require__(/*! ./utils/strings */ 189); -var msg = __webpack_require__(/*! ./zlib/messages */ 156); -var ZStream = __webpack_require__(/*! ./zlib/zstream */ 188); +var strings = __webpack_require__(/*! ./utils/strings */ 190); +var msg = __webpack_require__(/*! ./zlib/messages */ 157); +var ZStream = __webpack_require__(/*! ./zlib/zstream */ 189); var toString = Object.prototype.toString; @@ -107570,7 +107571,7 @@ exports.gzip = gzip; /***/ }), -/* 298 */ +/* 299 */ /*!************************************!*\ !*** ./node_modules/pako/index.js ***! \************************************/ @@ -107584,9 +107585,9 @@ exports.gzip = gzip; var assign = __webpack_require__(/*! ./lib/utils/common */ 86).assign; -var deflate = __webpack_require__(/*! ./lib/deflate */ 297); -var inflate = __webpack_require__(/*! ./lib/inflate */ 294); -var constants = __webpack_require__(/*! ./lib/zlib/constants */ 187); +var deflate = __webpack_require__(/*! ./lib/deflate */ 298); +var inflate = __webpack_require__(/*! ./lib/inflate */ 295); +var constants = __webpack_require__(/*! ./lib/zlib/constants */ 188); var pako = {}; @@ -107596,7 +107597,7 @@ module.exports = pako; /***/ }), -/* 299 */ +/* 300 */ /*!*****************************************!*\ !*** ./node_modules/jszip/lib/flate.js ***! \*****************************************/ @@ -107608,8 +107609,8 @@ module.exports = pako; var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); -var pako = __webpack_require__(/*! pako */ 298); -var utils = __webpack_require__(/*! ./utils */ 61); +var pako = __webpack_require__(/*! pako */ 299); +var utils = __webpack_require__(/*! ./utils */ 60); var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 77); var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; @@ -107693,7 +107694,7 @@ exports.uncompressWorker = function () { /***/ }), -/* 300 */ +/* 301 */ /*!**************************************************!*\ !*** ./node_modules/jszip/lib/generate/index.js ***! \**************************************************/ @@ -107704,8 +107705,8 @@ exports.uncompressWorker = function () { "use strict"; -var compressions = __webpack_require__(/*! ../compressions */ 192); -var ZipFileWorker = __webpack_require__(/*! ./ZipFileWorker */ 289); +var compressions = __webpack_require__(/*! ../compressions */ 193); +var ZipFileWorker = __webpack_require__(/*! ./ZipFileWorker */ 290); /** * Find the compression to use. @@ -107762,7 +107763,7 @@ exports.generateWorker = function (zip, options, comment) { /***/ }), -/* 301 */ +/* 302 */ /*!*********************************************!*\ !*** ./node_modules/jszip/lib/zipObject.js ***! \*********************************************/ @@ -107773,10 +107774,10 @@ exports.generateWorker = function (zip, options, comment) { "use strict"; -var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ 197); -var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ 195); -var utf8 = __webpack_require__(/*! ./utf8 */ 99); -var CompressedObject = __webpack_require__(/*! ./compressedObject */ 158); +var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ 198); +var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ 196); +var utf8 = __webpack_require__(/*! ./utf8 */ 100); +var CompressedObject = __webpack_require__(/*! ./compressedObject */ 159); var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 77); /** @@ -107907,7 +107908,7 @@ module.exports = ZipObject; /***/ }), -/* 302 */ +/* 303 */ /*!********************************************************************!*\ !*** ./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js ***! \********************************************************************/ @@ -107918,9 +107919,9 @@ module.exports = ZipObject; "use strict"; -var Readable = __webpack_require__(/*! readable-stream */ 210).Readable; +var Readable = __webpack_require__(/*! readable-stream */ 211).Readable; -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); utils.inherits(NodejsStreamOutputAdapter, Readable); /** @@ -107961,7 +107962,7 @@ module.exports = NodejsStreamOutputAdapter; /***/ }), -/* 303 */ +/* 304 */ /*!********************************************************!*\ !*** ./node_modules/jszip/lib/stream/ConvertWorker.js ***! \********************************************************/ @@ -107973,7 +107974,7 @@ module.exports = NodejsStreamOutputAdapter; var GenericWorker = __webpack_require__(/*! ./GenericWorker */ 77); -var utils = __webpack_require__(/*! ../utils */ 61); +var utils = __webpack_require__(/*! ../utils */ 60); /** * A worker which convert chunks to a specified type. @@ -107999,7 +108000,7 @@ module.exports = ConvertWorker; /***/ }), -/* 304 */ +/* 305 */ /*!***********************************************!*\ !*** ./node_modules/immediate/lib/browser.js ***! \***********************************************/ @@ -108081,7 +108082,7 @@ function immediate(task) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 82))) /***/ }), -/* 305 */ +/* 306 */ /*!*****************************************!*\ !*** ./node_modules/lie/lib/browser.js ***! \*****************************************/ @@ -108091,7 +108092,7 @@ function immediate(task) { "use strict"; -var immediate = __webpack_require__(/*! immediate */ 304); +var immediate = __webpack_require__(/*! immediate */ 305); /* istanbul ignore next */ function INTERNAL() {} @@ -108346,7 +108347,7 @@ function race(iterable) { /***/ }), -/* 306 */ +/* 307 */ /*!*************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_cof.js ***! \*************************************************************************/ @@ -108361,7 +108362,7 @@ module.exports = function(it){ }; /***/ }), -/* 307 */ +/* 308 */ /*!**************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_html.js ***! \**************************************************************************/ @@ -108369,10 +108370,10 @@ module.exports = function(it){ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(/*! ./_global */ 120).document && document.documentElement; +module.exports = __webpack_require__(/*! ./_global */ 121).document && document.documentElement; /***/ }), -/* 308 */ +/* 309 */ /*!****************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js ***! \****************************************************************************/ @@ -108398,7 +108399,7 @@ module.exports = function(fn, args, that){ }; /***/ }), -/* 309 */ +/* 310 */ /*!**************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_task.js ***! \**************************************************************************/ @@ -108406,11 +108407,11 @@ module.exports = function(fn, args, that){ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(/*! ./_ctx */ 200) - , invoke = __webpack_require__(/*! ./_invoke */ 308) - , html = __webpack_require__(/*! ./_html */ 307) - , cel = __webpack_require__(/*! ./_dom-create */ 198) - , global = __webpack_require__(/*! ./_global */ 120) +var ctx = __webpack_require__(/*! ./_ctx */ 201) + , invoke = __webpack_require__(/*! ./_invoke */ 309) + , html = __webpack_require__(/*! ./_html */ 308) + , cel = __webpack_require__(/*! ./_dom-create */ 199) + , global = __webpack_require__(/*! ./_global */ 121) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate @@ -108445,7 +108446,7 @@ if(!setTask || !clearTask){ delete queue[id]; }; // Node.js 0.8- - if(__webpack_require__(/*! ./_cof */ 306)(process) == 'process'){ + if(__webpack_require__(/*! ./_cof */ 307)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; @@ -108483,7 +108484,7 @@ module.exports = { }; /***/ }), -/* 310 */ +/* 311 */ /*!***********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js ***! \***********************************************************************************/ @@ -108501,7 +108502,7 @@ module.exports = function(bitmap, value){ }; /***/ }), -/* 311 */ +/* 312 */ /*!**********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js ***! \**********************************************************************************/ @@ -108510,7 +108511,7 @@ module.exports = function(bitmap, value){ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(/*! ./_is-object */ 160); +var isObject = __webpack_require__(/*! ./_is-object */ 161); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ @@ -108523,7 +108524,7 @@ module.exports = function(it, S){ }; /***/ }), -/* 312 */ +/* 313 */ /*!************************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js ***! \************************************************************************************/ @@ -108531,12 +108532,12 @@ module.exports = function(it, S){ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(/*! ./_descriptors */ 159) && !__webpack_require__(/*! ./_fails */ 199)(function(){ - return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 198)('div'), 'a', {get: function(){ return 7; }}).a != 7; +module.exports = !__webpack_require__(/*! ./_descriptors */ 160) && !__webpack_require__(/*! ./_fails */ 200)(function(){ + return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 199)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), -/* 313 */ +/* 314 */ /*!*******************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js ***! \*******************************************************************************/ @@ -108544,14 +108545,14 @@ module.exports = !__webpack_require__(/*! ./_descriptors */ 159) && !__webpack_r /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./_is-object */ 160); +var isObject = __webpack_require__(/*! ./_is-object */ 161); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }), -/* 314 */ +/* 315 */ /*!*******************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js ***! \*******************************************************************************/ @@ -108559,12 +108560,12 @@ module.exports = function(it){ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(/*! ./_an-object */ 313) - , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 312) - , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 311) +var anObject = __webpack_require__(/*! ./_an-object */ 314) + , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 313) + , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 312) , dP = Object.defineProperty; -exports.f = __webpack_require__(/*! ./_descriptors */ 159) ? Object.defineProperty : function defineProperty(O, P, Attributes){ +exports.f = __webpack_require__(/*! ./_descriptors */ 160) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); @@ -108577,7 +108578,7 @@ exports.f = __webpack_require__(/*! ./_descriptors */ 159) ? Object.defineProper }; /***/ }), -/* 315 */ +/* 316 */ /*!**************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_hide.js ***! \**************************************************************************/ @@ -108585,9 +108586,9 @@ exports.f = __webpack_require__(/*! ./_descriptors */ 159) ? Object.defineProper /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(/*! ./_object-dp */ 314) - , createDesc = __webpack_require__(/*! ./_property-desc */ 310); -module.exports = __webpack_require__(/*! ./_descriptors */ 159) ? function(object, key, value){ +var dP = __webpack_require__(/*! ./_object-dp */ 315) + , createDesc = __webpack_require__(/*! ./_property-desc */ 311); +module.exports = __webpack_require__(/*! ./_descriptors */ 160) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; @@ -108595,7 +108596,7 @@ module.exports = __webpack_require__(/*! ./_descriptors */ 159) ? function(objec }; /***/ }), -/* 316 */ +/* 317 */ /*!********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js ***! \********************************************************************************/ @@ -108609,7 +108610,7 @@ module.exports = function(it){ }; /***/ }), -/* 317 */ +/* 318 */ /*!****************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/_export.js ***! \****************************************************************************/ @@ -108617,10 +108618,10 @@ module.exports = function(it){ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(/*! ./_global */ 120) - , core = __webpack_require__(/*! ./_core */ 201) - , ctx = __webpack_require__(/*! ./_ctx */ 200) - , hide = __webpack_require__(/*! ./_hide */ 315) +var global = __webpack_require__(/*! ./_global */ 121) + , core = __webpack_require__(/*! ./_core */ 202) + , ctx = __webpack_require__(/*! ./_ctx */ 201) + , hide = __webpack_require__(/*! ./_hide */ 316) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ @@ -108680,7 +108681,7 @@ $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), -/* 318 */ +/* 319 */ /*!**********************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js ***! \**********************************************************************************/ @@ -108688,15 +108689,15 @@ module.exports = $export; /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(/*! ./_export */ 317) - , $task = __webpack_require__(/*! ./_task */ 309); +var $export = __webpack_require__(/*! ./_export */ 318) + , $task = __webpack_require__(/*! ./_task */ 310); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); /***/ }), -/* 319 */ +/* 320 */ /*!*****************************************************************************!*\ !*** ./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js ***! \*****************************************************************************/ @@ -108704,11 +108705,11 @@ $export($export.G + $export.B, { /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../modules/web.immediate */ 318); -module.exports = __webpack_require__(/*! ../modules/_core */ 201).setImmediate; +__webpack_require__(/*! ../modules/web.immediate */ 319); +module.exports = __webpack_require__(/*! ../modules/_core */ 202).setImmediate; /***/ }), -/* 320 */ +/* 321 */ /*!*****************************************************!*\ !*** ./node_modules/readable-stream/passthrough.js ***! \*****************************************************/ @@ -108716,11 +108717,11 @@ module.exports = __webpack_require__(/*! ../modules/_core */ 201).setImmediate; /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(/*! ./readable */ 162).PassThrough +module.exports = __webpack_require__(/*! ./readable */ 163).PassThrough /***/ }), -/* 321 */ +/* 322 */ /*!***************************************************!*\ !*** ./node_modules/readable-stream/transform.js ***! \***************************************************/ @@ -108728,11 +108729,11 @@ module.exports = __webpack_require__(/*! ./readable */ 162).PassThrough /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(/*! ./readable */ 162).Transform +module.exports = __webpack_require__(/*! ./readable */ 163).Transform /***/ }), -/* 322 */ +/* 323 */ /*!********************************************************!*\ !*** ./node_modules/readable-stream/duplex-browser.js ***! \********************************************************/ @@ -108744,7 +108745,7 @@ module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ 92); /***/ }), -/* 323 */ +/* 324 */ /*!**********************************************************!*\ !*** ./node_modules/readable-stream/writable-browser.js ***! \**********************************************************/ @@ -108752,11 +108753,11 @@ module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ 92); /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ 161); +module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ 162); /***/ }), -/* 324 */ +/* 325 */ /*!*****************************************************************!*\ !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***! \*****************************************************************/ @@ -108794,11 +108795,11 @@ module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ 161); module.exports = PassThrough; -var Transform = __webpack_require__(/*! ./_stream_transform */ 203); +var Transform = __webpack_require__(/*! ./_stream_transform */ 204); /**/ -var util = __webpack_require__(/*! core-util-is */ 102); -util.inherits = __webpack_require__(/*! inherits */ 98); +var util = __webpack_require__(/*! core-util-is */ 103); +util.inherits = __webpack_require__(/*! inherits */ 99); /**/ util.inherits(PassThrough, Transform); @@ -108814,7 +108815,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { }; /***/ }), -/* 325 */ +/* 326 */ /*!************************************************!*\ !*** ./node_modules/util-deprecate/browser.js ***! \************************************************/ @@ -108893,7 +108894,7 @@ function config (name) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82))) /***/ }), -/* 326 */ +/* 327 */ /*!*************************************************************************!*\ !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***! \*************************************************************************/ @@ -108906,8 +108907,8 @@ function config (name) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var Buffer = __webpack_require__(/*! safe-buffer */ 122).Buffer; -var util = __webpack_require__(/*! util */ 206); +var Buffer = __webpack_require__(/*! safe-buffer */ 123).Buffer; +var util = __webpack_require__(/*! util */ 207); function copyBuffer(src, target, offset) { src.copy(target, offset); @@ -108983,7 +108984,7 @@ if (util && util.inspect && util.inspect.custom) { } /***/ }), -/* 327 */ +/* 328 */ /*!*************************************************!*\ !*** ./node_modules/stream-browserify/index.js ***! \*************************************************/ @@ -109014,15 +109015,15 @@ if (util && util.inspect && util.inspect.custom) { module.exports = Stream; -var EE = __webpack_require__(/*! events */ 163).EventEmitter; -var inherits = __webpack_require__(/*! inherits */ 98); +var EE = __webpack_require__(/*! events */ 164).EventEmitter; +var inherits = __webpack_require__(/*! inherits */ 99); inherits(Stream, EE); -Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ 162); -Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ 323); -Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ 322); -Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ 321); -Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ 320); +Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ 163); +Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ 324); +Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ 323); +Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ 322); +Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ 321); // Backwards-compat with node 0.4.x Stream.Stream = Stream; @@ -109121,7 +109122,7 @@ Stream.prototype.pipe = function(dest, options) { /***/ }), -/* 328 */ +/* 329 */ /*!***************************************!*\ !*** ./node_modules/ieee754/index.js ***! \***************************************/ @@ -109216,7 +109217,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { /***/ }), -/* 329 */ +/* 330 */ /*!*****************************************!*\ !*** ./node_modules/base64-js/index.js ***! \*****************************************/ @@ -109379,7 +109380,7 @@ function fromByteArray (uint8) { /***/ }), -/* 330 */ +/* 331 */ /*!******************************************!*\ !*** ./node_modules/jszip/lib/object.js ***! \******************************************/ @@ -109389,16 +109390,16 @@ function fromByteArray (uint8) { "use strict"; -var utf8 = __webpack_require__(/*! ./utf8 */ 99); -var utils = __webpack_require__(/*! ./utils */ 61); +var utf8 = __webpack_require__(/*! ./utf8 */ 100); +var utils = __webpack_require__(/*! ./utils */ 60); var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 77); -var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ 197); -var defaults = __webpack_require__(/*! ./defaults */ 196); -var CompressedObject = __webpack_require__(/*! ./compressedObject */ 158); -var ZipObject = __webpack_require__(/*! ./zipObject */ 301); -var generate = __webpack_require__(/*! ./generate */ 300); -var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 121); -var NodejsStreamInputAdapter = __webpack_require__(/*! ./nodejs/NodejsStreamInputAdapter */ 288); +var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ 198); +var defaults = __webpack_require__(/*! ./defaults */ 197); +var CompressedObject = __webpack_require__(/*! ./compressedObject */ 159); +var ZipObject = __webpack_require__(/*! ./zipObject */ 302); +var generate = __webpack_require__(/*! ./generate */ 301); +var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 122); +var NodejsStreamInputAdapter = __webpack_require__(/*! ./nodejs/NodejsStreamInputAdapter */ 289); /** @@ -109780,7 +109781,7 @@ module.exports = out; /***/ }), -/* 331 */ +/* 332 */ /*!***************************************************!*\ !*** ./node_modules/setimmediate/setImmediate.js ***! \***************************************************/ @@ -109975,10 +109976,10 @@ module.exports = out; attachTo.clearImmediate = clearImmediate; }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self)); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../process/browser.js */ 104))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 82), __webpack_require__(/*! ./../process/browser.js */ 105))) /***/ }), -/* 332 */ +/* 333 */ /*!**********************************************************!*\ !*** ./node_modules/js-beautify/js/lib/beautify-html.js ***! \**********************************************************/ @@ -111341,9 +111342,9 @@ var style_html = legacy_beautify_html; /* Footer */ if (true) { // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, __webpack_require__(/*! ./beautify */ 167), __webpack_require__(/*! ./beautify-css */ 166)], __WEBPACK_AMD_DEFINE_RESULT__ = (function(requireamd) { - var js_beautify = __webpack_require__(/*! ./beautify */ 167); - var css_beautify = __webpack_require__(/*! ./beautify-css */ 166); + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, __webpack_require__(/*! ./beautify */ 168), __webpack_require__(/*! ./beautify-css */ 167)], __WEBPACK_AMD_DEFINE_RESULT__ = (function(requireamd) { + var js_beautify = __webpack_require__(/*! ./beautify */ 168); + var css_beautify = __webpack_require__(/*! ./beautify-css */ 167); return { html_beautify: function(html_source, options) { diff --git a/doc/source/netscriptfunctions.rst b/doc/source/netscriptfunctions.rst index 43343da74..7dbca87ff 100644 --- a/doc/source/netscriptfunctions.rst +++ b/doc/source/netscriptfunctions.rst @@ -13,6 +13,7 @@ hack :param string hostname/ip: IP or hostname of the target server to hack :returns: The amount of money stolen if the hack is successful, and zero otherwise + :RAM cost: 0.1 GB Function that is used to try and hack servers to steal money and gain hacking experience. The runtime for this command depends on your hacking level and the target server's security level. In order to hack a server you must first gain root access @@ -35,6 +36,7 @@ grow :param string hostname/ip: IP or hostname of the target server to grow :returns: The number by which the money on the server was multiplied for the growth + :RAM cost: 0.15 GB Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target server's security level. When grow() completes, the money available on a target server will be increased by a @@ -57,6 +59,7 @@ weaken :param string hostname.ip: IP or hostname of the target server to weaken :returns: The amount by which the target server's security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads + :RAM cost: 0.15 GB Use your hacking skills to attack a server's security, lowering the server's security level. The runtime for this command depends on your hacking level and the target server's security level. This function lowers the security level of the target @@ -75,6 +78,7 @@ sleep .. js:function:: sleep(n) :param number n: Number of milliseconds to sleep + :RAM cost: 0 GB Suspends the script for n milliseconds. @@ -84,6 +88,7 @@ print .. js:function:: print(x) :param x: Value to be printed + :RAM cost: 0 GB Prints a value or a variable to the script's logs. @@ -93,6 +98,7 @@ tprint .. js:function:: tprint(x) :param x: Value to be printed + :RAM cost: 0 GB Prints a value or a variable to the Terminal @@ -101,6 +107,8 @@ clearLog .. js:function:: clearLog() + :RAM cost: 0 GB + Clears the script's logs disableLog @@ -109,6 +117,7 @@ disableLog .. js:function:: disableLog(fn) :param string fn: Name of function for which to disable logging + :RAM cost: 0 GB Disables logging for the given function. Logging can be disabled for all functions by passing 'ALL' as the argument. @@ -125,6 +134,7 @@ enableLog .. js:function:: enableLog(fn) :param string fn: Name of function for which to enable logging + :RAM cost: 0 GB Re-enables logging for the given function. If 'ALL' is passed into this function as an argument, then it will revert the effects of disableLog('ALL') @@ -135,6 +145,7 @@ isLogEnabled .. js:function:: isLogEnabled(fn) :param string fn: Name of function to check + :RAM cost: 0 GB Returns a boolean indicating whether or not logging is enabled for that function (or 'ALL') @@ -144,6 +155,8 @@ getScriptLogs .. js:function:: getScriptLogs() + :RAM cost: 0 GB + Returns the script's logs. The logs are returned as an array, where each line is an element in the array. The most recently logged line is at the end of the array. @@ -158,6 +171,7 @@ scan :param string hostname/ip: IP or hostname of the server to scan :param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false) + :RAM cost: 0.2 GB Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The hostnames/IPs in the returned array are strings. @@ -168,6 +182,7 @@ nuke .. js:function:: nuke(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer. @@ -181,6 +196,7 @@ brutessh .. js:function:: brutessh(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer. @@ -194,6 +210,7 @@ ftpcrack .. js:function:: ftpcrack(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer. @@ -207,6 +224,7 @@ relaysmtp .. js:function:: relaysmtp(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer. @@ -220,6 +238,7 @@ httpworm .. js:function:: httpworm(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer. @@ -233,6 +252,7 @@ sqlinject .. js:function:: sqlinject(hostname/ip) :param string hostname/ip: IP or hostname of the target server + :RAM cost: 0 GB Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer. @@ -250,6 +270,7 @@ run :param args...: Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument *numThreads* must be filled in with a value. + :RAM cost: 1 GB Run a script as a separate process. This function can only be used to run scripts located on the current server (the server running the script that calls this function). @@ -282,6 +303,7 @@ exec :param args...: Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument *numThreads* must be filled in with a value. + :RAM cost: 1.3 GB Run a script as a separate process on a specified server. This is similar to the *run* function except that it can be used to run a script on any server, instead of just the current server. @@ -311,6 +333,7 @@ spawn :param number numThreads: Number of threads to spawn new script with. Will be rounded to nearest integer :param args...: Additional arguments to pass into the new script that is being run. + :RAM cost: 2 GB Terminates the current script, and then after a delay of about 20 seconds it will execute the newly-specified script. The purpose of this function is to execute a new script without being constrained by the RAM usage of the current one. @@ -330,6 +353,7 @@ kill :param string script: Filename of the script to kill :param string hostname/ip: IP or hostname of the server on which to kill the script :param args...: Arguments to identify which script to kill + :RAM cost: 0.5 GB Kills the script on the target server specified by the script's name and arguments. Remember that scripts are uniquely identified by both their name and arguments. For example, if *foo.script* is run with the argument 1, then this @@ -357,6 +381,7 @@ killall .. js:function:: killall(hostname/ip) :param string hostname/ip: IP or hostname of the server on which to kill all scripts + :RAM cost: 0.5 GB Kills all running scripts on the specified server. This function returns true if any scripts were killed, and false otherwise. In other words, it will return true if there are any scripts running on the target server. @@ -367,6 +392,8 @@ exit .. js:function:: exit() + :RAM cost: 0 GB + Terminates the current script immediately scp @@ -379,6 +406,7 @@ scp Hostname or IP of the source server, which is the server from which the file will be copied. This argument is optional and if it's omitted the source will be the current server. :param string destination: Hostname or IP of the destination server, which is the server to which the file will be copied. + :RAM cost: 0.6 GB Copies a script or literature (.lit) file(s) to another server. The *files* argument can be either a string specifying a single file to copy, or an array of strings specifying multiple files to copy. @@ -405,6 +433,7 @@ ls :param string hostname/ip: Hostname or IP of the target server :param string grep: a substring to search for in the filename + :RAM cost: 0 GB Returns an array with the filenames of all files on the specified server (as strings). The returned array is sorted in alphabetic order @@ -416,6 +445,7 @@ ps :param string ip: Hostname or IP address of the target server. If not specified, it will be the current server's IP by default + :RAM cost: 0 GB Returns an array with general information about all scripts running on the specified target server. The information for each server is given in an object with @@ -443,6 +473,7 @@ hasRootAccess .. js:function:: hasRootAccess(hostname/ip) :param string hostname/ip: Hostname or IP of the target server + :RAM cost: 0.05 GB Returns a boolean indicating whether or not the player has root access to the specified target server. @@ -457,6 +488,8 @@ getHostname .. js:function:: getHostname() + :RAM cost: 0.05 GB + Returns a string with the hostname of the server that the script is running on getHackingLevel @@ -464,6 +497,8 @@ getHackingLevel .. js:function:: getHackingLevel() + :RAM cost: 0.05 GB + Returns the player's current hacking level getHackingMultipliers @@ -471,6 +506,8 @@ getHackingMultipliers .. js:function:: getHackingMultipliers() + :RAM cost: 4 GB + Returns an object containing the Player's hacking related multipliers. These multipliers are returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure:: @@ -492,6 +529,8 @@ getHacknetMultipliers .. js:function:: getHacknetMultipliers() + :RAM cost: 4 GB + Returns an object containing the Player's hacknet related multipliers. These multipliers are returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure:: @@ -517,6 +556,7 @@ getServerMoneyAvailable .. js:function:: getServerMoneyAvailable(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the amount of money available on a server. **Running this function on the home computer will return the player's money.** @@ -532,6 +572,7 @@ getServerMaxMoney .. js:function:: getServerMaxMoney(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the maximum amount of money that can be available on a server @@ -541,6 +582,7 @@ getServerGrowth .. js:function:: getServerGrowth(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the server's instrinsic "growth parameter". This growth parameter is a number between 1 and 100 that represents how quickly the server's money grows. This parameter affects the @@ -553,6 +595,7 @@ getServerSecurityLevel .. js:function:: getServerSecurityLevel(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the security level of the target server. A server's security level is denoted by a number, typically between 1 and 100 (but it can go above 100). @@ -563,6 +606,7 @@ getServerBaseSecurityLevel .. js:function:: getServerBaseSecurityLevel(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the base security level of the target server. This is the security level that the server starts out with. This is different than *getServerSecurityLevel()* because *getServerSecurityLevel()* returns the current @@ -575,6 +619,7 @@ getServerMinSecurityLevel .. js:function:: getServerMinSecurityLevel(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the minimum security level of the target server @@ -584,6 +629,7 @@ getServerRequiredHackingLevel .. js:function:: getServerRequiredHackingLevel(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the required hacking level of the target server @@ -593,6 +639,7 @@ getServerNumPortsRequired .. js:function:: getServerNumPortsRequired(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns the number of open ports required to successfully run NUKE.exe on the specified server. @@ -602,6 +649,7 @@ getServerRam .. js:function:: getServerRam(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns an array with two elements that gives information about a server's memory (RAM). The first element in the array is the amount of RAM that the server has total (in GB). The second element in @@ -619,6 +667,7 @@ serverExists .. js:function:: serverExists(hostname/ip) :param string hostname/ip: Hostname or IP of target server + :RAM cost: 0.1 GB Returns a boolean denoting whether or not the specified server exists @@ -631,6 +680,7 @@ fileExists :param string hostname/ip: Hostname or IP of target server. This is optional. If it is not specified then the function will use the current server as the target server + :RAM cost: 0.1 GB Returns a boolean indicating whether the specified file exists on the target server. The filename for scripts is case-sensitive, but for other types of files it is not. For example, *fileExists("brutessh.exe")* @@ -655,6 +705,7 @@ isRunning :param string filename: Filename of script to check. This is case-sensitive. :param string hostname/ip: Hostname or IP of target server :param args...: Arguments to specify/identify which scripts to search for + :RAM cost: 0.1 GB Returns a boolean indicating whether the specified script is running on the target server. Remember that a script is uniquely identified by both its name and its arguments. @@ -681,6 +732,8 @@ getNextHacknetNodeCost .. js:function:: getNextHacknetNodeCost() + :RAM cost: 0 GB + Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi` purchaseHacknetNode @@ -688,6 +741,8 @@ purchaseHacknetNode .. js:function:: purchaseHacknetNode() + :RAM cost: 0 GB + Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi` getPurchasedServerCost @@ -695,6 +750,8 @@ getPurchasedServerCost .. js:function:: getPurchasedServerCost(ram) + :RAM cost: 0.25 GB + :param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20) Returns the cost to purchase a server with the specified amount of *ram*. @@ -712,6 +769,7 @@ purchaseServer :param string hostname: Hostname of the purchased server :param number ram: Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20) + :RAM cost: 2.25 GB Purchased a server with the specified hostname and amount of RAM. @@ -741,6 +799,7 @@ deleteServer .. js:function:: deleteServer(hostname) :param string hostname: Hostname of the server to delete + :RAM cost: 2.25 GB Deletes one of your purchased servers, which is specified by its hostname. @@ -757,6 +816,7 @@ getPurchasedServers :param boolean hostname: Specifies whether hostnames or IP addresses should be returned. If it's true then hostnames will be returned, and if false then IPs will be returned. If this argument is omitted then it is true by default + :RAM cost: 2.25 GB Returns an array with either the hostnames or IPs of all of the servers you have purchased. @@ -765,6 +825,8 @@ getPurchasedServerLimit .. js:function:: getPurchasedServerLimit() + :RAM cost: 0.05 GB + Returns the maximum number of servers you can purchase getPurchasedServerMaxRam @@ -772,6 +834,8 @@ getPurchasedServerMaxRam .. js:function:: getPurchasedServerMaxRam() + :RAM cost: 0.05 GB + Returns the maximum RAM that a purchased server can have write @@ -782,6 +846,7 @@ write :param string/number port/fn: Port or text file/script that will be written to :param string data: Data to write :param string mode: Defines the write mode. Only valid when writing to text files or scripts. + :RAM cost: 1 GB This function can be used to either write data to a port, a text file (.txt), or a script (.script, .js, .ns) @@ -802,6 +867,7 @@ tryWrite :param number port: Port to be written to :param string data: Data to try to write :returns: True if the data is successfully written to the port, and false otherwise + :RAM cost: 1 GB Attempts to write data to the specified Netscript Port. If the port is full, the data will not be written. Otherwise, the data will be written normally @@ -812,6 +878,7 @@ read .. js:function:: read(port/fn) :param string/number port/fn: Port or text file to read from + :RAM cost: 1 GB This function is used to read data from a port, a text file (.txt), or a script (.script, .js, .ns) @@ -828,6 +895,7 @@ peek .. js:function:: peek(port) :param number port: Port to peek. Must be an integer between 1 and 20 + :RAM cost: 1 GB This function is used to peek at the data from a port. It returns the first element in the specified port without removing that element. If the port is empty, the string "NULL PORT DATA" will be returned. @@ -840,6 +908,7 @@ clear .. js:function:: clear(port/fn) :param string/number port/fn: Port or text file to clear + :RAM cost: 1 GB This function is used to clear data in a `Netscript Ports `_ or a text file. @@ -853,6 +922,7 @@ getPortHandle .. js:function:: getPortHandle(port) :param number port: Port number + :RAM cost: 10 GB Get a handle to a Netscript Port. See more details here: :ref:`netscript_ports` @@ -865,6 +935,7 @@ rm :param string fn: Filename of file to remove. Must include the extension :returns: True if it successfully deletes the file, and false otherwise + :RAM cost: 1 GB Removes the specified file from the current server. This function works for every file type except message (.msg) files. @@ -875,6 +946,7 @@ scriptRunning :param string scriptname: Filename of script to check. This is case-sensitive. :param string hostname/ip: Hostname or IP of target server + :RAM cost: 1 GB Returns a boolean indicating whether any instance of the specified script is running on the target server, regardless of its arguments. @@ -899,6 +971,7 @@ scriptKill :param string scriptname: Filename of script to kill. This is case-sensitive. :param string hostname/ip: Hostname or IP of target server + :RAM cost: 1 GB Kills all scripts with the specified filename on the target server specified by *hostname/ip*, regardless of arguments. Returns true if one or more scripts were successfully killed, and false if none were. @@ -908,6 +981,8 @@ getScriptName .. js:function:: getScriptName() + :RAM cost: 0 GB + Returns the current script name getScriptRam @@ -917,6 +992,7 @@ getScriptRam :param string scriptname: Filename of script. This is case-sensitive. :param string hostname/ip: Hostname or IP of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server. + :RAM cost: 0.1 GB Returns the amount of RAM required to run the specified script on the target server. Returns 0 if the script does not exist. @@ -928,6 +1004,7 @@ getHackTime :param string hostname/ip: Hostname or IP of target server :param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level + :RAM cost: 0.05 GB Returns the amount of time in seconds it takes to execute the *hack()* Netscript function on the target server. @@ -941,6 +1018,7 @@ getGrowTime :param string hostname/ip: Hostname or IP of target server :param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level + :RAM cost: 0.05 GB Returns the amount of time in seconds it takes to execute the *grow()* Netscript function on the target server. @@ -954,6 +1032,7 @@ getWeakenTime :param string hostname/ip: Hostname or IP of target server :param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level + :RAM cost: 0.05 GB Returns the amount of time in seconds it takes to execute the *weaken()* Netscript function on the target server. @@ -968,6 +1047,7 @@ getScriptIncome :param string scriptname: Filename of script :param string hostname/ip: Server on which script is running :param args...: Arguments that the script is running with + :RAM cost: 0.1 GB Returns the amount of income the specified script generates while online (when the game is open, does not apply for offline income). Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script with the arguments @@ -986,6 +1066,7 @@ getScriptExpGain :param string scriptname: Filename of script :param string hostname/ip: Server on which script is running :param args...: Arguments that the script is running with + :RAM cost: 0.1 GB Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for offline experience gains). Remember that a script is uniquely identified by both its name and its arguments. @@ -997,6 +1078,8 @@ getTimeSinceLastAug .. js:function:: getTimeSinceLastAug() + :RAM cost: 0.05 GB + Returns the amount of time in milliseconds that have passed since you last installed Augmentations sprintf @@ -1004,6 +1087,8 @@ sprintf .. js:function:: sprintf() + :RAM cost: 0 GB + See `this link `_ for details. vsprintf @@ -1011,6 +1096,8 @@ vsprintf .. js:function:: vsprintf() + :RAM cost: 0 GB + See `this link `_ for details. prompt @@ -1019,6 +1106,7 @@ prompt .. js:function:: prompt(txt) :param string txt: Text to appear in the prompt dialog box + :RAM cost: 0 GB Prompts the player with a dialog box with two options: "Yes" and "No". This function will return true if the player click "Yes" and false if the player clicks "No". The script's execution is halted until the player selects one of the options. @@ -1031,6 +1119,7 @@ wget :param string url: URL to pull data from :param string target: Filename to write data to. Must be script or text file :param string ip: Optional hostname/ip of server for target file. + :RAM cost: 0 GB Retrieves data from a URL and downloads it to a file on the specified server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, @@ -1057,4 +1146,6 @@ wget getFavorToDonate ^^^^^^^^^^^^^^^^ + :RAM cost: 0.1 GB + Returns the amount of Faction favor required to be able to donate to a faction. diff --git a/doc/source/netscriptsingularityfunctions.rst b/doc/source/netscriptsingularityfunctions.rst index 9dece53af..c41372d93 100644 --- a/doc/source/netscriptsingularityfunctions.rst +++ b/doc/source/netscriptsingularityfunctions.rst @@ -14,7 +14,7 @@ You can use the Singularity Functions in other BitNodes if and only if you have Source-File 4 will open up additional Singularity Functions that you can use in other BitNodes. If your Source-File 4 is upgraded all the way to level 3, then you will be able to access all of the Singularity Functions. -Note that Singularity Functions require a lot of RAM outside of BitNode-4 (their RAM costs are multiplied by 10 if you are not in BitNode-4) +Note that Singularity Functions require twice as much RAM outside of BitNode-4 universityCourse ---------------- @@ -422,7 +422,7 @@ donateToFaction Attempts to donate money to the specified faction in exchange for reputation. Returns true if you successfully donate the money, and false otherwise. - + createProgram ------------- diff --git a/index.html b/index.html index e7a0b6e1a..41fc4314d 100644 --- a/index.html +++ b/index.html @@ -488,58 +488,6 @@

- -
-

If you see this menu you can pretty much break the game. It's recommended that you use this menu only to setup a save file appropriate to test a new feature or bug fix.

- -

Generic

- Add $1000t - Double home RAM - -

Augmentation related:

- - - Queue AugmentationMay require save + reload - - Add/Remove source file If Lvl == 0 the sf will be removed, calling it with another level will replace your current source file. You CAN set a source file higher than it's maximum level. - -

Faction related:

- - Receive inviteMay require save + reload - -

Program related:

- - ConnectConnect to the target server. - - - Add ProgramAdd this program to the player home server, won't add the same program twice. - - Trigger BitFlumeQuick escape to change BN, does not give SFs - -

Server related:

- NUKE + ports all serversOpens all ports, nukes all servers, gains root access to everything (still need the appropriate hacking level) - minimize all servers securityAll servers security will be set to their minimum security - maximize all servers moneySet all servers available money to maximum for that server - -

Exp/stats related:

- - add hacking expAdd that many hacking experience point, use negative numbers to remove, don't worry about going under 0 exp - - add strength expAdd that many strength experience point, use negative numbers to remove, don't worry about going under 0 exp - - add defense expAdd that many defense experience point, use negative numbers to remove, don't worry about going under 0 exp - - add dexterity expAdd that many dexterity experience point, use negative numbers to remove, don't worry about going under 0 exp - - add agility expAdd that many agility experience point, use negative numbers to remove, don't worry about going under 0 exp - - add charisma expAdd that many charisma experience point, use negative numbers to remove, don't worry about going under 0 exp - - add intelligence expAdd that many intelligence experience point, use negative numbers to remove, don't worry about going under 0 exp - enable intelligenceEnables the intelligence stat - disable intelligenceDisables the intelligence stat -
-
Return to World diff --git a/netscript.js b/netscript.js index 250f819b7..529088b7f 100644 --- a/netscript.js +++ b/netscript.js @@ -92,8 +92,9 @@ let NetscriptFunctions = "installAugmentations|" + // TIX API - "getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|shortStock|sellShort|" + - "placeOrder|cancelOrder|" + + "getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|" + + "shortStock|sellShort|" + + "placeOrder|cancelOrder|getStockVolatility|getStockForecast|" + // Hacknet Node API "hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|" + diff --git a/src/Augmentations.js b/src/Augmentations.js index df1359a2c..ce25d8566 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -1,8 +1,7 @@ import {BitNodeMultipliers} from "./BitNodeMultipliers"; import {CONSTANTS} from "./Constants"; import {Engine} from "./engine"; -import {Factions, getNextNeurofluxLevel, - factionExists} from "./Faction"; +import {Factions, factionExists} from "./Faction"; import {hasBladeburnerSF} from "./NetscriptFunctions"; import {addWorkerScript} from "./NetscriptWorker"; import {Player} from "./Player"; @@ -1029,9 +1028,25 @@ function initAugmentations() { "This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation " + "increases ALL of the player's multipliers by 1%." }); - var nextLevel = getNextNeurofluxLevel(); - NeuroFluxGovernor.level = nextLevel - 1; - mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); + + // Set the Augmentation's level to the currently-installed level + let currLevel = 0; + for (let i = 0; i < Player.augmentations.length; ++i) { + if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) { + currLevel = Player.augmentations[i].level; + } + } + NeuroFluxGovernor.level = currLevel; + + // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux + // levels that are purchased but not yet installed + let nextLevel = currLevel; + for (let i = 0; i < Player.queuedAugmentations.length; ++i) { + if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) { + ++nextLevel; + } + } + mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel); NeuroFluxGovernor.baseRepRequirement = 500 * mult * CONSTANTS.AugmentationRepMultiplier * BitNodeMultipliers.AugmentationRepCost; NeuroFluxGovernor.baseCost = 750e3 * mult * CONSTANTS.AugmentationCostMultiplier * BitNodeMultipliers.AugmentationMoneyCost; if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) { @@ -2380,7 +2395,7 @@ function applyAugmentation(aug, reapply=false) { return; } - if (aug.name == AugmentationNames.NeuroFluxGovernor) { + if (aug.name === AugmentationNames.NeuroFluxGovernor) { for (var i = 0; i < Player.augmentations.length; ++i) { if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) { //Already have this aug, just upgrade the level diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 73d214196..f96df7070 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -3336,6 +3336,38 @@ Bladeburner.prototype.startActionNetscriptFn = function(type, name, workerScript return false; } + // Special logic for Black Ops + if (actionId.type === ActionTypes["BlackOp"]) { + // Can't start a BlackOp if you don't have the required rank + let action = this.getActionObject(actionId); + if (action.reqdRank > this.rank) { + workerScript.log(`Failed to start Black Op ${actionId.name} due to insufficient rank`); + return false; + } + + // Can't start a BlackOp if you haven't done the one before it + var blackops = []; + for (const nm in BlackOperations) { + if (BlackOperations.hasOwnProperty(nm)) { + blackops.push(nm); + } + } + blackops.sort(function(a, b) { + return (BlackOperations[a].reqdRank - BlackOperations[b].reqdRank); // Sort black ops in intended order + }); + + let i = blackops.indexOf(actionId.name); + if (i === -1) { + workerScript.log("ERROR: Invalid Black Operation name passed into bladeburner.startAction(). Note that this name is case-sensitive & whitespace-sensitive"); + return false; + } + + if (i > 0 && this.blackops[blackops[i-1]] == null) { + workerScript.log(`ERROR: Cannot attempt Black Operation ${actionId.name} because you have not done the preceding one`); + return false; + } + } + try { this.startAction(actionId); if (workerScript.shouldLog("startAction")) { @@ -3437,9 +3469,14 @@ Bladeburner.prototype.getActionCountRemainingNetscriptFn = function(type, name, switch (actionId.type) { case ActionTypes["Contract"]: case ActionTypes["Operation"]: + return actionObj.count; case ActionTypes["BlackOp"]: case ActionTypes["BlackOperation"]: - return actionObj.count; + if (this.blackops[name] != null) { + return 0; + } else { + return 1; + } case ActionTypes["Training"]: case ActionTypes["Field Analysis"]: case ActionTypes["FieldAnalysis"]: diff --git a/src/Constants.js b/src/Constants.js index 26a1f04de..5b52153f1 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -48,7 +48,7 @@ let CONSTANTS = { /* Netscript Constants */ //RAM Costs for different commands ScriptBaseRamCost: 1.6, - ScriptDomRamCost: 100, + ScriptDomRamCost: 25, ScriptWhileRamCost: 0, ScriptForRamCost: 0, ScriptIfRamCost: 0, @@ -91,6 +91,8 @@ let CONSTANTS = { ScriptSingularityFn2RamCost: 2, ScriptSingularityFn3RamCost: 3, + ScriptSingularityFnRamMult: 2, // Multiplier for RAM cost outside of BN-4 + ScriptBladeburnerApiBaseRamCost: 4, NumNetscriptPorts: 20, @@ -500,6 +502,7 @@ let CONSTANTS = { LatestUpdate: ` v0.41.0 + * WARNING: In NetscriptJS, defining a function called print() is no longer possible * Gang Mechanic Changes (BitNode-2): *** Added new 'ascension' mechanic for Gang Members *** The first three gang members are now 'free' (can be recruited instantly) @@ -508,9 +511,18 @@ let CONSTANTS = { *** Added a new category of upgrades for Gang Members: Augmentations *** Non-Augmentation Gang member upgrades are now significantly weaker *** Reputation for your Gang faction can no longer be gained through Infiltration + * RAM Cost of accessing the global document object lowered from 100 GB to 25 GB + * RAM Cost to use Singularity Functions outside of BitNode-4 lowered by 75%. They now only cost twice as much as they do in BitNode-4 * b1t_flum3.exe now takes significantly less time to create + * Improved number formatting for Player 'work' actions (including crimes, etc.). These numbers should also adhere to locale settings now (by Kline-) + * Bug Fix: Calling print() in NetscriptJS no longer brings up the print dialog * Bug Fix: Fixed a bug that sometimes caused a blank black screen when destroying/resetting/switching BitNodes * Bug Fix: Netscript calls that throw errors will now no longer cause the 'concurrent calls' error if they are caught in the script. i.e. try/catch should now work properly in scripts + * Bug Fix: Fixed a bug where sometimes the NeuroFlux Governor Augmentation level would be incorrectly calculated when the game was loaded + * Bug Fix: Fixed a bug where calling the scp() Netscript function with invalid hostname/ips would throw an unclear error message + * Bug Fix: Bladeburner API function getActionCountRemaining() should now work properly for BlackOps + * Bug Fix: Black Ops can no longer be attempted out-of-order or without the required rank via Bladeburner API + * RAM cost for basic Netscript functions added to documentation (by CBJamo) ` } diff --git a/src/DevMenu.js b/src/DevMenu.js new file mode 100644 index 000000000..3390f294d --- /dev/null +++ b/src/DevMenu.js @@ -0,0 +1,395 @@ +import {AugmentationNames} from "./Augmentations" +import {Programs} from "./CreateProgram" +import {Factions} from "./Faction"; +import {Player} from "./Player"; +import {AllServers} from "./Server"; +import {Terminal} from "./Terminal"; +import {exceptionAlert} from "../utils/helpers/exceptionAlert"; +import {createElement} from "../utils/uiHelpers/createElement"; +import {removeElementById} from "../utils/uiHelpers/removeElementById"; + +const devMenuContainerId = "dev-menu-container"; + +export function createDevMenu() { + if (process.env.NODE_ENV !== "development") { + throw new Error("Cannot create Dev Menu because you are not in a dev build"); + } + + const devMenuText = createElement("h1", { + display: "block", + innerText: "Development Menu - Only meant to be used for testing/debugging", + }); + + // Generic + const genericHeader = createElement("h2", { + display: "block", + innerText: "Generic" + }); + + const addMoney = createElement("button", { + class: "std-button", + clickListener: () => { + Player.gainMoney(1e15); + }, + display: "block", + innerText: "Add $1000t", + }); + + const addRam = createElement("button", { + class: "std-button", + clickListener: () => { + Player.getHomeComputer().maxRam *= 2; + }, + display: "block", + innerText: "Double Home Computer RAM", + }); + + const triggerBitflume = createElement("button", { + class: "std-button", + clickListener: () => { + hackWorldDaemon(Player.bitNodeN, true); + }, + innerText: "Trigger BitFlume", + }); + + const destroyCurrentBitnode = createElement("button", { + class: "std-button", + clickListener: () => { + hackWorldDaemon(Player.bitNodeN); + }, + innerText: "Destroy Current BitNode", + tooltip: "Will grant Source-File for the BitNode", + }) + + // Experience / stats + const statsHeader = createElement("h2", { + display: "block", + innerText: "Experience/Stats" + }); + + const statsHackingExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsHackingExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsHackingExpInput.value); + Player.gainHackingExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsStrengthExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsStrengthExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsStrengthExpInput.value); + Player.gainStrengthExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsDefenseExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsDefenseExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsDefenseExpInput.value); + Player.gainDefenseExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsDexterityExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsDexterityExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsDexterityExpInput.value); + Player.gainDexterityExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsAgilityExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsAgilityExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsAgilityExpButton.value); + Player.gainAgilityExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsCharismaExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsCharismaExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsCharismaExpInput.value); + Player.gainCharismaExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsIntelligenceExpInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "+/- hacking exp", + type: "number", + }); + const statsIntelligenceExpButton = createElement("button", { + class: "std-button", + clickListener: () => { + const exp = parseInt(statsIntelligenceExpInput.value); + Player.gainIntelligenceExp(exp); + Player.updateSkillLevels(); + }, + display: "block", + innerText: "Add Hacking Exp", + }); + + const statsEnableIntelligenceButton = createElement("button", { + class: "std-button", + clickListener: () => { + Player.intelligence = 1; + }, + innerText: "Enable Intelligence" + }); + + const statsDisableIntelligenceButton = createElement("button", { + class: "std-button", + clickListener: () => { + Player.intelligence = 0; + }, + innerText: "Disable Intelligence" + }); + + // Factions + const factionsHeader = createElement("h2", {innerText: "Factions"}); + + const factionsDropdown = createElement("select", {class: "dropdown"}); + for (const i in Factions) { + factionsDropdown.options[factionsDropdown.options.length] = new Option(Factions[i].name, Factions[i].name); + } + + const factionsAddButton = createElement("button", { + class: "std-button", + clickListener: () => { + const facName = factionsDropdown.options[factionsDropdown.selectedIndex].value; + Player.receiveInvite(facName); + }, + innerText: "Receive Invite to Faction", + }); + + // Augmentations / Source Files + const augmentationsHeader = createElement("h2", {innerText: "Augmentations"}); + + const augmentationsDropdown = createElement("select", {class: "dropdown"}); + for (const i in AugmentationNames) { + const augName = AugmentationNames[i]; + augmentationsDropdown.options[augmentationsDropdown.options.length] = new Option(augName, augName); + } + + const augmentationsQueueButton = createElement("button", { + class: "std-button", + clickListener: () => { + Player.queueAugmentation(augmentationsDropdown.options[augmentationsDropdown.selectedIndex].value); + }, + innerText: "Queue Augmentation", + }) + + // Programs + const programsHeader = createElement("h2", {innerText: "Programs"}); + + const programsAddDropdown = createElement("select", {class: "dropdown"}); + for (const i in Programs) { + const progName = Programs[i].name; + programsAddDropdown.options[programsAddDropdown.options.length] = new Option(progName, progName); + } + + const programsAddButton = createElement("button", { + class: "std-button", + clickListener: () => { + const program = programsAddDropdown.options[programsAddDropdown.selectedIndex].value; + if(!Player.hasProgram(program)) { + Player.getHomeComputer().programs.push(program); + } + }, + innerText: "Add Program", + }) + + // Servers + const serversHeader = createElement("h2", {innerText: "Servers"}); + + const serversOpenAll = createElement("button", { + class: "std-button", + clickListener: () => { + for (const i in AllServers) { + AllServers[i].hasAdminRights = true; + AllServers[i].sshPortOpen = true; + AllServers[i].ftpPortOpen = true; + AllServers[i].smtpPortOpen = true; + AllServers[i].httpPortOpen = true; + AllServers[i].sqlPortOpen = true; + AllServers[i].openPortCount = 5; + } + }, + display: "block", + innerText: "Get Admin Rights to all servers", + }); + + const serversMinSecurityAll = createElement("button", { + class: "std-button", + clickListener: () => { + for (const i in AllServers) { + AllServers[i].hackDifficulty = AllServers[i].minDifficulty; + } + }, + display: "block", + innerText: "Set all servers to min security", + }); + + const serversMaxMoneyAll = createElement("button", { + class: "std-button", + clickListener: () => { + for (const i in AllServers) { + AllServers[i].moneyAvailable = AllServers[i].moneyMax; + } + }, + display: "block", + innerText: "Set all servers to max money", + }); + + const serversConnectToDropdown = createElement("select", {class: "dropdown"}); + for (const i in AllServers) { + const hn = AllServers[i].hostname; + serversConnectToDropdown.options[serversConnectToDropdown.options.length] = new Option(hn, hn); + } + + const serversConnectToButton = createElement("button", { + class: "std-button", + clickListener: () => { + const host = serversConnectToDropdown.options[serversConnectToDropdown.selectedIndex].value; + Terminal.connectToServer(host); + }, + innerText: "Connect to server", + }); + + // Add everything to container, then append to main menu + const devMenuContainer = createElement("div", { + class: "generic-menupage-container", + id: devMenuContainerId, + }); + + const bladeburnerHeader = createElement("h2", {innerText: "Bladeburner"}); + + const bladeburnerGainRankInput = createElement("input", { + class: "text-input", + display: "block", + placeholder: "Rank to gain (or negative to lose rank)", + type: "number", + }); + + const bladeburnerGainRankButton = createElement("button", { + class: "std-button", + clickListener: () => { + try { + const rank = parseInt(bladeburnerGainRankInput.value); + Player.bladeburner.changeRank(rank); + } catch(e) { + exceptionAlert(`Failed to change Bladeburner Rank in dev menu: ${e}`); + } + }, + display: "block", + innerText: "Gain Bladeburner Rank", + }) + + devMenuContainer.appendChild(devMenuText); + devMenuContainer.appendChild(genericHeader); + devMenuContainer.appendChild(addMoney); + devMenuContainer.appendChild(addRam); + devMenuContainer.appendChild(triggerBitflume); + devMenuContainer.appendChild(destroyCurrentBitnode); + devMenuContainer.appendChild(statsHeader); + devMenuContainer.appendChild(statsHackingExpInput); + devMenuContainer.appendChild(statsHackingExpButton); + devMenuContainer.appendChild(statsStrengthExpInput); + devMenuContainer.appendChild(statsStrengthExpButton); + devMenuContainer.appendChild(statsDefenseExpInput); + devMenuContainer.appendChild(statsDefenseExpButton); + devMenuContainer.appendChild(statsDexterityExpInput); + devMenuContainer.appendChild(statsDexterityExpButton); + devMenuContainer.appendChild(statsAgilityExpInput); + devMenuContainer.appendChild(statsAgilityExpButton); + devMenuContainer.appendChild(statsCharismaExpInput); + devMenuContainer.appendChild(statsCharismaExpButton); + devMenuContainer.appendChild(statsIntelligenceExpInput); + devMenuContainer.appendChild(statsIntelligenceExpButton); + devMenuContainer.appendChild(statsEnableIntelligenceButton); + devMenuContainer.appendChild(statsDisableIntelligenceButton); + devMenuContainer.appendChild(factionsHeader); + devMenuContainer.appendChild(factionsDropdown); + devMenuContainer.appendChild(factionsAddButton); + devMenuContainer.appendChild(augmentationsHeader); + devMenuContainer.appendChild(augmentationsQueueButton); + devMenuContainer.appendChild(programsHeader); + devMenuContainer.appendChild(programsAddDropdown); + devMenuContainer.appendChild(programsAddButton); + devMenuContainer.appendChild(serversHeader); + devMenuContainer.appendChild(serversOpenAll); + devMenuContainer.appendChild(serversMinSecurityAll); + devMenuContainer.appendChild(serversMaxMoneyAll); + devMenuContainer.appendChild(serversConnectToDropdown); + devMenuContainer.appendChild(serversConnectToButton); + devMenuContainer.appendChild(bladeburnerHeader); + devMenuContainer.appendChild(bladeburnerGainRankInput); + devMenuContainer.appendChild(bladeburnerGainRankButton); + + const entireGameContainer = document.getElementById("entire-game-container"); + if (entireGameContainer == null) { + throw new Error("Could not find entire-game-container DOM element"); + } + entireGameContainer.appendChild(devMenuContainer); +} + +export function closeDevMenu() { + removeElementById(devMenuContainerId); +} diff --git a/src/Faction.js b/src/Faction.js index 7d92905ff..770526374 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -734,27 +734,21 @@ function purchaseAugmentation(aug, fac, sing=false) { } function getNextNeurofluxLevel() { - var aug = Augmentations[AugmentationNames.NeuroFluxGovernor]; - if (aug == null) { - for (var i = 0; i < Player.augmentations.length; ++i) { - if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) { - aug = Player.augmentations[i]; - } - } - if (aug == null) { - console.log("WARNING: Could not find NeuroFlux Governor aug. This is OK if " + - "it happens during the loading/initialization of the game, but probably " + - "indicates something seriously wrong at other times"); - return 1; + // Get current Neuroflux level based on Player's augmentations + let currLevel = 0; + for (var i = 0; i < Player.augmentations.length; ++i) { + if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) { + currLevel = Player.augmentations[i].level; } } - var nextLevel = aug.level + 1; + + // Account for purchased but uninstalled Augmentations for (var i = 0; i < Player.queuedAugmentations.length; ++i) { if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) { - ++nextLevel; + ++currLevel; } } - return nextLevel; + return currLevel + 1; } function processPassiveFactionRepGain(numCycles) { diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index cf1ace527..30522c8ad 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -882,12 +882,12 @@ function NetscriptFunctions(workerScript) { } destServer = getServer(ip2); if (destServer == null) { - throw makeRuntimeRejectMsg(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip); + throw makeRuntimeRejectMsg(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip2}`); } currServ = getServer(ip1); if (currServ == null) { - throw makeRuntimeRejectMsg(workerScript, "Could not find server ip for this script. This is a bug please contact game developer"); + throw makeRuntimeRejectMsg(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip1}`); } } else if (arguments.length === 2) { //scriptname, destination if (scriptname === undefined || ip1 === undefined) { @@ -895,7 +895,7 @@ function NetscriptFunctions(workerScript) { } destServer = getServer(ip1); if (destServer == null) { - throw makeRuntimeRejectMsg(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip); + throw makeRuntimeRejectMsg(workerScript, `ERROR: Invalid hostname/ip passed into scp() command: ${ip1}`); } currServ = getServer(workerScript.serverIp); @@ -2313,7 +2313,7 @@ function NetscriptFunctions(workerScript) { /* Singularity Functions */ universityCourse : function(universityName, className) { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("universityCourse", ramCost); } @@ -2402,7 +2402,7 @@ function NetscriptFunctions(workerScript) { gymWorkout : function(gymName, stat) { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("gymWorkout", ramCost); } @@ -2504,7 +2504,7 @@ function NetscriptFunctions(workerScript) { travelToCity(cityname) { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("travelToCity", ramCost); } @@ -2541,7 +2541,7 @@ function NetscriptFunctions(workerScript) { purchaseTor() { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseTor", ramCost); } @@ -2585,7 +2585,7 @@ function NetscriptFunctions(workerScript) { }, purchaseProgram(programName) { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseProgram", ramCost); } @@ -2637,7 +2637,7 @@ function NetscriptFunctions(workerScript) { }, getStats : function() { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getStats", ramCost); } @@ -2661,7 +2661,7 @@ function NetscriptFunctions(workerScript) { }, getCharacterInformation : function() { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCharacterInformation", ramCost); } @@ -2697,7 +2697,7 @@ function NetscriptFunctions(workerScript) { }, isBusy : function() { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("isBusy", ramCost); } @@ -2712,7 +2712,7 @@ function NetscriptFunctions(workerScript) { }, stopAction : function() { var ramCost = CONSTANTS.ScriptSingularityFn1RamCost / 2; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("stopAction", ramCost); } @@ -2734,7 +2734,7 @@ function NetscriptFunctions(workerScript) { }, upgradeHomeRam : function() { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("upgradeHomeRam", ramCost); } @@ -2766,7 +2766,7 @@ function NetscriptFunctions(workerScript) { }, getUpgradeHomeRamCost : function() { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost / 2; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getUpgradeHomeRamCost", ramCost); } @@ -2782,7 +2782,7 @@ function NetscriptFunctions(workerScript) { }, workForCompany : function() { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("workForCompany", ramCost); } @@ -2823,7 +2823,7 @@ function NetscriptFunctions(workerScript) { }, applyToCompany : function(companyName, field) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("applyToCompany", ramCost); } @@ -2904,7 +2904,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyRep : function(companyName) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost / 2; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyRep", ramCost); } @@ -2925,7 +2925,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyFavor : function(companyName) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyFavor", ramCost); } @@ -2946,7 +2946,7 @@ function NetscriptFunctions(workerScript) { }, getCompanyFavorGain : function(companyName) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCompanyFavorGain", ramCost); } @@ -2967,7 +2967,7 @@ function NetscriptFunctions(workerScript) { }, checkFactionInvitations : function() { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("checkFactionInvitations", ramCost); } @@ -2983,7 +2983,7 @@ function NetscriptFunctions(workerScript) { }, joinFaction : function(name) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("joinFaction", ramCost); } @@ -3022,7 +3022,7 @@ function NetscriptFunctions(workerScript) { }, workForFaction : function(name, type) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("workForFaction", ramCost); } @@ -3122,7 +3122,7 @@ function NetscriptFunctions(workerScript) { }, getFactionRep : function(name) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost / 4; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionRep", ramCost); } @@ -3143,7 +3143,7 @@ function NetscriptFunctions(workerScript) { }, getFactionFavor : function(name) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionFavor", ramCost); } @@ -3164,7 +3164,7 @@ function NetscriptFunctions(workerScript) { }, getFactionFavorGain: function(name) { var ramCost = CONSTANTS.ScriptSingularityFn2RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getFactionFavorGain", ramCost); } @@ -3185,7 +3185,7 @@ function NetscriptFunctions(workerScript) { }, donateToFaction : function(name, amt) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("donateToFaction", ramCost); } @@ -3224,7 +3224,7 @@ function NetscriptFunctions(workerScript) { }, createProgram : function(name) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("createProgram", ramCost); } @@ -3278,7 +3278,7 @@ function NetscriptFunctions(workerScript) { }, commitCrime : function(crimeRoughName) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("commitCrime", ramCost); } @@ -3335,7 +3335,7 @@ function NetscriptFunctions(workerScript) { }, getCrimeChance : function(crimeRoughName) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getCrimeChance", ramCost); } @@ -3356,7 +3356,7 @@ function NetscriptFunctions(workerScript) { }, getOwnedAugmentations : function(purchased=false) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getOwnedAugmentations", ramCost); } @@ -3380,7 +3380,7 @@ function NetscriptFunctions(workerScript) { }, getOwnedSourceFiles : function() { let ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getOwnedSourceFiles", ramCost); } @@ -3399,7 +3399,7 @@ function NetscriptFunctions(workerScript) { }, getAugmentationsFromFaction : function(facname) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getAugmentationsFromFaction", ramCost); } @@ -3425,7 +3425,7 @@ function NetscriptFunctions(workerScript) { }, getAugmentationCost : function(name) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("getAugmentationCost", ramCost); } @@ -3447,7 +3447,7 @@ function NetscriptFunctions(workerScript) { }, purchaseAugmentation : function(faction, name) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("purchaseAugmentation", ramCost); } @@ -3512,7 +3512,7 @@ function NetscriptFunctions(workerScript) { }, installAugmentations : function(cbScript) { var ramCost = CONSTANTS.ScriptSingularityFn3RamCost; - if (Player.bitNodeN !== 4) {ramCost *= 8;} + if (Player.bitNodeN !== 4) {ramCost *= CONSTANTS.ScriptSingularityFnRamMult;} if (workerScript.checkingRam) { return updateStaticRam("installAugmentations", ramCost); } diff --git a/src/NetscriptJSEvaluator.js b/src/NetscriptJSEvaluator.js index 55ce31972..69f3beb64 100644 --- a/src/NetscriptJSEvaluator.js +++ b/src/NetscriptJSEvaluator.js @@ -31,8 +31,6 @@ export async function executeJSScript(scripts = [], workerScript) { loadedModule = script.module; let ns = workerScript.env.vars; - //ns.threads = workerScript.threads; - //ns.args = workerScript.args; try { // TODO: putting await in a non-async function yields unhelpful @@ -75,7 +73,7 @@ export function _getScriptUrls(script, scripts, seen) { // import {foo} from "blob://" // // Where the blob URL contains the script content. - const transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g, + let transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g, (unmodified, prefix, filename, suffix) => { const isAllowedImport = scripts.some(s => s.filename == filename); if (!isAllowedImport) return unmodified; @@ -92,6 +90,9 @@ export function _getScriptUrls(script, scripts, seen) { } ); + // We automatically define a print function() in the NetscriptJS module so that + // accidental calls to window.print() do not bring up the "print screen" dialog + transformedCode += `\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript's print()?");}` // If we successfully transformed the code, create a blob url for it and // push that URL onto the top of the stack. diff --git a/src/NetscriptWorker.js b/src/NetscriptWorker.js index ac60657b1..6a02d62d7 100644 --- a/src/NetscriptWorker.js +++ b/src/NetscriptWorker.js @@ -14,7 +14,6 @@ import {NetscriptPort} from "./NetscriptPort"; import {AllServers} from "./Server"; import {Settings} from "./Settings"; -//TODO Maybe escodegen might be better? import {generate} from 'escodegen'; import {parse, Node} from "../utils/acorn"; diff --git a/src/Player.js b/src/Player.js index 45177ce05..9edddb8ff 100644 --- a/src/Player.js +++ b/src/Player.js @@ -20,17 +20,14 @@ import {AllServers, Server, AddToAllServers} from "./Server"; import {Settings} from "./Settings"; import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps"; import {SourceFiles, applySourceFile} from "./SourceFile"; - import Decimal from "decimal.js"; import {numeralWrapper} from "./ui/numeralFormat"; - import {dialogBoxCreate} from "../utils/DialogBox"; import {clearEventListeners} from "../utils/uiHelpers/clearEventListeners"; import {createRandomIp} from "../utils/IPAddress"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver"; -import {formatNumber, - convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions"; +import {convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions"; const CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle; @@ -721,17 +718,17 @@ PlayerObject.prototype.work = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently working as a " + this.companyPosition.positionName + " at " + this.companyName + " (Current Company Reputation: " + - formatNumber(companyRep, 0) + ")

" + + numeralWrapper.format(companyRep, '0,0') + ")

" + "You have been working for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "You have earned:

" + - "$" + formatNumber(this.workMoneyGained, 2) + " ($" + formatNumber(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - formatNumber(this.workRepGained, 4) + " (" + formatNumber(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this company

" + - formatNumber(this.workHackExpGained, 4) + " (" + formatNumber(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - formatNumber(this.workStrExpGained, 4) + " (" + formatNumber(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - formatNumber(this.workDefExpGained, 4) + " (" + formatNumber(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - formatNumber(this.workDexExpGained, 4) + " (" + formatNumber(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " (" + formatNumber(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - formatNumber(this.workChaExpGained, 4) + " (" + formatNumber(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + " ($" + numeralWrapper.format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " (" + numeralWrapper.format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this company

" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "You will automatically finish after working for 8 hours. You can cancel earlier if you wish, " + "but you will only gain half of the reputation you've earned so far." } @@ -750,14 +747,14 @@ PlayerObject.prototype.finishWork = function(cancelled, sing=false) { this.updateSkillLevels(); var txt = "You earned a total of:
" + - "$" + formatNumber(this.workMoneyGained, 2) + "
" + - formatNumber(this.workRepGained, 4) + " reputation for the company
" + - formatNumber(this.workHackExpGained, 4) + " hacking exp
" + - formatNumber(this.workStrExpGained, 4) + " strength exp
" + - formatNumber(this.workDefExpGained, 4) + " defense exp
" + - formatNumber(this.workDexExpGained, 4) + " dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " agility exp
" + - formatNumber(this.workChaExpGained, 4) + " charisma exp
"; + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + "
" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " reputation for the company
" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (cancelled) { txt = "You worked a short shift of " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + @@ -774,14 +771,14 @@ PlayerObject.prototype.finishWork = function(cancelled, sing=false) { if (sing) { var res = "You worked a short shift of " + convertTimeMsToTimeElapsedString(this.timeWorked) + " and " + - "earned $" + formatNumber(this.workMoneyGained, 2) + ", " + - formatNumber(this.workRepGained, 4) + " reputation, " + - formatNumber(this.workHackExpGained, 4) + " hacking exp, " + - formatNumber(this.workStrExpGained, 4) + " strength exp, " + - formatNumber(this.workDefExpGained, 4) + " defense exp, " + - formatNumber(this.workDexExpGained, 4) + " dexterity exp, " + - formatNumber(this.workAgiExpGained, 4) + " agility exp, and " + - formatNumber(this.workChaExpGained, 4) + " charisma exp."; + "earned $" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + ", " + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " reputation, " + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp."; this.resetWorkStatus(); return res; } @@ -843,17 +840,17 @@ PlayerObject.prototype.workPartTime = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently working as a " + this.companyPosition.positionName + " at " + Player.companyName + " (Current Company Reputation: " + - formatNumber(companyRep, 0) + ")

" + + numeralWrapper.format(companyRep, '0,0') + ")

" + "You have been working for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "You have earned:

" + - "$" + formatNumber(this.workMoneyGained, 2) + " ($" + formatNumber(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - formatNumber(this.workRepGained, 4) + " (" + formatNumber(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this company

" + - formatNumber(this.workHackExpGained, 4) + " (" + formatNumber(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - formatNumber(this.workStrExpGained, 4) + " (" + formatNumber(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - formatNumber(this.workDefExpGained, 4) + " (" + formatNumber(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - formatNumber(this.workDexExpGained, 4) + " (" + formatNumber(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " (" + formatNumber(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - formatNumber(this.workChaExpGained, 4) + " (" + formatNumber(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + " ($" + numeralWrapper.format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " (" + numeralWrapper.format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this company

" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "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."; @@ -868,14 +865,14 @@ PlayerObject.prototype.finishWorkPartTime = function(sing=false) { this.updateSkillLevels(); var txt = "You earned a total of:
" + - "$" + formatNumber(this.workMoneyGained, 2) + "
" + - formatNumber(this.workRepGained, 4) + " reputation for the company
" + - formatNumber(this.workHackExpGained, 4) + " hacking exp
" + - formatNumber(this.workStrExpGained, 4) + " strength exp
" + - formatNumber(this.workDefExpGained, 4) + " defense exp
" + - formatNumber(this.workDexExpGained, 4) + " dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " agility exp
" + - formatNumber(this.workChaExpGained, 4) + " charisma exp
"; + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + "
" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " reputation for the company
" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; txt = "You worked for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + txt; if (!sing) {dialogBoxCreate(txt);} @@ -886,14 +883,14 @@ PlayerObject.prototype.finishWorkPartTime = function(sing=false) { if (sing) { var res = "You worked for " + convertTimeMsToTimeElapsedString(this.timeWorked) + " and " + "earned a total of " + - "$" + formatNumber(this.workMoneyGained, 2) + ", " + - formatNumber(this.workRepGained, 4) + " reputation, " + - formatNumber(this.workHackExpGained, 4) + " hacking exp, " + - formatNumber(this.workStrExpGained, 4) + " strength exp, " + - formatNumber(this.workDefExpGained, 4) + " defense exp, " + - formatNumber(this.workDexExpGained, 4) + " dexterity exp, " + - formatNumber(this.workAgiExpGained, 4) + " agility exp, and " + - formatNumber(this.workChaExpGained, 4) + " charisma exp"; + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + ", " + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " reputation, " + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp"; this.resetWorkStatus(); return res; } @@ -1012,17 +1009,17 @@ PlayerObject.prototype.workForFaction = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You are currently " + this.currentWorkFactionDescription + " for your faction " + faction.name + - " (Current Faction Reputation: " + formatNumber(faction.playerReputation, 0) + ").
" + + " (Current Faction Reputation: " + numeralWrapper.format(faction.playerReputation, '0,0') + ").
" + "You have been doing this for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "You have earned:

" + - "$" + formatNumber(this.workMoneyGained, 2) + " (" + formatNumber(this.workMoneyGainRate * CYCLES_PER_SEC, 2) + " / sec)

" + - formatNumber(this.workRepGained, 4) + " (" + formatNumber(this.workRepGainRate * CYCLES_PER_SEC, 4) + " / sec) reputation for this faction

" + - formatNumber(this.workHackExpGained, 4) + " (" + formatNumber(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp

" + - formatNumber(this.workStrExpGained, 4) + " (" + formatNumber(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - formatNumber(this.workDefExpGained, 4) + " (" + formatNumber(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - formatNumber(this.workDexExpGained, 4) + " (" + formatNumber(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " (" + formatNumber(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp

" + - formatNumber(this.workChaExpGained, 4) + " (" + formatNumber(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp

" + + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + " (" + numeralWrapper.format(this.workMoneyGainRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " (" + numeralWrapper.format(this.workRepGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) reputation for this faction

" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp

" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp

" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp

" + "You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
" + "There is no penalty for cancelling earlier."; @@ -1038,14 +1035,14 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, sing=false) { var txt = "You worked for your faction " + faction.name + " for a total of " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "You earned a total of:
" + - "$" + formatNumber(this.workMoneyGained, 2) + "
" + - formatNumber(this.workRepGained, 4) + " reputation for the faction
" + - formatNumber(this.workHackExpGained, 4) + " hacking exp
" + - formatNumber(this.workStrExpGained, 4) + " strength exp
" + - formatNumber(this.workDefExpGained, 4) + " defense exp
" + - formatNumber(this.workDexExpGained, 4) + " dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " agility exp
" + - formatNumber(this.workChaExpGained, 4) + " charisma exp
"; + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + "
" + + numeralWrapper.format(this.workRepGained, '0,0.0000') + " reputation for the faction
" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (!sing) {dialogBoxCreate(txt);} var mainMenu = document.getElementById("mainmenu-container"); @@ -1058,13 +1055,13 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, sing=false) { if (sing) { var res="You worked for your faction " + faction.name + " for a total of " + convertTimeMsToTimeElapsedString(this.timeWorked) + ". " + "You earned " + - formatNumber(this.workRepGained, 4) + " rep, " + - formatNumber(this.workHackExpGained, 4) + " hacking exp, " + - formatNumber(this.workStrExpGained, 4) + " str exp, " + - formatNumber(this.workDefExpGained, 4) + " def exp, " + - formatNumber(this.workDexExpGained, 4) + " dex exp, " + - formatNumber(this.workAgiExpGained, 4) + " agi exp, and " + - formatNumber(this.workChaExpGained, 4) + " cha exp."; + numeralWrapper.format(this.workRepGained, '0,0.0000') + " rep, " + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " str exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " def exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agi exp, and " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " cha exp."; this.resetWorkStatus(); return res; } @@ -1350,14 +1347,14 @@ PlayerObject.prototype.takeClass = function(numCycles) { var txt = document.getElementById("work-in-progress-text"); txt.innerHTML = "You have been " + className + " for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "This has cost you:
" + - "$" + formatNumber(this.workMoneyGained, 2) + " ($" + formatNumber(this.workMoneyLossRate * CYCLES_PER_SEC, 2) + " / sec)

" + + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + " ($" + numeralWrapper.format(this.workMoneyLossRate * CYCLES_PER_SEC, '0,0.00') + " / sec)

" + "You have gained:
" + - formatNumber(this.workHackExpGained, 4) + " (" + formatNumber(this.workHackExpGainRate * CYCLES_PER_SEC, 4) + " / sec) hacking exp
" + - formatNumber(this.workStrExpGained, 4) + " (" + formatNumber(this.workStrExpGainRate * CYCLES_PER_SEC, 4) + " / sec) strength exp
" + - formatNumber(this.workDefExpGained, 4) + " (" + formatNumber(this.workDefExpGainRate * CYCLES_PER_SEC, 4) + " / sec) defense exp
" + - formatNumber(this.workDexExpGained, 4) + " (" + formatNumber(this.workDexExpGainRate * CYCLES_PER_SEC, 4) + " / sec) dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " (" + formatNumber(this.workAgiExpGainRate * CYCLES_PER_SEC, 4) + " / sec) agility exp
" + - formatNumber(this.workChaExpGained, 4) + " (" + formatNumber(this.workChaExpGainRate * CYCLES_PER_SEC, 4) + " / sec) charisma exp
" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workHackExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) hacking exp
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workStrExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDefExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workDexExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workAgiExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) agility exp
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " (" + numeralWrapper.format(this.workChaExpGainRate * CYCLES_PER_SEC, '0,0.0000') + " / sec) charisma exp
" + "You may cancel at any time"; } @@ -1373,14 +1370,14 @@ PlayerObject.prototype.finishClass = function(sing=false) { this.updateSkillLevels(); var txt = "After " + this.className + " for " + convertTimeMsToTimeElapsedString(this.timeWorked) + ",
" + - "you spent a total of $" + formatNumber(this.workMoneyGained * -1, 2) + ".

" + + "you spent a total of $" + numeralWrapper.format(this.workMoneyGained * -1, '0,0.00') + ".

" + "You earned a total of:
" + - formatNumber(this.workHackExpGained, 4) + " hacking exp
" + - formatNumber(this.workStrExpGained, 4) + " strength exp
" + - formatNumber(this.workDefExpGained, 4) + " defense exp
" + - formatNumber(this.workDexExpGained, 4) + " dexterity exp
" + - formatNumber(this.workAgiExpGained, 4) + " agility exp
" + - formatNumber(this.workChaExpGained, 4) + " charisma exp
"; + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp
"; if (!sing) {dialogBoxCreate(txt);} var mainMenu = document.getElementById("mainmenu-container"); @@ -1391,14 +1388,14 @@ PlayerObject.prototype.finishClass = function(sing=false) { Engine.loadLocationContent(); if (sing) { var res="After " + this.className + " for " + convertTimeMsToTimeElapsedString(this.timeWorked) + ", " + - "you spent a total of $" + formatNumber(this.workMoneyGained * -1, 2) + ". " + + "you spent a total of $" + numeralWrapper.format(this.workMoneyGained * -1, '0,0.00') + ". " + "You earned a total of: " + - formatNumber(this.workHackExpGained, 3) + " hacking exp, " + - formatNumber(this.workStrExpGained, 3) + " strength exp, " + - formatNumber(this.workDefExpGained, 3) + " defense exp, " + - formatNumber(this.workDexExpGained, 3) + " dexterity exp, " + - formatNumber(this.workAgiExpGained, 3) + " agility exp, and " + - formatNumber(this.workChaExpGained, 3) + " charisma exp"; + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility exp, and " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma exp"; this.resetWorkStatus(); return res; } @@ -1489,23 +1486,23 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained " + numeralWrapper.format(this.workMoneyGained, "$0.000a") + ", " + - formatNumber(this.workHackExpGained, 3) + " hack exp, " + - formatNumber(this.workStrExpGained, 3) + " str exp, " + - formatNumber(this.workDefExpGained, 3) + " def exp, " + - formatNumber(this.workDexExpGained, 3) + " dex exp, " + - formatNumber(this.workAgiExpGained, 3) + " agi exp, " + - formatNumber(this.workChaExpGained, 3) + " cha exp."); + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hack exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " str exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " def exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agi exp, " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " cha exp."); } } else { dialogBoxCreate("Crime successful!

" + "You gained:
"+ - numeralWrapper.format(this.workMoneyGained, "$0.000a") + "
" + - formatNumber(this.workHackExpGained, 4) + " hacking experience
" + - formatNumber(this.workStrExpGained, 4) + " strength experience
" + - formatNumber(this.workDefExpGained, 4) + " defense experience
" + - formatNumber(this.workDexExpGained, 4) + " dexterity experience
" + - formatNumber(this.workAgiExpGained, 4) + " agility experience
" + - formatNumber(this.workChaExpGained, 4) + " charisma experience"); + "$" + numeralWrapper.format(this.workMoneyGained, '0,0.00') + "
" + + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking experience
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength experience
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense experience
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity experience
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility experience
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma experience"); } } else { @@ -1519,22 +1516,22 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if (this.committingCrimeThruSingFn) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained " + - formatNumber(this.workHackExpGained, 3) + " hack exp, " + - formatNumber(this.workStrExpGained, 3) + " str exp, " + - formatNumber(this.workDefExpGained, 3) + " def exp, " + - formatNumber(this.workDexExpGained, 3) + " dex exp, " + - formatNumber(this.workAgiExpGained, 3) + " agi exp, " + - formatNumber(this.workChaExpGained, 3) + " cha exp."); + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hack exp, " + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " str exp, " + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " def exp, " + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dex exp, " + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agi exp, " + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " cha exp."); } } else { dialogBoxCreate("Crime failed!

" + "You gained:
"+ - formatNumber(this.workHackExpGained, 4) + " hacking experience
" + - formatNumber(this.workStrExpGained, 4) + " strength experience
" + - formatNumber(this.workDefExpGained, 4) + " defense experience
" + - formatNumber(this.workDexExpGained, 4) + " dexterity experience
" + - formatNumber(this.workAgiExpGained, 4) + " agility experience
" + - formatNumber(this.workChaExpGained, 4) + " charisma experience"); + numeralWrapper.format(this.workHackExpGained, '0,0.0000') + " hacking experience
" + + numeralWrapper.format(this.workStrExpGained, '0,0.0000') + " strength experience
" + + numeralWrapper.format(this.workDefExpGained, '0,0.0000') + " defense experience
" + + numeralWrapper.format(this.workDexExpGained, '0,0.0000') + " dexterity experience
" + + numeralWrapper.format(this.workAgiExpGained, '0,0.0000') + " agility experience
" + + numeralWrapper.format(this.workChaExpGained, '0,0.0000') + " charisma experience"); } } @@ -1912,10 +1909,10 @@ PlayerObject.prototype.reapplyAllAugmentations = function(resetMultipliers=true) this.augmentations[i].name = "Hacknet Node NIC Architecture Neural-Upload"; } - var augName = this.augmentations[i].name; + const augName = this.augmentations[i].name; var aug = Augmentations[augName]; if (aug == null) { - console.log("WARNING: Invalid augmentation name"); + console.log(`WARNING: Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`); continue; } aug.owned = true; diff --git a/src/SaveObject.js b/src/SaveObject.js old mode 100644 new mode 100755 index bf4bb9be2..965ab6792 --- a/src/SaveObject.js +++ b/src/SaveObject.js @@ -24,7 +24,7 @@ import {Reviver, Generic_toJSON, import {createElement} from "../utils/uiHelpers/createElement"; import {createPopup} from "../utils/uiHelpers/createPopup"; import {createStatusText} from "./ui/createStatusText"; -import {formatNumber} from "../utils/StringHelperFunctions"; +import {numeralWrapper} from "./ui/numeralFormat"; import {removeElementById} from "../utils/uiHelpers/removeElementById"; import Decimal from "decimal.js"; @@ -517,8 +517,8 @@ function loadImportedGame(saveObj, saveString) { Player.lastUpdate = Engine._lastUpdate; Engine.start(); //Run main game loop and Scripts loop dialogBoxCreate("While you were offline, your scripts generated $" + - formatNumber(offlineProductionFromScripts, 2) + " and your Hacknet Nodes generated $" + - formatNumber(offlineProductionFromHacknetNodes, 2) + ""); + numeralWrapper.format(offlineProductionFromScripts, '0,0.00') + " and your Hacknet Nodes generated $" + + numeralWrapper.format(offlineProductionFromHacknetNodes, '0,0.00') + ""); return true; } diff --git a/src/engine.js b/src/engine.js index a0e2d6568..88ad8a569 100644 --- a/src/engine.js +++ b/src/engine.js @@ -33,6 +33,7 @@ import {displayCreateProgramContent, getNumAvailableCreateProgram, initCreateProgramButtons, Programs} from "./CreateProgram"; +import {createDevMenu, closeDevMenu} from "./DevMenu"; import {displayFactionContent, joinFaction, processPassiveFactionRepGain, Factions, inviteToFaction, initFactions} from "./Faction"; @@ -193,41 +194,6 @@ const Engine = { tutorialFactionsButton: null, tutorialAugmentationsButton: null, tutorialBackButton: null, - - //Dev menu - devMenuGiveMoney: null, - devMenuGiveRam: null, - devMenuAugDropdown: null, - devMenuAddAug: null, - devMenuTriggerBitFlume: null, - devMenuFactionDropdown: null, - devMenuAddFaction: null, - devMenuOpen: null, - devMenuMinSecurity: null, - devMenuMaxMoney: null, - devMenuConnectDropdown: null, - devMenuConnect: null, - devMenuProgramsDropdown: null, - devMenuAddProgram: null, - devMenuHackingExp: null, - devMenuAddHacking: null, - devMenuStrengthExp: null, - devMenuAddStrength: null, - devMenuDefenseExp: null, - devMenuAddDefense: null, - devMenuDexterityExp: null, - devMenuAddDexterity: null, - devMenuAgilityExp: null, - devMenuAddAgility: null, - devMenuCharismaExp: null, - devMenuAddCharisma: null, - devMenuIntelligenceExp: null, - devMenuAddIntelligence: null, - devMenuEnableIntelligence: null, - devMenuDisableIntelligence: null, - devMenuSFN: null, - devMenuSFLvl: null, - devMenuAddSF: null, }, //Display objects @@ -253,7 +219,6 @@ const Engine = { factionAugmentationsContent: null, augmentationsContent: null, tutorialContent: null, - devMenuContent: null, infiltrationContent: null, stockMarketContent: null, locationContent: null, @@ -364,8 +329,7 @@ const Engine = { loadDevMenuContent: function() { Engine.hideAllContent(); - Engine.Display.devMenuContent.style.display = "block"; - Engine.displayDevMenuContent(); + createDevMenu(); routing.navigateTo(Page.DevMenu); document.getElementById("dev-menu-link").classList.add("active"); }, @@ -506,7 +470,6 @@ const Engine = { Engine.Display.factionAugmentationsContent.style.display = "none"; Engine.Display.augmentationsContent.style.display = "none"; Engine.Display.tutorialContent.style.display = "none"; - Engine.Display.devMenuContent.style.display = "none"; Engine.Display.locationContent.style.display = "none"; Engine.Display.workInProgressContent.style.display = "none"; Engine.Display.redPillContent.style.display = "none"; @@ -553,6 +516,9 @@ const Engine = { document.getElementById("bladeburner-menu-link").classList.remove("active"); document.getElementById("corporation-menu-link").classList.remove("active"); document.getElementById("gang-menu-link").classList.remove("active"); + + // Close dev menu + closeDevMenu(); }, displayCharacterOverviewInfo: function() { @@ -845,43 +811,6 @@ const Engine = { document.getElementById("tutorial-text").style.display = "none"; }, - displayDevMenuContent: function() { - Engine.Clickables.devMenuGiveMoney.style.display = "block"; - Engine.Clickables.devMenuGiveRam.style.display = "block"; - Engine.Clickables.devMenuAugDropdown.style.display = "block"; - Engine.Clickables.devMenuAddAug.style.display = "block"; - Engine.Clickables.devMenuTriggerBitFlume.style.display = "block"; - Engine.Clickables.devMenuFactionDropdown.style.display = "block"; - Engine.Clickables.devMenuAddFaction.style.display = "block"; - Engine.Clickables.devMenuOpen.style.display = "block"; - Engine.Clickables.devMenuMinSecurity.style.display = "block"; - Engine.Clickables.devMenuMaxMoney.style.display = "block"; - Engine.Clickables.devMenuConnectDropdown.style.display = "block"; - Engine.Clickables.devMenuConnect.style.display = "block"; - Engine.Clickables.devMenuProgramsDropdown.style.display = "block"; - Engine.Clickables.devMenuAddProgram.style.display = "block"; - - Engine.Clickables.devMenuHackingExp.style.display = "block"; - Engine.Clickables.devMenuAddHacking.style.display = "block"; - Engine.Clickables.devMenuStrengthExp.style.display = "block"; - Engine.Clickables.devMenuAddStrength.style.display = "block"; - Engine.Clickables.devMenuDefenseExp.style.display = "block"; - Engine.Clickables.devMenuAddDefense.style.display = "block"; - Engine.Clickables.devMenuDexterityExp.style.display = "block"; - Engine.Clickables.devMenuAddDexterity.style.display = "block"; - Engine.Clickables.devMenuAgilityExp.style.display = "block"; - Engine.Clickables.devMenuAddAgility.style.display = "block"; - Engine.Clickables.devMenuCharismaExp.style.display = "block"; - Engine.Clickables.devMenuAddCharisma.style.display = "block"; - Engine.Clickables.devMenuIntelligenceExp.style.display = "block"; - Engine.Clickables.devMenuAddIntelligence.style.display = "block"; - Engine.Clickables.devMenuEnableIntelligence.style.display = "block"; - Engine.Clickables.devMenuDisableIntelligence.style.display = "block"; - Engine.Clickables.devMenuSFN.style.display = "block"; - Engine.Clickables.devMenuSFLvl.style.display = "block"; - Engine.Clickables.devMenuAddSF.style.display = "block"; - }, - //Displays the text when a section of the Tutorial is opened displayTutorialPage: function(text) { document.getElementById("tutorial-getting-started-link").style.display = "none"; @@ -1526,9 +1455,6 @@ const Engine = { Engine.Display.tutorialContent = document.getElementById("tutorial-container"); Engine.Display.tutorialContent.style.display = "none"; - Engine.Display.devMenuContent = document.getElementById("dev-menu-container"); - Engine.Display.devMenuContent.style.display = "none"; - Engine.Display.infiltrationContent = document.getElementById("infiltration-container"); Engine.Display.infiltrationContent.style.display = "none"; @@ -1615,190 +1541,6 @@ const Engine = { Engine.Clickables.tutorialBackButton.addEventListener("click", function() { Engine.displayTutorialContent(); }); - - // dev menu buttons - Engine.Clickables.devMenuGiveMoney = document.getElementById("dev-need-money"); - Engine.Clickables.devMenuGiveMoney.addEventListener("click", function() { - Player.gainMoney(1e15); - }); - - Engine.Clickables.devMenuGiveRam = document.getElementById("dev-need-ram"); - Engine.Clickables.devMenuGiveRam.addEventListener("click", function() { - Player.getHomeComputer().maxRam *= 2; - }); - - Engine.Clickables.devMenuAugDropdown = document.getElementById("dev-menu-aug-dropdown"); - const augDD = Engine.Clickables.devMenuAugDropdown; - for(const i in AugmentationNames) { - augDD.options[augDD.options.length] = new Option(AugmentationNames[i], AugmentationNames[i]); - } - - Engine.Clickables.devMenuAddAug = document.getElementById("dev-add-aug"); - Engine.Clickables.devMenuAddAug.addEventListener("click", function() { - Player.queueAugmentation(augDD.options[augDD.selectedIndex].value); - }); - - Engine.Clickables.devMenuTriggerBitFlume = document.getElementById("dev-bit-flume"); - Engine.Clickables.devMenuTriggerBitFlume.addEventListener("click", function() { - hackWorldDaemon(Player.bitNodeN, true); - }); - - Engine.Clickables.devMenuFactionDropdown = document.getElementById("dev-menu-faction-dropdown"); - const facDD = Engine.Clickables.devMenuFactionDropdown; - for(const i in Factions) { - facDD.options[facDD.options.length] = new Option(Factions[i].name, Factions[i].name); - } - - Engine.Clickables.devMenuAddFaction = document.getElementById("dev-add-faction"); - Engine.Clickables.devMenuAddFaction.addEventListener("click", function() { - const factionName = facDD.options[facDD.selectedIndex].value; - Player.receiveInvite(factionName); - }); - - Engine.Clickables.devMenuOpen = document.getElementById("dev-open-all"); - Engine.Clickables.devMenuOpen.addEventListener("click", function() { - for(const i in AllServers) { - AllServers[i].hasAdminRights = true; - AllServers[i].sshPortOpen = true; - AllServers[i].ftpPortOpen = true; - AllServers[i].smtpPortOpen = true; - AllServers[i].httpPortOpen = true; - AllServers[i].sqlPortOpen = true; - AllServers[i].openPortCount = 5; - } - }); - - Engine.Clickables.devMenuMinSecurity = document.getElementById("dev-min-security"); - Engine.Clickables.devMenuMinSecurity.addEventListener("click", function() { - for(const i in AllServers) { - AllServers[i].hackDifficulty = AllServers[i].minDifficulty; - } - }); - - Engine.Clickables.devMenuMaxMoney = document.getElementById("dev-max-money"); - Engine.Clickables.devMenuMaxMoney.addEventListener("click", function() { - for(const i in AllServers) { - AllServers[i].moneyAvailable = AllServers[i].moneyMax; - } - }); - - Engine.Clickables.devMenuConnectDropdown = document.getElementById("dev-menu-connect-dropdown"); - const connectDD = Engine.Clickables.devMenuConnectDropdown; - for(const i in AllServers) { - connectDD.options[connectDD.options.length] = new Option(AllServers[i].hostname, AllServers[i].hostname); - } - - Engine.Clickables.devMenuConnect = document.getElementById("dev-connect"); - Engine.Clickables.devMenuConnect.addEventListener("click", function() { - const host = connectDD.options[connectDD.selectedIndex].value; - Terminal.connectToServer(host); - }); - - Engine.Clickables.devMenuProgramsDropdown = document.getElementById("dev-menu-add-program-dropdown"); - const programsDD = Engine.Clickables.devMenuProgramsDropdown; - for(const i in Programs) { - programsDD.options[programsDD.options.length] = new Option(Programs[i].name, Programs[i].name); - } - - Engine.Clickables.devMenuAddProgram = document.getElementById("dev-add-program"); - Engine.Clickables.devMenuAddProgram.addEventListener("click", function() { - const program = programsDD.options[programsDD.selectedIndex].value; - if(!Player.hasProgram(program)) { - Player.getHomeComputer().programs.push(program); - } - }); - - Engine.Clickables.devMenuHackingExp = document.getElementById("dev-hacking-exp"); - Engine.Clickables.devMenuAddHacking = document.getElementById("dev-add-hacking"); - Engine.Clickables.devMenuAddHacking.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuHackingExp.value); - Player.gainHackingExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuStrengthExp = document.getElementById("dev-strength-exp"); - Engine.Clickables.devMenuAddStrength = document.getElementById("dev-add-strength"); - Engine.Clickables.devMenuAddStrength.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuStrengthExp.value); - Player.gainStrengthExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuDefenseExp = document.getElementById("dev-defense-exp"); - Engine.Clickables.devMenuAddDefense = document.getElementById("dev-add-defense"); - Engine.Clickables.devMenuAddDefense.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuDefenseExp.value); - Player.gainDefenseExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuDexterityExp = document.getElementById("dev-dexterity-exp"); - Engine.Clickables.devMenuAddDexterity = document.getElementById("dev-add-dexterity"); - Engine.Clickables.devMenuAddDexterity.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuDexterityExp.value); - Player.gainDexterityExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuAgilityExp = document.getElementById("dev-agility-exp"); - Engine.Clickables.devMenuAddAgility = document.getElementById("dev-add-agility"); - Engine.Clickables.devMenuAddAgility.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuAgilityExp.value); - Player.gainAgilityExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuCharismaExp = document.getElementById("dev-charisma-exp"); - Engine.Clickables.devMenuAddCharisma = document.getElementById("dev-add-charisma"); - Engine.Clickables.devMenuAddCharisma.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuCharismaExp.value); - Player.gainCharismaExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuIntelligenceExp = document.getElementById("dev-intelligence-exp"); - Engine.Clickables.devMenuAddIntelligence = document.getElementById("dev-add-intelligence"); - Engine.Clickables.devMenuAddIntelligence.addEventListener("click", function() { - const exp = parseInt(Engine.Clickables.devMenuIntelligenceExp.value); - Player.gainIntelligenceExp(exp); - Player.updateSkillLevels(); - }); - - Engine.Clickables.devMenuEnableIntelligence = document.getElementById("dev-enable-intelligence"); - Engine.Clickables.devMenuEnableIntelligence.addEventListener("click", function() { - Player.intelligence = 1; - }); - - Engine.Clickables.devMenuDisableIntelligence = document.getElementById("dev-disable-intelligence"); - Engine.Clickables.devMenuDisableIntelligence.addEventListener("click", function() { - Player.intelligence = 0; - }); - - Engine.Clickables.devMenuSFN = document.getElementById("dev-sf-n"); - Engine.Clickables.devMenuSFLvl = document.getElementById("dev-sf-lvl"); - Engine.Clickables.devMenuAddSF = document.getElementById("dev-add-source-file"); - Engine.Clickables.devMenuAddSF.addEventListener("click", function() { - const sfN = parseInt(Engine.Clickables.devMenuSFN.value); - const sfLvl = parseInt(Engine.Clickables.devMenuSFLvl.value); - let sfIndex = -1; - for(const i in Player.sourceFiles) { - if(Player.sourceFiles[i].n === sfN) { - sfIndex = i; - break; - } - } - - if(sfIndex === -1) { // add fresh source file - Player.sourceFiles.push(new PlayerOwnedSourceFile(sfN, sfLvl)); - } else if(sfLvl === 0) { // remove a source file. - if(sfIndex === -1) { // doesn't have it anyway. - return; - } - Player.sourceFiles.splice(sfIndex, 1); - } else { // set source file level - Player.sourceFiles[sfIndex].lvl=sfLvl; - } - }); }, /* Initialization */ @@ -1900,7 +1642,7 @@ const Engine = { this.classList.toggle("opened"); const elems = [tutorial, options]; const links = [tutorialLink, optionsLink]; - if(process.env.NODE_ENV === "development") { + if (process.env.NODE_ENV === "development") { elems.push(document.getElementById("dev-tab")); links.push(document.getElementById("dev-menu-link")); } diff --git a/src/index.html b/src/index.html index 1d7636669..ffc3db652 100644 --- a/src/index.html +++ b/src/index.html @@ -490,58 +490,6 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>

- -
-

If you see this menu you can pretty much break the game. It's recommended that you use this menu only to setup a save file appropriate to test a new feature or bug fix.

- -

Generic

- Add $1000t - Double home RAM - -

Augmentation related:

- - - Queue AugmentationMay require save + reload - - Add/Remove source file If Lvl == 0 the sf will be removed, calling it with another level will replace your current source file. You CAN set a source file higher than it's maximum level. - -

Faction related:

- - Receive inviteMay require save + reload - -

Program related:

- - ConnectConnect to the target server. - - - Add ProgramAdd this program to the player home server, won't add the same program twice. - - Trigger BitFlumeQuick escape to change BN, does not give SFs - -

Server related:

- NUKE + ports all serversOpens all ports, nukes all servers, gains root access to everything (still need the appropriate hacking level) - minimize all servers securityAll servers security will be set to their minimum security - maximize all servers moneySet all servers available money to maximum for that server - -

Exp/stats related:

- - add hacking expAdd that many hacking experience point, use negative numbers to remove, don't worry about going under 0 exp - - add strength expAdd that many strength experience point, use negative numbers to remove, don't worry about going under 0 exp - - add defense expAdd that many defense experience point, use negative numbers to remove, don't worry about going under 0 exp - - add dexterity expAdd that many dexterity experience point, use negative numbers to remove, don't worry about going under 0 exp - - add agility expAdd that many agility experience point, use negative numbers to remove, don't worry about going under 0 exp - - add charisma expAdd that many charisma experience point, use negative numbers to remove, don't worry about going under 0 exp - - add intelligence expAdd that many intelligence experience point, use negative numbers to remove, don't worry about going under 0 exp - enable intelligenceEnables the intelligence stat - disable intelligenceDisables the intelligence stat -
-