From ee3530d9b97669d127738dd9a63d70e1ebbe101a Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 19 Aug 2021 11:04:01 -0400 Subject: [PATCH] hotfix some blade netscript functions not working --- dist/engine.bundle.js | 2 +- src/NetscriptFunctions.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 6bc892d23..d6c535c26 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m${e}`;r.getElementById("terminal-input").insertAdjacentHTML("beforebegin",a),function(){const e=r.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})},t.postElement=function(e){i(a.renderToStaticMarkup(e))},t.postContent=i},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamCost=t.RamCosts=t.RamCostConstants=void 0,t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServer:()=>t.RamCostConstants.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxRam:()=>t.RamCostConstants.ScriptGetServerMaxRam,getServerUsedRam:()=>t.RamCostConstants.ScriptGetServerUsedRam,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,getRunningScript:()=>t.RamCostConstants.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getCurrentServer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,connect:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,manualHack:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,installBackdoor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getPlayer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,hospitalize:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{createGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,inGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t
In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:

Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.

To capture a Node, you must lower its HP down to 0.

There are six different types of Nodes:

CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

Firewall - Nodes with high defense. These Nodes can 'Fortify'

Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions

Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions

Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action

Shield - Nodes with high defense. These Nodes can 'Fortify'

To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.

For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.

Other Notes:

-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.

-Whenever a Node is conquered, its stats are significantly reduced

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:'\n v0.52.4 - 2021-07-19 Bladeburner in React (hydroflame)\n -------------------------------------------\n\n ** Bladeburner **\n\n * The entire UI was rebuild in React. It should be more responsive\n\n ** Hacknet ** \n\n * Displays how many time each hash upgrade was bought.\n * Displays cummulative effect of the upgrade.\n * Removed "Close" button from hash upgrade menu.\n\n ** Misc. **\n\n * More popup/modals have dark background, can be dismissed by clicking\n outside, or by pressing escape.\n * Small reword in the guide.\n * Fix several typos in the bladeburner documentation.\n * Linting (no one cares except the dev)\n * nerf noodle bar\n'}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.dialogBoxCreate=t.MessagePopup=void 0;const r=n(103),i=n(36),o=a(n(0));function s(e){return o.default.createElement(o.default.Fragment,null,e.content)}t.MessagePopup=s,t.dialogBoxCreate=function(e,t=!1){const n="popup-"+Array.from(Array(16)).map(()=>`${i.getRandomInt(0,9)}`).join("");"string"==typeof e?t?r.createPopup(n,s,{content:o.default.createElement("pre",{dangerouslySetInnerHTML:{__html:e}})}):r.createPopup(n,s,{content:o.default.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"
")}})}):r.createPopup(n,s,{content:e})}},function(e,t,n){"use strict";function a(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.height&&(e.style.height=t.height),void 0!==t.top&&(e.style.top=t.top),void 0!==t.left&&(e.style.left=t.left),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(a("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=void 0,t.createElement=a},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations=void 0,t.Augmentations={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;const a=n(64),r={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1};t.Settings={AutosaveInterval:r.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:r.DisableASCIIArt,DisableHotkeys:r.DisableHotkeys,DisableTextEffects:r.DisableTextEffects,Editor:a.EditorSetting.CodeMirror,EditorKeybinding:a.CodeMirrorKeybindingSetting.Default,EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:r.MaxLogCapacity,MaxPortCapacity:r.MaxPortCapacity,OwnedAugmentationsOrder:a.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:a.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:r.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:r.SuppressFactionInvites,SuppressHospitalizationPopup:r.SuppressHospitalizationPopup,SuppressMessages:r.SuppressMessages,SuppressTravelConfirmation:r.SuppressTravelConfirmation,SuppressBladeburnerPopup:r.SuppressBladeburnerPopup,EditorHighlightActiveLine:!0,EditorShowInvisibles:!1,EditorUseSoftTab:!0,EditorAutoCloseBrackets:!0,EditorEnableLinting:!0,EditorContinueComments:!0,init(){Object.assign(t.Settings,r)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return he}),n.d(t,"indexedDb",function(){return indexedDb});var a=n(21),r=n(135),i=n(14),o=n(86),s=n(4),l=n(133),c=n(101),u=n(744),m=n(447),p=n(177),d=n(34),h=n(41),_=n(10),g=n(525),f=n(18),y=n(79),b=n(743),E=n(742),v=n(741),k=n(740),C=n(117),P=n(46),S=n(28),O=n(49),M=n(47),T=n(455),x=n(95),w=n(89),A=n(119),R=n(88),N=n(1),D=n(173),B=n(306),I=n(111),L=n(120),W=n(87),j=n(24),F=n(15),U=n(43),H=n(45),G=n(53),K=n(692),q=n(81),$=n(179),z=n(452),Y=n(520),V=n(149),J=n(691),X=n(19),Q=n(690),Z=n(31),ee=n(132),te=n(67),ne=n(519),ae=n(689),re=n(33),ie=n(11),oe=n(305),se=n(92),le=n(518),ce=n(44),ue=(n(858),n(857),n(0)),me=n.n(ue),pe=n(23),de=n.n(pe);e(document).keydown(function(e){if(!0!==F.Settings.DisableHotkeys){try{if(Object(W.c)().isFocused())return}catch(e){}if(!(N.Player.isWorking||I.redPillFlag||w.c||m.a))if(e.keyCode==ce.KEY.T&&e.altKey)e.preventDefault(),he.loadTerminalContent();else if(e.keyCode===ce.KEY.C&&e.altKey)e.preventDefault(),he.loadCharacterContent();else if(e.keyCode===ce.KEY.E&&e.altKey)e.preventDefault(),he.loadScriptEditorContent();else if(e.keyCode===ce.KEY.S&&e.altKey)e.preventDefault(),he.loadActiveScriptsContent();else if(e.keyCode===ce.KEY.H&&e.altKey)e.preventDefault(),he.loadHacknetNodesContent();else if(e.keyCode===ce.KEY.W&&e.altKey)e.preventDefault(),he.loadLocationContent();else if(e.keyCode===ce.KEY.J&&e.altKey)e.preventDefault(),he.loadJobContent();else if(e.keyCode===ce.KEY.R&&e.altKey)e.preventDefault(),he.loadTravelContent();else if(e.keyCode===ce.KEY.P&&e.altKey)e.preventDefault(),he.loadCreateProgramContent();else if(e.keyCode===ce.KEY.F&&e.altKey){if(X.routing.isOn(X.Page.Terminal)&&P.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),he.loadFactionsContent()}else e.keyCode===ce.KEY.A&&e.altKey?(e.preventDefault(),he.loadAugmentationsContent()):e.keyCode===ce.KEY.U&&e.altKey?(e.preventDefault(),he.loadTutorialContent()):e.keyCode===ce.KEY.B&&e.altKey?(e.preventDefault(),he.loadBladeburnerContent()):e.keyCode===ce.KEY.G&&e.altKey&&(e.preventDefault(),he.loadGangContent());e.keyCode===ce.KEY.O&&e.altKey&&(e.preventDefault(),Object(oe.b)())}});const he={Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,createProgramContent:null,factionsContent:null,factionContent:null,augmentationsContent:null,milestonesContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,gangContent:null,bladeburnerContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){he.hideAllContent(),he.Display.terminalContent.style.display="block",X.routing.navigateTo(X.Page.Terminal),re.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){he.hideAllContent(),he.Display.characterContent.style.display="block",he.updateCharacterInfo(),X.routing.navigateTo(X.Page.CharacterInfo),re.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){he.hideAllContent(),he.Display.scriptEditorContent.style.display="block";try{Object(W.c)().openScript(e,t)}catch(e){Object(se.exceptionAlert)(e)}Object(W.f)(),X.routing.navigateTo(X.Page.ScriptEditor),re.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){he.hideAllContent(),he.Display.activeScriptsContent.style.display="block",X.routing.navigateTo(X.Page.ActiveScripts),de.a.render(me.a.createElement(ne.ActiveScriptsRoot,{p:N.Player,workerScripts:A.workerScripts}),he.Display.activeScriptsContent),re.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){he.hideAllContent(),he.Display.hacknetNodesContent.style.display="block",X.routing.navigateTo(X.Page.HacknetNodes),Object(S.q)(),re.MainMenuLinks.HacknetNodes.classList.add("active")},loadCreateProgramContent:function(){he.hideAllContent(),he.Display.createProgramContent.style.display="block",Object(B.a)(),X.routing.navigateTo(X.Page.CreateProgram),re.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){he.hideAllContent(),he.Display.factionsContent.style.display="block",X.routing.navigateTo(X.Page.Factions),de.a.render(me.a.createElement(b.FactionList,{player:N.Player,engine:this}),he.Display.factionsContent),re.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){he.hideAllContent(),he.Display.factionContent.style.display="block",X.routing.navigateTo(X.Page.Faction)},loadAugmentationsContent:function(){he.hideAllContent(),he.Display.augmentationsContent.style.display="block",X.routing.navigateTo(X.Page.Augmentations),Object(o.c)(he.Display.augmentationsContent),re.MainMenuLinks.Augmentations.classList.add("active")},loadMilestonesContent:function(){he.hideAllContent(),he.Display.milestonesContent.style.display="block",X.routing.navigateTo(X.Page.Milestones),Object(K.displayMilestonesContent)(),re.MainMenuLinks.Milestones.classList.add("active")},loadTutorialContent:function(){he.hideAllContent(),he.Display.tutorialContent.style.display="block",X.routing.navigateTo(X.Page.Tutorial),re.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){he.hideAllContent(),Object(g.b)(),X.routing.navigateTo(X.Page.DevMenu),re.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(e=!0){he.hideAllContent(),he.Display.locationContent.style.display="block",re.MainMenuLinks.City.classList.add("active"),X.routing.navigateTo(X.Page.Location);const t=me.a.createElement(T.LocationRoot,{initiallyInCity:e,engine:he,p:N.Player});de.a.render(t,he.Display.locationContent)},loadTravelContent:function(){he.hideAllContent(),N.Player.gotoLocation(M.LocationName.TravelAgency),he.Display.locationContent.style.display="block",re.MainMenuLinks.Travel.classList.add("active"),X.routing.navigateTo(X.Page.Location);const e=me.a.createElement(T.LocationRoot,{initiallyInCity:!1,engine:he,p:N.Player});de.a.render(e,he.Display.locationContent)},loadJobContent:function(){if(""==N.Player.companyName)return void Object(ie.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.");he.hideAllContent(),N.Player.gotoLocation(N.Player.companyName),he.Display.locationContent.style.display="block",re.MainMenuLinks.Job.classList.add("active"),X.routing.navigateTo(X.Page.Location);const e=me.a.createElement(T.LocationRoot,{initiallyInCity:!1,engine:he,p:N.Player});de.a.render(e,he.Display.locationContent)},loadWorkInProgressContent:function(){he.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",he.Display.workInProgressContent.style.display="block",X.routing.navigateTo(X.Page.WorkInProgress)},loadRedPillContent:function(){he.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",he.Display.redPillContent.style.display="block",X.routing.navigateTo(X.Page.RedPill)},loadCinematicTextContent:function(){he.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",he.Display.cinematicTextContent.style.display="block",X.routing.navigateTo(X.Page.CinematicText)},loadInfiltrationContent:function(e,t,n){he.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",he.Display.infiltrationContent.style.display="block",X.routing.navigateTo(X.Page.Infiltration),Object(k.displayInfiltrationContent)(this,N.Player,e,t,n)},loadStockMarketContent:function(){he.hideAllContent(),he.Display.stockMarketContent.style.display="block",X.routing.navigateTo(X.Page.StockMarket),Object(G.displayStockMarketContent)()},loadGangContent:function(){he.hideAllContent(),N.Player.inGang()?(he.Display.gangContent.style.display="block",X.routing.navigateTo(X.Page.Gang),Object(E.displayGangContent)(this,N.Player.gang,N.Player)):(he.loadTerminalContent(),X.routing.navigateTo(X.Page.Terminal))},loadMissionContent:function(){he.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",he.Display.missionContent.style.display="block",X.routing.navigateTo(X.Page.Mission)},loadCorporationContent:function(){N.Player.corporation instanceof h.c&&(he.hideAllContent(),X.routing.navigateTo(X.Page.Corporation),N.Player.corporation.createUI())},loadBladeburnerContent:function(){N.Player.bladeburner instanceof c.Bladeburner&&(he.hideAllContent(),X.routing.navigateTo(X.Page.Bladeburner),he.Display.bladeburnerContent.style.display="block",de.a.render(me.a.createElement(v.Root,{bladeburner:N.Player.bladeburner,player:N.Player,engine:this}),he.Display.bladeburnerContent),re.MainMenuLinks.Bladeburner.classList.add("active"))},loadSleevesContent:function(){try{he.hideAllContent(),X.routing.navigateTo(X.Page.Sleeves),Object(z.createSleevesPage)(N.Player)}catch(e){Object(se.exceptionAlert)(e)}},loadResleevingContent:function(){try{he.hideAllContent(),X.routing.navigateTo(X.Page.Resleeves),Object(Y.createResleevesPage)(N.Player)}catch(e){Object(se.exceptionAlert)(e)}},hideAllContent:function(){he.Display.terminalContent.style.display="none",he.Display.characterContent.style.display="none",he.Display.scriptEditorContent.style.display="none",he.Display.activeScriptsContent.style.display="none",de.a.unmountComponentAtNode(he.Display.activeScriptsContent),he.Display.infiltrationContent.style.display="none",de.a.unmountComponentAtNode(he.Display.infiltrationContent),Object(S.a)(),he.Display.createProgramContent.style.display="none",he.Display.factionsContent.style.display="none",de.a.unmountComponentAtNode(he.Display.factionsContent),he.Display.factionContent.style.display="none",de.a.unmountComponentAtNode(he.Display.factionContent),he.Display.augmentationsContent.style.display="none",de.a.unmountComponentAtNode(he.Display.augmentationsContent),he.Display.milestonesContent.style.display="none",he.Display.tutorialContent.style.display="none",he.Display.locationContent.style.display="none",de.a.unmountComponentAtNode(he.Display.locationContent),he.Display.gangContent.style.display="none",de.a.unmountComponentAtNode(he.Display.gangContent),he.Display.bladeburnerContent.style.display="none",de.a.unmountComponentAtNode(he.Display.bladeburnerContent),he.Display.workInProgressContent.style.display="none",he.Display.redPillContent.style.display="none",he.Display.cinematicTextContent.style.display="none",he.Display.stockMarketContent.style.display="none",he.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),N.Player.corporation instanceof h.c&&N.Player.corporation.clearUI(),Object(Y.clearResleevesPage)(),Object(z.clearSleevesPage)(),he.inactivateMainMenuLinks(),Object(g.a)()},inactivateMainMenuLinks:function(){re.MainMenuLinks.Terminal.classList.remove("active"),re.MainMenuLinks.ScriptEditor.classList.remove("active"),re.MainMenuLinks.ActiveScripts.classList.remove("active"),re.MainMenuLinks.CreateProgram.classList.remove("active"),re.MainMenuLinks.Stats.classList.remove("active"),re.MainMenuLinks.Factions.classList.remove("active"),re.MainMenuLinks.Augmentations.classList.remove("active"),re.MainMenuLinks.HacknetNodes.classList.remove("active"),re.MainMenuLinks.Sleeves.classList.remove("active"),re.MainMenuLinks.City.classList.remove("active"),re.MainMenuLinks.Travel.classList.remove("active"),re.MainMenuLinks.Job.classList.remove("active"),re.MainMenuLinks.StockMarket.classList.remove("active"),re.MainMenuLinks.Gang.classList.remove("active"),re.MainMenuLinks.Bladeburner.classList.remove("active"),re.MainMenuLinks.Corporation.classList.remove("active"),re.MainMenuLinks.Gang.classList.remove("active"),re.MainMenuLinks.Milestones.classList.remove("active"),re.MainMenuLinks.Tutorial.classList.remove("active"),re.MainMenuLinks.Options.classList.remove("active"),re.MainMenuLinks.DevMenu.classList.remove("active")},displayCharacterOverviewInfo:function(){de.a.render(me.a.createElement(u.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");F.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){de.a.render(Object(J.CharacterInfo)(N.Player),he.Display.characterInfo)},idleTimer:function(){const e=(new Date).getTime();let t=e-he._lastUpdate;const n=t%he._idleSpeed;(t=Math.floor(t/he._idleSpeed))>0&&(he._lastUpdate=e-n,N.Player.lastUpdate=e-n,he.updateGame(t)),window.requestAnimationFrame(he.idleTimer)},updateGame:function(e=1){const t=e*he._idleSpeed;null==N.Player.totalPlaytime&&(N.Player.totalPlaytime=0),null==N.Player.playtimeSinceLastAug&&(N.Player.playtimeSinceLastAug=0),null==N.Player.playtimeSinceLastBitnode&&(N.Player.playtimeSinceLastBitnode=0),N.Player.totalPlaytime+=t,N.Player.playtimeSinceLastAug+=t,N.Player.playtimeSinceLastBitnode+=t,!0===q.a.actionStarted&&(he._totalActionTime=q.a.actionTime,he._actionTimeLeft=q.a.actionTime,he._actionInProgress=!0,he._actionProgressBarCount=1,he._actionProgressStr="[ ]",he._actionTimeStr="Time left: ",q.a.actionStarted=!1),N.Player.isWorking&&(N.Player.workType==_.CONSTANTS.WorkTypeFaction?N.Player.workForFaction(e):N.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?N.Player.createProgramWork(e):N.Player.workType==_.CONSTANTS.WorkTypeStudyClass?N.Player.takeClass(e):N.Player.workType==_.CONSTANTS.WorkTypeCrime?N.Player.commitCrime(e):N.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?N.Player.workPartTime(e):N.Player.work(e)),N.Player.hasWseAccount&&Object(G.processStockPrices)(e),N.Player.inGang()&&N.Player.gang.process(e,N.Player),w.c&&w.b&&w.b.process(e),N.Player.corporation instanceof h.c&&N.Player.corporation.storeCycles(e),N.Player.bladeburner instanceof c.Bladeburner&&N.Player.bladeburner.storeCycles(e);for(let t=0;t0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),he.Counters.createProgramNotifications=10}if(he.Counters.augmentationsNotifications<=0){e=N.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),he.Counters.augmentationsNotifications=10}if(he.Counters.checkFactionInvitations<=0){var n=N.Player.checkForFactionInvitations();if(n.length>0){!1===N.Player.firstFacInvRecvd&&(N.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(y.inviteToFaction)(a)}const e=N.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),he.Counters.checkFactionInvitations=100}if(he.Counters.passiveFactionGrowth<=0){var o=Math.floor(5-he.Counters.passiveFactionGrowth);Object(y.processPassiveFactionRepGain)(o),he.Counters.passiveFactionGrowth=5}if(he.Counters.messages<=0&&(Object(x.b)(),i.Augmentations[s.AugmentationNames.TheRedPill].owned?he.Counters.messages=4500:he.Counters.messages=150),he.Counters.mechanicProcess<=0){if(N.Player.corporation instanceof h.c&&N.Player.corporation.process(),N.Player.bladeburner instanceof c.Bladeburner)try{N.Player.bladeburner.process(N.Player)}catch(e){Object(se.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}he.Counters.mechanicProcess=5}he.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(p.generateRandomContract)(),he.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*he._idleSpeed;he._actionTimeLeft-=t/1e3,he._actionTimeLeft=Math.max(he._actionTimeLeft,0);for(var n=Math.round(100*(1-he._actionTimeLeft/he._totalActionTime));2*he._actionProgressBarCount<=n;)he._actionProgressStr=Object(a.replaceAt)(he._actionProgressStr,he._actionProgressBarCount,"|"),he._actionProgressBarCount+=1;he._actionTimeStr="Time left: "+Math.max(0,Math.round(he._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=he._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=he._actionProgressStr.replace(/ /g," "),n>=100&&(he._actionInProgress=!1,q.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;te===1.0777-1?"7.77%":e===1.777-1?"77.7%":c.numeralWrapper.formatPercentage(e,t);let r=o.createElement(o.Fragment,null,"Effects:");return e.hacking_mult&&e.hacking_mult==e.strength_mult&&e.hacking_mult==e.defense_mult&&e.hacking_mult==e.dexterity_mult&&e.hacking_mult==e.agility_mult&&e.hacking_mult==e.charisma_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," all skills"):(e.hacking_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," hacking skill")),e.strength_mult&&e.strength_mult==e.defense_mult&&e.strength_mult==e.dexterity_mult&&e.strength_mult==e.agility_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," combat skills"):(e.strength_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," strength skill")),e.defense_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_mult-1)," defense skill")),e.dexterity_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_mult-1)," dexterity skill")),e.agility_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_mult-1)," agility skill"))),e.charisma_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_mult-1)," Charisma skill"))),e.hacking_exp_mult&&e.hacking_exp_mult===e.strength_exp_mult&&e.hacking_exp_mult===e.defense_exp_mult&&e.hacking_exp_mult===e.dexterity_exp_mult&&e.hacking_exp_mult===e.agility_exp_mult&&e.hacking_exp_mult===e.charisma_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," exp for all skills"):(e.hacking_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," hacking exp")),e.strength_exp_mult&&e.strength_exp_mult===e.defense_exp_mult&&e.strength_exp_mult===e.dexterity_exp_mult&&e.strength_exp_mult===e.agility_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," combat exp"):(e.strength_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," strength exp")),e.defense_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_exp_mult-1)," defense exp")),e.dexterity_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_exp_mult-1)," dexterity exp")),e.agility_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_exp_mult-1)," agility exp"))),e.charisma_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_exp_mult-1)," charisma exp"))),e.hacking_speed_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_speed_mult-1)," faster hacking")),e.hacking_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_chance_mult-1)," hack() success chance")),e.hacking_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_money_mult-1)," hack() power")),e.hacking_grow_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_grow_mult-1)," grow() power")),e.faction_rep_mult&&e.faction_rep_mult===e.company_rep_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions and companies"):(e.faction_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions")),e.company_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.company_rep_mult-1)," reputation from companies"))),e.crime_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_money_mult-1)," crime money")),e.crime_success_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_success_mult-1)," crime success rate")),e.work_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.work_money_mult-1)," work money")),e.hacknet_node_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacknet_node_money_mult-1)," hacknet production")),e.hacknet_node_purchase_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),e.hacknet_node_level_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),e.bladeburner_max_stamina_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),e.bladeburner_stamina_gain_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),e.bladeburner_analysis_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),e.bladeburner_success_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),n&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",u.Money(n)," after installing Augmentations.")),t&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",t.join(" and ")," after installing Augmentations.")),r}(this.mults,e.programs,e.startingMoney)}addToFactions(e){for(let t=0;t{let t=`${e%1e3}`;for(;t.length<3;)t="0"+t;return t})(),u=t?`${l}.${c}`:`${l}`;let m="";return a>0&&(m+=`${a} days `),i>0&&(m+=`${i} hours `),s>0&&(m+=`${s} minutes `),m+=`${u} seconds`},t.longestCommonStart=function(e){if(!r(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new a.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&r.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;ec(t[e-1]))},t.prestigeAllServers=function(){for(const e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions=void 0,t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";function a(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function r(e,t,n){var a,r;n||(n=Object.keys(t)),a={};for(let e=0;es.CONSTANTS.ServerMaxGrowthRate&&(a=s.CONSTANTS.ServerMaxGrowthRate);const r=e.serverGrowth/100;return Math.log(t)/(Math.log(a)*n.hacking_grow_mult*r*o.BitNodeMultipliers.ServerGrowthRate)}function d(e){for(const t in a.AllServers)if(a.AllServers.hasOwnProperty(t)&&a.AllServers[t].hostname==e)return a.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&a.ipExists(e.ip)&&(e.ip=a.createUniqueRandomIp()),null!=d(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=d(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new r.Server(e)},t.numCycleForGrowth=p,t.processSingleServerGrowth=function(e,t,n){let a=i.calculateServerGrowth(e,t,n);a<1&&(console.warn("serverGrowth calculated to be less than 1"),a=1);const r=e.moneyAvailable;if(e.moneyAvailable*=a,u.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),u.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),r!==e.moneyAvailable){let t=p(e,e.moneyAvailable/r,n);t=Math.max(0,t),e.fortify(2*s.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/r},t.prestigeHomeComputer=function(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push(c.LiteratureNames.HackersStartingHandbook)},t.GetServerByHostname=d,t.getServer=function(e){return m.isValidIPAddress(e)?void 0!==a.AllServers[e]?a.AllServers[e]:null:d(e)},t.getServerOnNetwork=function(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):a.AllServers[e.serversOnNetwork[t]]},t.isBackdoorInstalled=function(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},function(e,t,n){"use strict";n.d(t,"h",function(){return C}),n.d(t,"m",function(){return P}),n.d(t,"i",function(){return S}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return M}),n.d(t,"f",function(){return T}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return A}),n.d(t,"o",function(){return R}),n.d(t,"p",function(){return N}),n.d(t,"l",function(){return D}),n.d(t,"k",function(){return B}),n.d(t,"q",function(){return I}),n.d(t,"a",function(){return L}),n.d(t,"j",function(){return W}),n.d(t,"r",function(){return F}),n.d(t,"n",function(){return U});var a=n(530),r=n(155),i=n(147),o=n(37),s=n(85),l=n(178),c=n(242),u=n(177),m=n(49),p=n(1),d=n(24),h=n(27),_=n(43),g=n(19),f=n(0),y=n.n(f),b=n(23),E=n.n(b),v=n(446);let k;function C(){return 9===p.Player.bitNodeN||_.SourceFileFlags[9]>0}function P(){if(m.a.isRunning){if(m.a.currStep!==m.d.HacknetNodesIntroduction)return;Object(m.b)()}const e=p.Player.hacknetNodes.length;if(C()){const t=M();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return p.Player.canAfford(t)?(p.Player.loseMoney(t),p.Player.createHacknetServer(),F(),e):-1}{const t=O();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!p.Player.canAfford(t))return-1;const n="hacknet-node-"+e,r=new a.HacknetNode(n,p.Player.hacknet_node_money_mult);return p.Player.loseMoney(t),p.Player.hacknetNodes.push(r),e}}function S(){return C()&&p.Player.hacknetNodes.length>=o.HacknetServerConstants.MaxServers}function O(){return Object(r.calculateNodeCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function M(){return Object(i.calculateServerCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function T(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateLevelUpgradeCost(1,p.Player.hacknet_node_level_cost_mult)))return 0;let n=1,a=t-1,r=t-e.level;if(p.Player.money.gt(e.calculateLevelUpgradeCost(r,p.Player.hacknet_node_level_cost_mult)))return r;for(;n<=a;){var i=(n+a)/2|0;if(i!==t&&p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult))&&p.Player.money.lt(e.calculateLevelUpgradeCost(i+1,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function x(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateRamUpgradeCost(1,p.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof s.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),p.Player.money.gt(e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(p.Player.money.gt(e.calculateRamUpgradeCost(t,p.Player.hacknet_node_ram_cost_mult)))return t;return 0}function w(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateCoreUpgradeCost(1,p.Player.hacknet_node_core_cost_mult)))return 0;let n=1,a=t-1;const r=t-e.cores;if(p.Player.money.gt(e.calculateCoreUpgradeCost(r,p.Player.hacknet_node_core_cost_mult)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult))&&p.Player.money.lt(e.calculateCoreUpgradeCost(i+1,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function A(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!p.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,a=t-1;const r=t-e.cache;if(p.Player.canAfford(e.calculateCacheUpgradeCost(r)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!p.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(r,i);if(p.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!p.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(r,i);n=i+1}else a=i-1}return 0}function R(e,t=1){const n=Math.round(t),a=e.calculateLevelUpgradeCost(n,p.Player.hacknet_node_level_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.level>=(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel))return!1;if(e.level+n>(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)){return R(e,Math.max(0,(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)-e.level))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeLevel(n,p.Player.hacknet_node_money_mult),!0)}function N(e,t=1){const n=Math.round(t),a=e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.ram>=(r?o.HacknetServerConstants.MaxRam:o.HacknetNodeConstants.MaxRam))return!1;if(r){if(e.maxRam*Math.pow(2,n)>o.HacknetServerConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetServerConstants.MaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>o.HacknetNodeConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetNodeConstants.MaxRam/e.ram))))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeRam(n,p.Player.hacknet_node_money_mult),!0)}function D(e,t=1){const n=Math.round(t),a=e.calculateCoreUpgradeCost(n,p.Player.hacknet_node_core_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.cores>=(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores))return!1;if(e.cores+n>(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)){return D(e,Math.max(0,(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)-e.cores))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCore(n,p.Player.hacknet_node_money_mult),!0)}function B(e,t=1){const n=Math.round(t),a=e.calculateCacheUpgradeCost(n);if(isNaN(a)||a<=0||n<0)return!1;if(!(e instanceof s.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.HacknetServerConstants.MaxCache){return B(e,Math.max(0,o.HacknetServerConstants.MaxCache-e.cache))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCache(n),!0)}function I(){g.routing.isOn(g.Page.HacknetNodes)&&E.a.render(y.a.createElement(v.a,null),k)}function L(){k instanceof HTMLElement&&E.a.unmountComponentAtNode(k),k.style.display="none"}function W(e){return 0===p.Player.hacknetNodes.length?0:C()?function(e){if(!(p.Player.hashManager instanceof l.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})();t.MainMenuLinks={Terminal:r,ScriptEditor:r,ActiveScripts:r,CreateProgram:r,Stats:r,Factions:r,Augmentations:r,HacknetNodes:r,Sleeves:r,City:r,Travel:r,Job:r,StockMarket:r,Bladeburner:r,Corporation:r,Gang:r,Milestones:r,Tutorial:r,Options:r,DevMenu:r},t.initializeMainMenuLinks=function(){try{function e(e){const t=a.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Milestones=e("milestones-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link");const n=document.getElementById("options-menu-link");if(null===n)throw new Error('Could not find element with id: "options-menu-link"');return t.MainMenuLinks.Options=n,t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.companyExists=t.loadCompanies=t.initCompanies=t.Companies=void 0;const a=n(1234),r=n(146),i=n(26);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},a.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new r.Company(e)}(e)});for(const n in t.Companies){const a=t.Companies[n];e[n]instanceof r.Company?(a.favor=e[n].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetIndustryResearchTrees=t.IndustryResearchTrees=t.IndustryDescriptions=t.IndustryStartingCosts=t.Industries=void 0;const a=n(1247),r=n(3);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:"Engage in the production and distribution of energy.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"
Recommended starting Industry: NO",Utilities:"Distribute water and provide wastewater services.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Utilities,"$0.000a")+"
Recommended starting Industry: NO",Agriculture:"Cultivate crops and breed livestock to produce food.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Agriculture,"$0.000a")+"
Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"
Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Mining,"$0.000a")+"
Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Food,"$0.000a")+"
Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"
Recommended starting Industry: YES",Chemical:"Produce industrial chemicals.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"
Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Pharmaceutical,"$0.000a")+"
Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"
Recommended starting Industry: NO",Robotics:"Develop and create robots.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"
Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"
Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"
Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.

Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"
Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:a.getBaseResearchTreeCopy(),Utilities:a.getBaseResearchTreeCopy(),Agriculture:a.getBaseResearchTreeCopy(),Fishing:a.getBaseResearchTreeCopy(),Mining:a.getBaseResearchTreeCopy(),Food:a.getProductIndustryResearchTreeCopy(),Tobacco:a.getProductIndustryResearchTreeCopy(),Chemical:a.getBaseResearchTreeCopy(),Pharmaceutical:a.getProductIndustryResearchTreeCopy(),Computer:a.getProductIndustryResearchTreeCopy(),Robotics:a.getProductIndustryResearchTreeCopy(),Software:a.getProductIndustryResearchTreeCopy(),Healthcare:a.getProductIndustryResearchTreeCopy(),RealEstate:a.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=a.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=function(e,t){const n=Math.min(e,t),a=Math.max(e,t);return Math.floor(Math.random()*(a-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServerConstants=t.HacknetNodeConstants=void 0,t.HacknetNodeConstants={MoneyGainPerLevel:1.6,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},t.HacknetServerConstants={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CityName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},,,function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(531),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(451),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(450),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(25),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(35),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(304),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(291),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(134),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(204),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(410),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(121),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(22),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(449),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(140),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(38),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__),_Player__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(1),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(19),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(789),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(11),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(26),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(788),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(12),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(57),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(69),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(21),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(36),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(62),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(44),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(165),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(48),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(55),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__),react__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_32__),react_dom__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(23),react_dom__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_33__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(787),_ui_Root__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(785),_ui_Routing__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(448),_ui_Routing__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_36__),decimal_js__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(56);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;function Industry(e={}){this.offices={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new OfficeSpace({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chonqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(.1,5),this.pro=0,this.cyclesUntilRaise=CyclesPerEmployeeRaise,this.loc=e.loc?e.loc:"",this.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned}$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)}),Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"
")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var a=0;for(var r in this.offices)this.offices[r]instanceof OfficeSpace&&(a+=this.offices[r].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(a),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var i=n.getDreamSenseGain(),o=4*i;return void(i>0&&(this.popularity+=i*e,this.awareness+=o*e))}let s=this.processMaterials(e,n);Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1])),s=this.processProducts(e,n),Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1]))},Industry.prototype.processMaterialMarket=function(){for(var e=this.reqMats,t=this.prodMats,n=0;n0&&(r.qty+=a,expenses+=a*r.bCost)}(matName,this),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);e=Math.min(maxAmt,e)}e<0&&(e=0),warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;tmat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI=expWarehouse.size)return[0,0];var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,a=this.offices[t],r=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(a.employeeProd,this);break}}for(var a in this.products)if(this.products.hasOwnProperty(a)){var r=this.products[a];r instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&r.fin&&(n+=this.processProduct(e,r,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);e=Math.min(maxAmt,e)}warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty0&&e>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*e*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*producableFrac}product.data[city][1]=e*producableFrac/(SecsPerMarketCycle*marketCycles);break}case"SALE":{for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,a=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(n/a);let i;0===a||0===r?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){for(var n=t.corporation,a=t.office,r=e[0];this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(a[e]),this.researched[a[e]]=!0,Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`Researched ${a[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${r}`)}const r=document.getElementById(`${e}-content`);null!=r&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(r,2),r.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`})),r.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.003*e,a=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var r=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=r,this.exp+=r,this.eff+=r),this.ene-=a,this.hap-=a,this.eneHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"
Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s
"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{});for(var l in _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions)_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.hasOwnProperty(l)&&s.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l],value:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l]}));s.addEventListener("change",()=>{this.pos=s.options[s.selectedIndex].value});for(var c=0;c=this.size},OfficeSpace.prototype.process=function(e=1,t){var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var a=1;n.funds<0&&n.lastCycleRevenue<0?a=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(a=Math.pow(1.01,e));const r=n.hasResearch("AutoBrew"),i=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;tCharisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cha,1)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.exp,1)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cre,1)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.eff,1)+"
Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t.sal,"$0.000a")+" s
",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},_=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),g=[d,h(u,this),h(m,this),h(p,this),_];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-hire-employee-popup",g)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetYesButton)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetNoButton)();a.innerHTML="Hire",r.innerHTML="Cancel",a.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetInput)(),a=0;aObject(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:a*e,creativity:r*e,efficiency:i*e,salary:EmployeeSalaryMultiplier*(t+n+a+r+i)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.generateRandomString)(7);for(let e=0;e=CyclesPerIndustryStateCycle){const e=this.getState(),t=1,n=t*CyclesPerIndustryStateCycle;if(this.storedCycles-=n,this.divisions.forEach(n=>{n.process(t,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=n),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=n),"START"===e){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const e=this.revenue.minus(this.expenses).times(t*SecsPerMarketCycle);if(isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.

(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,a=t/this.totalShares,r=this.numShares*a*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_15__.Player.gainMoney(r),_Player__WEBPACK_IMPORTED_MODULE_15__.Player.recordMoneySource(r,"corporation"),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var a=t*e*n,r=Math.floor(INITIALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetNoButton)();i.innerHTML="Accept",o.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(a),this.numShares-=r,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r,"0.000a")+" shares).

Do you accept or reject this offer?

Hint: Investment firms will offer more money if your corporation is turning a profit")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/this.totalShares,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t,"$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).

You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(a.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-go-public-popup",[n,r,a,e,i])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,a=this.sharePrice,r=0,i=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`},Corporation.prototype.unlock=function(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],r=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var i=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*r,1===t)for(var o=0;oh.Start&&(_.currStep-=1);f()}(),!1}),Object(c.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return y(),!1}),f()}function f(){if(!_.isRunning)return;const e=Object(c.clearEventListeners)("terminal-menu-link"),t=Object(c.clearEventListeners)("stats-menu-link"),n=Object(c.clearEventListeners)("active-scripts-menu-link"),r=Object(c.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(c.clearEventListeners)("city-menu-link"),o=Object(c.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),r.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");const s=document.getElementById("interactive-tutorial-next");switch(_.currStep){case h.Start:a.Engine.loadTerminalContent(),v("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...

This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case h.GoToCharacterPage:a.Engine.loadTerminalContent(),v("Let's start by heading to the Stats page. Click the Stats tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return a.Engine.loadCharacterContent(),y(),!1});break;case h.CharacterPage:a.Engine.loadCharacterContent(),v("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses. "),s.style.display="inline-block";break;case h.CharacterGoToTerminalPage:a.Engine.loadCharacterContent(),v("Let's head to your computer's terminal by clicking the Terminal tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),y(),!1});break;case h.TerminalIntro:a.Engine.loadTerminalContent(),v("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case h.TerminalHelp:a.Engine.loadTerminalContent(),v("Let's try it out. Start by entering the help command into the Terminal (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case h.TerminalLs:a.Engine.loadTerminalContent(),v("The help command displays a list of all available Terminal commands, how to use them, and a description of what they do.

Let's try another command. Enter the ls command."),s.style.display="none";break;case h.TerminalScan:a.Engine.loadTerminalContent(),v(" ls is a basic command that shows files on the computer. Right now, it shows that you have a program called NUKE.exe on your computer. We'll get to what this does later.

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

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

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

From the results of the scan-analyze command, we can see that the n00dles server is only one node away. Let's connect so it now using: connect n00dles"),s.style.display="none";break;case h.TerminalAnalyze:a.Engine.loadTerminalContent(),v("You are now connected to another machine! What can you do now? You can hack it!

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

Before you try to hack a server, you should run diagnostics using the analyze command."),s.style.display="none";break;case h.TerminalNuke:a.Engine.loadTerminalContent(),v("When the analyze command finishes running it will show useful information about hacking the server.

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

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

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

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

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

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

To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case h.TerminalFree:a.Engine.loadTerminalContent(),v("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.

To check how much RAM is available on this machine, enter the free command."),s.style.display="none";break;case h.TerminalRunScript:a.Engine.loadTerminalContent(),v("We have 4GB of free RAM on this machine, which is enough to run our script. Let's run our script using run n00dles.script."),s.style.display="none";break;case h.TerminalGoToActiveScriptsPage:a.Engine.loadTerminalContent(),v("Your script is now running! It will continuously run in the background and will automatically stop if the code ever completes (the n00dles.script will never complete because it runs an infinite loop).

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

Let's check out some statistics for our running scripts by clicking the Active Scripts link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return a.Engine.loadActiveScriptsContent(),y(),!1});break;case h.ActiveScriptsPage:a.Engine.loadActiveScriptsContent(),v("This page displays information about all of your scripts that are running across every server. You can use this to gauge how well your scripts are doing. Let's go back to the Terminal"),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),y(),!1});break;case h.ActiveScriptsToTerminal:a.Engine.loadTerminalContent(),v("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the tail command. Do that now for the script we just ran by typing tail n00dles.script"),s.style.display="none";break;case h.TerminalTailScript:a.Engine.loadTerminalContent(),v("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes!

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

For now, let's move on to something else!"),s.style.display="inline-block";break;case h.GoToHacknetNodesPage:a.Engine.loadTerminalContent(),v("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the Hacknet page through the main navigation menu now."),s.style.display="none",r.setAttribute("class","flashing-button"),r.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),y(),!1});break;case h.HacknetNodesIntroduction:a.Engine.loadHacknetNodesContent(),v("here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case h.HacknetNodesGoToWorldPage:a.Engine.loadHacknetNodesContent(),v("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.

Let's go to the City page through the main navigation menu."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return a.Engine.loadLocationContent(),y(),!1});break;case h.WorldDescription:a.Engine.loadLocationContent(),v("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!

Lastly, click on the Tutorial link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return a.Engine.loadTutorialContent(),y(),!1});break;case h.TutorialPageInfo:a.Engine.loadTutorialContent(),v("This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case h.End:b();break;default:throw new Error("Invalid tutorial step")}!0===_.stepIsDone[_.currStep]&&(s.style.display="inline-block")}function y(){_.currStep===h.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),_.currStep===h.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===h.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),_.currStep===h.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===h.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),_.currStep===h.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),_.currStep===h.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),_.stepIsDone[_.currStep]=!0,_.currStep
Getting Started GuideDocumentation

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

cat "+s.LiteratureNames.HackersStartingHandbook}),n=Object(u.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(m.createPopup)(e,[t,n]),r.Player.getHomeComputer().messages.push(s.LiteratureNames.HackersStartingHandbook)}let E=null;function v(e){E.innerHTML=e,E.parentElement.scrollTop=0}!function(){document.addEventListener("DOMContentLoaded",function e(){E=document.getElementById("interactive-tutorial-text"),document.removeEventListener("DOMContentLoaded",e)})}()},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearEventListeners=void 0;const a=n(193);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?a.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayStockMarketContent=t.processStockPrices=t.stockMarketCycle=t.initSymbolToStockMap=t.initStockMarket=t.deleteStockMarket=t.loadStockMarket=t.cancelOrder=t.placeOrder=t.SymbolToStockMap=t.StockMarket=void 0;const o=n(175),s=n(988),l=n(987),c=n(194),u=n(986),m=n(985),p=n(118),d=n(105),h=n(284),_=n(984),g=n(10),f=n(1),y=n(485),b=n(19),E=n(3),v=n(11),k=n(26),C=i(n(0)),P=i(n(23));function S(e,n,a,r,i,o=null){if(!(e instanceof c.Stock))return o?o.log("placeOrder",`Invalid stock: '${e}'`):v.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof a)return o?o.log("placeOrder",`Invalid arguments: shares='${n}' price='${a}'`):v.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const u=new s.Order(e.symbol,n,a,r,i);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const a=t.StockMarket[n];a instanceof c.Stock&&(e[a.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(u);const m={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return l.processOrders(e,u.type,u.pos,m),D(),!0}function O(e,n=null){if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof s.Order){const n=e.order,a=t.StockMarket.Orders[n.stockSymbol];for(let e=0;e=n.cap&&(i=.1,n.b=!1),isNaN(i)&&(i=.5);const o=Math.random(),s={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};o1?1:i<0?0:i},t.calculateHackingExpGain=function(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let n=3;return(n+=e.baseDifficulty*t.hacking_exp_mult*.3)*a.BitNodeMultipliers.HackExpGain},t.calculatePercentMoneyHacked=function(e,t){const n=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return n<0?0:n>1?1:n*a.BitNodeMultipliers.ScriptHackMoney},t.calculateHackingTime=i,t.calculateGrowTime=function(e,t){return 3.2*i(e,t)},t.calculateWeakenTime=function(e,t){return 4*i(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPositions=void 0;const a=n(1220),r=n(286);t.CompanyPositions={},a.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new r.CompanyPosition(e)}(e)})},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e||e instanceof String}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedAugmentationsOrderSetting=t.PurchaseAugmentationsOrderSetting=t.EditorSetting=t.CodeMirrorThemeSetting=t.CodeMirrorKeybindingSetting=t.AceKeybindingSetting=void 0,function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(t.AceKeybindingSetting||(t.AceKeybindingSetting={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(t.CodeMirrorKeybindingSetting||(t.CodeMirrorKeybindingSetting={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.SolarizedDark="solarized dark",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(t.CodeMirrorThemeSetting||(t.CodeMirrorThemeSetting={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(t.EditorSetting||(t.EditorSetting={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(t.PurchaseAugmentationsOrderSetting||(t.PurchaseAugmentationsOrderSetting={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(t.OwnedAugmentationsOrderSetting||(t.OwnedAugmentationsOrderSetting={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartTimeCompanyPositions=t.BusinessConsultantCompanyPositions=t.SoftwareConsultantCompanyPositions=t.MiscCompanyPositions=t.AgentCompanyPositions=t.SecurityCompanyPositions=t.BusinessCompanyPositions=t.NetworkEngineerCompanyPositions=t.SecurityEngineerCompanyPositions=t.ITCompanyPositions=t.SoftwareCompanyPositions=void 0,t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButton=void 0;const o=i(n(0));t.StdButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n,a=e.disabled?"std-button-disabled":"std-button";if(t&&(a+=" tooltip"),"string"==typeof e.addClasses&&(a+=` ${e.addClasses}`),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};n=o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else n=o.createElement("span",{className:"tooltiptext"},e.tooltip);return o.createElement("button",{className:a,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Reputation=void 0;const o=i(n(0)),s=n(3);t.Reputation=function(e){return o.createElement("span",{className:"reputation samefont"},"number"==typeof e?s.numeralWrapper.formatReputation(e):e)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopupCloseButton=void 0;const a=n(12),r=n(165);t.createPopupCloseButton=function(e,t){const n=a.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&n.click()}return n.addEventListener("click",()=>{if(e instanceof Element)r.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&r.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),n}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=void 0,t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(0);const r=n.n(a).a.Component;class i extends r{corp(){return this.props.corp}eventHandler(){return this.props.eventHandler}routing(){return this.props.routing}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOptionElement=void 0;const a=n(12);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),a.createElement("option",{text:e,value:n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.substituteAliases=t.removeAlias=t.parseAliasDeclaration=t.printAliases=t.loadGlobalAliases=t.loadAliases=t.GlobalAliases=t.Aliases=void 0;const a=n(7);function r(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}function i(e){return t.GlobalAliases.hasOwnProperty(e)?t.GlobalAliases[e]:null}t.Aliases={},t.GlobalAliases={},t.loadAliases=function(e){t.Aliases=""===e?{}:JSON.parse(e)},t.loadGlobalAliases=function(e){t.GlobalAliases=""===e?{}:JSON.parse(e)},t.printAliases=function(){for(const e in t.Aliases)t.Aliases.hasOwnProperty(e)&&a.post("alias "+e+"="+t.Aliases[e]);for(const e in t.GlobalAliases)t.GlobalAliases.hasOwnProperty(e)&&a.post("global alias "+e+"="+t.GlobalAliases[e])},t.parseAliasDeclaration=function(e,n=!1){const a=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=a&&3==a.length&&(n?function(e,n){e in t.Aliases&&delete t.Aliases[e],t.GlobalAliases[e]=n.trim()}(a[1],a[2]):function(e,n){e in t.GlobalAliases&&delete t.GlobalAliases[e],t.Aliases[e]=n.trim()}(a[1],a[2]),!0)},t.removeAlias=function(e){return t.Aliases.hasOwnProperty(e)?(delete t.Aliases[e],!0):!!t.GlobalAliases.hasOwnProperty(e)&&(delete t.GlobalAliases[e],!0)},t.substituteAliases=function(e){var t,n;const a=e.split(" ");if(a.length>0){if("unalias"===a[0]||"alias"===a[0])return a.join(" ");let e=!0,o=0;for(;e&&o<10;){o++,e=!1;const s=null===(t=r(a[0]))||void 0===t?void 0:t.split(" ");null!=s&&(e=!0,a.splice(0,1,...s));for(let t=0;t{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var a="";null!=n&&(a=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const r=i.AllServers[e.serverIp];if(null==r)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+r.hostname+"|"+e.name+"|"+t+a}function l(e,t,n){const a=e.scriptRef.threads;if(!n)return isNaN(a)||a<1?1:a;const r=0|n;if(isNaN(n)||r<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>a)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${a}.`);return r}function c(e){if(!Object(r.isString)(e))return!1;return 4==e.split("|").length}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killWorkerScript=void 0;const a=n(248),r=n(119),i=n(152),o=n(197),s=n(24),l=n(198),c=n(292);function u(e,t=!0){const n=r.workerScripts.get(e);return n instanceof a.WorkerScript&&(m(n,t),!0)}function m(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof a.WorkerScript&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof a.WorkerScript))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const n=e.serverIp,a=e.name,o=s.AllServers[n];if(null==o)return void console.error(`Could not find server on which this script is running: ${n}`);o.ramUsed=c.roundToTwo(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t0)for(let n=0;n["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname+` ~${n}]> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(n<0||n>r)&&(Terminal.commandHistoryIndex=r),0!=n&&--Terminal.commandHistoryIndex;var a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((n<0||n>r)&&(Terminal.commandHistoryIndex=r),n==r||n==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const a=n.lastIndexOf(";");-1!==a&&(n=n.slice(a+1));const r=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=r.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==r.length)return;1==r.length?l=r[0]:2==r.length?(l=r[0],s=r[1]):3==r.length?(l=r[0]+" "+r[1],s=r[2]):(s=r.pop(),l=r.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const n=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`
[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$
`+`