{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Player.ts","webpack:///./src/Faction/data/FactionNames.ts","webpack:///./src/Settings/Settings.ts","webpack:///./src/ui/numeralFormat.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Augmentation/data/AugmentationNames.ts","webpack:///./src/Constants.ts","webpack:///./src/ui/React/DialogBox.tsx","webpack:///./src/Locations/data/CityNames.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/ui/React/Money.tsx","webpack:///./src/utils/JSONReviver.ts","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/ui/Router.ts","webpack:///./src/Server/AllServers.ts","webpack:///./src/ui/Context.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/Server/Server.ts","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Corporation/Actions.ts","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Bladeburner/data/BlackOperationNames.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/CotMG/FragmentType.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/Augmentation/StaticAugmentations.ts","webpack:///./src/Company/Companies.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/ui/React/StatsRow.tsx","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/Terminal.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/Work/ClassWork.tsx","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/Hacking.ts","webpack:///./src/Work/data/FactionWorkType.ts","webpack:///./src/CotMG/Helper.tsx","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/SaveObject.tsx","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/CotMG/Fragment.ts","webpack:///./src/ScriptEditor/ui/themes.ts","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Infiltration/utils.ts","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/ui/React/OptionSwitch.tsx","webpack:///./src/BitNode/BitNode.tsx","webpack:///./src/Work/Work.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/Hacknet/formulas/HacknetServers.ts","webpack:///./src/Alias.ts","webpack:///./src/Locations/Locations.ts","webpack:///./src/Work/WorkStats.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Themes/ui/Theme.tsx","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/Netscript/ScriptDeath.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Corporation/Material.ts","webpack:///./src/Gang/formulas/formulas.ts","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Bladeburner/Bladeburner.tsx","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/CotMG/data/Shapes.ts","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/Work/FactionWork.tsx","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/Server/ServerPurchases.ts","webpack:///./src/TextFile.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/PersonObjects/ITaskTracker.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/PersonObjects/Multipliers.ts","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/Gang/GangMemberTasks.ts","webpack:///./src/Corporation/Warehouse.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Terminal/ITerminal.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/utils/WorkType.ts","webpack:///./src/ui/React/ConfirmationModal.tsx","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/hash/hash.ts","webpack:///./src/Company/Company.ts","webpack:///./src/Script/Script.ts","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/MathJaxWrapper.tsx","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts","webpack:///./src/PersonObjects/Grafting/GraftingHelpers.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/CotMG/ActiveFragment.ts","webpack:///./src/Crime/Crime.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/GameOptions/GameOptionsTab.ts","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Message/Message.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/Electron.tsx","webpack:///./src/Work/CreateProgramWork.ts","webpack:///./src/Achievements/Achievements.ts","webpack:///./src/ui/React/CharacterOverview.tsx","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/Casino/RNG.ts","webpack:///./src/Work/CompanyWork.tsx","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/Work/formulas/Class.ts","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/Themes/Themes.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/utils/IPAddress.ts","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/db.tsx","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Augmentation/data/AugmentationCreator.tsx","webpack:///./src/Server/data/servers.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/utils/helpers/checkEnum.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/ui/React/CorruptableText.tsx","webpack:///./src/Work/GraftingWork.tsx","webpack:///./src/utils/helpers/formatTime.ts","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Crime/CrimeHelpers.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/Corporation/data/CorporationUpgrades.ts","webpack:///./src/PersonObjects/Grafting/GraftableAugmentation.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/utils/Validator.ts","webpack:///./src/Infiltration/formulas/victory.ts","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/utils/CompressionContracts.ts","webpack:///./src/ui/React/StatsProgressBar.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","webpack:///./src/Themes/Styles.ts","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/Corporation/Product.ts","webpack:///./src/Corporation/ui/Helpers.tsx","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/Faction/ui/FactionsRoot.tsx","webpack:///./src/ui/React/Progress.tsx","webpack:///./src/RedPill.tsx","webpack:///./src/ui/React/RecoveryRoot.tsx","webpack:///./src/NetworkShare/Share.tsx","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/Locations/City.ts","webpack:///./src/GameOptions/ui/OptionsSlider.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/Prestige.ts","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/Netscript/RecentScripts.ts","webpack:///./src/Gang/GangMemberTask.ts","webpack:///./src/Work/CrimeWork.tsx","webpack:///./src/ui/Apr1.tsx","webpack:///./src/ui/React/WorldMap.tsx","webpack:///./src/Bladeburner/ui/SuccessChance.tsx","webpack:///./src/ui/React/StaticModal.tsx","webpack:///./src/Script/RunningScript.ts","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Hacking/netscriptCanHack.ts","webpack:///./src/Infiltration/formulas/game.ts","webpack:///./src/Terminal/Parser.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/Script/RamCalculations.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Gang/Gang.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/Terminal/HelpText.ts","webpack:///./src/utils/ErrorHelper.ts","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/GameOptions/ui/GameOptionsPage.tsx","webpack:///./src/Casino/CardDeck/Hand.ts","webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx","webpack:///./src/CotMG/ui/DummyGrid.tsx","webpack:///./src/Server/BaseServer.ts","webpack:///./src/ui/React/CodingContractModal.tsx","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/ui/React/ANSIITypography.tsx","webpack:///./src/Gang/GangMember.ts","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/CotMG/StaneksGiftEvents.ts","webpack:///./src/Locations/data/LocationsMetadata.ts","webpack:///./src/Terminal/commands/download.ts","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","webpack:///./src/Bladeburner/data/Icons.tsx","webpack:///./src/Bladeburner/ui/ActionLevel.tsx","webpack:///./src/Bladeburner/ui/Autolevel.tsx","webpack:///./src/Bladeburner/ui/TeamSizeButton.tsx","webpack:///./src/PersonObjects/Grafting/ui/GraftingRoot.tsx","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/Themes/ui/StyleEditorButton.tsx","webpack:///./src/Themes/ui/ThemeEditorButton.tsx","webpack:///./src/Themes/ui/ThemeCollaborate.tsx","webpack:///./src/ui/React/DeleteGameButton.tsx","webpack:///./src/ui/React/SoftResetButton.tsx","webpack:///./src/Augmentation/ui/PurchasableAugmentations.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/Terminal/DirectoryServerHelpers.ts","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/NetscriptFunctions/Flags.ts","webpack:///./src/NetscriptFunctions/toNative.ts","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/BitNode/ui/BitnodeMultipliersDescription.tsx","webpack:///./src/CotMG/ui/Cell.tsx","webpack:///./src/CotMG/ui/Grid.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/Terminal/commands/common/editor.ts","webpack:///./src/utils/HammingCodeTools.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/CotMG/data/Constants.ts","webpack:///./src/utils/v1APIBreak.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/PersonObjects/Player/PlayerObjectWorkMethods.ts","webpack:///./src/engine.tsx","webpack:///./src/Themes/data/index.ts","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.ts","webpack:///./src/CotMG/StaneksGift.ts","webpack:///./src/Locations/Location.ts","webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx","webpack:///./src/ui/React/ServerDropdown.tsx","webpack:///./src/Casino/Blackjack.tsx","webpack:///./src/Casino/CardDeck/ReactCard.tsx","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/Achievements/AchievementEntry.tsx","webpack:///./src/ThirdParty/colorUtils.ts","webpack:///./src/Themes/data/default/index.ts","webpack:///./src/Themes/data/default-lite/index.ts","webpack:///./src/Themes/data/monokai-ish/index.ts","webpack:///./src/Themes/data/warmer/index.ts","webpack:///./src/Themes/data/dark-plus/index.ts","webpack:///./src/Themes/data/mayukai-dark/index.ts","webpack:///./src/Themes/data/purple/index.ts","webpack:///./src/Themes/data/smooth-green/index.ts","webpack:///./src/Themes/data/dracula/index.ts","webpack:///./src/Themes/data/dark-blue/index.ts","webpack:///./src/Themes/data/discord-like/index.ts","webpack:///./src/Themes/data/one-dark/index.ts","webpack:///./src/Themes/data/muted-gold-blue/index.ts","webpack:///./src/Themes/data/light/index.ts","webpack:///./src/Themes/data/default/screenshot.png","webpack:///./src/Themes/data/default-lite/screenshot.png","webpack:///./src/Themes/data/monokai-ish/screenshot.png","webpack:///./src/Themes/data/warmer/screenshot.png","webpack:///./src/Themes/data/dark-plus/screenshot.png","webpack:///./src/Themes/data/mayukai-dark/screenshot.png","webpack:///./src/Themes/data/purple/screenshot.png","webpack:///./src/Themes/data/smooth-green/screenshot.png","webpack:///./src/Themes/data/dracula/screenshot.png","webpack:///./src/Themes/data/dark-blue/screenshot.png","webpack:///./src/Themes/data/discord-like/screenshot.png","webpack:///./src/Themes/data/one-dark/screenshot.png","webpack:///./src/Themes/data/muted-gold-blue/screenshot.png","webpack:///./src/Themes/data/light/screenshot.png","webpack:///./src/Terminal/Terminal.ts","webpack:///./src/data/codingcontracttypes.ts","webpack:///./src/utils/Heap.ts","webpack:///./src/utils/helpers/createRandomString.ts","webpack:///./src/Programs/Program.ts","webpack:///./src/Programs/data/ProgramsMetadata.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/NetworkShare/formulas/share.tsx","webpack:///./src/Work/formulas/Faction.ts","webpack:///./src/Company/data/CompaniesMetadata.ts","webpack:///./src/Corporation/Research.ts","webpack:///./src/Corporation/data/ResearchMetadata.ts","webpack:///./src/Hacknet/HashUpgrade.ts","webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx","webpack:///./src/Netscript/Environment.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/Gang/data/tasks.ts","webpack:///./src/Gang/GangMemberUpgrade.ts","webpack:///./src/Gang/data/power.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptFunctions/Stanek.ts","webpack:///./src/CotMG/formulas/effect.ts","webpack:///./src/NetscriptFunctions/Infiltration.ts","webpack:///./src/NetscriptFunctions/UserInterface.ts","webpack:///./src/NetscriptFunctions/Bladeburner.ts","webpack:///./src/NetscriptFunctions/CodingContract.ts","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Corporation.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/NetscriptFunctions/Formulas.ts","webpack:///./src/NetscriptFunctions/StockMarket.ts","webpack:///./src/NetscriptFunctions/Grafting.ts","webpack:///./src/ui/InteractiveTutorial/InteractiveTutorialRoot.tsx","webpack:///./src/ui/InteractiveTutorial/NSSelection.tsx","webpack:///./src/ui/React/Overview.tsx","webpack:///./src/Sidebar/ui/SidebarRoot.tsx","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx","webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx","webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx","webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx","webpack:///./src/Augmentation/ui/SourceFiles.tsx","webpack:///./src/DevMenu.tsx","webpack:///./src/DevMenu/ui/General.tsx","webpack:///./src/DevMenu/ui/Stats.tsx","webpack:///./src/DevMenu/ui/Factions.tsx","webpack:///./src/DevMenu/ui/Augmentations.tsx","webpack:///./src/DevMenu/ui/SourceFiles.tsx","webpack:///./src/DevMenu/ui/Programs.tsx","webpack:///./src/DevMenu/ui/Servers.tsx","webpack:///./src/DevMenu/ui/Companies.tsx","webpack:///./src/DevMenu/ui/Bladeburner.tsx","webpack:///./src/DevMenu/ui/Gang.tsx","webpack:///./src/DevMenu/ui/Corporation.tsx","webpack:///./src/DevMenu/ui/CodingContracts.tsx","webpack:///./src/DevMenu/ui/StockMarket.tsx","webpack:///./src/DevMenu/ui/Sleeves.tsx","webpack:///./src/DevMenu/ui/Stanek.tsx","webpack:///./src/DevMenu/ui/TimeSkip.tsx","webpack:///./src/DevMenu/ui/SaveFile.tsx","webpack:///./src/DevMenu/ui/Achievements.tsx","webpack:///./src/DevMenu/ui/Entropy.tsx","webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx","webpack:///./src/Bladeburner/ui/Stats.tsx","webpack:///./src/Bladeburner/ui/TravelModal.tsx","webpack:///./src/Bladeburner/ui/Console.tsx","webpack:///./src/Bladeburner/ui/AllPages.tsx","webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx","webpack:///./src/Bladeburner/ui/GeneralActionList.tsx","webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx","webpack:///./src/Bladeburner/data/GeneralActions.tsx","webpack:///./src/Bladeburner/ui/ContractPage.tsx","webpack:///./src/Bladeburner/ui/ContractList.tsx","webpack:///./src/Bladeburner/ui/ContractElem.tsx","webpack:///./src/Bladeburner/data/Contracts.tsx","webpack:///./src/Bladeburner/ui/StealthIcon.tsx","webpack:///./src/Bladeburner/ui/KillIcon.tsx","webpack:///./src/Bladeburner/ui/OperationPage.tsx","webpack:///./src/Bladeburner/ui/OperationList.tsx","webpack:///./src/Bladeburner/ui/OperationElem.tsx","webpack:///./src/Bladeburner/ui/TeamSizeModal.tsx","webpack:///./src/Bladeburner/data/Operations.tsx","webpack:///./src/Bladeburner/ui/BlackOpPage.tsx","webpack:///./src/Bladeburner/ui/BlackOpList.tsx","webpack:///./src/Bladeburner/ui/BlackOpElem.tsx","webpack:///./src/Bladeburner/data/BlackOperations.tsx","webpack:///./src/Bladeburner/ui/SkillPage.tsx","webpack:///./src/Bladeburner/ui/SkillList.tsx","webpack:///./src/Bladeburner/ui/SkillElem.tsx","webpack:///./src/Gang/ui/GangRoot.tsx","webpack:///./src/Gang/ui/ManagementSubpage.tsx","webpack:///./src/Gang/ui/GangStats.tsx","webpack:///./src/Gang/ui/BonusTime.tsx","webpack:///./src/Gang/ui/GangMemberList.tsx","webpack:///./src/Gang/ui/GangMemberCard.tsx","webpack:///./src/Gang/ui/GangMemberCardContent.tsx","webpack:///./src/Gang/ui/GangMemberStats.tsx","webpack:///./src/ui/React/KillScriptsModal.tsx","webpack:///./src/Work/formulas/Company.ts","webpack:///./src/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/Gang/ui/TaskSelector.tsx","webpack:///./src/Gang/ui/TaskDescription.tsx","webpack:///./src/Gang/ui/AscensionModal.tsx","webpack:///./src/Gang/ui/RecruitButton.tsx","webpack:///./src/Gang/ui/RecruitModal.tsx","webpack:///./src/Gang/ui/TerritorySubpage.tsx","webpack:///./src/Gang/ui/TerritoryInfoModal.tsx","webpack:///./src/Gang/ui/EquipmentsSubpage.tsx","webpack:///./src/Corporation/ui/CorporationRoot.tsx","webpack:///./src/Corporation/ui/MainPanel.tsx","webpack:///./src/Corporation/ui/CityTabs.tsx","webpack:///./src/Corporation/ui/Industry.tsx","webpack:///./src/Corporation/ui/IndustryOffice.tsx","webpack:///./src/Corporation/ui/modals/UpgradeOfficeSizeModal.tsx","webpack:///./src/Corporation/ui/modals/ThrowPartyModal.tsx","webpack:///./src/Corporation/ui/IndustryOverview.tsx","webpack:///./src/Corporation/ui/modals/MakeProductModal.tsx","webpack:///./src/Corporation/ui/modals/ResearchModal.tsx","webpack:///./src/Corporation/ui/IndustryWarehouse.tsx","webpack:///./src/Corporation/ui/modals/SmartSupplyModal.tsx","webpack:///./src/Corporation/ui/ProductElem.tsx","webpack:///./src/Corporation/ui/modals/DiscontinueProductModal.tsx","webpack:///./src/Corporation/ui/modals/LimitProductProductionModal.tsx","webpack:///./src/Corporation/ui/modals/SellProductModal.tsx","webpack:///./src/Corporation/ui/modals/ProductMarketTaModal.tsx","webpack:///./src/Corporation/ui/modals/CancelProductModal.tsx","webpack:///./src/Corporation/ui/MaterialElem.tsx","webpack:///./src/Corporation/ui/modals/ExportModal.tsx","webpack:///./src/Corporation/ui/modals/MaterialMarketTaModal.tsx","webpack:///./src/Corporation/ui/modals/SellMaterialModal.tsx","webpack:///./src/Corporation/ui/modals/PurchaseMaterialModal.tsx","webpack:///./src/Corporation/ui/modals/LimitMaterialProductionModal.tsx","webpack:///./src/Corporation/ui/IndustryProductEquation.tsx","webpack:///./src/Corporation/ui/ExpandNewCity.tsx","webpack:///./src/Corporation/ui/ExpandIndustryTab.tsx","webpack:///./src/Corporation/ui/Overview.tsx","webpack:///./src/Corporation/ui/LevelableUpgrade.tsx","webpack:///./src/Corporation/ui/UnlockUpgrade.tsx","webpack:///./src/Corporation/ui/modals/BribeFactionModal.tsx","webpack:///./src/Corporation/ui/modals/SellSharesModal.tsx","webpack:///./src/Corporation/ui/modals/BuybackSharesModal.tsx","webpack:///./src/Corporation/ui/modals/IssueDividendsModal.tsx","webpack:///./src/Corporation/ui/modals/IssueNewSharesModal.tsx","webpack:///./src/Corporation/ui/modals/FindInvestorsModal.tsx","webpack:///./src/Corporation/ui/modals/GoPublicModal.tsx","webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx","webpack:///./src/Infiltration/ui/Game.tsx","webpack:///./src/Infiltration/ui/BackwardGame.tsx","webpack:///./src/Infiltration/ui/BracketGame.tsx","webpack:///./src/Infiltration/ui/BribeGame.tsx","webpack:///./src/Infiltration/ui/CheatCodeGame.tsx","webpack:///./src/Infiltration/ui/Countdown.tsx","webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx","webpack:///./src/Infiltration/ui/MinesweeperGame.tsx","webpack:///./src/Infiltration/ui/SlashGame.tsx","webpack:///./src/Infiltration/ui/Victory.tsx","webpack:///./src/Infiltration/ui/WireCuttingGame.tsx","webpack:///./src/Infiltration/ui/Intro.tsx","webpack:///./src/ui/WorkInProgressRoot.tsx","webpack:///./src/GameOptions/ui/GameOptionsRoot.tsx","webpack:///./src/GameOptions/ui/CurrentOptionsPage.tsx","webpack:///./src/GameOptions/ui/GameOptionsSidebar.tsx","webpack:///./src/Diagnostic/FileDiagnosticModal.tsx","webpack:///./src/Themes/ui/StyleEditorModal.tsx","webpack:///./src/Themes/ui/ThemeEditorModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx","webpack:///./src/Augmentation/ui/PurchaseAugmentationModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TravelModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/FAQModal.tsx","webpack:///./src/Hacknet/ui/HacknetRoot.tsx","webpack:///./src/Hacknet/ui/GeneralInfo.tsx","webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx","webpack:///./src/Hacknet/ui/HacknetServerElem.tsx","webpack:///./src/Hacknet/ui/HashUpgradeModal.tsx","webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx","webpack:///./src/Hacknet/ui/MultiplierButtons.tsx","webpack:///./src/Hacknet/ui/PlayerInfo.tsx","webpack:///./src/Hacknet/ui/PurchaseButton.tsx","webpack:///./src/Locations/ui/GenericLocation.tsx","webpack:///./src/Locations/ui/CompanyLocation.tsx","webpack:///./src/Company/ui/QuitJobModal.tsx","webpack:///./src/Locations/ui/GymLocation.tsx","webpack:///./src/Locations/ui/HospitalLocation.tsx","webpack:///./src/Locations/ui/SlumsLocation.tsx","webpack:///./src/Locations/ui/SpecialLocation.tsx","webpack:///./src/Corporation/ui/modals/CreateCorporationModal.tsx","webpack:///./src/utils/helpers/N00dles.ts","webpack:///./src/Arcade/ui/ArcadeRoot.tsx","webpack:///./src/Arcade/ui/BBCabinet.tsx","webpack:///./src/Locations/ui/TechVendorLocation.tsx","webpack:///./src/Locations/ui/RamButton.tsx","webpack:///./src/Locations/ui/TorButton.tsx","webpack:///./src/Locations/LocationsHelpers.tsx","webpack:///./src/Locations/ui/CoresButton.tsx","webpack:///./src/Locations/ui/PurchaseServerModal.tsx","webpack:///./src/Locations/ui/TravelConfirmationModal.tsx","webpack:///./src/Locations/ui/UniversityLocation.tsx","webpack:///./src/Locations/ui/CasinoLocation.tsx","webpack:///./src/Casino/CardDeck/Deck.ts","webpack:///./src/Casino/CoinFlip.tsx","webpack:///./src/Casino/Roulette.tsx","webpack:///./src/Casino/SlotMachine.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","webpack:///./src/ScriptEditor/ui/ThemeEditorModal.tsx","webpack:///./src/ScriptEditor/NetscriptDefinitions.d.ts","webpack:///./src/Milestones/ui/MilestonesRoot.tsx","webpack:///./src/Terminal/ui/TerminalRoot.tsx","webpack:///./src/Terminal/ui/TerminalInput.tsx","webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx","webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptAccordion.tsx","webpack:///./src/Faction/ui/FactionRoot.tsx","webpack:///./src/Faction/ui/AugmentationsPage.tsx","webpack:///./src/Faction/ui/DonateOption.tsx","webpack:///./src/ui/React/NumberInput.tsx","webpack:///./src/Faction/ui/Info.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/SourceFile/applySourceFile.ts","webpack:///./src/Exploits/applyExploits.ts","webpack:///./src/Faction/ui/GangButton.tsx","webpack:///./src/Faction/ui/CreateGangModal.tsx","webpack:///./src/ui/CharacterStats.tsx","webpack:///./src/StockMarket/ui/StockMarketRoot.tsx","webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx","webpack:///./src/StockMarket/ui/StockTickers.tsx","webpack:///./src/StockMarket/ui/StockTicker.tsx","webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx","webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx","webpack:///./src/StockMarket/ui/StockTickerOrder.tsx","webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx","webpack:///./src/StockMarket/ui/PlaceOrderModal.tsx","webpack:///./src/BitNode/ui/BitverseRoot.tsx","webpack:///./src/BitNode/ui/PortalModal.tsx","webpack:///./src/ui/React/CinematicLine.tsx","webpack:///./src/CotMG/ui/StaneksGiftRoot.tsx","webpack:///./src/CotMG/ui/MainBoard.tsx","webpack:///./src/CotMG/ui/FragmentInspector.tsx","webpack:///./src/CotMG/ui/FragmentSelector.tsx","webpack:///./src/CotMG/ui/FragmentPreview.tsx","webpack:///./src/CotMG/ui/ActiveFragmentSummary.tsx","webpack:///./src/CotMG/DummyGift.ts","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/Achievements/AchievementsRoot.tsx","webpack:///./src/Achievements/AchievementList.tsx","webpack:///./src/Achievements/AchievementIcon.tsx","webpack:///./src/ui/ErrorBoundary.tsx","webpack:///./src/Themes/ui/ThemeBrowser.tsx","webpack:///./src/Themes/ui/ThemeEntry.tsx","webpack:///./src/ui/React/ImportSaveRoot.tsx","webpack:///./src/ui/React/BypassWrapper.tsx","webpack:///./src/NetscriptFunctions/Singularity.ts","webpack:///./src/Netscript/APIWrapper.ts","webpack:///./src/NetscriptPort.ts","webpack:///./src/utils/helpers/clearObject.ts","webpack:///./src/PersonObjects/Grafting/EntropyAccumulation.ts","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/Terminal/commands/alias.ts","webpack:///./src/Terminal/commands/analyze.ts","webpack:///./src/Terminal/commands/backdoor.ts","webpack:///./src/Terminal/commands/buy.ts","webpack:///./src/Terminal/commands/cat.ts","webpack:///./src/Terminal/commands/cd.ts","webpack:///./src/Terminal/commands/check.ts","webpack:///./src/Terminal/commands/connect.ts","webpack:///./src/Terminal/commands/cp.ts","webpack:///./src/Terminal/commands/expr.ts","webpack:///./src/Terminal/commands/free.ts","webpack:///./src/Terminal/commands/grow.ts","webpack:///./src/Terminal/commands/hack.ts","webpack:///./src/Terminal/commands/help.ts","webpack:///./src/Terminal/commands/history.ts","webpack:///./src/Terminal/commands/home.ts","webpack:///./src/Terminal/commands/hostname.ts","webpack:///./src/Terminal/commands/kill.ts","webpack:///./src/Terminal/commands/killall.ts","webpack:///./src/Terminal/commands/ls.tsx","webpack:///./src/Terminal/commands/lscpu.ts","webpack:///./src/Terminal/commands/mem.ts","webpack:///./src/Terminal/commands/mv.ts","webpack:///./src/Terminal/commands/nano.ts","webpack:///./src/ScriptEditor/CursorPositions.ts","webpack:///./src/Terminal/commands/ps.ts","webpack:///./src/Terminal/commands/rm.ts","webpack:///./src/Terminal/commands/run.ts","webpack:///./src/Terminal/commands/runScript.ts","webpack:///./src/Terminal/commands/runProgram.ts","webpack:///./src/Terminal/commands/scan.ts","webpack:///./src/Terminal/commands/scananalyze.ts","webpack:///./src/Terminal/commands/scp.ts","webpack:///./src/Terminal/commands/sudov.ts","webpack:///./src/Terminal/commands/tail.ts","webpack:///./src/Terminal/commands/top.ts","webpack:///./src/Terminal/commands/unalias.ts","webpack:///./src/Terminal/commands/vim.ts","webpack:///./src/Terminal/commands/weaken.ts","webpack:///./src/Terminal/commands/wget.ts","webpack:///./src/Terminal/commands/apr1.ts","webpack:///./src/Exploits/loops.ts","webpack:///./src/UncaughtPromiseHandler.ts","webpack:///./src/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Player","PlayerObject","loadPlayer","saveString","JSON","parse","Reviver","money","parseFloat","exploits","sanitizeExploits","FactionNames","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","DisableOverviewProgressBars","EnableBashHotkeys","TimestampsFormat","Locale","MaxRecentScriptsCapacity","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SaveGameOnFileSave","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","SuppressTIXPopup","SuppressSavedGameToast","SuppressAutosaveDisabledWarnings","UseIEC60027_2","ExcludeRunningScriptsFromSave","IsSidebarOpened","theme","defaultTheme","styles","defaultStyles","overview","x","y","opened","EditorTheme","defaultMonacoTheme","Settings","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","MonacoVim","MonacoWordWrap","init","assign","load","save","extraFormats","extraNotations","gigaMultiplier","numeralWrapper","constructor","this","defaultLocale","updateLocale","numeral","locale","console","warn","format","Math","abs","answer","formatBigNumber","formatReallyBigNumber","decimalPlaces","nAbs","Infinity","repeat","str","formatHp","formatMoney","formatSkill","formatExp","formatHashes","formatReputation","formatFavor","formatSecurity","toFixed","formatRAM","formatPercentage","formatter","formatServerSecurity","formatRespect","formatWanted","formatMultiplier","formatSleeveShock","formatSleeveSynchro","formatSleeveMemory","formatPopulation","formatStamina","formatShares","formatInfiltrationSecurity","formatThreads","formatStaneksGiftHeat","formatStaneksGiftCharge","formatStaneksGiftPower","parseCustomLargeNumber","numericRegExp","RegExp","join","match","NaN","number","notation","notationIndex","indexOf","largestAbsoluteNumber","n1","n2","n3","isNaN","max","parseMoney","numeralValue","parsed","selfParsed","LocationName","AugmentationNames","CONSTANTS","VersionString","VersionNumber","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","PurchasedServerLimit","PurchasedServerMaxRam","MultipleAugMultiplier","TorRouterCost","WSEAccountCost","TIXAPICost","MarketData4SCost","MarketDataTixApi4SCost","StockMarketCommission","HospitalCostPerHp","IntelligenceCrimeWeight","IntelligenceInfiltrationWeight","IntelligenceCrimeBaseExpGain","IntelligenceProgramBaseExpGain","IntelligenceGraftBaseExpGain","IntelligenceTerminalHackBaseExpGain","IntelligenceSingFnBaseExpGain","IntelligenceClassBaseExpGain","MillisecondsPer20Hours","GameCyclesPer20Hours","MillisecondsPer10Hours","GameCyclesPer10Hours","MillisecondsPer8Hours","GameCyclesPer8Hours","MillisecondsPer4Hours","GameCyclesPer4Hours","MillisecondsPer2Hours","GameCyclesPer2Hours","MillisecondsPerHour","GameCyclesPerHour","MillisecondsPerHalfHour","GameCyclesPerHalfHour","MillisecondsPerQuarterHour","GameCyclesPerQuarterHour","MillisecondsPerFiveMinutes","GameCyclesPerFiveMinutes","BaseFocusBonus","ClassDataStructuresBaseCost","ClassNetworksBaseCost","ClassAlgorithmsBaseCost","ClassManagementBaseCost","ClassLeadershipBaseCost","ClassGymBaseCost","ClassStudyComputerScienceBaseExp","ClassDataStructuresBaseExp","ClassNetworksBaseExp","ClassAlgorithmsBaseExp","ClassManagementBaseExp","ClassLeadershipBaseExp","CodingContractBaseFactionRepGain","CodingContractBaseCompanyRepGain","CodingContractBaseMoneyGain","AugmentationGraftingCostMult","AugmentationGraftingTimeBase","SoACostMult","SoARepMult","EntropyEffect","TotalNumBitNodes","InfiniteLoopLimit","Donations","LatestUpdate","dialogBoxCreate","txt","AlertEvents","emit","component","sx","dangerouslySetInnerHTML","__html","CityName","BitNodeMultipliers","defaultMultipliers","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","disabled","colors","Money","props","classes","undefined","player","Error","canAfford","className","ctor","constructors","fromJSON","obj","validationData","validateObject","Generic_toJSON","ctorName","keys","index","Generic_fromJSON","convertTimeMsToTimeElapsedString","time","showMilli","floor","totalSeconds","days","secondPerHours","secTruncDays","hours","secondPerMinute","secTruncHours","minutes","secTruncMinutes","milliTruncSec","res","longestCommonStart","strings","containsAllStrings","A","concat","sort","a1","a2","L","a","charAt","b","toUpperCase","substring","arr","every","isString","formatNumber","num","numFractionDigits","toLocaleString","maximumFractionDigits","minimumFractionDigits","generateRandomString","chars","random","cyrb53","seed","h1","h2","ch","charCodeAt","imul","toString","capitalizeFirstLetter","capitalizeEachWord","split","map","word","KEY","KEYCODE","Page","AllServers","GetServer","server","isValidIPAddress","hostname","GetServerByHostname","ipserver","ip","GetServerByIP","GetAllServers","servers","DeleteServer","serverkey","ipExists","createUniqueRandomIp","createRandomIp","AddToAllServers","initForeignServers","homeComputer","networkLayers","toNumber","getRandomInt","min","metadata","serverMetadata","serverParams","numOpenPortsRequired","organizationName","maxRamExponent","maxRam","pow","hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth","Server","filename","literature","messages","SpecialServers","WorldDaemon","WorldDaemonDifficulty","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","prestigeAllServers","member","loadAllServers","saveAllServers","excludeRunningScripts","TempAllServers","stringify","runningScripts","runningScriptObj","logs","Context","React","createContext","Router","use","useContext","Factions","loadFactions","faction","getInfo","err","error","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","lower","upper","Augmentation","params","info","moneyCost","repCost","factions","prereqs","baseRepRequirement","freeze","baseCost","isSpecial","hacking","mults","strength","defense","dexterity","agility","charisma","hacking_exp","strength_exp","defense_exp","dexterity_exp","agility_exp","charisma_exp","hacking_chance","hacking_speed","hacking_money","hacking_grow","company_rep","faction_rep","crime_money","crime_success","work_money","hacknet_node_money","hacknet_node_purchase_cost","hacknet_node_ram_cost","hacknet_node_core_cost","hacknet_node_level_cost","bladeburner_max_stamina","bladeburner_stamina_gain","bladeburner_analysis","bladeburner_success_chance","stats","programs","startingMoney","f","decimals","desc","generateStatsDescription","addToFactions","factionList","augmentations","getCost","augmentationReference","StaticAugmentations","NeuroFluxGovernor","nextLevel","getLevel","multiplier","AugmentationRepCost","AugmentationMoneyCost","queuedAugmentations","getBaseAugmentationPriceMultiplier","includes","ShadowsOfAnarchy","soaAugmentationNames","initSoAAugmentations","augmentation","soaMultiplier","filter","augmentationName","hasAugmentation","find","getGenericAugmentationPriceMultiplier","currLevel","level","addToAllFactions","fac","facObj","special","toJSON","AllCorporationStates","CorporationConstants","INITIALSHARES","SHARESPERPRICEUPDATE","IssueNewSharesCooldown","SellSharesCooldown","CyclesPerMarketCycle","CyclesPerIndustryStateCycle","SecsPerMarketCycle","Cities","Aevum","Chongqing","Sector12","NewTokyo","Ishima","Volhaven","WarehouseInitialCost","WarehouseInitialSize","WarehouseUpgradeBaseCost","OfficeInitialCost","OfficeInitialSize","OfficeUpgradeBaseCost","BribeThreshold","BribeToRepRatio","ProductProductionCostRatio","DividendMaxRate","EmployeeSalaryMultiplier","CyclesPerEmployeeRaise","EmployeeRaiseAmount","BaseMaxProducts","AllMaterials","FundingRoundShares","FundingRoundMultiplier","AvgProfitLength","modal","display","alignItems","justifyContent","paper","backgroundColor","background","default","border","primary","main","boxShadow","dark","padding","maxWidth","maxHeight","overflow","scrollbarWidth","Modal","disableRestoreFocus","disableScrollLock","disableEnforceFocus","disableAutoFocus","open","onClose","closeAfterTransition","in","children","HacknetNodeConstants","MoneyGainPerLevel","BaseCost","LevelBaseCost","RamBaseCost","CoreBaseCost","PurchaseNextMult","UpgradeLevelMult","UpgradeRamMult","UpgradeCoreMult","MaxLevel","MaxRam","MaxCores","PurchaseMultipliers","x1","x5","x10","MAX","HacknetServerConstants","HashesPerLevel","CacheBaseCost","PurchaseMult","UpgradeCacheMult","MaxServers","MaxCache","EmployeePositions","Operations","Engineer","Business","Management","RandD","Training","Unassigned","ActionTypes","Idle","Contract","Operation","BlackOp","BlackOperation","Recruitment","FieldAnalysis","Diplomacy","iTutorialSteps","ITutorial","currStep","Start","isRunning","stepIsDone","NSSelection","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalGoHome","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End","iTutorialStart","iTutorialNextStep","iTutorialEnd","ITutorialEvents","iTutorialPrevStep","getHomeComputer","LiteratureNames","HackersStartingHandbook","BaseServer","super","startsWith","createRandomString","purchasedByPlayer","ServerStartingMoney","moneyMax","ServerMaxMoney","ServerStartingSecurity","baseDifficulty","minDifficulty","round","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","aboveCap","log","fortify","amt","weaken","ServerWeakenRate","Corporation","Division","useCorporation","useDivision","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","LocationType","hasHacknetServers","bitNodeN","sourceFileLvl","purchaseHacknet","numOwned","hacknetNodes","cost","getCostOfNextHacknetServer","loseMoney","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","calculateLevelUpgradeCost","levelsToMax","curr","getMaxNumberRamUpgrades","calculateRamUpgradeCost","HacknetServer","log2","ram","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","cores","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","upgradeLevel","purchaseRamUpgrade","upgradeRam","purchaseCoreUpgrade","upgradeCore","purchaseCacheUpgrade","upgradeCache","processHacknetEarnings","numCycles","hashManager","HashManager","hashes","hserver","updateHashRate","h","process","wastedHashes","storeHashes","upgrade","HashUpgrades","gainMoney","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upg","corporation","refundUpgrade","funds","target","e","division","divisions","sciResearch","qty","bladeburner","changeRank","skillPoints","generateRandomContract","NewIndustry","industry","type","Industry","NewCity","city","offices","OfficeSpace","loc","size","UnlockUpgrade","price","unlockUpgrades","unlock","LevelUpgrade","basePrice","priceMult","upgrades","IssueDividends","rate","dividendRate","SellMaterial","mat","replace","temp","bCost","eval","sCost","q","tempQty","maxsll","prd","sllman","SellProduct","product","all","cities","tempCity","SetSmartSupply","warehouse","smartSupply","smartSupplyEnabled","SetSmartSupplyUseLeftovers","material","useLeftover","smartSupplyUseLeftovers","BuyMaterial","buy","BulkPurchase","matSize","MaterialSizes","maxAmount","sizeUsed","SellShares","numShares","public","shareSaleCooldown","stockSaleResults","calculateShareSale","profit","newSharePrice","newSharesUntilUpdate","issuedShares","sharePrice","shareSalesUntilPriceUpdate","BuyBackShares","buybackPrice","AssignJob","office","employeeName","job","employee","employees","values","assignSingleJob","AutoAssignJob","count","autoAssignJob","UpgradeOfficeSize","initialPriceMult","mult","BuyCoffee","getCoffeeCost","setCoffee","ThrowParty","costPerEmployee","setParty","PurchaseWarehouse","warehouses","Warehouse","UpgradeWarehouseCost","Array","from","reduce","acc","UpgradeWarehouse","sizeUpgradeCost","updateSize","HireAdVert","getAdVertCost","applyAdVert","MakeProduct","productName","designInvest","marketingInvest","makesProducts","maxProducts","hasResearch","products","Product","trim","createCity","designCost","advCost","Research","researchName","researchTree","getAllNodes","research","ResearchMap","researched","ExportMaterial","divisionName","cityName","sanitizedAmt","isRelevantMaterial","exportObj","ind","exp","CancelExportMaterial","LimitProductProduction","prdman","LimitMaterialProduction","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","BladeburnerConstants","CityNames","CyclesPerSecond","StaminaGainPerSecond","BaseStaminaLoss","MaxStaminaToGainFactor","DifficultyToTimeFactor","DiffMultExponentialFactor","DiffMultLinearFactor","EffAgiLinearFactor","EffDexLinearFactor","EffAgiExponentialFactor","EffDexExponentialFactor","BaseRecruitmentTimeNeeded","PopulationThreshold","PopulationExponent","ChaosThreshold","BaseStatGain","BaseIntGain","ActionCountGrowthPeriod","RankToFactionRepFactor","RankNeededForFaction","ContractSuccessesPerLevel","OperationSuccessesPerLevel","RanksPerSkillPoint","ContractBaseMoneyGain","HrcHpGain","HrcStaminaGain","BlackOperationNames","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","currentServer","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","location","TravelAgency","jobs","purchasedServers","factionInvitations","numSleeves","sleevesFromCovenant","sleeves","Sleeve","shock","synchronize","shockRecovery","lastUpdate","Date","getTime","playtimeSinceLastAug","scriptProdSinceLastAug","moneySourceA","reset","prestige","reapplyAllAugmentations","hp","max_hp","finishWork","prestigeSourceFile","entropy","karma","sync","gang","resetGangs","hasWseAccount","hasTixApiAccess","has4SData","has4SDataTixApi","moneySourceB","playtimeSinceLastBitnode","receiveInvite","calculateSkill","calculateSkillF","calculateSkillProgress","calculateSkillProgressF","updateSkillLevels","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","intelligence","intelligence_exp","ratio","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","source","recordMoneySource","MoneySourceTracker","record","gainHackingExp","gainStrengthExp","gainDefenseExp","gainDexterityExp","gainAgilityExp","gainCharismaExp","gainIntelligenceExp","gainStats","retValue","hack","def","dex","agi","cha","int","queryStatFromString","tempStr","startFocusing","focus","stopFocusing","takeDamage","hospitalize","regenerateHp","getHospitalizationCost","SnackbarEvents","ToastVariant","WARNING","applyForJob","entryPosType","sing","company","Companies","Company","pos","isQualified","getJobRequirementText","hasPosition","nextPos","getNextCompanyPositionHelper","reqText","getNextCompanyPosition","currCompany","currentPositionName","currentPosition","CompanyPositions","isSoftwareJob","isITJob","isBusinessJob","isSecurityEngineerJob","isNetworkEngineerJob","isSecurityJob","isAgentJob","isSoftwareConsultantJob","isBusinessConsultantJob","isPartTimeJob","quitJob","isCompanyWork","currentWork","companyName","hasJob","Boolean","applyForSoftwareJob","posNames","applyForSoftwareConsultantJob","applyForItJob","applyForSecurityEngineerJob","applyForNetworkEngineerJob","applyForBusinessJob","applyForBusinessConsultantJob","applyForSecurityJob","applyForAgentJob","applyForEmployeeJob","position","applyForPartTimeEmployeeJob","applyForWaiterJob","applyForPartTimeWaiterJob","offset","jobStatReqOffset","reqHacking","requiredHacking","reqStrength","requiredStrength","reqDefense","requiredDefense","reqDexterity","requiredDexterity","reqAgility","reqCharisma","requiredCharisma","playerReputation","requiredReputation","playerAug","applyAugmentation","reapplyAllSourceFiles","sourceFiles","srcFileKey","SourceFiles","applySourceFile","applyExploit","checkForFactionInvitations","invitedFactions","numAugmentations","allCompanies","allPositions","checkMegacorpRequirements","serverMeta","specialName","bonus","backdoorInstalled","getCompanyRep","illuminatiFac","Illuminati","isBanned","isMember","alreadyInvited","daedalusFac","Daedalus","DaedalusAugsRequirement","covenantFac","TheCovenant","ecorpFac","ECorp","AevumECorp","megacorpFac","MegaCorp","Sector12MegaCorp","bachmanandassociatesFac","BachmanAssociates","AevumBachmanAndAssociates","bladeindustriesFac","BladeIndustries","Sector12BladeIndustries","nwoFac","NWO","VolhavenNWO","clarkeincorporatedFac","ClarkeIncorporated","AevumClarkeIncorporated","omnitekincorporatedFac","OmniTekIncorporated","VolhavenOmniTekIncorporated","foursigmaFac","FourSigma","Sector12FourSigma","kuaigonginternationalFac","KuaiGongInternational","ChongqingKuaiGongInternational","fulcrumsecrettechonologiesFac","FulcrumSecretTechnologies","fulcrumSecretServer","AevumFulcrumTechnologies","bitrunnersFac","BitRunners","bitrunnersServer","BitRunnersServer","theblackhandFac","TheBlackHand","blackhandServer","TheBlackHandServer","nitesecFac","NiteSec","nitesecServer","NiteSecServer","chongqingFac","sector12Fac","newtokyoFac","aevumFac","ishimaFac","volhavenFac","speakersforthedeadFac","SpeakersForTheDead","Sector12CIA","Sector12NSA","thedarkarmyFac","TheDarkArmy","thesyndicateFac","TheSyndicate","silhouetteFac","Silhouette","tetradsFac","Tetrads","slumsnakesFac","SlumSnakes","netburnersFac","Netburners","totalHacknetRam","totalHacknetCores","totalHacknetLevels","v","tiandihuiFac","TianDiHui","cybersecFac","CyberSec","cybersecServer","CyberSecServer","setBitNodeNumber","queueAugmentation","aug","PlayerOwnedAugmentation","gainCodingContractReward","reward","difficulty","CodingContractRewardType","FactionReputation","FactionReputationAll","repGain","totalGain","specialFactions","Bladeburners","gainPerFaction","facName","CompanyReputation","moneyGain","CodingContractMoney","travel","to","gotoLocation","Locations","canAccessGrafting","giveExploit","exploit","SUCCESS","giveAchievement","achievementId","achievement","achievements","ID","unlockedOn","Name","getIntelligenceBonus","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","canAccessCotMG","sf","lvl","focusPenalty","programsMetadata","Program","run","FragmentType","Effect","tpe","HackingChance","HackingSpeed","HackingMoney","HackingGrow","Hacking","Strength","Defense","Dexterity","Agility","Charisma","HacknetMoney","HacknetCost","Rep","WorkMoney","Crime","Bladeburner","CorporationManagementHandbook","HistoryOfSynthoids","AGreenTomorrow","AlphaOmega","SimulatedReality","BeyondMan","BrighterThanTheSun","DemocracyIsDead","Sector12Crime","ManAndMachine","SecretSocieties","TheFailedFrontier","CodedIntelligence","SyntheticMuscles","TensionsInTechRace","CostOfImmortality","TheHiddenWorld","TheNewGod","NewTriads","TheSecretWar","SleeveTaskType","PositionTypes","root","borderBottom","small","width","TableCell","Table","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","AllGangs","power","territory","loadAllGangs","StatsRow","content","cellNone","style","align","Crimes","Shoplift","CrimeType","dexterity_success_weight","agility_success_weight","RobStore","hacking_success_weight","Mug","strength_success_weight","defense_success_weight","Larceny","DealDrugs","Drugs","charisma_success_weight","BondForgery","TraffickArms","Homicide","kills","GrandTheftAuto","Kidnap","Assassination","Heist","removeLeadingSlash","removeTrailingSlash","endsWith","isValidFilename","isValidDirectoryName","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","fn","getFirstParentDirectory","getAllParentDirectories","lastSlash","getDestinationFilepath","destination","cwd","dstDir","evaluateDirectoryPath","fileName","getFileName","isInRootDirectory","currPath","reconstructedPath","pop","evaluateFilePath","areFilesEqual","f0","f1","areImportsEquals","Terminal","TTerminal","trusted","event","isTrusted","TheDarkArmyServer","DaedalusServer","DarkWeb","ClassType","Classes","StudyComputerScience","youAreCurrently","earnings","newWorkStats","hackExp","intExp","DataStructures","Networks","Algorithms","chaExp","Leadership","GymStrength","strExp","GymDefense","defExp","GymDexterity","dexExp","GymAgility","agiExp","isClassWork","w","WorkType","CLASS","ClassWork","Work","singularity","classType","Sector12RothmanUniversity","isGym","getClass","calculateRates","calculateClassEarningsRate","cycles","cyclesWorked","applyWorkStats","sumWorkStats","finish","htmlLocation","margin","spacing","flexGrow","minHeight","boxSizing","uninitialized","isInitialized","page","allowRouting","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCity","toCorporation","toCreateProgram","toDevMenu","toFaction","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toGrafting","toScriptEditor","toSleeves","toStockMarket","toTerminal","toTravel","toTutorial","toWork","toBladeburnerCinematic","toLocation","toStaneksGift","toAchievements","toThemeBrowser","toImportSave","GameRoot","engine","terminal","files","vim","setEditorOptions","useState","setPage","RecoveryMode","Recovery","determineStartPage","setRerender","augPage","setAugPage","setFaction","isFactionWork","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","errorBoundaryKey","setErrorBoundaryKey","sidebarOpened","setSideBarOpened","importString","setImportString","importAutomatic","setImportAutomatic","ImportSave","allowRoutingCalls","setAllowRoutingCalls","rerender","old","killAllScripts","saveObject","saveGame","setTimeout","reload","softReset","installAugmentations","useEffect","subscribe","ActiveScripts","Augmentations","Stats","CreateProgram","DevMenu","Options","Gang","Hacknet","Milestones","Grafting","options","ScriptEditor","Sleeves","StockMarket","Tutorial","City","Travel","calculateAchievements","BitVerse","BladeburnerCinematic","StaneksGift","Achievements","ThemeBrowser","base64save","automatic","_functions","fnName","_wrap","func","args","scrollTo","mainPage","withSidebar","withPopups","bypassGame","router","enter","enterBitNode","staneksGift","getCurrentServer","workerScripts","reactivateTutorial","buyStockLong","buyStock","buyStockShort","shortStock","cancelOrder","eventEmitterForReset","eventEmitterForUiReset","initStockMarket","initStockMarketFn","placeOrder","sellStockLong","sellStock","sellStockShort","sellShort","stockMarket","export","onExport","exportGame","forceKill","exportGameFn","installAugmentationsFn","Provider","killScripts","flexDirection","onToggled","isOpened","updateHashCapacity","costMult","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","cpuCores","runScript","script","updateRamUsed","calculateHashGainRate","ramUsed","snackbar","zIndex","logBoxBaseZIndex","alignSelf","SnackbarProvider","dense","maxSnack","anchorOrigin","horizontal","vertical","autoHideDuration","containerRoot","EventEmitter","Snackbar","enqueueSnackbar","closeSnackbar","useSnackbar","variant","duration","id","severity","k","onClick","StockSymbols","IshimaStormTechnologies","NewTokyoDefComm","VolhavenHeliosLabs","NewTokyoVitaLife","Sector12IcarusMicrosystems","Sector12UniversalEnergy","AevumAeroCorp","VolhavenOmniaCybersystems","ChongqingSolarisSpaceSystems","NewTokyoGlobalPharmaceuticals","IshimaNovaMedical","AevumWatchdogSecurity","VolhavenLexoCorp","AevumRhoConstruction","Sector12AlphaEnterprises","VolhavenSysCoreSecurities","VolhavenCompuTek","AevumNetLinkTechnologies","IshimaOmegaSoftware","Sector12FoodNStuff","Sector12JoesGuns","validScriptExtensions","isScriptFilename","some","ext","calculateHackingChance","difficultyMult","skillMult","chance","calculateHackingExpGain","expGain","HackExpGain","calculatePercentMoneyHacked","percentMoneyHacked","ScriptHackMoney","calculateHackingTime","skillFactor","calculateGrowTime","calculateWeakenTime","FactionWorkType","loadStaneksGift","zeros","height","array","fill","calculateGrid","gift","newgrid","fragmentAt","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","stock","shares","workerScript","Stock","order","Order","symbol","orders","stk","processOrderRefs","symbolToStockMap","processOrders","stockOrders","stockSymbol","orderTxt","scriptRef","loadStockMarket","deleteStockMarket","InitStockMetadata","TicksPerCycle","initSymbolToStockMap","cyclesPerStockUpdate","processStockPrices","timeNow","flipForecastForecast","stockMarketCycle","av","mv","chc","otlkMag","cap","changePrice","OrderTypes","LimitBuy","Short","LimitSell","Long","StopBuy","StopSell","otlkMagChange","cycleForecast","cycleForecastForecast","shareTxUntilMovement","shareTxForMovement","companyPositionMetadata","CompanyPosition","inviteToFaction","InvitationEvent","joinFaction","allFactions","factionInfo","enemy","enemies","hasAugmentationPrereqs","purchaseAugmentation","hasPrereqs","augCosts","queuedAugmentation","req","processPassiveFactionRepGain","offersWork","getGangName","favorMult","hRep","getHackingWorkRepGain","sRep","getFactionSecurityWorkRepGain","fRep","getFactionFieldWorkRepGain","FactionPassiveRepGain","getFactionAugmentationsFiltered","hasGangWith","augs","CongruityImplant","TheRedPill","rng","SFC32RNG","uniqueFilter","GangUniqueAugs","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","RealityAlteration","N00dles","YoureNotMeantToAccessThis","TrueRecursion","INeedARainbow","ExploitName","Set","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","Aliases","GlobalAliasesSave","GlobalAliases","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","StaneksGiftSave","inGang","AllGangsSave","btoa","unescape","encodeURIComponent","emitToastEvent","savedOn","lastSave","Promise","resolve","reject","then","saveData","playerIdentifier","identifier","getSaveFileName","pushGameSaved","INFO","catch","isRecovery","epochTime","now","bn","download","importGame","base64Save","getImportStringFromFile","file","reader","FileReader","promise","onload","readAsText","newSave","parsedSave","atob","base64","importedPlayer","playerData","totalPlaytime","current","bitNode","bitNodeLevel","loadGame","navigator","userAgent","setInterval","decodeURIComponent","escape","saveObj","loadAliases","loadGlobalAliases","ver","anyPlayer","companyPosition","positionName","companyPositions","changes","convert","code","change","scripts","v1APIBreak","AwardNFG","revenue","expenses","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","sleeve","resleeves","contract","contracts","ownedNFGs","newNFG","nfg","darkweb","pushProgram","graft","evaluateVersionCompatibility","href","resets","createNewUpdateText","whiteSpace","paddingLeft","lineHeight","Blob","document","createElement","url","URL","createObjectURL","body","appendChild","click","removeChild","revokeObjectURL","initAugmentations","resetFactionAugmentations","clearObject","initNeuroFluxGovernor","initUnstableCircadianModulator","initGeneralAugmentations","initBladeburnerAugmentations","ChurchOfTheMachineGod","initChurchOfTheMachineGodAugmentations","resetAugmentation","augmentationExists","AddToStaticAugmentations","reapply","staticAugmentation","mergeMultipliers","applyEntropy","ownedNfg","pAug","ownedAug","force","augmentationList","nfgIndex","isRepeatableAug","netscriptDelay","delayReject","delay","env","stopFlag","ScriptDeath","makeRuntimeRejectMsg","msg","scriptUrl","dependencies","resolveNetscriptRequestedThreads","ctx","requestedThreads","threads","requestedThreadsAsInt","function","isScriptErrorMessage","CodingContractType","gen","solver","diff","numTries","generate","CodingContractTypes","md","codingContractTypesMetadata","CodingContractResult","CodingContract","getData","getDescription","getDifficulty","getMaxNumTries","getType","isSolution","solution","Cancelled","onAttempt","val","Success","Failure","CodingContractEvent","MoneyRate","Fragments","Fragment","shape","limit","fullAt","rotation","sy","mx","my","qx","qy","neighboors","candidates","add","coord","cells","candidate","cell","copy","FragmentById","fragment","_","X","Shapes","S","Z","T","I","J","O","Booster","NoneFragment","None","DeleteFragment","Delete","base","inherit","common","accent","bg","fg","syntax","tag","entity","string","regexp","markup","keyword","comment","constant","ui","line","panel","selected","selection","colorRegExp","sanitizeTheme","entries","repairBlock","block","makeTheme","themeRules","token","foreground","themeColors","fromEntries","rules","async","loadThemes","monaco","editor","defineTheme","fontStyle","uuidv4","uuid","subscribers","sub","Adjuster","setValue","label","placeholder","subtract","tons","onChange","InputProps","startAdornment","title","transform","endAdornment","upArrowSymbol","downArrowSymbol","leftArrowSymbol","rightArrowSymbol","getArrow","UP_ARROW","W","LEFT_ARROW","DOWN_ARROW","RIGHT_ARROW","D","getInverseArrow","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","makeNode","Node","text","createBaseResearchTreeNodes","rootNode","autoBrew","autoParty","autoDrugs","bulkPurchasing","cph4","drones","dronesAssembly","dronesTransport","goJuice","hrRecruitment","hrTraining","joywire","marketta1","marketta2","overclock","scAssemblers","stimu","addChild","baseResearchTree","ResearchTree","setRoot","upgradeFulcrum","upgradeCapacity1","upgradeCapacity2","upgradeDashboard","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","ServerGrowthRate","numCycleForGrowthCorrected","targetMoney","startMoney","adjGrowthRate","exponentialBase","coreMultiplier","threadMultiplier","ey","bt","corr","bct","opc","fca","cca","ceil","processSingleServerGrowth","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","MoneyCost","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","reputation","rep","Reputation","useGang","killWorkerScript","WorkerScript","stopAndCleanUpWorkerScript","killWorkerScriptByPid","runningScript","pid","ws","compareArrays","atExit","String","clearTimeout","killNetscriptDelay","rs","ramUsage","delete","AddRecentScript","WorkerScriptStartStopEventEmitter","removeWorkerScript","OptionSwitch","checked","tooltip","control","BitNode","BitNodes","HomeComputerRamCost","PurchasedServerCost","PurchasedServerSoftcap","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoneyGain","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","FactionWorkRepGain","RepToDonateToFaction","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","CorporationSoftcap","BladeburnerRank","BladeburnerSkillCost","GangSoftcap","StaneksGiftPowerMultiplier","StaneksGiftExtraSize","getBitNodeMultipliers","inc","dec","initBitNodeMultipliers","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","getAskPrice","getBidPrice","influenceForecast","influenceForecastForecast","startingLevel","extraLevels","totalMultiplier","startingRam","totalCost","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","printAliases","print","parseAliasDeclaration","global","matches","addGlobalAlias","addAlias","getAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","constructLocation","asciiArt","LocationsMetadata","addLocation","w0","w1","workStats","gains","Literature","CopyableText","setOpen","copyText","select","setSelectionRange","execCommand","ThemeEvents","refreshTheme","createTheme","combat","backgroundprimary","backgroundsecondary","button","successlight","success","successdark","white","black","light","primarylight","primarydark","secondary","secondarylight","secondarydark","errorlight","errordark","infolight","infodark","warning","warninglight","warningdark","well","typography","fontFamily","textTransform","components","MuiInputBase","styleOverrides","input","userSelect","MuiInput","borderBottomColor","underline","MuiInputLabel","MuiButtonGroup","marginRight","MuiButton","borderRadius","MuiSelect","icon","defaultProps","MuiTextField","MuiTypography","MuiMenu","list","MuiMenuItem","MuiAccordionSummary","MuiAccordionDetails","MuiIconButton","MuiTooltip","fontSize","disableInteractive","MuiSlider","valueLabel","MuiDrawer","paperAnchorDockedLeft","borderRight","welllight","MuiDivider","MuiFormControlLabel","MuiSwitch","switchBase","track","MuiPaper","MuiTablePagination","selectLabel","displayedRows","MuiTab","textColorPrimary","MuiTabs","scrollButtons","opacity","TabIndicatorProps","MuiAlert","standardSuccess","standardError","standardWarning","standardInfo","TTheme","injectFirst","layerCounter","LogBoxEvents","LogBoxCloserEvents","LogBoxClearEvents","LogBoxManager","closePid","LogWindow","close","overflowY","overflowX","wordWrap","titleButton","draggableRef","useRef","rootRef","setScript","container","minimized","setMinimized","kill","findRunningScript","startWorkerScript","updateLayer","full","maxLength","minimize","clearInterval","addEventListener","onResize","removeEventListener","debounce","isOnScreen","resetPosition","bounds","getBoundingClientRect","right","bottom","left","innerWidth","top","outerWidth","state","setState","minConstraints","handle","onDrag","MouseEvent","clientX","clientY","innerHeight","ref","onMouseDown","flexFlow","minWidth","cursor","textOverflow","has","onTouchEnd","Water","Plants","Metal","Hardware","Chemicals","Robots","AICores","calculateExp","skill","currentSkill","nextSkill","baseExperience","nextExperience","progress","currentExperience","remainingExperience","experience","UpgradeType","gangMemberUpgradesMetadata","upgType","Weapon","Armor","Vehicle","Rootkit","gainFavor","getFavorGain","totalRep","favorToRep","repToFavor","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","GangKarmaRequirement","errorMessage","NetscriptPorts","NetscriptPort","prestigeWorkerScripts","port","clear","startNetscript1Script","codeWithImports","codeLineOffset","running","importProcessingRes","ast","ecmaVersion","allowReserved","sourceType","getServer","generatedCode","hasImports","walksimple","ImportDeclaration","scriptName","getScript","scriptAst","specifiers","namespace","local","fnNames","fnDeclarations","FunctionDeclaration","fnsToImport","lineOffset","linesRemoved","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","isArray","pseudoToNative","callb","errorTextArray","errorMsg","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","runInterpreter","more","step","_e","parent","createAndAddWorkerScript","oneRamUsage","getRamUsageFromRunningScript","roundToTwo","arrayToString","generateNextPid","set","scriptExecution","runningFn","wrap","propName","sprintf","finally","wrapObject","vars","tree","prop","executeJSScript","SyntaxError","message","stack","startNetscript2Script","onlineExpGained","onlineMoneyMade","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","arg","getRunningScript","Number","ramAvailable","hasAdminRights","RunningScript","Map","StatsTable","rows","wide","MuiTable","row","elem","noWrap","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","calculateWantedPenalty","respect","wantedLevel","calculateRespectGain","task","baseRespect","statWeight","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","territoryMult","territoryPenalty","respectMult","calculateWantedLevelGain","baseWanted","wanted","calc","calculateMoneyGain","baseMoney","calculateAscensionPointsGain","calculateAscensionMult","points","GameTimer","setV","totalMillis","WKSharmonizer","millis","intervalId","onExpire","noPaper","mb","ActionIdentifier","general","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","stamina","maxStamina","getCurrentCity","calculateStaminaPenalty","canAttemptBlackOp","actionId","getActionObject","reqdRank","rank","nm","BlackOperations","isAvailable","startAction","person","actionTimeCurrent","actionTimeToComplete","resetAction","getActionTime","exceptionAlert","comms","testBlackOp","getRecruitmentTime","upgradeSkill","skillName","skills","executeConsoleCommands","commands","consoleHistory","arrayOfCommands","executeConsoleCommand","postToConsole","saveToLogs","consoleLogs","getTimestamp","clearConsole","bladeburnerFac","storeCycles","getActionIdFromTypeAndName","convertedType","convertedName","operations","executeStartConsoleCommand","GeneralActions","executeSkillConsoleCommand","skillNames","Skills","multKeys","skillMultipliers","Skill","currentLevel","pointCost","calculateCost","maxLvl","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","SPACE","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","triggerPotentialMigration","randomEvent","chaos","getActionStats","successMult","unweightedGain","unweightedIntGain","weights","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","sleeveSize","effCharisma","effCha","charismaFactor","sleeveSupport","joining","resetSkillMultipliers","successChanceAll","successChanceStealth","successChanceKill","successChanceContract","successChanceOperation","successChanceEstimate","actionTime","effHack","effStr","effDef","effDex","effAgi","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","sup","bbAction","teamLost","improvePopulationEstimateByPercentage","changePopulationByPercentage","changeEstEqually","nonZero","changeChaosByCount","changeChaosByPercentage","changePopulationByCount","estChange","estOffset","completeContract","actionIdent","improvePopulationEstimateByCount","completeAction","isPlayer","createTaskTracker","isOperation","difficultyMultiplier","rewardMultiplier","rewardFac","attempt","successes","setMaxLevel","rankGain","gain","addOffset","whoAmI","failures","loss","damage","rankLoss","hpLoss","hpLost","calculateHospitalizationCost","numHosp","moneyLost","logLossText","autoLevel","teamLossMax","strExpGain","defExpGain","dexExpGain","agiExpGain","staminaGain","staminaBonus","eff","hackingExpGain","charismaExpGain","successChance","recruitTime","growthF","Growths","operation","infiltrateSynthoidCommunities","infilSleeves","maxRank","bladeburnersFactionName","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","BladesSimulacrum","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","canRunOp","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","win","reachedLimit","reached","Game","interpolate","settings","out","lerpD","lerp","Trivial","Normal","Hard","Impossible","KeyHandler","press","onKeyDown","FACTION","FactionWork","factionWorkType","HACKING","getFaction","getReputationRate","FIELD","SECURITY","focusBonus","NeuroreceptorManager","getExpRates","calculateFactionExp","Hashes","updateMoneyGainRate","moneyGainRatePerSecond","totalMoneyGenerated","minMax","getPurchaseServerCost","sanitizedRam","isPowerOfTwo","sign","getPurchaseServerMaxRam","getPurchaseServerLimit","clz32","purchaseServer","newServ","purchaseRamForHomeComputer","getUpgradeHomeRamCost","TextFile","append","read","show","write","getTextFile","textFiles","createTextFile","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptCorporationRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","ScriptWeakenAnalyzeRamCost","ScriptScanRamCost","ScriptRecentScriptsRamCost","ScriptPortProgramRamCost","ScriptRunRamCost","ScriptExecRamCost","ScriptSpawnRamCost","ScriptScpRamCost","ScriptKillRamCost","ScriptHasRootAccessRamCost","ScriptGetHostnameRamCost","ScriptGetHackingLevelRamCost","ScriptGetMultipliersRamCost","ScriptGetServerRamCost","ScriptGetServerMaxRam","ScriptGetServerUsedRam","ScriptFileExistsRamCost","ScriptIsRunningRamCost","ScriptHacknetNodesRamCost","ScriptHNUpgLevelRamCost","ScriptHNUpgRamRamCost","ScriptHNUpgCoreRamCost","ScriptGetStockRamCost","ScriptBuySellStockRamCost","ScriptGetPurchaseServerRamCost","ScriptPurchaseServerRamCost","ScriptGetPurchasedServerLimit","ScriptGetPurchasedServerMaxRam","ScriptRoundRamCost","ScriptReadWriteRamCost","ScriptArbScriptRamCost","ScriptGetScriptRamCost","ScriptGetRunningScriptRamCost","ScriptGetHackTimeRamCost","ScriptGetFavorToDonate","ScriptCodingContractBaseRamCost","ScriptSleeveBaseRamCost","ScriptGetOwnedSourceFiles","ScriptClearTerminalCost","ScriptSingularityFn1RamCost","ScriptSingularityFn2RamCost","ScriptSingularityFn3RamCost","ScriptGangApiBaseRamCost","ScriptBladeburnerApiBaseRamCost","ScriptStanekWidth","ScriptStanekHeight","ScriptStanekCharge","ScriptStanekFragmentDefinitions","ScriptStanekPlacedFragments","ScriptStanekClear","ScriptStanekCanPlace","ScriptStanekPlace","ScriptStanekFragmentAt","ScriptStanekDeleteAt","ScriptInfiltrationCalculateDifficulty","ScriptInfiltrationCalculateRewards","ScriptInfiltrationGetLocations","ScriptInfiltrationGetInfiltrations","ScriptStanekAcceptGift","SF4Cost","sf4","getSymbols","getPrice","getPosition","getMaxShares","getPurchaseCost","getSaleGain","short","getOrders","getVolatility","getForecast","purchase4SMarketData","purchase4SMarketDataTixApi","purchaseWseAccount","purchaseTixApi","universityCourse","gymWorkout","travelToCity","goToLocation","purchaseTor","purchaseProgram","connect","manualHack","installBackdoor","getDarkwebProgramCost","getDarkwebPrograms","getStats","getCharacterInformation","isBusy","stopAction","upgradeHomeRam","upgradeHomeCores","getUpgradeHomeCoresCost","workForCompany","applyToCompany","getCompanyFavor","getCompanyFavorGain","checkFactionInvitations","workForFaction","getFactionRep","getFactionFavor","getFactionFavorGain","donateToFaction","createProgram","commitCrime","getCrimeChance","getCrimeStats","getOwnedAugmentations","getAugmentationsFromFaction","getAugmentationCost","getAugmentationPrereq","getAugmentationPrice","getAugmentationBasePrice","getAugmentationRepReq","getAugmentationStats","isFocused","setFocus","b1tflum3","destroyW0r1dD43m0n","createGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","getAscensionResult","setTerritoryWarfare","getChanceToWinClash","getBonusTime","getContractNames","getOperationNames","getBlackOpNames","getBlackOpRank","getGeneralActionNames","getSkillNames","stopBladeburnerAction","getCurrentAction","getActionCurrentTime","getActionEstimatedSuccessChance","getActionRepGain","getActionCountRemaining","getActionMaxLevel","getActionCurrentLevel","getActionAutolevel","setActionAutolevel","setActionLevel","getRank","getSkillPoints","getSkillLevel","getSkillUpgradeCost","getTeamSize","setTeamSize","getCityEstimatedPopulation","getCityCommunities","getCityChaos","getCity","switchCity","getStamina","joinBladeburnerFaction","joinBladeburnerDivision","infiltration","getPossibleLocations","getInfiltration","codingcontract","getContractType","getNumTriesRemaining","getNumSleeves","setToShockRecovery","setToSynchronize","setToCommitCrime","setToUniversityCourse","setToCompanyWork","setToFactionWork","setToGymWorkout","getSleeveStats","getTask","getInformation","getSleeveAugmentations","getSleevePurchasableAugs","purchaseSleeveAug","setToBladeburnerAction","stanek","giftWidth","giftHeight","chargeFragment","fragmentDefinitions","activeFragments","clearGift","canPlaceFragment","placeFragment","getFragment","removeFragment","acceptGift","SourceRamCosts","enums","createCorporation","hasUnlockUpgrade","getUnlockUpgradeCost","getUpgradeLevel","getUpgradeLevelCost","getExpandIndustryCost","getExpandCityCost","getInvestmentOffer","acceptInvestmentOffer","goPublic","bribe","getCorporation","getDivision","expandIndustry","expandCity","unlockUpgrade","levelUpgrade","issueDividends","buyBackShares","sellShares","sellMaterial","sellProduct","discontinueProduct","setSmartSupply","setSmartSupplyUseLeftovers","buyMaterial","bulkPurchase","getWarehouse","getProduct","getMaterial","setMaterialMarketTA1","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","exportMaterial","cancelExportMaterial","purchaseWarehouse","upgradeWarehouse","makeProduct","limitMaterialProduction","limitProductProduction","getPurchaseWarehouseCost","getUpgradeWarehouseCost","hasWarehouse","assignJob","hireEmployee","upgradeOfficeSize","throwParty","buyCoffee","hireAdVert","getOffice","getEmployee","getHireAdVertCost","getHireAdVertCount","getResearchCost","hasResearched","setAutoJobAssignment","getOfficeSizeUpgradeCost","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","maxNumNodes","getHashUpgrades","getHashUpgradeLevel","getStudyMult","getTrainingMult","getTheme","setTheme","resetTheme","getStyles","setStyles","resetStyles","getGameInfo","clearTerminal","grafting","getAugmentationGraftPrice","getAugmentationGraftTime","getGraftableAugmentations","graftAugmentation","vsprintf","scan","hackAnalyzeThreads","hackAnalyze","hackAnalyzeSecurity","hackAnalyzeChance","sleep","asleep","share","getSharePower","grow","growthAnalyze","growthAnalyzeSecurity","weakenAnalyze","printf","tprint","tprintf","clearLog","disableLog","enableLog","isLogEnabled","getScriptLogs","nuke","brutessh","ftpcrack","relaysmtp","httpworm","sqlinject","exec","spawn","killall","exit","scp","ls","ps","getRecentScripts","hasRootAccess","getHostname","getHackingLevel","getHackingMultipliers","getHacknetMultipliers","getServerMoneyAvailable","getServerSecurityLevel","getServerBaseSecurityLevel","getServerMinSecurityLevel","getServerRequiredHackingLevel","getServerMaxMoney","getServerGrowth","getServerNumPortsRequired","getServerRam","getServerMaxRam","getServerUsedRam","serverExists","fileExists","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","deleteServer","getPurchasedServers","tryWritePort","peek","writePort","readPort","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getTotalScriptIncome","getScriptIncome","getTotalScriptExpGain","getScriptExpGain","nFormat","tFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","getPlayer","getOwnedSourceFiles","tail","toast","closeTail","clearPort","openDevMenu","alert","flags","bypass","alterReality","rainbow","heart","break","formulas","calculateFavorToRep","calculateRepToFavor","repFromDonation","hackChance","hackPercent","growPercent","hackTime","growTime","weakenTime","moneyGainRate","levelUpgradeCost","ramUpgradeCost","coreUpgradeCost","hacknetNodeCost","constants","hacknetServers","hashGainRate","cacheUpgradeCost","hashUpgradeCost","hacknetServerCost","wantedPenalty","respectGain","wantedLevelGain","ascensionPointsGain","ascensionMultiplier","RamCosts","getRamCost","currType","costInc","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","GangMemberUpgrades","GangMemberUpgrade","getStockMarket4SDataCost","getStockMarket4STixApiCost","getStockMarketWseCost","getStockMarketTixApiCost","m0","m1","HashUpgradesMetadata","HashUpgrade","GangMemberTasks","gangMemberTasksMetadata","GangMemberTask","isHacking","isCombat","materials","updateMaterialSizeUsed","matName","getStorageMultiplier","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","netProfit","origCost","Output","formatTime","RawOutput","raw","Link","dashes","TTimer","timeLeft","recursiveMode","thisUpgrade","unFloored","ConfirmationModal","confirmationText","onConfirm","additionalButton","createProgressBarText","derived","totalTicks","bars","hash","__COMMIT_HASH__","DefaultConstructorParams","expMultiplier","salaryMultiplier","isPlayerEmployed","isMegacorp","hasAgentPositions","hasBusinessConsultantPositions","hasBusinessPositions","hasEmployeePositions","hasITPositions","hasSecurityPositions","hasSoftwareConsultantPositions","hasSoftwarePositions","hasWaiterPositions","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","formatCode","dependent","dependents","dependentScript","calculateRamUsage","ramUsageEntries","imports","DarkWebItems","BruteSSHProgram","DarkWebItem","FTPCrackProgram","RelaySMTPProgram","HTTPWormProgram","SQLInjectProgram","ServerProfiler","DeepscanV1","DeepscanV2","AutolinkProgram","AutoLink","FormulasProgram","Formulas","actionNames","actionName","Action","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","SourceFile","bitnodeKey","bitnode","timePassed","confidence","dataMap","serv","timesGrown","host","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScriptByPid","MathJaxWrapper","version","src","lineNumber","CorporationUnlockUpgradeIndex","CorporationUnlockUpgrades","Export","SmartSupply","MarketResearchDemand","MarketDataCompetition","VeChain","ShadyAccounting","GovernmentPartnership","WarehouseAPI","OfficeAPI","getGraftingAvailableAugs","augName","graftingIntBonus","calculateGraftingTimeWithBonus","OperationTyphoon","OperationZero","OperationX","OperationTitan","OperationAres","OperationArchangel","OperationJuggernaut","OperationRedDragon","OperationK","OperationDeckard","OperationTyrell","OperationWallace","OperationShoulderOfOrion","OperationHyron","OperationMorpheus","OperationIonStorm","OperationAnnihilus","OperationUltron","OperationCenturion","OperationVindictus","OperationDaedalus","ActiveFragment","highestCharge","numCharge","collide","other","thisFragment","otherFragment","dx","dy","fragSize","worldX","worldY","commit","div","startWork","CrimeWork","crimeType","successRate","vals","CalculateShareMult","GameOptionsTab","HashRate","Message","ApplyToJobButton","getJobRequirementTooltip","researchMetadata","initElectron","normalizeFileName","getFiles","deleteFile","removeFile","saveFile","Buffer","overwritten","writeToScriptFile","initWebserver","funcs","typesFn","appNotifier","initAppNotifier","triggerSave","triggerGameExport","ERROR","triggerScriptsExport","exportScripts","getSaveData","getSaveInfo","getImportDataFromString","pushSaveData","appSaveFns","initSaveFunctions","bridge","electronBridge","receive","send","initElectronBridge","pushGameReady","playtime","game","pushImportResult","wasImported","pushDisableRestore","isCreateProgramWork","CREATE_PROGRAM","CreateProgramWork","unitCompleted","programFile","percComplete","unitNeeded","getProgram","reqLvl","cancelled","incompleteName","lines","achievementData","bitNodeFinishedState","wd","hasAccessToSF","knowsAboutBitverse","Icon","Condition","THE_BLACK_HAND","THE_COVENANT","Visible","MONEY_1Q","MONEY_M1B","Secret","INSTALL_1","INSTALL_100","QUEUE_40","HACKING_100000","COMBAT_3000","NEUROFLUX_255","NS2","FROZE","RUNNING_SCRIPTS_1000","DRAIN_SERVER","MAX_RAM","MAX_CORES","SCRIPTS_30","KARMA_1000000","STOCK_1q","DISCOUNT","SCRIPT_32GB","FIRST_HACKNET_NODE","MAX_HACKNET_NODE","HACKNET_NODE_10M","REPUTATION_10M","DONATION","TRAVEL","WORKOUT","TOR","hasTorRouter","HOSPITALIZED","hospitalization","GANG","FULL_GANG","members","GANG_TERRITORY","GANG_MEMBER_POWER","CORPORATION","CORPORATION_BRIBE","CORPORATION_PROD_1000","CORPORATION_EMPLOYEE_3000","CORPORATION_REAL_ESTATE","Description","INTELLIGENCE_255","BLADEBURNER_DIVISION","BLADEBURNER_OVERCLOCK","BLADEBURNER_UNSPENT_100000","FIRST_HACKNET_SERVER","AdditionalUnlock","ALL_HACKNET_SERVER","MAX_HACKNET_SERVER","hs","HACKNET_SERVER_1B","MAX_CACHE","capacity","SLEEVE_8","INDECISIVE","FAST_BN","CHALLENGE_BN1","CHALLENGE_BN2","CHALLENGE_BN3","CHALLENGE_BN6","CHALLENGE_BN7","CHALLENGE_BN8","CHALLENGE_BN9","hacknet_expenses","CHALLENGE_BN10","CHALLENGE_BN12","BYPASS","PROTOTYPETAMPERING","UNCLICKABLE","UNDOCUMENTEDFUNCTIONCALL","TIMECOMPRESSION","REALITYALTERATION","N00DLES","EDITSAVEFILE","UNACHIEVABLE","CHALLENGE_BN13","StaneksGift1","DEVMENU","RAINBOW","TRUE_RECURSION","playerAchievements","missingAchievements","flatMap","Intelligence","useTheme","colSpan","WorkInProgressOverview","onClickFocus","header","workCell","workHeader","pt","pb","workSubtitles","mt","details","innerText","isCrimeWork","crime","getCrime","isGraftingWork","factionWork","companyWork","getCompany","getGainRates","textAlign","CharacterOverview","killOpen","setKillOpen","hackingProgress","strengthProgress","defenseProgress","dexterityProgress","agilityProgress","charismaProgress","borderTop","flex","aria-label","midpoint","program","description","BadRNG","WHRNG","s1","s2","s3","genSeed","COMPANY","CompanyWork","NewTokyoNoodleBar","calculateCompanyWorkStats","influenceStockThroughCompanyWork","v1","v2","Favor","gameCPS","classs","discount","calculateClassEarnings","work","hashMult","expMult","Person","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","currentTaskTime","successGainRates","keysForIteration","gainExperience","bb","bbContract","bbRetValue","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","pIntExp","earningsForPlayer","earningsForTask","earningsForSleeves","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","jobPerformance","calculateJobPerformance","getFactionHackingWorkRepGain","installAugmentation","updateStatLevels","cyclesUsed","Class","Gym","updateTaskGainRates","Synchro","retVal","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","sanitizedStat","totalExpMult","upgradeMemory","baseSalary","strengthExpGain","defenseExpGain","dexterityExpGain","agilityExpGain","workType","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","stat","getBladeburnerActionTime","recruitmentSuccessChance","contractGainRates","contractSuccessChance","chances","RamCalculationErrorCode","TerminalEvents","TerminalClearEvents","orderType","refs","orderBook","executeOrder","isBuy","predefined","getPredefinedThemes","AlertManager","alerts","setAlerts","sha256","getMessageHash","overflowWrap","getRandomByte","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","request","put","deleteGame","sendMessage","forced","showMessage","recvd","addMessageToServer","Messages","checkForMessagesToSend","jumper0","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","truthGazer","TruthGazer","redpill","RedPill","worldDaemon","flightName","Flight","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","canGetBonus","setLastExportBonus","unixTime","Option","buttonText","infoText","getTeamSuccessBonus","inst","getActionTypeSkillSuccessBonus","MightOfAres","WisdomOfAthena","ChaosOfDionysus","BeautyOfAphrodite","TrickeryOfHermes","FloodOfPoseidon","HuntOfArtemis","KnowledgeOfApollo","HemoRecirculator","Targeting1","Targeting2","Targeting3","SyntheticHeart","SynfibrilMuscle","CombatRib1","CombatRib2","CombatRib3","NanofiberWeave","SubdermalArmor","WiredReflexes","GrapheneBoneLacings","BionicSpine","GrapheneBionicSpine","BionicLegs","GrapheneBionicLegs","SpeechProcessor","TITN41Injection","EnhancedSocialInteractionImplant","BitWire","ArtificialBioNeuralNetwork","ArtificialSynapticPotentiation","EnhancedMyelinSheathing","SynapticEnhancement","NeuralRetentionEnhancement","DataJack","ENM","ENMCore","ENMCoreV2","ENMCoreV3","ENMAnalyzeEngine","ENMDMA","Neuralstimulator","NeuralAccelerator","CranialSignalProcessorsG1","CranialSignalProcessorsG2","CranialSignalProcessorsG3","CranialSignalProcessorsG4","CranialSignalProcessorsG5","NeuronalDensification","NuoptimalInjectorImplant","SpeechEnhancement","FocusWire","PCDNI","PCDNIOptimizer","PCDNINeuralNetwork","ADRPheromone1","ADRPheromone2","ShadowsSimulacrum","HacknetNodeCPUUpload","HacknetNodeCacheUpload","HacknetNodeNICUpload","HacknetNodeKernelDNI","HacknetNodeCoreDNI","Neurotrainer1","Neurotrainer2","Neurotrainer3","Hypersight","LuminCloaking1","LuminCloaking2","SmartSonar","PowerRecirculator","QLink","SPTN97","HiveMind","CordiARCReactor","SmartJaw","Neotra","Xanipher","HydroflameLeftArm","nextSENS","OmniTekInfoLoad","PhotosyntheticCells","Neurolink","CRTX42AA","Neuregen","CashRoot","NutriGen","PCMatrix","INFRARet","DermaForce","GrapheneBrachiBlades","BrachiBlades","GrapheneBionicArms","BionicArms","SNA","EsperEyewear","EMS4Recombination","OrionShoulder","HyperionV1","HyperionV2","GolemSerum","VangelisVirus","VangelisVirus3","INTERLINKED","BladeRunner","BladeArmor","BladeArmorPowerCells","BladeArmorEnergyShielding","BladeArmorUnibeam","BladeArmorOmnibeam","BladeArmorIPU","StaneksGift2","StaneksGift3","donationBonus","randomBonuses","bonuses","randomNumber","getRandomBonus","UnstableCircadianModulatorParams","UnstableCircadianModulator","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","nextPosition","repMultiplier","reqdHacking","reqdStrength","reqdDefense","reqdDexterity","requiredAgility","reqdAgility","reqdCharisma","reqdReputation","hackingEffectiveness","strengthEffectiveness","defenseEffectiveness","dexterityEffectiveness","agilityEffectiveness","charismaEffectiveness","hackRatio","strRatio","defRatio","dexRatio","agiRatio","chaRatio","reputationGain","checkEnum","enumVariable","StartButton","char","CorruptableText","setContent","counter","timers","letter","randFrom","randomize","timerId","GRAFTING","GraftingWork","GraftableAugmentations","GraftableAugmentation","fmt","FactionInfo","keep","keepOnInstall","assignment","getMult","getUpgrade","getUpgradeCost","newCap","determineCrimeSuccess","found","findCrime","roughName","atCapacity","marketCycles","emp","hireRandomEmployee","calculateTotalEmployees","calculateNextEmployees","maxEne","maxHap","maxMor","autoCoffee","perfMult","totalSalary","ene","coffeeMult","coffeeEmployees","mor","hap","partyMult","partyEmployees","minEne","minMor","minHap","calculateEmployeeProductivity","employeeNextJobs","employeeJobs","employeeProd","prod","calculateProductivity","getElementById","cre","sal","Employee","creativity","efficiency","salary","CorporationUpgradeIndex","CorporationUpgrades","SmartFactories","benefit","SmartStorage","DreamSense","WilsonAnalytics","NuoptimalNootropicInjectorImplants","SpeechProcessorImplants","NeuralAccelerators","FocusWires","ABCSalesBots","ProjectInsight","antiLog","sum","ReputationRate","validator","paramValidator","calculateSellInformationCashReward","levelBonus","calculateTradeInformationRepReward","calculateInfiltratorsRepReward","startingSecurityLevel","infiltrationData","sanitizedSource","comprGenChar","comprLZGenerate","plain","comprLZEncode","cur_state","new_state","new_offset","tmp_state","len","comprLZDecode","compr","literal_length","backref_length","backref_offset","StatsProgressBar","remaining","StatsProgressOverviewCell","characterOverviewStyles","paddingBottom","canAccessGang","isAwareOfGang","getGangFaction","startGang","oldhp","PromptEvent","PromptManager","setPrompt","PromptMenuText","PromptMenuSelect","PromptContent","PromptMenuBoolean","paddingTop","submit","autoFocus","onInput","stopPropagation","ENTER","preventDefault","choices","getItems","createCityMap","demand","competition","quality","per","performance","dur","durability","rel","reliability","aes","aesthetics","fea","features","siz","reqMats","createProduct","fin","opProd","engrProd","mgmtProd","mgmtFactor","prog","creationProd","finishProduct","totalProd","engrRatio","mgmtRatio","rndRatio","opsRatio","busRatio","totalMult","sciFac","calculateRating","advMult","busmgtgRatio","isFinite","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","prodMats","ProgramsSeen","ProgramsRoot","getHackingLevelRemaining","disableGutters","gridTemplateColumns","curCompletion","getProgCompletion","Paper","flexWrap","mr","InvitationsSeen","WorkTypesOffered","FactionElement","facInfo","joined","gap","openFaction","openFactionAugPage","acceptInvitation","ml","justifyItems","gridAutoFlow","FactionsRoot","allJoinedFactions","invitations","breakpoints","down","gridTemplateRows","gridAutoRows","ProgressBar","withStyles","bar","transition","LinearProgress","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","ActivateRecoveryMode","RecoveryRoot","errorData","resetError","issueUrl","newIssueUrl","startIcon","onTriggered","px","multiline","fullWidth","sharePower","StartSharing","CSM","nsFuncsGenerator","sanitizedPid","Environment","getScriptOnServer","shouldLog","disableLogs","CorporationState","numUnlockUpgrades","upgradeMultipliers","addFunds","getState","gameCycles","issueNewSharesCooldown","avgProfit","cycleProfit","updateDividendTax","retainedEarnings","getCycleDividends","updateSharePrice","nextState","dividendTax","dividendsPerShare","dividends","determineValuation","getTargetSharePrice","targetPrice","immediatelyUpdateSharePrice","sharesTracker","sharesUntilUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","popEst","locations","OptionsSlider","initialValue","_evt","newValue","onChangeCommitted","callback","valueLabelDisplay","marks","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","maintainMembership","finishAction","penalty","hack_asc_points","str_asc_points","def_asc_points","dex_asc_points","agi_asc_points","cha_asc_points","resetPidCounter","setMaxRam","EPSILON","decay","getSuccessChance","baseTime","skillFac","effDexterity","statFac","est","clamp","real","low","high","competence","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","recentScripts","killedTime","unshift","timeOfDeath","CRIME","StrExp","DefExp","DexExp","AgiExp","ChaExp","frames","Apr1Events","Apr1","getMonth","getDate","isApr1","setN","allow","currentCity","onTravel","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","logEntry","logUpd","displayLog","recordHack","moneyGained","recordGrow","recordWeaken","litObj","Literatures","checkIfConnectedToDarkweb","listAllDarkwebItems","item","printRaw","buyDarkwebItem","itemName","buyAllDarkwebItems","itemsToBuy","baseCheck","netscriptCanHack","initialCheck","netscriptCanGrow","netscriptCanWeaken","calculateRawDiff","startingDifficulty","calculateDifficulty","calculateReward","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","DOUBLE_QUOTE","QUOTE","CinematicText","setI","done","setDone","onDone","newI","auto","MaxSleevesFromCovenant","BaseCostPerSleeve","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","parseOnlyRamCalculate","dependencyMap","completedParses","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","detailedCosts","unresolvedRefs","resolvedRefs","loadedFns","prefix","ident","dep","applyFuncRam","findFunc","refDetail","fnRam","checkInfiniteLoop","missingAwaitLine","walk","WhileStatement","st","walkDeeper","nodeHasTrueTest","test","hasAwait","AwaitExpression","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","importModuleName","spec","imported","codeCopy","decimal","pidCounter","tempCounter","MAX_SAFE_INTEGER","safeGetServer","makeRuntimeErrorMsg","getRunningScriptByArgs","scriptArgs","getRunningScriptByPid","createPublicRunningScript","offlineMoneyMade","getCannotFindRunningScriptErrorMessage","failOnHacknetServer","callingFn","errstack","userstack","stackline","dependency","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","manual","hackingTime","canHack","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","toNative","roughlyIs","expect","actual","expects","actuals","helperString","funcName","argName","helperNumber","isScriptArgs","_args","helper","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","ustring","unumber","scriptIdentifier","_fn","_hostname","boolean","checkSingularityAccess","getValidPort","iport","hacking_chance_mult","tor","inBladeburner","hasCorporation","g","gangMember","GangMember","gangTask","NetscriptSingularity","NetscriptGang","NetscriptBladeburner","NetscriptCodingContract","NetscriptSleeve","NetscriptCorporation","NetscriptStanek","NetscriptInfiltration","NetscriptUserInterface","NetscriptFormulas","NetscriptStockMarket","NetscriptGrafting","NetscriptHacknet","_hackAmount","hackAmount","_threads","_time","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","_growth","_cores","maxThreadsNeeded","end","_format","possibleLogs","_pid","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","_scriptname","scriptServer","spawnDelay","killByPid","_safetyguard","safetyguard","scriptsKilled","_destination","_source","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","_grep","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","_filename","_ram","_name","hostnameStr","_port","_mode","tryWrite","_file","status","suc","_n","_milliseconds","_milliPrecision","milliseconds","milliPrecision","_message","_variant","_duration","_txt","_url","_target","$","writeToTextFile","fail","_host","source_is_txt","dest_is_txt","source_file","dest_file","Flags","NetscriptExtra","getFunctionNames","functionNames","wrappedNS","wrapAPI","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","isHackingGang","respectGainRate","wantedGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","powerMult","PowerMultiplier","additiveGain","gangs","others","thisGang","otherGang","thisPwr","thisChance","calculateTerritoryGain","winGang","loseGang","powerBonus","territoryGain","clash","won","baseDeathChance","modifiedDeathChance","killMember","getRespectNeededToRecruitMember","getWantedPenalty","memberTotal","totalRespect","lostRespect","earnedRespect","ascend","getDiscount","getAllTaskNames","taskName","tooltiptext","reqRep","TerminalHelpText","TemplatedHelpTexts","HelpTexts","analyze","backdoor","cat","check","cls","cp","expr","free","help","history","lscpu","mem","nano","sudov","unalias","GameEnv","Platform","getErrorForDisplay","errorInfo","isElectron","Production","toDisplay","language","cookiesEnabled","cookieEnabled","doNotTrack","indexedDb","platform","Steam","Browser","environment","getErrorMetadata","Development","componentStack","Tracking","Retirement","Investigation","Raid","initValue","GameOptionsPage","disablePadding","uniqueId","Hand","cards","addCards","removeByIndex","StockTickerTxButton","DummyGrid","DummyGift","fragments","ghostGrid","getContract","contractName","removeContract","existingPartialExeIndex","findIndex","ret","CodingContractModal","setProps","setAnswer","contractType","tries","BitFlumeEvent","BitFlumeModal","terminalCommandHistory","generalMethods","workMethods","processWork","augmentationMethods","canAccessBladeburner","bladeburnerMethods","startBladeburner","canAccessCorporation","corporationMethods","startCorporation","gangMethods","serverMethods","InvitationModal","opt_initFunc","sourceCode","sourceCodeLineOffset","acorn","PARSE_OPTIONS","initFunc_","paused_","polyfills_","functionCounter_","stepFunctions_","stepMatch","methodName","createScope","stripLocations_","State","stateStack","nodeConstructor","READONLY_DESCRIPTOR","configurable","writable","NONENUMERABLE_DESCRIPTOR","READONLY_NONENUMERABLE_DESCRIPTOR","VARIABLE_DESCRIPTOR","STEP_ERROR","SCOPE_REFERENCE","VALUE_IN_DESCRIPTOR","toStringCycles_","getErrorLineNumber","getErrorLineNumberMessage","appendCode","populateScope_","initGlobalScope","OBJECT_PROTO","FUNCTION_PROTO","initFunction","initObject","proto","OBJECT","initArray","initString","initBoolean","initNumber","initDate","initRegExp","initError","initMath","initJSON","thisInterpreter","EvalError","parseInt","strFunctions","decodeURI","encodeURI","wrapper","nativeFunc","throwException","URI_ERROR","FUNCTION","ARRAY","ARRAY_PROTO","REGEXP","REGEXP_PROTO","DATE","DATE_PROTO","identifierRegexp","var_args","calledWithNew","newFunc","createObjectProto","arguments","argsStr","SYNTAX_ERROR","parentScope","boxThis","isObject","getScope","strict","box","getPrototype","thisArg","func_","funcThis_","arguments_","arrayPseudoToNative","TYPE_ERROR","doneExec_","setNativeFunctionPrototype","valueOf","throwIfNullUndefined","properties","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","class","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","getProperty","hasProperty","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","functions","compareString","locales","localeCompare","separator","jsList","search","newSubstr","BOOLEAN","NUMBER","numConsts","fractionDigits","toExponential","digits","precision","toPrecision","radix","Function","UTC","pattern","rgx","populateRegExp","lastIndex","opt_message","newError","createObject","createErrorSubclass","EVAL_ERROR","REFERENCE_ERROR","myMath","mathConsts","numFunctions","myJSON","nativeObj","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","pseudoObj","opt_cycles","pseudo","native","nativeArray","pseudoArray","lineNum","isGetter","TypeError","opt_descriptor","ReferenceError","defObj","firstNode","expression","createSpecialScope","opt_scope","getValueFromScope","prevNode","setValueToScope","nodeClass","isConstructor","getValue","Completion","NORMAL","BREAK","CONTINUE","RETURN","THROW","errorClass","lineNumErrorMsg","unwind","lineNumberMsg","cv","labels","isLoop","isSwitch","realError","errorTable","RangeError","URIError","createGetter_","funcThis","doneCallee_","doneArgs_","createSetter_","elements","n_","array_","doneLeft_","doneRight_","leftReference_","doneGetter_","leftValue_","leftValue","doneSetter_","setterValue_","rightValue","directEval_","funcNode","paramName","paramValue","argsList","evalNode","argsWithCallback","done_","throwValue","mode_","test_","doneInit_","doneObject_","variable_","object_","visited_","name_","gotPropName","props_","doneVariable_","doneProperty_","properties_","kinds","switchValue_","defaultCase_","index_","switchCase","matched_","tested_","doneBlock_","doneHandler_","doneFinalizer_","leftSide_","changeValue","returnValue","declarations","declarationNode","init_","doneBody_","numServerGrowthCycles","numServerGrowthCyclesAdjusted","ANSI_ESCAPE","lineClass","ANSIITypography","memo","parts","groups","matchAll","startIndex","stopIndex","partText","paragraph","part","spanStyle","COLOR_MAP_BRIGHT","1","2","3","4","5","6","7","COLOR_MAP_DARK","codeParts","nextStyleKey","codePart","ir","ig","ib","grey","ansi2rgb","fontWeight","textDecoration","ansiCodeStyle","isEmpty","hack_exp","hack_mult","str_exp","str_mult","def_exp","def_mult","dex_exp","dex_mult","agi_exp","agi_mult","cha_exp","cha_mult","assignToTask","unassignFromTask","difficultyPerCycles","getGainedAscensionPoints","canAscend","getCurrentAscensionMults","getAscensionMultsAfterAscend","getAscensionResults","postAscend","preAscend","applyUpgrade","respectToDeduct","buyUpgrade","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","validMults","StaneksGiftEvents","maxClearanceLevel","TechVendor","techVendorMaxRam","techVendorMinRam","University","AevumCasino","Casino","Special","NewTokyoArcade","Sector12CarmichaelSecurity","Sector12CityHall","Hospital","Slums","WorldStockExchange","ChongqingChurchOfTheMachineGod","IshimaGlitch","matchEnding","zip","JSZip","zipFiles","fileNames","fileContents","zipFn","generateAsync","FileSaver","saveAs","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","TeamSizeButton","canGraft","AugPreReqsChecklist","preAug","GraftingRoot","graftableAug","selectedAug","setSelectedAug","graftOpen","setGraftOpen","selectedAugmentation","switchSortOrder","newOrder","Cost","getAugsSorted","BlinkingCursor","setOn","StyleEditorButton","styleEditorOpen","setStyleEditorOpen","ThemeEditorButton","themeEditorOpen","setThemeEditorOpen","ThemeCollaborate","DeleteGameButton","modalOpened","setModalOpened","SoftResetButton","noConfirmation","PreReqs","ownedPreReqs","hasPreReqs","Requirement","gridArea","Exclusive","PurchasableAugmentations","augNames","PurchasableAugmentation","owned","sleeveAugs","canPurchase","float","gridTemplateAreas","TravelAgencyRoot","setDestination","startTravel","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","OpenScript","lastPosition","model","openScripts","currentScript","Root","editorRef","monacoRef","vimStatusRef","vimEditor","setVimEditor","setEditor","setFilter","searchExpanded","setSearchExpanded","setRAM","ramEntries","setRamEntries","updatingRam","setUpdatingRam","decorations","setDecorations","optionsOpen","setOptionsOpen","setOptions","insertSpaces","ramInfoOpen","setRamInfoOpen","dimensions","setDimensions","regenerateModel","createModel","debouncedHandleResize","updateRAM","keydown","ctrlKey","metaKey","require","initVimMode","VimMode","Vim","defineEx","defineAction","_cm","nTabs","currIndex","currentTabIndex","onTabClick","nextIndex","mapCommand","context","dispose","debouncedSetRAM","useMemo","newCode","entriesDisp","scriptToSave","textFile","cleanCode","ns1","ns2","curIndex","isDisposed","setModel","setPosition","revealLineInCenter","onTabClose","closingScript","savedScriptIndex","savedScriptCode","serverScriptIndex","indexOffset","getServerCode","openScript","serverScript","handleFilterChange","handleExpandSearch","filteredOpenScripts","editorHeight","tabMaxWidth","tabTextWidth","tabIconWidth","onDragEnd","items","endIndex","removed","reorder","droppableId","direction","provided","snapshot","innerRef","droppableProps","isDraggingOver","spellCheck","externalScript","colorProps","borderColor","iconButtonStyle","scriptTabText","serverScriptCode","dirty","draggableId","disableInteractiveElementBlocking","draggableProps","dragHandleProps","flexShrink","onTabUpdate","beforeMount","languages","registerCompletionItemProvider","provideCompletionItems","getWordAtPosition","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","startLineNumber","startColumn","endLineNumber","endColumn","column","js","getLanguages","hasLoader","loader","tokenizer","libSource","typescript","javascriptDefaults","addExtraLib","typescriptDefaults","onMount","Position","loading","defaultLanguage","defaultValue","newPos","newArr","tempScript","awaitWarning","newDecorations","deltaDecorations","isWholeLine","glyphMarginClassName","glyphMarginHoverMessage","infLoop","glyphMargin","getAction","getSubdirectories","t_dir","processFile","subdir","containsFiles","dirWithTrailingSlash","makeScriptBlob","compile","shouldCompile","uurls","_getScriptUrls","loadedModule","isDependencyOutOfDate","scriptModuleSequenceNumber","depScript","seen","urlStack","ranges","importNodes","ExportNamedDeclaration","ExportAllDeclaration","transformedCode","matchingScripts","importedScript","urls","blob","ScriptUrl","vargs","schema","numDashes","libarg","argv","defaultInterpreter","TablePaginationActionsAll","rowsPerPage","onPageChange","BitnodeMultiplierDescription","BitNodeMultipliersDisplay","maxSfLevel","columnCount","columnGap","GeneralMults","SkillMults","FactionMults","AugmentationMults","HackingMults","PurchasedServersMults","StockMults","CrimeMults","InfiltrationMults","CompanyMults","GangMults","CorporationMults","BladeburnerMults","StanekMults","BNMultTable","rowsArray","rowData","marginBottom","sectionName","extraSize","StnakesGiftPowerMultiplier","Cell","cellProps","onMouseEnter","Grid","activeGrid","randomColor","elems","newNs2Template","detectSimpleScriptGlob","globString","globDatabase","parsedGlob","glob","preGlob","postGlob","globError","globMatches","globAgainst","parseSimpleScriptGlob","commonEditor","scriptEditorRouteOptions","filesToLoadOrCreate","globSearch","filepath","getFilepath","fileIsNs2","isNs2","CursorPositions","saveCursor","HammingEncode","_data","_sumParity","_lengthOfDBits","_build","_tempcount","_temparray","_tempdata","_temp","HammingDecode","_testArray","_overallParity","_tempIndex","_tempStep","_tempData","_tempArray","_tempParity","_fixIndex","truth","automate","stop","findNode","setParent","queue","getMultiplierHelper","getProductProductionMultiplier","advertisingMult","employeeChaMult","employeeCreMult","employeeEffMult","employeeIntMult","productionMult","productProductionMult","salesMult","sciResearchMult","storageMult","StanekConstants","RAMBonus","BaseSize","MaxSize","detect","hasChanges","orig","nf","fl","backups","currPos","nextPosName","corpName","additionalShares","warehouseApi","OfficeApi","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","achievementsCounter","counterName","warningToast","warnAutosaveDisabled","adjustedCycles","startExploits","setupUncaughtPromiseHandler","timeOffline","numCyclesOffline","numContracts","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","ignoreQueued","stacks","calculateEntropy","typ","invalidArgs","baseSize","charge","af","cotmg","inBonus","updateMults","effect","boost","neighboor","CalculateEffect","canPlace","rootX","rootY","newFrag","aFrag","place","findFragment","clearCharge","Void","StatsElement","EarningsElement","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","purchased","serverType","purchase","DECK_COUNT","Result","Blackjack","bet","canStartGame","playerHand","deck","safeDrawCard","dealerHand","gameInProgress","Pending","getTrueHandValue","finishGame","Tie","PlayerWonByBlackjack","DealerWon","hand","handValues","getHandValue","valuesUnder21","isHandBusted","newHand","newDealerHand","PlayerWon","dealerHandValue","playerHandValue","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","render","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","card","prev","hidden","red","ReactCard","Clubs","Spades","allFactionAugs","factionAugs","factionAug","TickerHeaderFormatData","longestName","longestSymbol","AchievementEntry","cssFiltersUnlocked","cssFiltersLocked","isUnlocked","mainColor","achievedOn","unlocked","colorFilters","Color","hueRotate","angle","PI","sin","cos","multiply","grayscale","sepia","saturate","matrix","newR","newG","newB","brightness","linear","contrast","slope","intercept","invert","hsl","Solver","targetHSL","reusedColor","solve","solveNarrow","solveWide","css","best","initial","spsa","A1","iters","bestLoss","deltas","highArgs","lowArgs","ck","lossDiff","ak","fix","idx","filters","colorHSL","getFiltersFromHex","hex","rgb","hexToRgb","Theme","credit","screenshot","img1","reference","outputHistory","startHack","startGrow","startWeaken","startBackdoor","startAnalyze","finishHack","oldSec","newSec","finishGrow","finishWeaken","finishBackdoor","finishAnalyze","isHacknet","org","canRunScripts","hackingSkill","security","hackingChance","numPort","getProgressText","getFile","getLitFile","lit","currDir","setcwd","contractOpen","executeScanAnalyzeCommand","visited","depthQueue","newS","titleDashes","connectToServer","executeCommands","commandHistory","commandHistoryIndex","executeCommand","n00dlesServ","commandName","scananalyze","apr1","removeBracketsFromArrayString","strCpy","removeQuotesFromString","convert2DArrayToString","ans","nums","ways","maxLen","padStart","spiral","u","col","playerAns","_arr","reach","jumps","lastJump","jumpedFrom","intervals","numIntervals","interval","sanitizedResult","sanitizedAns","B","C","ansArr","ipInAns","maxCur","maxSoFar","hold1","MIN_SAFE_INTEGER","hold2","release1","release2","prices","hold","rele","cur","createTriangleRecurse","numLevels","createTriangle","triangle","dp","numRows","numColumns","currentRow","gridString","grid","obstacleGrid","dstY","dstX","minPathLength","distanceFactor","distance","MinHeap","validPosition","neighbors","yN","xN","changeWeight","yQ","xQ","ansX","ansY","roll","dfs","pair","sanitizedPlayerAnsArr","resultInAnswer","numDigits","digitsArray","evaluated","multed","_alteredBit","_buildArray","_randomIndex","edges","shuffle","vertexShuffler","neighbourhood","vertex","adjLeft","adjRight","coloring","initialVertex","frontier","validColors","aColor","bColor","plaintext","ans_plain","run_length","compressed","BinHeap","heapifyUp","heapifyDown","predicate","heapOrderABeforeB","tmp","toSwap","weightA","weightB","requireHackingLevel","targetServer","numAugReq","ipaddress","byteRange","formattedHours","getHours","formattedMinutes","getMinutes","formattedSeconds","getSeconds","FactionWorkStats","baseStats","AllSoftwarePositions","AllITPositions","AllNetworkEngineerPositions","SecurityEngineerPositions","AllTechnologyPositions","AllBusinessPositions","AllAgentPositions","AllSecurityPositions","AllSoftwareConsultantPositions","AllBusinessConsultantPositions","SoftwarePositionsUpToHeadOfEngineering","SoftwarePositionsUpToLeadDeveloper","BusinessPositionsUpToOperationsManager","WaiterOnly","EmployeeOnly","PartTimeWaiterOnly","PartTimeEmployeeOnly","OperationsManagerOnly","CEOOnly","effectText","costPerLevel","hasTargetServer","checkGangApiAccess","getGangMember","_faction","wantedLevelGainRate","cpy","_memberName","memberName","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","recruited","tasks","_taskName","getGangTask","_equipName","equipName","equipment","typecheck","_engage","engage","_otherGang","playerPower","createDescription","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","sl","_sleeveNumber","_crimeRoughName","crimeRoughName","_universityName","_className","_cityName","acompanyName","_factionName","_workType","_gymName","_stat","jobTitle","maxHp","agilityExp","charismaExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","timeWorked","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workMoneyGain","workRepGain","purchasableAugs","_augName","_action","_contract","devMenu","doc","completely_unused_field","real_document","recur","guess","bcrypt","getHacknetNode","hi","_i","hasUpgraded","timeOnline","totalProduction","_upgName","_upgTarget","checkStanekAPIAccess","_ctx","_rootX","_rootY","_rotation","_fragmentId","fragmentId","getLocationsWithInfiltrations","_location","locationName","tradeRep","sellCash","SoARep","calculateInfiltrationData","newTheme","currentTheme","errors","newStyles","currentStyles","checkBladeburnerAccess","skipjoined","apiDenied","bladeburnerDenied","checkBladeburnerCity","getBladeburnerActionObject","_blackOpName","blackOpName","_type","_level","_autoLevel","_skillName","_count","_size","getCodingContract","returnReward","answerStr","is2DArray","answerComponents","creward","upgradeName","materialName","checkAccess","api","getSafeDivision","numAdVerts","_divisionName","_amt","_materialName","sell","sll","_productName","pCost","cityData","developmentProgress","_price","_all","_enabled","enabled","_designInvest","_marketingInvest","_qty","_sourceDivision","_sourceCity","_targetDivision","_targetCity","sourceDivision","targetDivision","targetCity","_on","_researchName","_employeeName","_job","_amount","amount","_costPerEmployee","_industryName","industryName","_upgradeName","_rate","dividendEarnings","_corporationName","_selfFund","corporationName","selfFund","fundingRound","percShares","funding","investShares","_numShares","initialSharePrice","_amountCash","_amountShares","amountCash","amountShares","startingCost","reFac","robFac","aiFac","advFac","hwFac","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","MAX_VALUE","processMaterials","processProducts","wh","foo","imp","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","reqMatName","normQty","producableFrac","reqMatQtyNeeded","fooProd","fooI","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","marketTa2Price","sellAmt","totalExp","expI","amtStr","expIndustry","expWarehouse","processProduct","totalProfit","forProduct","netStorageSize","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","trainingEff","effCre","effEff","prodBase","checkFormulasAccess","_favor","_rep","_player","_exp","_mult","_skill","_server","_startingLevel","_extraLevels","_costMult","_startingRam","_startingCore","_extraCores","extraCores","_ramUsed","_maxRam","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","_startingCache","_extraCache","extraCache","HScalculateCacheUpgradeCost","HScalculateServerCost","_gang","_member","_task","_points","checkTixApiAccess","getStockFromSymbol","_symbol","_shares","_posType","sanitizedPosType","_pos","orderPos","ltype","lpos","stockMarketOrders","forecast","checkGraftingAPIAccess","_focus","wasFocusing","craftableAug","textfield","Language","InteractiveTutorialRoot","nsSelectionOpen","setNSSelectionOpen","setLanguage","tutorialScriptExtension","NS1","tutorialScriptName","contents","canNext","square","tab","updateOptions","readOnly","overviewContainer","visibilityToggle","collapse","Overview","setX","setY","CurrentIcon","KeyboardArrowUpIcon","KeyboardArrowDownIcon","LeftIcon","SchoolIcon","EqualizerIcon","fakeDrag","triggerMouseEvent","eventType","clickEvent","createEvent","initEvent","dispatchEvent","Loading","onStop","defaultPosition","onDoubleClick","openedMixin","transitions","easing","sharp","enteringScreen","closedMixin","leavingScreen","up","Drawer","styled","shouldForwardProp","active","borderLeft","listitem","SidebarRoot","hackingOpen","setHackingOpen","characterOpen","setCharacterOpen","worldOpen","setWorldOpen","helpOpen","setHelpOpen","flashTerminal","flashStats","flashActiveScripts","flashHacknet","flashCity","flashTutorial","augmentationCount","invitationsCount","programCount","getAvailableCreatePrograms","canOpenFactions","canOpenAugmentations","canOpenSleeves","canCorporation","canGang","canJob","canStockMarket","canBladeburner","canStaneksGift","clickTerminal","clickScriptEditor","clickStats","clickActiveScripts","clickCreateProgram","clickFactions","clickAugmentations","clickHacknet","clickCity","clickTravel","clickJob","clickBladeburner","clickGang","clickTutorial","clickOptions","handleShortcuts","altKey","E","H","R","P","F","U","G","anchor","timeout","unmountOnExit","clsx","badgeContent","NeuroFluxDisplay","EntropyDisplay","AugmentationsRoot","installOpen","setInstallOpen","InstalledAugmentations","sourceAugs","Alphabetically","aug1","aug2","BitNodeModifiedStats","MultiplierList","listItems","augmented","bnMult","py","disableTypography","PlayerMultipliers","augP","augObj","calculateAugmentedStats","leftColData","rightColData","PurchasedAugmentations","displayName","enterNextDelay","safeGetSf","sfNum","sfObj","getMaxLevel","SourceFilesElement","sourceSfs","sf1","sf2","selectedSf","setSelectedSf","DevMenuRoot","General","setError","setCorporationName","gangFaction","setGangFaction","addMoney","TransitionProps","expandIcon","bigNumber","modifyExp","modifier","modifyKarma","resetExperience","modifyFactionRep","AllFaction","modifyFactionFavor","labelId","arial-label","setAugmentation","validSFN","setSF","sfN","sfLvl","setAllSF","setProgram","AllPrograms","Servers","setServer","setCompany","modifyCompanyRep","AllCompanies","modifyCompanyFavor","modifyBladeburnerRank","modify","modifyBladeburnerCycles","modifyGangCycles","modifyCorporationFunds","modifyCorporationCycles","CodingContracts","setCodingcontract","cc","stockPrice","setStockPrice","setStockSymbol","processStocks","inputSymbols","SM","stocks","sleeveSetStoredCycles","Stanek","modCycles","modCharge","TimeSkip","timeskip","SaveFile","importInput","setSaveFile","restoreScripts","setRestoreScripts","restoreAugs","setRestoreAugs","restoreSFs","setRestoreSFs","File","FileList","ii","playerAchievement","setPlayerAchievements","achieved","grantAchievement","removeAchievement","Entropy","BladeburnerRoot","travelOpen","setTravelOpen","inFaction","wordBreak","TravelModal","nopadding","preformatted","Line","Console","setCommand","consoleInput","consoleHistoryIndex","setConsoleHistoryIndex","Logs","tabIndex","inputRef","prevCommand","currentTarget","scrollHook","scrollTop","scrollHeight","AllPages","GeneralActionPage","GeneralActionList","actions","GeneralActionElem","computedActionTimeCurrent","actionData","ContractPage","ContractList","ContractElem","Contracts","StealthIcon","KillIcon","OperationPage","OperationList","OperationElem","TeamSizeModal","BlackOpPage","BlackOpList","blackopName","blackop","BlackOpElem","hasReqdRank","SkillPage","valid","onUpgrade","SkillList","SkillElem","canLevel","GangRoot","ManagementSubpage","GangStats","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","ascendOnly","setAscendOnly","onRecruit","GangMemberCard","GangMemberCardContent","ascendOpen","setAscendOpen","borderRightWidth","onAscend","borderLeftWidth","onTaskChange","GangMemberStats","asc","KillScriptsModal","companyPositionName","bn11Mult","TaskSelector","setCurrentTask","contextMember","TaskDescription","AscensionModal","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","infoOpen","setInfoOpen","formatTerritory","OtherGangTerritory","clashVictoryChance","TerritoryInfoModal","NextReveal","PurchasedUpgrade","UpgradeButton","GangMemberUpgradePanel","currentCategory","setCurrentCategory","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","categories","Weapons","Vehicles","Rootkits","EquipmentsSubpage","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","EmployeeCount","next","currJob","nextJob","nextUna","AutoManagement","vechain","totalMorale","totalHappiness","totalEnergy","avgMorale","avgHappiness","avgEnergy","currUna","IndustryOffice","upgradeOfficeSizeOpen","setUpgradeOfficeSizeOpen","throwPartyOpen","setThrowPartyOpen","employeeManualAssignMode","setEmployeeManualAssignMode","UpgradeSizeButton","upgradeSize","UpgradeOfficeSizeModal","upgradeCost","upgradeCost15","maxMult","maxNum","multIncrease","upgradeCostMax","ThrowPartyModal","setCost","canParty","EffectText","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","IndustryOverview","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","Upgrade","wrapInTooltip","ele","but","ResearchModal","retainHeight","WarehouseRoot","smartSupplyOpen","setSmartSupplyOpen","canAffordUpgrade","stateText","mats","isInStock","isRelevant","breakdownItems","breakdown","previous","IndustryWarehouse","EmptyWarehouse","Leftover","setChecked","SmartSupplyModal","ProductElem","sellOpen","setSellOpen","limitOpen","setLimitOpen","discontinueOpen","setDiscontinueOpen","cancelOpen","setCancelOpen","marketTaOpen","setMarketTaOpen","nfB","hasUpgradeDashboard","sellButtonText","limitProductionButtonText","DiscontinueProductModal","LimitProductProductionModal","setLimit","SellProductModal","iQty","setQty","setPx","initialPrice","MarketTA2","ProductMarketTaModal","CancelProductModal","MaterialElem","purchaseMaterialOpen","setPurchaseMaterialOpen","exportOpen","setExportOpen","sellMaterialOpen","setSellMaterialOpen","materialMarketTaOpen","setMaterialMarketTaOpen","limitProductionOpen","setLimitProductionOpen","tutorial","purchaseButtonText","limitMaterialButtonText","disablePurchaseLimit","ExportModal","possibleDivisions","defaultDivision","setIndustry","setAmt","removeExport","currentDivision","possibleCities","newCost","setNewCost","MaterialMarketTaModal","SellMaterialModal","setPrice","BulkPurchaseSection","setBuyAmt","setDisabled","BulkPurchaseText","parsedAmt","PurchaseMaterialModal","purchaseMaterial","LimitMaterialProductionModal","IndustryProductEquation","reqs","reqAmt","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","DividendsStats","PublicButtons","PrivateButtons","BribeButton","Upgrades","findInvestorsopen","setFindInvestorsopen","goPublicopen","setGoPublicopen","fundingAvailable","findInvestorsTooltip","upgradeData","sellSharesOpen","setSellSharesOpen","buybackSharesOpen","setBuybackSharesOpen","issueNewSharesOpen","setIssueNewSharesOpen","issueDividendsOpen","setIssueDividendsOpen","sellSharesOnCd","sellSharesTooltip","issueNewSharesOnCd","issueNewSharesTooltip","canBribe","totalDividends","playerEarnings","storedTime","LevelableUpgrade","xs","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","SellSharesModal","setShares","ProfitIndicator","BuybackSharesModal","CostIndicator","IssueDividendsModal","percent","setPercent","canIssue","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","GoPublicModal","InfiltrationRoot","setStart","StartingDifficulty","Difficulty","Reward","cancel","Stage","minigames","SlashGame","BracketGame","BackwardGame","BribeGame","CheatCodeGame","Cyberpunk2077Game","MinesweeperGame","WireCuttingGame","setLevel","stage","setStage","Countdown","results","setResults","gameIds","setGameIds","lastGames","nextGameId","ids","setupNextGame","pushResult","stageComponent","onFinish","Minigame","MiniGame","onSuccess","Sell","onFailure","automated","Progress","difficulties","timer","words","makeAnswer","setGuess","hasAugment","BACKSPACE","shiftKey","ignorableKeyboardEvent","nextGuess","setRight","OPEN_BRACKET","LESS_THAN","OPEN_PARENTHESIS","OPEN_BRACE","generateLeftSide","CLOSE_PARENTHESIS","CLOSE_BRACKET","CLOSE_BRACE","GREATER_THAN","getChar","positive","option","negative","shuffleArray","makeChoices","correctIndex","setCorrectIndex","setIndex","currentChoice","choice","defaultColor","disabledColor","upColor","downColor","choiceColor","upIndex","upDistance","downIndex","downDistance","onCorrectIndex","newIndex","arrows","arrow","generateCode","puzzle","randChar","generatePuzzle","answers","generateAnswers","currentAnswerIndex","setCurrentAnswerIndex","setPos","flatGrid","isCorrectAnswer","optionColor","move","mines","minefield","field","generateEmptyField","generateMinefield","memoryPhase","setMemoryPhase","flagged","marked","fieldEquals","phase","setPhase","phaseZeroTime","timeUntilAttacking","Victory","quitInfiltration","handleInfiltrators","soa","infiltrationRepGain","isMemberOfInfiltrators","wiresmin","wiresmax","PIPE","DOT","FORWARD_SLASH","HYPHEN","HASH","colorNames","blue","wires","numWires","wireColors","generateWires","cutWires","setCutWires","questions","numQuestions","questionGenerators","randomPositionQuestion","randomColorQuestion","generateQuestion","checkWire","wireNum","shouldCut","wiresToBeCut","shouldBeCut","question","isCorrectWire","wire","wireColor","cutColor","arrowPart","Intro","CYCLES_PER_SEC","ExpRows","WorkInProgressRoot","workInfo","buttons","stopText","completion","unfocus","classWork","rates","elapsed","stopTooltip","comp","tooltipInfo","GameOptionsRoot","currentTab","setCurrentTab","SYSTEM","setTab","CurrentOptionsPage","execTime","setExecTime","recentScriptsSize","setRecentScriptsSize","logSize","setLogSize","portSize","setPortSize","terminalSize","setTerminalSize","autosaveInterval","setAutosaveInterval","timestampFormat","setTimestampFormat","setLocale","_event","INTERFACE","GAMEPLAY","MISC","SideBarTab","sideBarProps","tabName","GameOptionsSidebar","diagnosticOpen","setDiagnosticOpen","importSaveOpen","setImportSaveOpen","importData","setImportData","confirmedImportGame","method","alt","ServerAccordion","FileDiagnosticModal","FontFamilyField","refreshId","errorText","setErrorText","setFontFamily","LineHeightField","setLineHeight","StyleEditorModal","setRefreshId","customStyle","setCustomStyle","persistToSettings","endIcon","ColorEditor","onColorChange","hideTextfield","deferred","newColor","disableAlpha","ThemeEditorModal","customTheme","setCustomTheme","setTemplateTheme","placement","maxRows","importedTheme","SleeveRoot","FAQOpen","setFAQOpen","SleeveElem","statsOpen","setStatsOpen","earningsOpen","setEarningsOpen","augmentationsOpen","setAugmentationsOpen","abc","setABC","doing","MoreEarningsModal","MoreStatsModal","SleeveAugmentationsModal","PurchaseAugmentationModal","universitySelectorOptions","gymSelectorOptions","bladeburnerSelectorOptions","possibleJobs","forbiddenCompanies","otherSleeve","possibleFactions","forbiddenFactions","factionObj","second","universities","gyms","possibleContracts","Synchronize","canDo","getABC","s0","setS0","setS1","setS2","validActions","detailsF","details2","detail","FAQModal","HacknetRoot","purchaseMultiplier","setPurchaseMultiplier","purchaseMultiplierOnClicks","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelButton","upgradeRAMButton","upgradeCoresButton","increase","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeRamButton","upgradeCacheButton","base_increase","modded_increase","upgradeCacheCost","HashUpgradeModal","serversMap","HacknetUpgradeElem","selectedServer","setSelectedServer","MultiplierButton","MultiplierButtons","btnProps","PlayerInfo","hasServers","PurchaseButton","GenericLocation","locContent","locName","getLocationSpecificContent","CompanyLocation","quitOpen","setQuitOpen","isEmployedHere","favorGain","onQuit","QuitJobModal","GymLocation","train","HospitalLocation","getHealed","currHp","btnStyle","SlumsLocation","shopliftChance","robStoreChance","mugChance","larcenyChance","drugsChance","bondChance","armsChance","homicideChance","gtaChance","kidnapChance","assassinateChance","heistChance","SpecialLocation","handleBladeburner","worldHeader","HTMLElement","handleGrafting","CreateCorporation","handleCotMG","renderBladeburner","toStanek","renderCotMG","CreateCorporationModal","canSelfFund","n00dlePower","ArcadeRoot","Megabyteburner2000","currentGame","BBCabinetRoot","origin","joystick","borderStyle","borderWidth","ServerButton","TechVendorLocation","purchaseServerButtons","RamButton","TorButton","purchaseTorRouter","CoresButton","maxCores","PurchaseServerModal","setHostname","tryToPurchaseServer","TravelConfirmationModal","UniversityLocation","take","dataStructuresCost","networksCost","algorithmsCost","managementCost","leadershipCost","GameType","CasinoLocation","setGame","Coin","Slots","Roulette","numDecks","drawCard","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","correct","redNumbers","strategies","Red","payout","Black","Odd","Even","High","Low","Third1","Third2","Third3","Single","canPlay","setCanPlay","lock","setLock","strategy","playerWin","isRed","currentNumber","getPayout","payLines","SlotMachine","locks","setLocks","stoppedOne","getPaylineData","payline","point","countSequence","checkWinnings","getTable","LocationLetter","ASCIICity","locationLettersRegex","letterMap","K","M","N","Q","V","Y","lineElems","startI","endI","locationI","ListCity","locationButtons","LocationCity","OptionsModal","setInsertSpaces","setFontSize","setWordWrap","setVim","themePath","themeCopy","setThemeCopy","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","TerminalRoot","setKey","doScroll","hook","scrollIntoView","debounced","maxWait","unsubscribe","scrollId","TerminalInput","terminalInput","postUpdateValue","setPostUpdateValue","possibilities","setPossibilities","saveValue","postUpdate","modifyInput","mod","inputLength","selectionStart","inputText","delStart","moveTextCursor","keyDown","autoComplete","onBlur","TAB","semiColonIndex","allPos","determineAllPossibilitiesForTabCompletion","tabCompletion","selectionEnd","anchorEl","parentDirPath","evaledParentDirPath","addAllCodingContracts","cct","addAllLitFiles","addAllPrograms","addAllScripts","processFilepath","addAllTextFiles","addAllDirectories","subdirs","t_parentDirPath","convertParentPath","isCommand","cmd","t_cmd","autocomplete","runArgs","permissive","flagFunc","autocompleteData","txts","pos2","scriptAutocomplete","addAllMessages","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","confirmResetOpen","setConfirmResetOpen","ActiveScriptsRoot","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","RecentScriptsPage","recentScript","RecentScriptAccordion","MainPage","onAugmentations","sleevesOpen","setSleevesOpen","isPlayersGang","favorToDonate","canDonate","canPurchaseSleeves","startHackingContracts","startFieldWork","startSecurityWork","FactionRoot","purchasingAugs","setPurchasingAugs","routeToMainPage","AugmentationsPage","getAugs","augName1","augName2","getAugsSortedByCost","getAugsSortedByReputation","Purchasable","canBuy","hasReq","hasRep","cantBuy","getAugsSortedByPurchasable","purchasable","multiplierComponent","costs","showModal","DonateOption","donateAmt","setDonateAmt","Status","NumberInput","textProps","noformat","DefaultAssignment","Info","Assignment","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","maxMemory","purchaseBtnDisabled","purchaseBtnContent","calculateStat","srcFile","sourceFileObject","incMult","decMult","GangButton","gangOpen","setGangOpen","CreateGangModal","EmployersModal","MultiplierTable","noMargin","effValue","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","CharacterStats","moneyOpen","setMoneyOpen","employersOpen","setEmployersOpen","timeRows","showBitNodeMults","isEqual","StockMarketRoot","Purchase4SMarketDataTixApiAccessButton","PurchaseWseAccountButton","PurchaseTixApiAccessButton","Purchase4SMarketDataButton","InfoAndPurchases","StockTickers","setTickerDisplayMode","AllStocks","watchlistSymbols","setWatchlistSymbols","tickers","stockMarketProp","rerenderAllTickers","sanitizedWatchlist","SelectorOrderType","StockTicker","setOrderType","Market","tickerOpen","setTicketOpen","modalProps","setModalProps","placeText","getQuantity","hasOrderAccess","Limit","Stop","getBuyTransactionCostContent","getSellTransactionCostContent","playerMoney","localesWithLongPriceFormat","StockTickerHeaderText","stockPriceFormat","spacesAllottedForStockPrice","spacesAfterStockName","spacesBeforePrice","hdrText","plusOrMinus","StockTickerOrderList","StockTickerOrder","posTxt","LongPosition","percentageGains","ShortPosition","StockTickerPositionText","PlaceOrderModal","portal","level0","level1","level2","level3","BitNodePortal","portalOpen","setPortalOpen","cssClass","aria-description","BitverseRoot","destroyed","destroySequence","setDestroySequence","nextSourceFileLvl","PortalModal","bitNodeKey","maxSourceFileLevel","newLevel","CinematicLine","setLength","ms","newLength","advance","StaneksGiftRoot","MainBoard","setGhostGrid","setRotation","selectedFragment","setSelectedFragment","moveGhost","clickAt","deleteAt","doRotate","selectFragment","FragmentInspector","setC","effectAmt","FragmentOption","colorAt","FragmentSelector","FragmentPreview","ActiveFragmentSummary","summary","coordinate","formatEffect","_width","_height","getComputedStyle","Element","visibility","AchievementsRoot","AchievementList","cssPrimary","cssSecondary","secret","unavailable","locked","pr","defaultExpanded","AchievementIcon","imgLoaded","setImgLoaded","onLoad","ErrorBoundary","Component","hasError","componentDidCatch","ex","previousScrollY","modalOpen","setModalOpen","modalImageSrc","setModalImageSrc","predefinedThemes","themes","templateTheme","onActivated","scrollY","previousColors","onImageClick","handleZoom","ThemeEntry","subheader","image","ComparisonIcon","isBetter","initialAutosave","ImportSaveRoot","currentData","setCurrentData","importModalOpen","setImportModalOpen","headback","setHeadback","dataBeingImported","dataCurrentlyInGame","fetchData","BypassWrapper","getAugmentation","runAfterReset","cbScript","_purchased","_facName","_cbScript","_locationName","_programName","baseserver","installTime","jobTitles","wasWorking","_companyName","wasFocused","_field","repNeededToDonate","_nextBN","_callbackScript","nextBN","callbackScript","hackingRequirements","wrapFunction","helpers","wrappedAPI","functionPath","functionName","extra","branch","getNestedProperty","setNestedProperty","empty","nerf","normalServer","relative_filename","evaledDir","t_dst","dst","srcExt","tRes","sRes","sanitizedExpr","used","avail","usedPercent","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","ClickableScriptRow","scriptLinksWrap","scriptLink","textDecorationLine","paddingRight","rowSplitArray","rowItem","onScriptLinkClick","ClickableMessageRow","linksWrap","link","onMessageLinkClick","FileType","postSegments","group","segments","linked","filesPerRow","Folder","numThreads","verboseEntries","t_dest","sourcePath","destFile","destPath","positions","getCursor","re","matching","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","threadFlag","tailFlag","toLocaleLowerCase","hasRoot","maxHostname","maxIP","args2","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","ReactDOM","globalThis","onbeforeunload"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,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AKqlD,GAAK,GACVrlD,KAAK05E,IAAM,EACX,MACF,IAAK,SACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,IACbxtB,KAAKqlD,GAAK,GACVrlD,KAAK05E,IAAM,EACX,MACF,IAAK,OACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,IACbxtB,KAAKqlD,GAAK,EACVrlD,KAAK05E,IAAM,EACX,MACF,IAAK,SACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,IACbxtB,KAAKqlD,GAAK,GACVrlD,KAAK05E,IAAM,KACX,MACF,IAAK,QACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,KACbxtB,KAAKqlD,GAAK,EACVrlD,KAAK05E,IAAM,EACX,MACF,IAAK,WACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,IACbxtB,KAAKqlD,GAAK,GACVrlD,KAAK05E,IAAM,EACX,MACF,IAAK,YACH15E,KAAK25E,IAAM,GACX35E,KAAK45E,KAAO,CAAC,GAAI,IACjB55E,KAAK65E,IAAM,GACX75E,KAAK85E,KAAO,CAAC,GAAI,IACjB95E,KAAKwtB,MAAQ,IACbxtB,KAAKqlD,GAAK,IACVrlD,KAAK05E,IAA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BE,EAAe,IACjB7C,GAAW6C,EAAe,gBAExBE,EAAa,IACf/C,GAAW+C,EAAa,cAEtBC,EAAc,IAChBhD,GAAWgD,EAAc,eAEvB8+G,EAAS,IACX9hH,GAAW8hH,EAAS,iBAEtB9hH,EAAUA,EAAQ5vB,UAAU,EAAG4vB,EAAQnlC,OAAS,GAChDmlC,GAAW,KAENA,EAjDT,mC,6BCHA,oEAGO,MAAM+hH,EAA6B,CACxC,oDACA,IACA,8EACA,sFACA,sFACA,mFACA,8EACA,qEACA,6EACA,2EACA,gEACA,uEACA,uDACA,4FACA,8EACA,kFACA,mHACA,oEACA,kGACA,wEACA,oEACA,gFACA,6FACA,4FACA,6EACA,2FACA,iGACA,6EACA,4GACA,0FACA,yEACA,uEACA,gGACA,0FACA,iFACA,+FACA,0FACA,4FACA,uEACA,wHACA,sFACA,iFACA,KAGIC,EACWr+D,GACN,CACJ,UAASA,wBACT,IACA,8GACA,4FACA,IACA,4CAA2CA,kDAC3C,kBAAiBA,yEACjB,IACA,YACA,IACA,OAAMA,YACN,OAAMA,qBACN,IACA,OAAMA,WACN,OAAMA,iBACN,KAKMs+D,EAA4B,CACvCx4E,MAAO,CACL,oCACA,IACA,4FACA,uGACA,yHACA,kGACA,IACA,gCACA,IACA,mHACA,yHACA,4CACA,IACA,gCACA,IACA,6DACA,IACA,eACA,IACA,2HACA,4HACA,IACA,mCACA,IACA,8GACA,IACA,uHACA,uCACA,IACA,uDACA,KAEFy4E,QAAS,CACP,iBACA,IACA,0GACA,mHACA,kHACA,gCACA,KAEFC,SAAU,CACR,kBACA,IACA,6FACA,IACA,+BACA,KAEF3wH,IAAK,CACH,iCACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,+FACA,IACA,wGACA,KAEF4wH,IAAK,CACH,oBACA,IACA,6EACA,IACA,iBACA,IACA,kBACA,IACA,sBACA,KAEFla,GAAI,CACF,kBACA,IACA,yGACA,iFACA,IACA,yBACA,IACA,eACA,IACA,aACA,KAEFma,MAAO,CACL,uCACA,IACA,+HACA,uDACA,kIACA,IACA,oCACA,IACA,gGACA,IACA,sCACA,KAEFrsE,MAAO,CACL,eACA,IACA,mIACA,uIACA,KAEFssE,IAAK,CACH,aACA,IACA,mIACA,yIACA,KAEFpsD,QAAS,CACP,4BACA,IACA,+FACA,oIACA,8GACA,KAEFqsD,GAAI,CAAC,wBAAyB,IAAK,wEAAyE,KAC5G9zF,SAAU,CACR,qCACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEF+zF,KAAM,CACJ,wCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,wBACA,IACA,qFACA,KAEFC,KAAM,CACJ,cACA,IACA,gIACA,gCACA,KAEFz+C,KAAM,CACJ,cACA,IACA,6GACA,2CACA,KAEF9lE,KAAM,CACJ,cACA,IACA,uHACA,KAEFwkH,KAAM,CACJ,wBACA,IACA,yHACA,0HACA,mEACA,IACA,iBACA,IACA,wBACA,KAEFC,QAAS,CACP,sBACA,IACA,6GACA,KAEFzlH,KAAM,CACJ,cACA,IACA,sGACA,KAEF7qB,SAAU,CAAC,kBAAmB,IAAK,4CAA6C,KAChF2+D,KAAM,CACJ,mDACA,IACA,4EACA,IACA,6EACA,4EACA,iFACA,4DACA,IACA,uCACA,IACA,qEACA,IACA,wCACA,IACA,qFACA,KAEFo0B,QAAS,CACP,iBACA,IACA,4CACA,2HACA,uHACA,2EACA,KAEFG,GAAI,CACF,wCACA,IACA,iIACA,sDACA,IACA,8FACA,IACA,gFACA,IACA,yHACA,IACA,YACA,IACA,wEACA,IACA,2BACA,IACA,iEACA,IACA,yBACA,IACA,uFACA,IACA,oCACA,KAEFq9C,MAAO,CAAC,eAAgB,IAAK,wDAAyD,KAEtFC,IAAK,CACH,4CACA,IACA,6HACA,2HACA,gFACA,IACA,qBACA,IACA,2BACA,IACA,4HACA,iFACA,KAEF96F,GAAI,CACF,yBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,qEACA,IACA,oCACA,KAEF+6F,KAAMd,EAAgC,QACtCx8C,GAAI,CAAC,YAAa,IAAK,4DAA6D,KACpF8B,GAAI,CACF,mBACA,IACA,6GACA,IACA,kDACA,KAEF76D,IAAK,CACH,sDACA,IACA,gDACA,IACA,sHACA,2GACA,gEACA,2DACA,2FACA,IACA,kHACA,iFACA,KAEF82D,KAAM,CACJ,cACA,IACA,6HACA,2CACA,KAEF,eAAgB,CACd,mCACA,IACA,kGACA,wGACA,4EACA,IACA,uGACA,qGACA,0BACA,IACA,iHACA,yGACA,UACA,IACA,2GACA,sEACA,KAEF+B,IAAK,CACH,4CACA,IACA,8EACA,2GACA,oCACA,2FACA,IACA,6BACA,IACA,wCACA,KAEFy9C,MAAO,CAAC,eAAgB,IAAK,oEAAqE,KAElGr6C,KAAM,CACJ,sCACA,IACA,oHACA,uHACA,oEACA,IACA,8BACA,IACA,gFACA,IACA,+BACA,KAEFt2B,IAAK,CACH,aACA,IACA,yGACA,+BACA,KAEF4wE,QAAS,CACP,8BACA,IACA,mFACA,IACA,iDACA,IACA,oBACA,IACA,kCACA,IACA,gBACA,IACA,kGACA,KAEFtpG,IAAKsoG,EAAgC,OACrCx6H,OAAQ,CACN,gBACA,IACA,oHACA,iEACA,KAEF8gF,KAAM,CACJ,kCACA,IACA,iGACA,oGACA,0CACA,IACA,mGACA,iDACA,IACA,mGACA,O,6BC/dJ,wEAIK26C,EAKAC,EATL,0B,SAIKD,O,2BAAAA,I,8BAAAA,M,cAKAC,O,qBAAAA,I,kBAAAA,M,KA2CE,MAAMzd,EAAe,qDA8BrB,SAAS0d,EAAmB3sI,EAAc4sI,EAA6B/rG,GAAyB,YACrG,MAAM7jC,EA7BR,SAA0BgD,EAAc4sI,EAA6B/rG,GACnE,MAAMgsG,EAAavzF,UAAUC,UAAU5yB,cAAcn3B,QAAQ,eAAiB,EACxE8uD,EAAqEmuF,EAAQK,WAC7EnwC,EAAuB,CAC3BA,QAAStsG,IAAUC,cACnBkoG,KAAM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AAK4pJ,2BAA2B5pJ,KAAKgoJ,MAAO,SAAUL,GAEtDA,EAAU,SAAU6D,EAAeC,GACjC,OAAO/5H,MAAMr5B,UAAUiL,QAAQxK,MAAMkH,KAAK+pJ,WAAYpB,YAExD3oJ,KAAK4pJ,2BAA2B5pJ,KAAKgoJ,MAAO,UAAWL,GAEvDA,EAAU,SAAU6D,EAAeC,GACjC,OAAO/5H,MAAMr5B,UAAU03C,YAAYj3C,MAAMkH,KAAK+pJ,WAAYpB,YAE5D3oJ,KAAK4pJ,2BAA2B5pJ,KAAKgoJ,MAAO,cAAeL,GAE3DA,EAAU,WAER,OADAj2H,MAAMr5B,UAAU6U,KAAK3U,KAAKyH,KAAK+pJ,YACxB/pJ,MAETA,KAAK4pJ,2BAA2B5pJ,KAAKgoJ,MAAO,OAAQL,GAEpD3nJ,KAAK6kJ,WAAWpsJ,KAGd,kDACA,8CACA,kCACA,oEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,+DACA,OACA,IACA,eACA,IACA,MAIA,mDACA,8CACA,+BACA,wFACA,wBACA,4BACA,gBACA,+DACA,kCACA,gBACA,kBACA,mDACA,IACA,IACA,cACA,IACA,MAKA,+BACA,mDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,iBACA,IACA,OACA,IACA,oBACA,KACA,sBACA,iBACA,MACA,IAKA,oCACA,wDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,YACA,IACA,OACA,IACA,aACA,KACA,sBACA,iBACA,MACA,IAIA,oDACA,8CACA,gCACA,kEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,4CACA,OACA,IACA,IACA,MAIA,uDACA,8CACA,sBACA,0DACA,IACA,yCACA,wBACA,mDACA,4BACA,mCACA,mBACA,gBACA,IACA,yCACA,qEACA,yBACA,uBACA,qBACA,oBACA,2BACA,+BACA,uDACA,iCACA,8FACA,IACA,8BACA,oBACA,+DACA,wEACA,4CACA,eACA,IACA,0BACA,OACA,IACA,qBACA,gBACA,IACA,MAIA,gDACA,8CACA,gCACA,8DACA,eACA,wBACA,4BACA,yCACA,sBACA,SACA,oBACA,mDACA,OACA,IACA,YACA,IACA,MAIA,mDACA,8CACA,0CACA,kEACA,4DACA,gCACA,wBACA,WACA,oCACA,kBACA,kEACA,IACA,kBACA,IACA,yBACA,mDACA,IACA,gBACA,IACA,MAIA,wDACA,8CACA,0CACA,yGACA,kEACA,+BACA,wBACA,WACA,mCACA,eACA,kEACA,IACA,kBACA,IACA,wBACA,mDACA,IACA,gBACA,IACA,MAIA,iDACA,8CACA,+BACA,6DACA,wBACA,4BACA,+DACA,kCACA,iDACA,eACA,IACA,IACA,gBACA,IACA,MAEA,gBACA,oCACA,8CAEA,wCACA,2BACA,IAEA,0CACA,mBACA,kDACA,4CACA,sBACA,yBACA,sBACA,aACA,IACA,IACA,uBACA,IACA,eACA,KACA,QAEA,2DACA,8CACA,eACA,gBACA,0CACA,wFACA,IACA,wBACA,IACA,MACA,KAQJy9E,EAAY79E,UAAUwuJ,WAAa,SAAU1xE,GAC3C,IACIwyE,EADAN,EAAkBrnJ,KAGtB2nJ,EAAU,SAAUltJ,GAElB,OADAA,EAAQsmE,OAAOtmE,GACX4sJ,EAAgBmB,iBAElBxoJ,KAAKrI,KAAO8C,EACLuF,MAGAvF,GAGXuF,KAAK0rJ,OAAS1rJ,KAAK+1E,qBAAqB4xE,GAAS,GACjD3nJ,KAAK61E,YAAYV,EAAO,SAAUn1E,KAAK0rJ,QAGvC1rJ,KAAK61E,YACH71E,KAAK0rJ,OACL,eACA1rJ,KAAK+1E,qBAAqBhV,OAAO4qF,cAAc,GAC/Cz1E,EAAYwvE,0BAoBd,IAfA,IAAIkG,EAAY,CACd,SACA,aACA,SACA,UACA,cACA,QACA,SACA,YACA,oBACA,oBACA,cACA,cACA,QAEO3zJ,EAAI,EAAGA,EAAI2zJ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AC,IAAD,CAAYn+D,QAAQ,MAApB,UAAkC2/J,EAA2B,GAAd,aAC/C,kBAAC,IAAD,CAAYh0H,UAdlB,SAA+Bl6C,GAE7B,GADAA,EAAMmrF,iBALR,SAAgCnrF,GAC9B,OAAOA,EAAMx2C,MAAQqU,IAAIswM,WAAcnuK,EAAMouK,UAA0B,UAAdpuK,EAAMx2C,KAAoBw2C,EAAM+uH,SAAW/uH,EAAMwvJ,OAKtG6e,CAAuBruK,GAAQ,OACnC,MAAMsuK,EAAYzzB,EAAQ76I,EAAMx2C,IAAI0S,cAC/B/M,EAAOkjB,WAAWi8L,GACdn/M,IAAWm/M,EAAWj1M,EAAMm0M,YAChCS,EAASK,GAFqBj1M,EAAMq0M,aAUPA,UAAWr0M,EAAMq0M,YAC/C,kBAAC,IAAD,CAAYtxK,MAAO,CAAEusB,UAAWulJ,EAAa,OAAS,eAAiB/+M,GACvE,kBAAC,IAAD,KACG0rL,EACD,kBAAC,IAAD,SAkBV,MAAMkzB,EAAQ,CACZ,YACA,SACA,MACA,cACA,QACA,SACA,YACA,SACA,MACA,OACA,SACA,OACA,UACA,WACA,OACA,YACA,UACA,SACA,MACA,MACA,OACA,QACA,YACA,UACA,KACA,SACA,SACA,YACA,QACA,YACA,UACA,UACA,WACA,WACA,YACA,SACA,OACA,MACA,aACA,aACA,YACA,OACA,SACA,WACA,QACA,aACA,SACA,UACA,cACA,UACA,OACA,MACA,WACA,SACA,cACA,MACA,aACA,WACA,OACA,MACA,UACA,QACA,WACA,UACA,aACA,QACA,UACA,MACA,OACA,SACA,WACA,WACA,UACA,QACA,cACA,cACA,YACA,SACA,OACA,SACA,QACA,WACA,WACA,WACA,OACA,SACA,WACA,YACA,OACA,OACA,YACA,YACA,OACA,QACA,UACA,YACA,WACA,aACA,YACA,OACA,WACA,WACA,SACA,MACA,WACA,UACA,SACA,gBACA,OACA,QACA,UACA,QACA,QACA,UACA,YACA,QACA,YACA,UACA,QACA,SACA,SACA,QACA,UACA,cACA,QACA,aACA,MACA,UACA,OACA,WACA,WACA,UACA,SACA,aACA,YACA,SACA,SACA,SACA,OACA,WACA,QACA,OACA,WACA,SACA,SACA,WACA,SACA,UACA,QACA,SACA,QACA,UACA,UACA,UACA,UACA,aACA,WACA,QACA,SACA,MACA,WACA,SACA,aACA,UACA,MACA,OACA,SACA,UACA,OACA,OACA,UACA,SACA,aACA,SACA,SACA,SACA,SACA,SACA,WACA,SACA,YACA,QACA,QACA,YACA,WACA,oBACA,WACA,OACA,UACA,cACA,UACA,SACA,UACA,gBACA,OACA,SACA,QACA,MACA,WACA,WACA,WACA,cACA,SACA,UACA,QACA,eACA,WACA,OACA,OACA,SACA,MACA,OACA,iBACA,WACA,UACA,UACA,UACA,iBACA,QACA,MACA,YACA,UACA,SACA,OACA,SACA,UACA,WACA,YACA,cACA,MACA,OACA,MACA,MACA,Q,6BCzTF,yIAmBA,MAAMF,EAKF,CACFj0H,QAAS,CAAEk0H,MAAO,IAAMxuM,IAAK,EAAGjN,IAAK,GACrCwnF,OAAQ,CAAEi0H,MAAO,IAAMxuM,IAAK,EAAGjN,IAAK,GACpCynF,KAAM,CAAEg0H,MAAO,IAAMxuM,IAAK,EAAGjN,IAAK,GAClC0nF,WAAY,CAAE+zH,MAAO,KAAMxuM,IAAK,EAAGjN,IAAK,IAkCnC,SAAS25M,EAAY3yM,GAC1B,MAAM48B,EAAyB,CAAE63K,MAAO,EAAGxuM,IAAK,EAAGjN,IAAK,GACxDknF,YAAYs0H,EAAcx0M,EAAM48B,WAAYA,GAC5C,MAAM63K,EAAQ73K,EAAW63K,OAClB/vI,EAAOwwI,GAAY5oK,mBAAS,KAC5Bs4B,GAAQt4B,mBApCjB,SAA0B1P,GACxB,IAAIvmC,EAAM,GACV,MAAMq5C,EAAU,CAAClrC,IAAI2wM,aAAc3wM,IAAI4wM,UAAW5wM,IAAI6wM,iBAAkB7wM,IAAI8wM,YACxEzkN,IAAOme,gBAAgB1V,IAAkBynH,gBAAgB,IAC3DrxE,EAAQ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+C,WAAW45L,EAZN,eAmBdC,K,6BClCF,gEAIO,SAASlhE,IACd32K,OAAOwzE,iBAAiB,sBAAsB,SAAUxjD,GACtD,GAAI2nC,YAAqB3nC,EAAE0nJ,QAAS,CAClC,MAAMr9F,EAAiBrqD,EAAE0nJ,OAAO/jK,MAAM,eAChCU,EAAWgmE,EAAe,GAC1BtB,EAAasB,EAAe,GAC5BC,EAAWD,EAAe,GAEhC,IAAInjB,EAAO,8DAA6D6hB,KAAc1kE,QACtF6iD,GAAO,OACPA,GAAOojB,EACPrsE,YAAgBipD,QACX,GAAIlnC,EAAE0nJ,kBAAkB1gH,IAAa,CAC1C,MAAME,EACH,8DAA6DlnC,EAAE0nJ,OAAOh5K,QAAQsxB,EAAE0nJ,OAAOrjK,mBAAmB2b,EAAE0nJ,OAAOryG,uCAEtHp3D,YAAgBipD,S,0GCpBtB,wEAgBA,SAASvZ,IACP+uB,cACAorK,IAAS97D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFtnH,SAASqoE,eAAe,SAhB5B3jB,cACA2+H,WAAU,MAAYjgO,IACtBigO,WAAU,SAAeD,IACzBA,IAAS97D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFtnH,SAASqoE,eAAe,SAcxBtwD,IAAYpuB,UAAUV,GAIwB/hB,SAASu4B,KAAK7rC,WAAW,aACvEtoB,OAAOg4O,eAAiB,WACtB,MAAO,4BAKTh4O,OAAO2qE,MAAQ,KACb,MAAM,IAAIj7D,MAAM,8D","file":"main.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1552,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n Player.money = parseFloat(Player.money + \"\");\n Player.exploits = sanitizeExploits(Player.exploits);\n}\n","export enum FactionNames {\n Illuminati = \"Illuminati\",\n Daedalus = \"Daedalus\",\n TheCovenant = \"The Covenant\",\n ECorp = \"ECorp\",\n MegaCorp = \"MegaCorp\",\n BachmanAssociates = \"Bachman & Associates\",\n BladeIndustries = \"Blade Industries\",\n NWO = \"NWO\",\n ClarkeIncorporated = \"Clarke Incorporated\",\n OmniTekIncorporated = \"OmniTek Incorporated\",\n FourSigma = \"Four Sigma\",\n KuaiGongInternational = \"KuaiGong International\",\n FulcrumSecretTechnologies = \"Fulcrum Secret Technologies\",\n BitRunners = \"BitRunners\",\n TheBlackHand = \"The Black Hand\",\n NiteSec = \"NiteSec\",\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n SpeakersForTheDead = \"Speakers for the Dead\",\n TheDarkArmy = \"The Dark Army\",\n TheSyndicate = \"The Syndicate\",\n Silhouette = \"Silhouette\",\n Tetrads = \"Tetrads\",\n SlumSnakes = \"Slum Snakes\",\n Netburners = \"Netburners\",\n TianDiHui = \"Tian Di Hui\",\n CyberSec = \"CyberSec\",\n Bladeburners = \"Bladeburners\",\n ChurchOfTheMachineGod = \"Church of the Machine God\",\n ShadowsOfAnarchy = \"Shadows of Anarchy\",\n}\n","import { ISelfInitializer, ISelfLoading } from \"../types\";\nimport { OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting } from \"./SettingEnums\";\nimport { defaultTheme, ITheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { WordWrapOptions } from \"../ScriptEditor/ui/Options\";\nimport { OverviewSettings } from \"../ui/React/Overview\";\nimport { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { defaultMonacoTheme, IScriptEditorTheme } from \"../ScriptEditor/ui/themes\";\n\n/**\n * Represents the default settings the player could customize.\n */\ninterface IDefaultSettings {\n /**\n * How many servers per page\n */\n ActiveScriptsServerPageSize: number;\n /**\n * How many scripts per page\n */\n ActiveScriptsScriptPageSize: number;\n /**\n * How often the game should autosave the player's progress, in seconds.\n */\n AutosaveInterval: number;\n\n /**\n * How many milliseconds between execution points for Netscript 1 statements.\n */\n CodeInstructionRunTime: number;\n\n /**\n * Render city as list of buttons.\n */\n DisableASCIIArt: boolean;\n\n /**\n * Whether global keyboard shortcuts should be recognized throughout the game.\n */\n DisableHotkeys: boolean;\n\n /**\n * Whether text effects such as corruption should be visible.\n */\n DisableTextEffects: boolean;\n\n /**\n * Whether overview progress bars should be visible.\n */\n DisableOverviewProgressBars: boolean;\n\n /**\n * Enable bash hotkeys\n */\n EnableBashHotkeys: boolean;\n\n /**\n * Timestamps format\n */\n TimestampsFormat: string;\n\n /**\n * Locale used for display numbers\n */\n Locale: string;\n\n /**\n * Limit the number of recently killed script entries being tracked.\n */\n MaxRecentScriptsCapacity: number;\n\n /**\n * Limit the number of log entries for each script being executed on each server.\n */\n MaxLogCapacity: number;\n\n /**\n * Limit how many entries can be written to a Netscript Port before entries start to get pushed out.\n */\n MaxPortCapacity: number;\n\n /**\n * Limit the number of entries in the terminal.\n */\n MaxTerminalCapacity: number;\n\n /**\n * Save the game when you save any file.\n */\n SaveGameOnFileSave: boolean;\n\n /**\n * Whether the player should be asked to confirm purchasing each and every augmentation.\n */\n SuppressBuyAugmentationConfirmation: boolean;\n\n /**\n * Whether the user should be prompted to join each faction via a dialog box.\n */\n SuppressFactionInvites: boolean;\n\n /**\n * Whether the user should be shown a dialog box whenever they receive a new message file.\n */\n SuppressMessages: boolean;\n\n /**\n * Whether the user should be asked to confirm travelling between cities.\n */\n SuppressTravelConfirmation: boolean;\n\n /**\n * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled.\n */\n SuppressBladeburnerPopup: boolean;\n\n /**\n * Whether the user should be displayed a popup message on stock market actions.\n */\n SuppressTIXPopup: boolean;\n\n /**\n * Whether the user should be displayed a toast alert when the game is saved.\n */\n SuppressSavedGameToast: boolean;\n\n /**\n * Whether the user should be displayed a toast warning when the autosave is disabled.\n */\n SuppressAutosaveDisabledWarnings: boolean;\n\n /*\n * Whether the game should skip saving the running scripts for late game\n */\n ExcludeRunningScriptsFromSave: boolean;\n\n /*\n * Theme colors\n */\n theme: ITheme;\n\n /*\n * Interface styles\n */\n styles: IStyleSettings;\n\n /*\n * Use GiB instead of GB\n */\n UseIEC60027_2: boolean;\n\n /*\n * Character overview settings\n */\n overview: OverviewSettings;\n\n /**\n * If the game's sidebar is opened\n */\n IsSidebarOpened: boolean;\n\n /**\n * Script editor theme data\n */\n EditorTheme: IScriptEditorTheme;\n}\n\n/**\n * Represents all possible settings the player wants to customize to their play style.\n */\ninterface ISettings extends IDefaultSettings {\n /**\n * What order the player's owned Augmentations/Source Files should be displayed in\n */\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting;\n\n /**\n * What order the Augmentations should be displayed in when purchasing from a Faction\n */\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;\n\n MonacoTheme: string;\n\n MonacoInsertSpaces: boolean;\n\n MonacoFontSize: number;\n\n MonacoVim: boolean;\n\n MonacoWordWrap: WordWrapOptions;\n}\n\nexport const defaultSettings: IDefaultSettings = {\n ActiveScriptsServerPageSize: 10,\n ActiveScriptsScriptPageSize: 10,\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n DisableOverviewProgressBars: false,\n EnableBashHotkeys: false,\n TimestampsFormat: \"\",\n Locale: \"en\",\n MaxRecentScriptsCapacity: 50,\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 500,\n SaveGameOnFileSave: true,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n SuppressTIXPopup: false,\n SuppressSavedGameToast: false,\n SuppressAutosaveDisabledWarnings: false,\n UseIEC60027_2: false,\n ExcludeRunningScriptsFromSave: false,\n IsSidebarOpened: true,\n\n theme: defaultTheme,\n styles: defaultStyles,\n overview: { x: 0, y: 0, opened: true },\n\n EditorTheme: defaultMonacoTheme,\n};\n\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\nexport const Settings: ISettings & ISelfInitializer & ISelfLoading = {\n ActiveScriptsServerPageSize: defaultSettings.ActiveScriptsServerPageSize,\n ActiveScriptsScriptPageSize: defaultSettings.ActiveScriptsScriptPageSize,\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n DisableOverviewProgressBars: defaultSettings.DisableOverviewProgressBars,\n EnableBashHotkeys: defaultSettings.EnableBashHotkeys,\n TimestampsFormat: defaultSettings.TimestampsFormat,\n Locale: \"en\",\n MaxRecentScriptsCapacity: defaultSettings.MaxRecentScriptsCapacity,\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SaveGameOnFileSave: defaultSettings.SaveGameOnFileSave,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n SuppressTIXPopup: defaultSettings.SuppressTIXPopup,\n SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,\n SuppressAutosaveDisabledWarnings: defaultSettings.SuppressAutosaveDisabledWarnings,\n UseIEC60027_2: defaultSettings.UseIEC60027_2,\n ExcludeRunningScriptsFromSave: defaultSettings.ExcludeRunningScriptsFromSave,\n IsSidebarOpened: defaultSettings.IsSidebarOpened,\n\n MonacoTheme: \"monokai\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 20,\n MonacoVim: false,\n MonacoWordWrap: \"off\",\n\n theme: { ...defaultTheme },\n styles: { ...defaultStyles },\n overview: defaultSettings.overview,\n EditorTheme: { ...defaultMonacoTheme },\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n const save = JSON.parse(saveString);\n Object.assign(Settings.theme, save.theme);\n delete save.theme;\n Object.assign(Settings.styles, save.styles);\n delete save.styles;\n Object.assign(Settings.overview, save.overview);\n delete save.overview;\n Object.assign(Settings.EditorTheme, save.EditorTheme);\n delete save.EditorTheme;\n Object.assign(Settings, save);\n },\n};\n","import numeral from \"numeral\";\nimport \"numeral/locales/bg\";\nimport \"numeral/locales/cs\";\nimport \"numeral/locales/da-dk\";\nimport \"numeral/locales/de\";\nimport \"numeral/locales/en-au\";\nimport \"numeral/locales/en-gb\";\nimport \"numeral/locales/es\";\nimport \"numeral/locales/fr\";\nimport \"numeral/locales/hu\";\nimport \"numeral/locales/it\";\nimport \"numeral/locales/lv\";\nimport \"numeral/locales/no\";\nimport \"numeral/locales/pl\";\nimport \"numeral/locales/ru\";\n\nimport { Settings } from \"../Settings/Settings\";\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\nconst gigaMultiplier = { standard: 1e9, iec60027_2: 2 ** 30 };\n\nclass NumeralFormatter {\n // Default Locale\n defaultLocale = \"en\";\n\n constructor() {\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l: string): boolean {\n if (numeral.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n\n numeral.locale(this.defaultLocale);\n return false;\n }\n return true;\n }\n\n format(n: number, format: string): string {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n const answer = numeral(n).format(format);\n if (answer === \"NaN\") {\n return `${n}`;\n }\n return answer;\n }\n\n formatBigNumber(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n formatReallyBigNumber(n: number, decimalPlaces = 3): string {\n const nAbs = Math.abs(n);\n if (n === Infinity) return \"∞\";\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < nAbs && nAbs <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n if (nAbs < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n: number): string {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n: number): string {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n: number): string {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatSecurity(n: number): string {\n return n.toFixed(3);\n }\n\n formatRAM(n: number): string {\n if (Settings.UseIEC60027_2) {\n return this.format(n * gigaMultiplier.iec60027_2, \"0.00ib\");\n }\n return this.format(n * gigaMultiplier.standard, \"0.00b\");\n }\n\n formatPercentage(n: number, decimalPlaces = 2): string {\n const formatter: string = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n: number): string {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n: number): string {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n: number): string {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n: number): string {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatStaneksGiftHeat(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftCharge(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftPower(n: number): string {\n return this.format(n, \"0.00\");\n }\n\n parseCustomLargeNumber(str: string): number {\n const numericRegExp = new RegExp(\"^(-?\\\\d+\\\\.?\\\\d*)([\" + extraNotations.join(\"\") + \"]?)$\");\n const match = str.match(numericRegExp);\n if (match == null) {\n return NaN;\n }\n const [, number, notation] = match;\n const notationIndex = extraNotations.indexOf(notation);\n if (notationIndex === -1) {\n return NaN;\n }\n return parseFloat(number) * extraFormats[notationIndex];\n }\n\n largestAbsoluteNumber(n1: number, n2 = 0, n3 = 0): number {\n if (isNaN(n1)) n1 = 0;\n if (isNaN(n2)) n2 = 0;\n if (isNaN(n3)) n3 = 0;\n const largestAbsolute = Math.max(Math.abs(n1), Math.abs(n2), Math.abs(n3));\n switch (largestAbsolute) {\n case Math.abs(n1):\n return n1;\n case Math.abs(n2):\n return n2;\n case Math.abs(n3):\n return n3;\n }\n return 0;\n }\n\n parseMoney(s: string): number {\n // numeral library does not handle formats like 1s (returns 1) and 1e10 (returns 110) well,\n // so if more then 1 return a valid number, return the one farthest from 0\n const numeralValue = numeral(s).value();\n const parsed = parseFloat(s);\n const selfParsed = this.parseCustomLargeNumber(s);\n // Check for one or more NaN values\n if (isNaN(parsed) && isNaN(selfParsed)) {\n if (numeralValue === null) {\n // 3x NaN\n return NaN;\n }\n // 2x NaN\n return numeralValue;\n } else if (numeralValue === null && isNaN(selfParsed)) {\n // 2x NaN\n return parsed;\n } else if (isNaN(parsed)) {\n if (numeralValue === null) {\n // 2x NaN\n return selfParsed;\n }\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, selfParsed);\n } else if (numeralValue === null) {\n // 1x NaN\n return this.largestAbsoluteNumber(parsed, selfParsed);\n } else if (isNaN(selfParsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, parsed);\n } else {\n // no NaN\n return this.largestAbsoluteNumber(numeralValue, parsed, selfParsed);\n }\n }\n}\n\nexport const numeralWrapper = new NumeralFormatter();\n","/**\n * Names of all locations\n */\nexport enum LocationName {\n // Aevum Locations\n AevumAeroCorp = \"AeroCorp\",\n AevumBachmanAndAssociates = \"Bachman & Associates\",\n AevumClarkeIncorporated = \"Clarke Incorporated\",\n AevumCrushFitnessGym = \"Crush Fitness Gym\",\n AevumECorp = \"ECorp\",\n AevumFulcrumTechnologies = \"Fulcrum Technologies\",\n AevumGalacticCybersystems = \"Galactic Cybersystems\",\n AevumNetLinkTechnologies = \"NetLink Technologies\",\n AevumPolice = \"Aevum Police Headquarters\",\n AevumRhoConstruction = \"Rho Construction\",\n AevumSnapFitnessGym = \"Snap Fitness Gym\",\n AevumSummitUniversity = \"Summit University\",\n AevumWatchdogSecurity = \"Watchdog Security\",\n AevumCasino = \"Iker Molina Casino\",\n\n // Chongqing locations\n ChongqingKuaiGongInternational = \"KuaiGong International\",\n ChongqingSolarisSpaceSystems = \"Solaris Space Systems\",\n ChongqingChurchOfTheMachineGod = \"Church of the Machine God\",\n\n // Sector 12\n Sector12AlphaEnterprises = \"Alpha Enterprises\",\n Sector12BladeIndustries = \"Blade Industries\",\n Sector12CIA = \"Central Intelligence Agency\",\n Sector12CarmichaelSecurity = \"Carmichael Security\",\n Sector12CityHall = \"Sector-12 City Hall\",\n Sector12DeltaOne = \"DeltaOne\",\n Sector12FoodNStuff = \"FoodNStuff\",\n Sector12FourSigma = \"Four Sigma\",\n Sector12IcarusMicrosystems = \"Icarus Microsystems\",\n Sector12IronGym = \"Iron Gym\",\n Sector12JoesGuns = \"Joe's Guns\",\n Sector12MegaCorp = \"MegaCorp\",\n Sector12NSA = \"National Security Agency\",\n Sector12PowerhouseGym = \"Powerhouse Gym\",\n Sector12RothmanUniversity = \"Rothman University\",\n Sector12UniversalEnergy = \"Universal Energy\",\n\n // New Tokyo\n NewTokyoDefComm = \"DefComm\",\n NewTokyoGlobalPharmaceuticals = \"Global Pharmaceuticals\",\n NewTokyoNoodleBar = \"Noodle Bar\",\n NewTokyoVitaLife = \"VitaLife\",\n NewTokyoArcade = \"Arcade\",\n\n // Ishima\n IshimaNovaMedical = \"Nova Medical\",\n IshimaOmegaSoftware = \"Omega Software\",\n IshimaStormTechnologies = \"Storm Technologies\",\n IshimaGlitch = \"0x6C1\",\n\n // Volhaven\n VolhavenCompuTek = \"CompuTek\",\n VolhavenHeliosLabs = \"Helios Labs\",\n VolhavenLexoCorp = \"LexoCorp\",\n VolhavenMilleniumFitnessGym = \"Millenium Fitness Gym\",\n VolhavenNWO = \"NWO\",\n VolhavenOmniTekIncorporated = \"OmniTek Incorporated\",\n VolhavenOmniaCybersystems = \"Omnia Cybersystems\",\n VolhavenSysCoreSecurities = \"SysCore Securities\",\n VolhavenZBInstituteOfTechnology = \"ZB Institute of Technology\",\n\n // Generic locations\n Hospital = \"Hospital\",\n Slums = \"The Slums\",\n TravelAgency = \"Travel Agency\",\n WorldStockExchange = \"World Stock Exchange\",\n\n // Default name for Location objects\n Void = \"The Void\",\n}\n","export enum AugmentationNames {\n Targeting1 = \"Augmented Targeting I\",\n Targeting2 = \"Augmented Targeting II\",\n Targeting3 = \"Augmented Targeting III\",\n SyntheticHeart = \"Synthetic Heart\",\n SynfibrilMuscle = \"Synfibril Muscle\",\n CombatRib1 = \"Combat Rib I\",\n CombatRib2 = \"Combat Rib II\",\n CombatRib3 = \"Combat Rib III\",\n NanofiberWeave = \"Nanofiber Weave\",\n SubdermalArmor = \"NEMEAN Subdermal Weave\",\n WiredReflexes = \"Wired Reflexes\",\n GrapheneBoneLacings = \"Graphene Bone Lacings\",\n BionicSpine = \"Bionic Spine\",\n GrapheneBionicSpine = \"Graphene Bionic Spine Upgrade\",\n BionicLegs = \"Bionic Legs\",\n GrapheneBionicLegs = \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor = \"Speech Processor Implant\",\n TITN41Injection = \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant = \"Enhanced Social Interaction Implant\",\n BitWire = \"BitWire\",\n ArtificialBioNeuralNetwork = \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation = \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing = \"Enhanced Myelin Sheathing\",\n SynapticEnhancement = \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement = \"Neural-Retention Enhancement\",\n DataJack = \"DataJack\",\n ENM = \"Embedded Netburner Module\",\n ENMCore = \"Embedded Netburner Module Core Implant\",\n ENMCoreV2 = \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3 = \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine = \"Embedded Netburner Module Analyze Engine\",\n ENMDMA = \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator = \"Neuralstimulator\",\n NeuralAccelerator = \"Neural Accelerator\",\n CranialSignalProcessorsG1 = \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2 = \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3 = \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4 = \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5 = \"Cranial Signal Processors - Gen V\",\n NeuronalDensification = \"Neuronal Densification\",\n NeuroreceptorManager = \"Neuroreceptor Management Implant\",\n NuoptimalInjectorImplant = \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement = \"Speech Enhancement\",\n FocusWire = \"FocusWire\",\n PCDNI = \"PC Direct-Neural Interface\",\n PCDNIOptimizer = \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork = \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix = \"PCMatrix\",\n ADRPheromone1 = \"ADR-V1 Pheromone Gene\",\n ADRPheromone2 = \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum = \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload = \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload = \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload = \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI = \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI = \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor = \"NeuroFlux Governor\",\n Neurotrainer1 = \"Neurotrainer I\",\n Neurotrainer2 = \"Neurotrainer II\",\n Neurotrainer3 = \"Neurotrainer III\",\n Hypersight = \"HyperSight Corneal Implant\",\n LuminCloaking1 = \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2 = \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator = \"HemoRecirculator\",\n SmartSonar = \"SmartSonar Implant\",\n PowerRecirculator = \"Power Recirculation Core\",\n QLink = \"QLink\",\n TheRedPill = \"The Red Pill\",\n SPTN97 = \"SPTN-97 Gene Modification\",\n HiveMind = \"ECorp HVMind Implant\",\n CordiARCReactor = \"CordiARC Fusion Reactor\",\n SmartJaw = \"SmartJaw\",\n Neotra = \"Neotra\",\n Xanipher = \"Xanipher\",\n nextSENS = \"nextSENS Gene Modification\",\n OmniTekInfoLoad = \"OmniTek InfoLoad\",\n PhotosyntheticCells = \"Photosynthetic Cells\",\n Neurolink = \"BitRunners Neurolink\",\n TheBlackHand = \"The Black Hand\",\n UnstableCircadianModulator = \"Unstable Circadian Modulator\",\n CRTX42AA = \"CRTX42-AA Gene Modification\",\n Neuregen = \"Neuregen Gene Modification\",\n CashRoot = \"CashRoot Starter Kit\",\n NutriGen = \"NutriGen Implant\",\n INFRARet = \"INFRARET Enhancement\",\n DermaForce = \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades = \"Graphene BrachiBlades Upgrade\",\n GrapheneBionicArms = \"Graphene Bionic Arms Upgrade\",\n BrachiBlades = \"BrachiBlades\",\n BionicArms = \"Bionic Arms\",\n SNA = \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm = \"Hydroflame Left Arm\",\n CongruityImplant = \"nickofolas Congruity Implant\",\n EsperEyewear = \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination = \"EMS-4 Recombination\",\n OrionShoulder = \"ORION-MKIV Shoulder\",\n HyperionV1 = \"Hyperion Plasma Cannon V1\",\n HyperionV2 = \"Hyperion Plasma Cannon V2\",\n GolemSerum = \"GOLEM Serum\",\n VangelisVirus = \"Vangelis Virus\",\n VangelisVirus3 = \"Vangelis Virus 3.0\",\n INTERLINKED = \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner = \"Blade's Runners\",\n BladeArmor = \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells = \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding = \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam = \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam = \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU = \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum = \"The Blade's Simulacrum\",\n\n StaneksGift1 = \"Stanek's Gift - Genesis\",\n StaneksGift2 = \"Stanek's Gift - Awakening\",\n StaneksGift3 = \"Stanek's Gift - Serenity\",\n\n // Infiltrators MiniGames\n MightOfAres = \"SoA - Might of Ares\", // slash\n WisdomOfAthena = \"SoA - Wisdom of Athena\", // bracket\n TrickeryOfHermes = \"SoA - Trickery of Hermes\", // cheatcode\n BeautyOfAphrodite = \"SoA - Beauty of Aphrodite\", // bribe\n ChaosOfDionysus = \"SoA - Chaos of Dionysus\", // reverse\n FloodOfPoseidon = \"SoA - Flood of Poseidon\", // hex\n HuntOfArtemis = \"SoA - Hunt of Artemis\", // mine\n KnowledgeOfApollo = \"SoA - Knowledge of Apollo\", // wire\n WKSharmonizer = \"SoA - phyzical WKS harmonizer\",\n}\n","/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nexport const CONSTANTS: {\n VersionString: string;\n VersionNumber: number;\n _idleSpeed: number;\n MaxSkillLevel: number;\n MilliPerCycle: number;\n CorpFactionRepRequirement: number;\n BaseFocusBonus: number;\n BaseCostFor1GBOfRamHome: number;\n BaseCostFor1GBOfRamServer: number;\n TravelCost: number;\n BaseFavorToDonate: number;\n DonateMoneyToRepDivisor: number;\n FactionReputationToFavorBase: number;\n FactionReputationToFavorMult: number;\n CompanyReputationToFavorBase: number;\n CompanyReputationToFavorMult: number;\n NeuroFluxGovernorLevelMult: number;\n NumNetscriptPorts: number;\n HomeComputerMaxRam: number;\n ServerBaseGrowthRate: number;\n ServerMaxGrowthRate: number;\n ServerFortifyAmount: number;\n ServerWeakenAmount: number;\n PurchasedServerLimit: number;\n PurchasedServerMaxRam: number;\n MultipleAugMultiplier: number;\n TorRouterCost: number;\n WSEAccountCost: number;\n TIXAPICost: number;\n MarketData4SCost: number;\n MarketDataTixApi4SCost: number;\n StockMarketCommission: number;\n HospitalCostPerHp: number;\n IntelligenceCrimeWeight: number;\n IntelligenceInfiltrationWeight: number;\n IntelligenceCrimeBaseExpGain: number;\n IntelligenceProgramBaseExpGain: number;\n IntelligenceGraftBaseExpGain: number;\n IntelligenceTerminalHackBaseExpGain: number;\n IntelligenceSingFnBaseExpGain: number;\n IntelligenceClassBaseExpGain: number;\n MillisecondsPer20Hours: number;\n GameCyclesPer20Hours: number;\n MillisecondsPer10Hours: number;\n GameCyclesPer10Hours: number;\n MillisecondsPer8Hours: number;\n GameCyclesPer8Hours: number;\n MillisecondsPer4Hours: number;\n GameCyclesPer4Hours: number;\n MillisecondsPer2Hours: number;\n GameCyclesPer2Hours: number;\n MillisecondsPerHour: number;\n GameCyclesPerHour: number;\n MillisecondsPerHalfHour: number;\n GameCyclesPerHalfHour: number;\n MillisecondsPerQuarterHour: number;\n GameCyclesPerQuarterHour: number;\n MillisecondsPerFiveMinutes: number;\n GameCyclesPerFiveMinutes: number;\n ClassDataStructuresBaseCost: number;\n ClassNetworksBaseCost: number;\n ClassAlgorithmsBaseCost: number;\n ClassManagementBaseCost: number;\n ClassLeadershipBaseCost: number;\n ClassGymBaseCost: number;\n ClassStudyComputerScienceBaseExp: number;\n ClassDataStructuresBaseExp: number;\n ClassNetworksBaseExp: number;\n ClassAlgorithmsBaseExp: number;\n ClassManagementBaseExp: number;\n ClassLeadershipBaseExp: number;\n CodingContractBaseFactionRepGain: number;\n CodingContractBaseCompanyRepGain: number;\n CodingContractBaseMoneyGain: number;\n AugmentationGraftingCostMult: number;\n AugmentationGraftingTimeBase: number;\n SoACostMult: number;\n SoARepMult: number;\n EntropyEffect: number;\n TotalNumBitNodes: number;\n InfiniteLoopLimit: number;\n Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG\n LatestUpdate: string;\n} = {\n VersionString: \"2.0.0\",\n VersionNumber: 21,\n\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 400e3,\n\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM\n\n // Cost to travel to another city\n TravelCost: 200e3,\n\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n\n NumNetscriptPorts: 20,\n\n // Server-related constants\n HomeComputerMaxRam: 1073741824, // 2 ^ 30\n ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened\n\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576, // 2^20\n\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n\n // TOR Router\n TorRouterCost: 200e3,\n\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain\n IntelligenceGraftBaseExpGain: 0.05,\n IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n\n // Player Work & Action\n BaseFocusBonus: 0.8,\n\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n\n // Augmentation grafting multipliers\n AugmentationGraftingCostMult: 3,\n AugmentationGraftingTimeBase: 3600000,\n\n // SoA mults\n SoACostMult: 7,\n SoARepMult: 1.3,\n\n // Value raised to the number of entropy stacks, then multiplied to player multipliers\n EntropyEffect: 0.98,\n\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n\n InfiniteLoopLimit: 2000,\n\n Donations: 21,\n\n LatestUpdate: `\nv2.0.0 - 2022-07-19 Work rework\n-------------------------------\n\n API break rewards\n\n * Everyone is awarded 10 NFG.\n * All work in progress program is auto completed.\n * All work in progress crafting is auto completed without adding entropy.\n\n Work (Create program / Work for faction / Studying / etc ...)\n\n * Working has been rebuilt from the grounds up. The motivation for that change is that all\n different types of work all required different cached variables on the main Player object.\n This caused a lot of bugs and crashes. It's been reworked in such a way as to prevent bugs\n and make it nearly trivial to add new kinds of work. However, since this caused a few API break\n I've decided to mark this version following semver protocols and call it 2.0.0\n * Crime can be unfocused and auto loops, no more spam clicking.\n * All work type give their reward immediately. No need to stop work to bank rewards like reputation.\n * Faction and Company work no longer have a time limit.\n * Company work no longer reduces rep gain by half for quitting early.\n * Company faction require 400k rep to join (from 200k)\n * Backdooring company server reduces faction requirement to 300k.\n * All work generally no longer keep track of cumulative gains like exp and reputation since it's applied instantly.\n * getPlayer returns way less fields but does return the new 'currentWork' field.\n\n API breaks\n\n * workForCompany argument 'companyName' is now not-optional\n * commitCrime now has 'focus' optional parameter\n * using getScriptIncome to get total income has been separated to getTotalScriptIncome.\n * using getScriptExpGain to get total income has been separated to getTotalScriptExpGain.\n * scp has it's 2 last argument reversed, the signature is now (files, destination, optional_source)\n * ns.connect and other singularity function are no longer available at the top level.\n They were already hidden from documentation but now they're gone.\n * stock.buy and stock.sell were renamed to stock.buyStock and stock.sellStock because 'buy' and 'sell'\n are very common tokens.\n\n Multipliers\n\n * The main player object was also plagues with a million fields all called '*_mult'. Representing the different multipliers\n * These have been refactored in a field called 'mults'.\n\n Misc. \n\n * Nerf noodle bar, obviously.\n\n`,\n};\n","import { AlertEvents } from \"./AlertManager\";\n\nimport React from \"react\";\nimport { SxProps } from \"@mui/system\";\nimport { Typography } from \"@mui/material\";\n\nexport function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {\n if (typeof txt !== \"string\") {\n AlertEvents.emit(txt);\n } else {\n AlertEvents.emit();\n }\n}\n","/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nexport enum CityName {\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n}\n","import { defaultMultipliers } from \"./BitNode\";\n\n/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\nexport interface IBitNodeMultipliers {\n /**\n * Influences how quickly the player's agility level (not exp) scales\n */\n AgilityLevelMultiplier: number;\n\n /**\n * Influences the base cost to purchase an augmentation.\n */\n AugmentationMoneyCost: number;\n\n /**\n * Influences the base rep the player must have with a faction to purchase an augmentation.\n */\n AugmentationRepCost: number;\n\n /**\n * Influences how quickly the player can gain rank within Bladeburner.\n */\n BladeburnerRank: number;\n\n /**\n * Influences the cost of skill levels from Bladeburner.\n */\n BladeburnerSkillCost: number;\n\n /**\n * Influences how quickly the player's charisma level (not exp) scales\n */\n CharismaLevelMultiplier: number;\n\n /**\n * Influences the experience gained for each ability when a player completes a class.\n */\n ClassGymExpGain: number;\n\n /**\n * Influences the amount of money gained from completing Coding Contracts\n **/\n CodingContractMoney: number;\n\n /**\n * Influences the experience gained for each ability when the player completes working their job.\n */\n CompanyWorkExpGain: number;\n\n /**\n * Influences how much money the player earns when completing working their job.\n */\n CompanyWorkMoney: number;\n\n /**\n * Influences the valuation of corporations created by the player.\n */\n CorporationValuation: number;\n\n /**\n * Influences the base experience gained for each ability when the player commits a crime.\n */\n CrimeExpGain: number;\n\n /**\n * Influences the base money gained when the player commits a crime.\n */\n CrimeMoney: number;\n\n /**\n * Influences how many Augmentations you need in order to get invited to the Daedalus faction\n */\n DaedalusAugsRequirement: number;\n\n /**\n * Influences how quickly the player's defense level (not exp) scales\n */\n DefenseLevelMultiplier: number;\n\n /**\n * Influences how quickly the player's dexterity level (not exp) scales\n */\n DexterityLevelMultiplier: number;\n\n /**\n * Influences how much rep the player gains in each faction simply by being a member.\n */\n FactionPassiveRepGain: number;\n\n /**\n * Influences the experience gained for each ability when the player completes work for a Faction.\n */\n FactionWorkExpGain: number;\n\n /**\n * Influences how much rep the player gains when performing work for a faction.\n */\n FactionWorkRepGain: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data API\n */\n FourSigmaMarketDataApiCost: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)\n */\n FourSigmaMarketDataCost: number;\n\n /**\n * Reduces gangs earning.\n */\n GangSoftcap: number;\n\n /**\n * Percentage of unique augs that the gang has.\n */\n GangUniqueAugs: number;\n\n /**\n * Influences the experienced gained when hacking a server.\n */\n HackExpGain: number;\n\n /**\n * Influences how quickly the player's hacking level (not experience) scales\n */\n HackingLevelMultiplier: number;\n\n /**\n * Influences how much money is produced by Hacknet Nodes.\n * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9)\n */\n HacknetNodeMoney: number;\n\n /**\n * Influences how much money it costs to upgrade your home computer's RAM\n */\n HomeComputerRamCost: number;\n\n /**\n * Influences how much money is gained when the player infiltrates a company.\n */\n InfiltrationMoney: number;\n\n /**\n * Influences how much rep the player can gain from factions when selling stolen documents and secrets\n */\n InfiltrationRep: number;\n\n /**\n * Influences how much money can be stolen from a server when the player performs a hack against it through\n * the Terminal.\n */\n ManualHackMoney: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerCost: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerSoftcap: number;\n\n /**\n * Influences the maximum number of purchased servers you can have\n */\n PurchasedServerLimit: number;\n\n /**\n * Influences the maximum allowed RAM for a purchased server\n */\n PurchasedServerMaxRam: number;\n /**\n * Influences the minimum favor the player must have with a faction before they can donate to gain rep.\n */\n RepToDonateToFaction: number;\n\n /**\n * Influences how much money can be stolen from a server when a script performs a hack against it.\n */\n ScriptHackMoney: number;\n\n /**\n * The amount of money actually gained when script hack a server. This is\n * different than the above because you can reduce the amount of money but\n * not gain that same amount.\n */\n ScriptHackMoneyGain: number;\n\n /**\n * Influences the growth percentage per cycle against a server.\n */\n ServerGrowthRate: number;\n\n /**\n * Influences the maxmimum money that a server can grow to.\n */\n ServerMaxMoney: number;\n\n /**\n * Influences the initial money that a server starts with.\n */\n ServerStartingMoney: number;\n\n /**\n * Influences the initial security level (hackDifficulty) of a server.\n */\n ServerStartingSecurity: number;\n\n /**\n * Influences the weaken amount per invocation against a server.\n */\n ServerWeakenRate: number;\n\n /**\n * Influences how quickly the player's strength level (not exp) scales\n */\n StrengthLevelMultiplier: number;\n\n /**\n * Influences the power of the gift.\n */\n StaneksGiftPowerMultiplier: number;\n\n /**\n * Influences the size of the gift.\n */\n StaneksGiftExtraSize: number;\n\n /**\n * Influences the hacking skill required to backdoor the world daemon.\n */\n WorldDaemonDifficulty: number;\n\n /**\n * Influences corporation dividends.\n */\n CorporationSoftcap: number;\n\n // Index signature\n [key: string]: number;\n}\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nexport const BitNodeMultipliers = Object.assign({}, defaultMultipliers);\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number | string;\n player?: IPlayer;\n}\nexport function Money(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n }\n return (\n \n {typeof props.money === \"number\" ? numeralWrapper.formatMoney(props.money) : props.money}\n \n );\n}\n","/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n\nimport { validateObject } from \"./Validator\";\n\nexport interface IReviverValue {\n ctor: string;\n data: any;\n}\n\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nexport function Reviver(key: string, value: IReviverValue | null): any {\n if (value == null) {\n return null;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.warn(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n const ctor = Reviver.constructors[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n const obj = ctor.fromJSON(value);\n if (ctor.validationData !== undefined) {\n validateObject(obj, ctor.validationData);\n }\n return obj;\n }\n }\n return value;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Reviver {\n export const constructors: { [key: string]: any } = {};\n}\n\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_toJSON(ctorName: string, obj: Record, keys?: string[]): IReviverValue {\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n const data: Record = {};\n for (let index = 0; index < keys.length; ++index) {\n const key = keys[index];\n data[key] = obj[key];\n }\n return { ctor: ctorName, data: data };\n}\n\n// A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_fromJSON(ctor: new () => T, data: any): T {\n const obj: any = new ctor();\n for (const name in data) {\n obj[name] = data[name];\n }\n return obj;\n}\n","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\nfunction convertTimeMsToTimeElapsedString(time: number, showMilli = false): string {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours: number = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay: number = secondPerHours * hoursPerDays;\n\n // Convert ms to seconds, since we only have second-level precision\n const totalSeconds: number = Math.floor(time / millisecondsPerSecond);\n\n const days: number = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays: number = totalSeconds % secondPerDay;\n\n const hours: number = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours: number = secTruncDays % secondPerHours;\n\n const minutes: number = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes: number = secTruncHours % secondPerMinute;\n\n const milliTruncSec: string = (() => {\n let str = `${time % millisecondsPerSecond}`;\n while (str.length < 3) str = \"0\" + str;\n return str;\n })();\n\n const seconds: string = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n\n let res = \"\";\n if (days > 0) {\n res += `${days} days `;\n }\n if (hours > 0) {\n res += `${hours} hours `;\n }\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n res += `${seconds} seconds`;\n\n return res;\n}\n\n// Finds the longest common starting substring in a set of strings\nfunction longestCommonStart(strings: string[]): string {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n if (strings.length === 0) {\n return \"\";\n }\n\n const A: string[] = strings.concat().sort();\n const a1: string = A[0];\n const a2: string = A[A.length - 1];\n const L: number = a1.length;\n let i = 0;\n const areEqualCaseInsensitive: EqualityFunc = (a: string, b: string) => a.toUpperCase() === b.toUpperCase();\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n}\n\n// Returns whether an array contains entirely of string objects\nfunction containsAllStrings(arr: string[]): boolean {\n return arr.every(isString);\n}\n\n// Formats a number with commas and a specific number of decimal digits\nfunction formatNumber(num: number, numFractionDigits = 0): string {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits,\n });\n}\n\n// Generates a random alphanumeric string with N characters\nfunction generateRandomString(n: number): string {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n/**\n * Hashes the input string. This is a fast hash, so NOT good for cryptography.\n * This has been ripped off here: https://stackoverflow.com/a/52171480\n * @param str The string that is to be hashed\n * @param seed A seed to randomize the result\n * @returns An hexadecimal string representation of the hashed input\n */\nfunction cyrb53(str: string, seed = 0): string {\n let h1 = 0xdeadbeef ^ seed;\n let h2 = 0x41c6ce57 ^ seed;\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);\n}\n\nfunction capitalizeFirstLetter(s: string): string {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\nfunction capitalizeEachWord(s: string): string {\n return s\n .split(\" \")\n .map((word) => capitalizeFirstLetter(word))\n .join(\" \");\n}\n\nexport {\n convertTimeMsToTimeElapsedString,\n longestCommonStart,\n containsAllStrings,\n formatNumber,\n generateRandomString,\n cyrb53,\n capitalizeFirstLetter,\n capitalizeEachWord,\n};\n","/**\n * Keyboard key codes as returned by event.key\n */\nexport enum KEY {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \" \",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n QUOTE = \"'\",\n DOUBLE_QUOTE = '\"',\n OPEN_BRACKET = \"[\",\n CLOSE_BRACKET = \"]\",\n LESS_THAN = \"<\",\n GREATER_THAN = \">\",\n OPEN_PARENTHESIS = \"(\",\n CLOSE_PARENTHESIS = \")\",\n OPEN_BRACE = \"{\",\n CLOSE_BRACE = \"}\",\n\n PIPE = \"|\",\n DOT = \".\",\n FORWARD_SLASH = \"/\",\n HYPHEN = \"-\",\n HASH = \"#\",\n\n k0 = \"0\",\n k1 = \"1\",\n k2 = \"2\",\n k3 = \"3\",\n k4 = \"4\",\n k5 = \"5\",\n k6 = \"6\",\n k7 = \"7\",\n k8 = \"8\",\n k9 = \"9\",\n\n A = \"a\",\n B = \"b\",\n C = \"c\",\n D = \"d\",\n E = \"e\",\n F = \"f\",\n G = \"g\",\n H = \"h\",\n I = \"i\",\n J = \"j\",\n K = \"k\",\n L = \"l\",\n M = \"m\",\n N = \"n\",\n O = \"o\",\n P = \"p\",\n Q = \"q\",\n R = \"r\",\n S = \"s\",\n T = \"t\",\n U = \"u\",\n V = \"v\",\n W = \"w\",\n X = \"x\",\n Y = \"y\",\n Z = \"z\",\n}\n\n/**\n * Keyboard key codes as returned by event.code\n */\nexport enum KEYCODE {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \"Space\",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n BACKWARD_SLASH = \"Backslash\",\n BACKQUOTE = \"Backquote\",\n COMMA = \"Comma\",\n DOT = \"Period\",\n EQUAL = \"Equal\",\n FORWARD_SLASH = \"Slash\",\n HYPHEN = \"Minus\",\n SEMICOLON = \"Semicolon\",\n QUOTE = \"Quote\",\n\n k0 = \"Digit0\",\n k1 = \"Digit1\",\n k2 = \"Digit2\",\n k3 = \"Digit3\",\n k4 = \"Digit4\",\n k5 = \"Digit5\",\n k6 = \"Digit6\",\n k7 = \"Digit7\",\n k8 = \"Digit8\",\n k9 = \"Digit9\",\n\n A = \"KeyA\",\n B = \"KeyB\",\n C = \"KeyC\",\n D = \"KeyD\",\n E = \"KeyE\",\n F = \"KeyF\",\n G = \"KeyG\",\n H = \"KeyH\",\n I = \"KeyI\",\n J = \"KeyJ\",\n K = \"KeyK\",\n L = \"KeyL\",\n M = \"KeyM\",\n N = \"KeyN\",\n O = \"KeyO\",\n P = \"KeyP\",\n Q = \"KeyQ\",\n R = \"KeyR\",\n S = \"KeyS\",\n T = \"KeyT\",\n U = \"KeyU\",\n V = \"KeyV\",\n W = \"KeyW\",\n X = \"KeyX\",\n Y = \"KeyY\",\n Z = \"KeyZ\",\n}\n","import { Faction } from \"../Faction/Faction\";\nimport { Location } from \"../Locations/Location\";\n\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nexport enum Page {\n ActiveScripts,\n Augmentations,\n BitVerse,\n Bladeburner,\n City,\n Corporation,\n CreateProgram,\n ScriptEditor,\n DevMenu,\n Faction,\n Factions,\n Gang,\n Hacknet,\n Infiltration,\n Job,\n Milestones,\n Options,\n Grafting,\n Sleeves,\n Stats,\n StockMarket,\n Terminal,\n Travel,\n Tutorial,\n Work,\n BladeburnerCinematic,\n Location,\n Loading,\n StaneksGift,\n Recovery,\n Achievements,\n ThemeBrowser,\n ImportSave,\n}\n\nexport interface ScriptEditorRouteOptions {\n vim: boolean;\n}\n\n/**\n * This class keeps track of player navigation/routing within the game.\n */\nexport interface IRouter {\n // toCinematicText(): void;\n // toInfiltration(): void;\n // toMission(): void;\n // toRedPill(): void;\n // toworkInProgress(): void;\n isInitialized: boolean;\n page(): Page;\n allowRouting(value: boolean): void;\n toActiveScripts(): void;\n toAugmentations(): void;\n toBitVerse(flume: boolean, quick: boolean): void;\n toBladeburner(): void;\n toStats(): void;\n toCity(): void; // travel ? city ?\n toCorporation(): void;\n toCreateProgram(): void;\n toDevMenu(): void;\n toFaction(faction: Faction, augPage?: boolean): void; // faction name\n toFactions(): void;\n toGameOptions(): void;\n toGang(): void;\n toHacknetNodes(): void;\n toInfiltration(location: Location): void;\n toJob(location: Location): void;\n toMilestones(): void;\n toGrafting(): void;\n toScriptEditor(files?: Record, options?: ScriptEditorRouteOptions): void;\n toSleeves(): void;\n toStockMarket(): void;\n toTerminal(): void;\n toTravel(): void;\n toTutorial(): void;\n toWork(): void;\n toBladeburnerCinematic(): void;\n toLocation(location: Location): void;\n toStaneksGift(): void;\n toAchievements(): void;\n toThemeBrowser(): void;\n toImportSave(base64Save: string, automatic?: boolean): void;\n}\n","import { Server } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { serverMetadata } from \"./data/servers\";\n\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\n\nimport { IMap, IMinMaxRange } from \"../types\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { isValidIPAddress } from \"../utils/helpers/isValidIPAddress\";\nimport { SpecialServers } from \"./data/SpecialServers\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\nlet AllServers: IMap = {};\n\nfunction GetServerByIP(ip: string): BaseServer | undefined {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== ip) continue;\n return server;\n }\n}\n\n//Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\nfunction GetServerByHostname(hostname: string): BaseServer | null {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.hostname == hostname) {\n return server;\n }\n }\n\n return null;\n}\n\n//Get server by IP or hostname. Returns null if invalid\nexport function GetServer(s: string): BaseServer | null {\n if (AllServers.hasOwnProperty(s)) {\n const server = AllServers[s];\n if (server) return server;\n }\n\n if (!isValidIPAddress(s)) {\n return GetServerByHostname(s);\n }\n\n const ipserver = GetServerByIP(s);\n if (ipserver !== undefined) {\n return ipserver;\n }\n\n return null;\n}\n\nexport function GetAllServers(): BaseServer[] {\n const servers: BaseServer[] = [];\n for (const key of Object.keys(AllServers)) {\n servers.push(AllServers[key]);\n }\n return servers;\n}\n\nexport function DeleteServer(serverkey: string): void {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== serverkey && server.hostname !== serverkey) continue;\n delete AllServers[key];\n break;\n }\n}\n\nexport function ipExists(ip: string): boolean {\n return AllServers[ip] != null;\n}\n\nexport function createUniqueRandomIp(): string {\n let ip: string;\n // Repeat generating ip, until unique one is found\n do {\n ip = createRandomIp();\n } while (ipExists(ip));\n\n return ip;\n}\n\n// Saftely add a Server to the AllServers map\nexport function AddToAllServers(server: Server | HacknetServer): void {\n if (GetServer(server.hostname)) {\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[server.hostname] = server;\n}\n\ninterface IServerParams {\n hackDifficulty?: number;\n hostname: string;\n ip: string;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired: number;\n organizationName: string;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport function initForeignServers(homeComputer: Server): void {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers: Server[][] = [];\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n }\n\n const toNumber = (value: number | IMinMaxRange): number => {\n if (typeof value === \"number\") return value;\n else return getRandomInt(value.min, value.max);\n };\n\n for (const metadata of serverMetadata) {\n const serverParams: IServerParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName,\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n if (metadata.hackDifficulty) serverParams.hackDifficulty = toNumber(metadata.hackDifficulty);\n if (metadata.moneyAvailable) serverParams.moneyAvailable = toNumber(metadata.moneyAvailable);\n if (metadata.requiredHackingSkill) serverParams.requiredHackingSkill = toNumber(metadata.requiredHackingSkill);\n if (metadata.serverGrowth) serverParams.serverGrowth = toNumber(metadata.serverGrowth);\n\n const server = new Server(serverParams);\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (server.hostname === SpecialServers.WorldDaemon) {\n server.requiredHackingSkill *= BitNodeMultipliers.WorldDaemonDifficulty;\n }\n AddToAllServers(server);\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n\n /* Create a randomized network for all the foreign servers */\n const linkComputers = (server1: Server, server2: Server): void => {\n server1.serversOnNetwork.push(server2.hostname);\n server2.serversOnNetwork.push(server1.hostname);\n };\n\n const getRandomArrayItem = (arr: T[]): T => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1: Server[], selectServer: () => Server): void => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n };\n\n // Connect the first tier of servers to the player's home computer\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\n\nexport function prestigeAllServers(): void {\n for (const member of Object.keys(AllServers)) {\n delete AllServers[member];\n }\n AllServers = {};\n}\n\nexport function loadAllServers(saveString: string): void {\n AllServers = JSON.parse(saveString, Reviver);\n}\n\nexport function saveAllServers(excludeRunningScripts = false): string {\n const TempAllServers = JSON.parse(JSON.stringify(AllServers), Reviver);\n for (const key of Object.keys(TempAllServers)) {\n const server = TempAllServers[key];\n if (excludeRunningScripts) {\n server.runningScripts = [];\n continue;\n }\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n return JSON.stringify(TempAllServers);\n}\n","import React, { useContext } from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"./Router\";\n\nexport const Context: {\n Player: React.Context;\n Router: React.Context;\n} = {\n Player: React.createContext({} as IPlayer),\n Router: React.createContext({} as IRouter),\n};\n\nexport const use: {\n Player: () => IPlayer;\n Router: () => IRouter;\n} = {\n Player: () => useContext(Context.Player),\n Router: () => useContext(Context.Router),\n};\n","/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\nimport { Faction } from \"./Faction\";\nimport { FactionInfos } from \"./FactionInfo\";\n\nimport { IMap } from \"../types\";\n\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Factions: IMap = {};\n\nexport function loadFactions(saveString: string): void {\n Factions = JSON.parse(saveString, Reviver);\n // safety check for when we load older save file that don't have newer factions\n for (const faction of Object.keys(Factions)) {\n try {\n Factions[faction].getInfo();\n } catch (err) {\n console.error(\"deleting \" + faction);\n delete Factions[faction];\n }\n }\n}\n\nfunction AddToFactions(faction: Faction): void {\n const name: string = faction.name;\n Factions[name] = faction;\n}\n\nexport function factionExists(name: string): boolean {\n return Factions.hasOwnProperty(name);\n}\n\nexport function initFactions(): void {\n for (const name of Object.keys(FactionInfos)) {\n resetFaction(new Faction(name));\n }\n}\n\n//Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\nfunction resetFaction(newFactionObject: Faction): void {\n if (!(newFactionObject instanceof Faction)) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n const factionName: string = newFactionObject.name;\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n AddToFactions(newFactionObject);\n}\n","// Defs for job titles, stored in arrays and categorized by job \"type\"\n\nexport const SoftwareCompanyPositions: string[] = [\n \"Software Engineering Intern\",\n \"Junior Software Engineer\",\n \"Senior Software Engineer\",\n \"Lead Software Developer\",\n \"Head of Software\",\n \"Head of Engineering\",\n \"Vice President of Technology\",\n \"Chief Technology Officer\",\n];\n\nexport const ITCompanyPositions: string[] = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\n\nexport const SecurityEngineerCompanyPositions: string[] = [\"Security Engineer\"];\n\nexport const NetworkEngineerCompanyPositions: string[] = [\"Network Engineer\", \"Network Administrator\"];\n\nexport const BusinessCompanyPositions: string[] = [\n \"Business Intern\",\n \"Business Analyst\",\n \"Business Manager\",\n \"Operations Manager\",\n \"Chief Financial Officer\",\n \"Chief Executive Officer\",\n];\n\nexport const SecurityCompanyPositions: string[] = [\n \"Police Officer\",\n \"Police Chief\",\n \"Security Guard\",\n \"Security Officer\",\n \"Security Supervisor\",\n \"Head of Security\",\n];\n\nexport const AgentCompanyPositions: string[] = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\n\nexport const MiscCompanyPositions: string[] = [\"Waiter\", \"Employee\"];\n\nexport const SoftwareConsultantCompanyPositions: string[] = [\"Software Consultant\", \"Senior Software Consultant\"];\n\nexport const BusinessConsultantCompanyPositions: string[] = [\"Business Consultant\", \"Senior Business Consultant\"];\n\nexport const PartTimeCompanyPositions: string[] = [\"Part-time Waiter\", \"Part-time Employee\"];\n","/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nexport function getRandomInt(min: number, max: number): number {\n const lower: number = Math.min(min, max);\n const upper: number = Math.max(min, max);\n\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n","// Class definition for a single Augmentation object\nimport * as React from \"react\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StaticAugmentations } from \"./StaticAugmentations\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { getBaseAugmentationPriceMultiplier, getGenericAugmentationPriceMultiplier } from \"./AugmentationHelpers\";\nimport { initSoAAugmentations } from \"./data/AugmentationCreator\";\nimport { Multipliers, defaultMultipliers } from \"../PersonObjects/Multipliers\";\n\nexport interface AugmentationCosts {\n moneyCost: number;\n repCost: number;\n}\n\nexport interface IConstructorParams {\n info: string | JSX.Element;\n stats?: JSX.Element | null;\n isSpecial?: boolean;\n moneyCost: number;\n name: string;\n prereqs?: string[];\n repCost: number;\n factions: string[];\n\n hacking?: number;\n strength?: number;\n defense?: number;\n dexterity?: number;\n agility?: number;\n charisma?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n hacking_chance?: number;\n hacking_speed?: number;\n hacking_money?: number;\n hacking_grow?: number;\n company_rep?: number;\n faction_rep?: number;\n crime_money?: number;\n crime_success?: number;\n work_money?: number;\n hacknet_node_money?: number;\n hacknet_node_purchase_cost?: number;\n hacknet_node_ram_cost?: number;\n hacknet_node_core_cost?: number;\n hacknet_node_level_cost?: number;\n bladeburner_max_stamina?: number;\n bladeburner_stamina_gain?: number;\n bladeburner_analysis?: number;\n bladeburner_success_chance?: number;\n infiltration_base_rep_increase?: number;\n infiltration_rep?: number;\n infiltration_trade?: number;\n infiltration_sell?: number;\n infiltration_timer?: number;\n infiltration_damage_reduction?: number;\n\n startingMoney?: number;\n programs?: string[];\n}\n\nfunction generateStatsDescription(mults: Multipliers, programs?: string[], startingMoney?: number): JSX.Element {\n const f = (x: number, decimals = 0): string => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return numeralWrapper.formatPercentage(x, decimals);\n };\n let desc = <>Effects:;\n\n if (\n mults.hacking !== 1 &&\n mults.hacking == mults.strength &&\n mults.hacking == mults.defense &&\n mults.hacking == mults.dexterity &&\n mults.hacking == mults.agility &&\n mults.hacking == mults.charisma\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking - 1)} all skills\n \n );\n } else {\n if (mults.hacking !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking - 1)} hacking skill\n \n );\n\n if (\n mults.strength !== 1 &&\n mults.strength == mults.defense &&\n mults.strength == mults.dexterity &&\n mults.strength == mults.agility\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength - 1)} combat skills\n \n );\n } else {\n if (mults.strength !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.strength - 1)} strength skill\n \n );\n if (mults.defense !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.defense - 1)} defense skill\n \n );\n if (mults.dexterity !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity - 1)} dexterity skill\n \n );\n if (mults.agility !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.agility - 1)} agility skill\n \n );\n }\n if (mults.charisma !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma - 1)} charisma skill\n \n );\n }\n\n if (\n mults.hacking_exp !== 1 &&\n mults.hacking_exp === mults.strength_exp &&\n mults.hacking_exp === mults.defense_exp &&\n mults.hacking_exp === mults.dexterity_exp &&\n mults.hacking_exp === mults.agility_exp &&\n mults.hacking_exp === mults.charisma_exp\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp - 1)} exp for all skills\n \n );\n } else {\n if (mults.hacking_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp - 1)} hacking exp\n \n );\n\n if (\n mults.strength_exp !== 1 &&\n mults.strength_exp === mults.defense_exp &&\n mults.strength_exp === mults.dexterity_exp &&\n mults.strength_exp === mults.agility_exp\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp - 1)} combat exp\n \n );\n } else {\n if (mults.strength_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp - 1)} strength exp\n \n );\n if (mults.defense_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_exp - 1)} defense exp\n \n );\n if (mults.dexterity_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_exp - 1)} dexterity exp\n \n );\n if (mults.agility_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_exp - 1)} agility exp\n \n );\n }\n if (mults.charisma_exp !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_exp - 1)} charisma exp\n \n );\n }\n\n if (mults.hacking_speed !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_speed - 1)} faster hack(), grow(), and weaken()\n \n );\n if (mults.hacking_chance !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_chance - 1)} hack() success chance\n \n );\n if (mults.hacking_money !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_money - 1)} hack() power\n \n );\n if (mults.hacking_grow !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_grow - 1)} grow() power\n \n );\n\n if (mults.faction_rep !== 1 && mults.faction_rep === mults.company_rep) {\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep - 1)} reputation from factions and companies\n \n );\n } else {\n if (mults.faction_rep !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep - 1)} reputation from factions\n \n );\n if (mults.company_rep !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.company_rep - 1)} reputation from companies\n \n );\n }\n\n if (mults.crime_money !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_money - 1)} crime money\n \n );\n if (mults.crime_success !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_success - 1)} crime success rate\n \n );\n if (mults.work_money !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.work_money - 1)} work money\n \n );\n\n if (mults.hacknet_node_money !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.hacknet_node_money - 1)} hacknet production\n \n );\n if (mults.hacknet_node_purchase_cost !== 1)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_purchase_cost - 1))} hacknet nodes cost\n \n );\n if (mults.hacknet_node_level_cost !== 1)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_level_cost - 1))} hacknet nodes upgrade cost\n \n );\n\n if (mults.bladeburner_max_stamina !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_max_stamina - 1)} Bladeburner Max Stamina\n \n );\n if (mults.bladeburner_stamina_gain !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_stamina_gain - 1)} Bladeburner Stamina gain\n \n );\n if (mults.bladeburner_analysis !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_analysis - 1)} Bladeburner Field Analysis effectiveness\n \n );\n if (mults.bladeburner_success_chance !== 1)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_success_chance - 1)} Bladeburner Contracts and Operations success chance\n \n );\n if (startingMoney)\n desc = (\n <>\n {desc}\n
\n Start with after installing Augmentations.\n \n );\n\n if (programs)\n desc = (\n <>\n {desc}\n
\n Start with {programs.join(\" and \")} after installing Augmentations.\n \n );\n return desc;\n}\n\nexport class Augmentation {\n // How much money this costs to buy before multipliers\n baseCost = 0;\n\n // How much faction reputation is required to unlock this before multipliers\n baseRepRequirement = 0;\n\n // Description of what this Aug is and what it does\n info: string | JSX.Element;\n\n // Description of the stats, often autogenerated, sometimes manually written.\n stats: JSX.Element | null;\n\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n isSpecial = false;\n\n // Name of Augmentation\n name = \"\";\n\n // Array of names of all prerequisites\n prereqs: string[] = [];\n\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n mults: Multipliers = defaultMultipliers();\n\n // Factions that offer this aug.\n factions: string[] = [];\n\n constructor(\n params: IConstructorParams = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0,\n factions: [],\n },\n ) {\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n\n this.baseRepRequirement = params.repCost;\n Object.freeze(this.baseRepRequirement);\n this.baseCost = params.moneyCost;\n Object.freeze(this.baseCost);\n this.factions = params.factions;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n // Set multipliers\n if (params.hacking) {\n this.mults.hacking = params.hacking;\n }\n if (params.strength) {\n this.mults.strength = params.strength;\n }\n if (params.defense) {\n this.mults.defense = params.defense;\n }\n if (params.dexterity) {\n this.mults.dexterity = params.dexterity;\n }\n if (params.agility) {\n this.mults.agility = params.agility;\n }\n if (params.charisma) {\n this.mults.charisma = params.charisma;\n }\n if (params.hacking_exp) {\n this.mults.hacking_exp = params.hacking_exp;\n }\n if (params.strength_exp) {\n this.mults.strength_exp = params.strength_exp;\n }\n if (params.defense_exp) {\n this.mults.defense_exp = params.defense_exp;\n }\n if (params.dexterity_exp) {\n this.mults.dexterity_exp = params.dexterity_exp;\n }\n if (params.agility_exp) {\n this.mults.agility_exp = params.agility_exp;\n }\n if (params.charisma_exp) {\n this.mults.charisma_exp = params.charisma_exp;\n }\n if (params.hacking_chance) {\n this.mults.hacking_chance = params.hacking_chance;\n }\n if (params.hacking_speed) {\n this.mults.hacking_speed = params.hacking_speed;\n }\n if (params.hacking_money) {\n this.mults.hacking_money = params.hacking_money;\n }\n if (params.hacking_grow) {\n this.mults.hacking_grow = params.hacking_grow;\n }\n if (params.company_rep) {\n this.mults.company_rep = params.company_rep;\n }\n if (params.faction_rep) {\n this.mults.faction_rep = params.faction_rep;\n }\n if (params.crime_money) {\n this.mults.crime_money = params.crime_money;\n }\n if (params.crime_success) {\n this.mults.crime_success = params.crime_success;\n }\n if (params.work_money) {\n this.mults.work_money = params.work_money;\n }\n if (params.hacknet_node_money) {\n this.mults.hacknet_node_money = params.hacknet_node_money;\n }\n if (params.hacknet_node_purchase_cost) {\n this.mults.hacknet_node_purchase_cost = params.hacknet_node_purchase_cost;\n }\n if (params.hacknet_node_ram_cost) {\n this.mults.hacknet_node_ram_cost = params.hacknet_node_ram_cost;\n }\n if (params.hacknet_node_core_cost) {\n this.mults.hacknet_node_core_cost = params.hacknet_node_core_cost;\n }\n if (params.hacknet_node_level_cost) {\n this.mults.hacknet_node_level_cost = params.hacknet_node_level_cost;\n }\n if (params.bladeburner_max_stamina) {\n this.mults.bladeburner_max_stamina = params.bladeburner_max_stamina;\n }\n if (params.bladeburner_stamina_gain) {\n this.mults.bladeburner_stamina_gain = params.bladeburner_stamina_gain;\n }\n if (params.bladeburner_analysis) {\n this.mults.bladeburner_analysis = params.bladeburner_analysis;\n }\n if (params.bladeburner_success_chance) {\n this.mults.bladeburner_success_chance = params.bladeburner_success_chance;\n }\n\n if (params.stats === undefined)\n this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n else this.stats = params.stats;\n }\n\n // Adds this Augmentation to the specified Factions\n addToFactions(factionList: string[]): void {\n for (let i = 0; i < factionList.length; ++i) {\n const faction: Faction | null = Factions[factionList[i]];\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n faction.augmentations.push(this.name);\n }\n }\n\n getCost(player: IPlayer): AugmentationCosts {\n const augmentationReference = StaticAugmentations[this.name];\n let moneyCost = augmentationReference.baseCost;\n let repCost = augmentationReference.baseRepRequirement;\n\n if (augmentationReference.name === AugmentationNames.NeuroFluxGovernor) {\n let nextLevel = this.getLevel(player);\n --nextLevel;\n const multiplier = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n repCost = augmentationReference.baseRepRequirement * multiplier * BitNodeMultipliers.AugmentationRepCost;\n moneyCost = augmentationReference.baseCost * multiplier * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n moneyCost *= getBaseAugmentationPriceMultiplier();\n }\n } else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) {\n const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name);\n const soaMultiplier = Math.pow(\n CONSTANTS.SoACostMult,\n soaAugmentationNames.filter((augmentationName) => player.hasAugmentation(augmentationName)).length,\n );\n moneyCost = augmentationReference.baseCost * soaMultiplier;\n if (soaAugmentationNames.find((augmentationName) => augmentationName === augmentationReference.name)) {\n repCost = augmentationReference.baseRepRequirement * soaMultiplier;\n }\n } else {\n moneyCost =\n augmentationReference.baseCost *\n getGenericAugmentationPriceMultiplier() *\n BitNodeMultipliers.AugmentationMoneyCost;\n repCost = augmentationReference.baseRepRequirement * BitNodeMultipliers.AugmentationRepCost;\n }\n return { moneyCost, repCost };\n }\n\n getLevel(player: IPlayer): number {\n // Get current Neuroflux level based on Player's augmentations\n if (this.name === AugmentationNames.NeuroFluxGovernor) {\n let currLevel = 0;\n for (let i = 0; i < player.augmentations.length; ++i) {\n if (player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n if (player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n }\n return 0;\n }\n\n // Adds this Augmentation to all Factions\n addToAllFactions(): void {\n for (const fac of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(fac)) {\n const facObj: Faction | null = Factions[fac];\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n if (facObj.getInfo().special) continue;\n facObj.augmentations.push(this.name);\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Augmentation\", this);\n }\n\n // Initiatizes a Augmentation object from a JSON save state.\n static fromJSON(value: IReviverValue): Augmentation {\n return Generic_fromJSON(Augmentation, value.data);\n }\n}\n\nReviver.constructors.Augmentation = Augmentation;\n","import { CityName } from \"./../../Locations/data/CityNames\";\nconst CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nexport const CorporationConstants: {\n INITIALSHARES: number;\n SHARESPERPRICEUPDATE: number;\n IssueNewSharesCooldown: number;\n SellSharesCooldown: number;\n CyclesPerMarketCycle: number;\n CyclesPerIndustryStateCycle: number;\n SecsPerMarketCycle: number;\n Cities: string[];\n WarehouseInitialCost: number;\n WarehouseInitialSize: number;\n WarehouseUpgradeBaseCost: number;\n OfficeInitialCost: number;\n OfficeInitialSize: number;\n OfficeUpgradeBaseCost: number;\n BribeThreshold: number;\n BribeToRepRatio: number;\n ProductProductionCostRatio: number;\n DividendMaxRate: number;\n EmployeeSalaryMultiplier: number;\n CyclesPerEmployeeRaise: number;\n EmployeeRaiseAmount: number;\n BaseMaxProducts: number;\n AllCorporationStates: string[];\n AllMaterials: string[];\n FundingRoundShares: number[];\n FundingRoundMultiplier: number[];\n AvgProfitLength: number;\n} = {\n INITIALSHARES: 1e9, //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6, //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3, // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3, // 1 Hour in terms of game cycles\n\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n\n Cities: [\n CityName.Aevum,\n CityName.Chongqing,\n CityName.Sector12,\n CityName.NewTokyo,\n CityName.Ishima,\n CityName.Volhaven,\n ],\n\n WarehouseInitialCost: 5e9, //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n\n BribeThreshold: 100e12, //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9, //Bribe Value divided by this = rep gain\n\n ProductProductionCostRatio: 5, //Ratio of material cost of a product to its production cost\n\n DividendMaxRate: 1,\n\n EmployeeSalaryMultiplier: 3, // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400, // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50, // Employee salary increases by this (additive)\n\n BaseMaxProducts: 3, // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\n \"Water\",\n \"Energy\",\n \"Food\",\n \"Plants\",\n \"Metal\",\n \"Hardware\",\n \"Chemicals\",\n \"Drugs\",\n \"Robots\",\n \"AI Cores\",\n \"Real Estate\",\n ],\n FundingRoundShares: [0.1, 0.35, 0.25, 0.2],\n FundingRoundMultiplier: [4, 3, 3, 2.5],\n\n AvgProfitLength: 1,\n};\n","import { Theme } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\nimport Fade from \"@mui/material/Fade\";\nimport M from \"@mui/material/Modal\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { SxProps } from \"@mui/system\";\nimport React from \"react\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.default,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: `0px 3px 5px -1px ${theme.palette.primary.dark},0px 5px 8px 0px ${theme.palette.primary.dark},0px 1px 14px 0px ${theme.palette.primary.dark}`,\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n },\n }),\n);\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: React.ReactNode;\n sx?: SxProps;\n}\n\nexport const Modal = (props: IProps): React.ReactElement => {\n const classes = useStyles();\n return (\n \n \n
\n {props.children}\n
\n
\n \n );\n};\n","export const HacknetNodeConstants: {\n // Constants for Hacknet Node production\n MoneyGainPerLevel: number;\n\n // Constants for Hacknet Node purchase/upgrade costs\n BaseCost: number;\n LevelBaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n\n PurchaseNextMult: number;\n UpgradeLevelMult: number;\n UpgradeRamMult: number;\n UpgradeCoreMult: number;\n\n // Constants for max upgrade levels for Hacknet Nodes\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n} = {\n MoneyGainPerLevel: 1.5,\n\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16,\n};\n\nexport const PurchaseMultipliers: {\n [key: string]: number | \"MAX\" | undefined;\n x1: number;\n x5: number;\n x10: number;\n MAX: \"MAX\";\n} = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\",\n};\n\nexport const HacknetServerConstants: {\n // Constants for Hacknet Server stats/production\n HashesPerLevel: number;\n\n // Constants for Hacknet Server purchase/upgrade costs\n BaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n CacheBaseCost: number;\n\n PurchaseMult: number; // Multiplier for puchasing an additional Hacknet Server\n UpgradeLevelMult: number; // Multiplier for cost when upgrading level\n UpgradeRamMult: number; // Multiplier for cost when upgrading RAM\n UpgradeCoreMult: number; // Multiplier for cost when buying another core\n UpgradeCacheMult: number; // Multiplier for cost when upgrading cache\n MaxServers: number; // Max number of Hacknet Servers you can own\n\n // Constants for max upgrade levels for Hacknet Server\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n MaxCache: number;\n} = {\n HashesPerLevel: 0.001,\n\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n\n MaxServers: 20,\n\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15,\n};\n","import { IMap } from \"../types\";\n\nexport const EmployeePositions: IMap = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\",\n};\n","// Action Identifier enum\nexport const ActionTypes: {\n [key: string]: number;\n Idle: number;\n Contract: number;\n Operation: number;\n BlackOp: number;\n BlackOperation: number;\n Training: number;\n Recruitment: number;\n FieldAnalysis: number;\n \"Field Analysis\": number;\n Diplomacy: number;\n \"Hyperbolic Regeneration Chamber\": number;\n \"Incite Violence\": number;\n} = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9,\n \"Incite Violence\": 10,\n};\n","import { Player } from \"./Player\";\n\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { ITutorialEvents } from \"./ui/InteractiveTutorial/ITutorialEvents\";\n\n// Ordered array of keys to Interactive Tutorial Steps\nenum iTutorialSteps {\n Start,\n NSSelection,\n GoToCharacterPage, // Click on 'Stats' page\n CharacterPage, // Introduction to 'Stats' page\n CharacterGoToTerminalPage, // Go back to Terminal\n TerminalIntro, // Introduction to Terminal\n TerminalHelp, // Using 'help' Terminal command\n TerminalLs, // Using 'ls' Terminal command\n TerminalScan, // Using 'scan' Terminal command\n TerminalScanAnalyze1, // Using 'scan-analyze' Terminal command\n TerminalScanAnalyze2, // Using 'scan-analyze 3' Terminal command\n TerminalConnect, // Connecting to n00dles\n TerminalAnalyze, // Analyzing n00dles\n TerminalNuke, // NUKE n00dles\n TerminalManualHack, // Hack n00dles\n TerminalHackingMechanics, // Explanation of hacking mechanics\n TerminalGoHome, // Go home before creating a script.\n TerminalCreateScript, // Create a script using 'nano'\n TerminalTypeScript, // Script Editor page - Type script and then save & close\n TerminalFree, // Using 'Free' Terminal command\n TerminalRunScript, // Running script using 'run' Terminal command\n TerminalGoToActiveScriptsPage,\n ActiveScriptsPage,\n ActiveScriptsToTerminal,\n TerminalTailScript,\n GoToHacknetNodesPage,\n HacknetNodesIntroduction,\n HacknetNodesGoToWorldPage,\n WorldDescription,\n TutorialPageInfo,\n End,\n}\n\nconst ITutorial: {\n currStep: iTutorialSteps;\n isRunning: boolean;\n stepIsDone: {\n [iTutorialSteps.Start]: boolean;\n [iTutorialSteps.NSSelection]: boolean;\n [iTutorialSteps.GoToCharacterPage]: boolean;\n [iTutorialSteps.CharacterPage]: boolean;\n [iTutorialSteps.CharacterGoToTerminalPage]: boolean;\n [iTutorialSteps.TerminalIntro]: boolean;\n [iTutorialSteps.TerminalHelp]: boolean;\n [iTutorialSteps.TerminalLs]: boolean;\n [iTutorialSteps.TerminalScan]: boolean;\n [iTutorialSteps.TerminalScanAnalyze1]: boolean;\n [iTutorialSteps.TerminalScanAnalyze2]: boolean;\n [iTutorialSteps.TerminalConnect]: boolean;\n [iTutorialSteps.TerminalAnalyze]: boolean;\n [iTutorialSteps.TerminalNuke]: boolean;\n [iTutorialSteps.TerminalManualHack]: boolean;\n [iTutorialSteps.TerminalHackingMechanics]: boolean;\n [iTutorialSteps.TerminalGoHome]: boolean;\n [iTutorialSteps.TerminalCreateScript]: boolean;\n [iTutorialSteps.TerminalTypeScript]: boolean;\n [iTutorialSteps.TerminalFree]: boolean;\n [iTutorialSteps.TerminalRunScript]: boolean;\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsToTerminal]: boolean;\n [iTutorialSteps.TerminalTailScript]: boolean;\n [iTutorialSteps.GoToHacknetNodesPage]: boolean;\n [iTutorialSteps.HacknetNodesIntroduction]: boolean;\n [iTutorialSteps.HacknetNodesGoToWorldPage]: boolean;\n [iTutorialSteps.WorldDescription]: boolean;\n [iTutorialSteps.TutorialPageInfo]: boolean;\n [iTutorialSteps.End]: boolean;\n };\n} = {\n currStep: iTutorialSteps.Start,\n isRunning: false,\n\n // Keeps track of whether each step has been done\n stepIsDone: {\n [iTutorialSteps.Start]: false,\n [iTutorialSteps.NSSelection]: false,\n [iTutorialSteps.GoToCharacterPage]: false,\n [iTutorialSteps.CharacterPage]: false,\n [iTutorialSteps.CharacterGoToTerminalPage]: false,\n [iTutorialSteps.TerminalIntro]: false,\n [iTutorialSteps.TerminalHelp]: false,\n [iTutorialSteps.TerminalLs]: false,\n [iTutorialSteps.TerminalScan]: false,\n [iTutorialSteps.TerminalScanAnalyze1]: false,\n [iTutorialSteps.TerminalScanAnalyze2]: false,\n [iTutorialSteps.TerminalConnect]: false,\n [iTutorialSteps.TerminalAnalyze]: false,\n [iTutorialSteps.TerminalNuke]: false,\n [iTutorialSteps.TerminalManualHack]: false,\n [iTutorialSteps.TerminalHackingMechanics]: false,\n [iTutorialSteps.TerminalGoHome]: false,\n [iTutorialSteps.TerminalCreateScript]: false,\n [iTutorialSteps.TerminalTypeScript]: false,\n [iTutorialSteps.TerminalFree]: false,\n [iTutorialSteps.TerminalRunScript]: false,\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsToTerminal]: false,\n [iTutorialSteps.TerminalTailScript]: false,\n [iTutorialSteps.GoToHacknetNodesPage]: false,\n [iTutorialSteps.HacknetNodesIntroduction]: false,\n [iTutorialSteps.HacknetNodesGoToWorldPage]: false,\n [iTutorialSteps.WorldDescription]: false,\n [iTutorialSteps.TutorialPageInfo]: false,\n [iTutorialSteps.End]: false,\n },\n};\n\nfunction iTutorialStart(): void {\n ITutorial.isRunning = true;\n ITutorial.currStep = iTutorialSteps.Start;\n}\n\n// Go to the next step and evaluate it\nfunction iTutorialNextStep(): void {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n if (ITutorial.currStep === iTutorialSteps.End) iTutorialEnd();\n ITutorialEvents.emit();\n}\n\n// Go to previous step and evaluate\nfunction iTutorialPrevStep(): void {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n ITutorialEvents.emit();\n}\n\nfunction iTutorialEnd(): void {\n ITutorial.isRunning = false;\n ITutorial.currStep = iTutorialSteps.Start;\n Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);\n ITutorialEvents.emit();\n}\n\nexport { iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial, iTutorialPrevStep };\n","// Class representing a single hackable Server\nimport { BaseServer } from \"./BaseServer\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { createRandomString } from \"../utils/helpers/createRandomString\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n adminRights?: boolean;\n hackDifficulty?: number;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired?: number;\n organizationName?: string;\n purchasedByPlayer?: boolean;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport class Server extends BaseServer {\n // Flag indicating whether this server has a backdoor installed by a player\n backdoorInstalled = false;\n\n // Initial server security level\n // (i.e. security level when the server was created)\n baseDifficulty = 1;\n\n // Server Security Level\n hackDifficulty = 1;\n\n // Minimum server security level that this server can be weakened to\n minDifficulty = 1;\n\n // How much money currently resides on the server and can be hacked\n moneyAvailable = 0;\n\n // Maximum amount of money that this server can hold\n moneyMax = 0;\n\n // Number of open ports required in order to gain admin/root access\n numOpenPortsRequired = 5;\n\n // How many ports are currently opened on the server\n openPortCount = 0;\n\n // Hacking level required to hack this server\n requiredHackingSkill = 1;\n\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n serverGrowth = 1;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = createRandomString(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false;\n\n //RAM, CPU speed and Scripts\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable =\n params.moneyAvailable != null ? params.moneyAvailable * BitNodeMultipliers.ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;\n\n //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n this.hackDifficulty =\n params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n\n //Port information, required for porthacking servers to get admin rights\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n capDifficulty(): void {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n }\n\n // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n changeMinimumSecurity(n: number, perc = false): void {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n }\n\n // Server security cannot go below 1\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n */\n changeMaximumMoney(n: number): void {\n const softCap = 10e12;\n if (this.moneyMax > softCap) {\n const aboveCap = this.moneyMax - softCap;\n n = 1 + (n - 1) / Math.log(aboveCap) / Math.log(8);\n }\n\n this.moneyMax *= n;\n }\n\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n fortify(amt: number): void {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n weaken(amt: number): void {\n this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;\n this.capDifficulty();\n }\n\n /**\n * Serialize the current object to a JSON save state\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Server\", this);\n }\n\n // Initializes a Server Object from a JSON save state\n static fromJSON(value: IReviverValue): Server {\n return Generic_fromJSON(Server, value.data);\n }\n}\n\nReviver.constructors.Server = Server;\n","import React, { useContext } from \"react\";\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\n\nexport const Context: {\n Corporation: React.Context;\n Division: React.Context;\n} = {\n Corporation: React.createContext({} as ICorporation),\n Division: React.createContext({} as IIndustry),\n};\n\nexport const useCorporation = (): ICorporation => useContext(Context.Corporation);\nexport const useDivision = (): IIndustry => useContext(Context.Division);\n","import React from \"react\";\nimport { ResearchTree } from \"./ResearchTree\";\nimport { ICorporation } from \"./ICorporation\";\nimport { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from \"./data/BaseResearchTree\";\nimport { MoneyCost } from \"./ui/MoneyCost\";\n\ninterface IIndustryMap {\n [key: string]: T | undefined;\n Energy: T;\n Utilities: T;\n Agriculture: T;\n Fishing: T;\n Mining: T;\n Food: T;\n Tobacco: T;\n Chemical: T;\n Pharmaceutical: T;\n Computer: T;\n Robotics: T;\n Software: T;\n Healthcare: T;\n RealEstate: T;\n}\n\n// Map of official names for each Industry\nexport const Industries: IIndustryMap = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\",\n};\n\n// Map of how much money it takes to start each industry\nexport const IndustryStartingCosts: IIndustryMap = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9,\n};\n\n// Map of description for each industry\nexport const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {\n Energy: (corp: ICorporation) => (\n <>\n Engage in the production and distribution of energy.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Utilities: (corp: ICorporation) => (\n <>\n Distribute water and provide wastewater services.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Agriculture: (corp: ICorporation) => (\n <>\n Cultivate crops and breed livestock to produce food.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Fishing: (corp: ICorporation) => (\n <>\n Produce food through the breeding and processing of fish and fish products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Mining: (corp: ICorporation) => (\n <>\n Extract and process metals from the earth.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Food: (corp: ICorporation) => (\n <>\n Create your own restaurants all around the world.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Tobacco: (corp: ICorporation) => (\n <>\n Create and distribute tobacco and tobacco-related products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Chemical: (corp: ICorporation) => (\n <>\n Produce industrial chemicals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Pharmaceutical: (corp: ICorporation) => (\n <>\n Discover, develop, and create new pharmaceutical drugs.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Computer: (corp: ICorporation) => (\n <>\n Develop and manufacture new computer hardware and networking infrastructures.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Robotics: (corp: ICorporation) => (\n <>\n Develop and create robots.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Software: (corp: ICorporation) => (\n <>\n Develop computer software and create AI Cores.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Healthcare: (corp: ICorporation) => (\n <>\n Create and manage hospitals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n RealEstate: (corp: ICorporation) => (\n <>\n Develop and manage real estate properties.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n};\n\n// Map of available Research for each Industry. This data is held in a\n// ResearchTree object\nexport const IndustryResearchTrees: IIndustryMap = {\n Energy: getBaseResearchTreeCopy(),\n Utilities: getBaseResearchTreeCopy(),\n Agriculture: getBaseResearchTreeCopy(),\n Fishing: getBaseResearchTreeCopy(),\n Mining: getBaseResearchTreeCopy(),\n Food: getProductIndustryResearchTreeCopy(),\n Tobacco: getProductIndustryResearchTreeCopy(),\n Chemical: getBaseResearchTreeCopy(),\n Pharmaceutical: getProductIndustryResearchTreeCopy(),\n Computer: getProductIndustryResearchTreeCopy(),\n Robotics: getProductIndustryResearchTreeCopy(),\n Software: getProductIndustryResearchTreeCopy(),\n Healthcare: getProductIndustryResearchTreeCopy(),\n RealEstate: getProductIndustryResearchTreeCopy(),\n};\n\nexport function resetIndustryResearchTrees(): void {\n IndustryResearchTrees.Energy = getBaseResearchTreeCopy();\n IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();\n IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();\n IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();\n IndustryResearchTrees.Mining = getBaseResearchTreeCopy();\n IndustryResearchTrees.Food = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Tobacco = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Pharmaceutical = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Computer = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Robotics = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Software = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Healthcare = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.RealEstate = getProductIndustryResearchTreeCopy();\n}\n","/**\n * Enum defining the different types of possible locations\n */\nexport enum LocationType {\n Company,\n Gym,\n Hospital,\n Slums,\n Special, // This location has special options/activities (e.g. Bladeburner, Re-sleeving)\n StockMarket,\n TechVendor,\n TravelAgency,\n University,\n Casino,\n}\n","/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\nimport { HacknetNode } from \"./HacknetNode\";\nimport { calculateNodeCost } from \"./formulas/HacknetNodes\";\nimport { calculateServerCost } from \"./formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"./data/Constants\";\nimport { HacknetServer } from \"./HacknetServer\";\nimport { HashManager } from \"./HashManager\";\nimport { HashUpgrades } from \"./HashUpgrades\";\n\nimport { generateRandomContract } from \"../CodingContractGenerator\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../InteractiveTutorial\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Server } from \"../Server/Server\";\n\n// Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\nexport function hasHacknetServers(player: IPlayer): boolean {\n return player.bitNodeN === 9 || player.sourceFileLvl(9) > 0;\n}\n\nexport function purchaseHacknet(player: IPlayer): number {\n /* INTERACTIVE TUTORIAL */\n if (ITutorial.isRunning) {\n if (ITutorial.currStep === iTutorialSteps.HacknetNodesIntroduction) {\n iTutorialNextStep();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n const numOwned = player.hacknetNodes.length;\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {\n return -1;\n }\n player.loseMoney(cost, \"hacknet_expenses\");\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n // Auto generate a name for the Node\n const name = \"hacknet-node-\" + numOwned;\n const node = new HacknetNode(name, player.mults.hacknet_node_money);\n\n player.loseMoney(cost, \"hacknet_expenses\");\n player.hacknetNodes.push(node);\n\n return numOwned;\n }\n}\n\nexport function hasMaxNumberHacknetServers(player: IPlayer): boolean {\n return hasHacknetServers(player) && player.hacknetNodes.length >= HacknetServerConstants.MaxServers;\n}\n\nexport function getCostOfNextHacknetNode(player: IPlayer): number {\n return calculateNodeCost(player.hacknetNodes.length + 1, player.mults.hacknet_node_purchase_cost);\n}\n\nexport function getCostOfNextHacknetServer(player: IPlayer): number {\n return calculateServerCost(player.hacknetNodes.length + 1, player.mults.hacknet_node_purchase_cost);\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\nexport function getMaxNumberLevelUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateLevelUpgradeCost(1, player.mults.hacknet_node_level_cost)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n if (player.money > nodeObj.calculateLevelUpgradeCost(levelsToMax, player.mults.hacknet_node_level_cost)) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr !== maxLevel &&\n player.money > nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost) &&\n player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.mults.hacknet_node_level_cost)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\nexport function getMaxNumberRamUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateRamUpgradeCost(1, player.mults.hacknet_node_ram_cost)) {\n return 0;\n }\n\n let levelsToMax;\n if (nodeObj instanceof HacknetServer) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.mults.hacknet_node_ram_cost)) {\n return levelsToMax;\n }\n\n //We'll just loop until we find the max\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money > nodeObj.calculateRamUpgradeCost(i, player.mults.hacknet_node_ram_cost)) {\n return i;\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\nexport function getMaxNumberCoreUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateCoreUpgradeCost(1, player.mults.hacknet_node_core_cost)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.mults.hacknet_node_core_cost)) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.money > nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost) &&\n player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.mults.hacknet_node_core_cost)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\nexport function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServer, maxLevel: number): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) &&\n !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))\n ) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\nexport function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.mults.hacknet_node_level_cost);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // If we're at max level, return false\n if (node.level >= (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n if (node.level + sanitizedLevels > (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeLevel(sanitizedLevels, player.mults.hacknet_node_money);\n\n return true;\n}\n\nexport function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.mults.hacknet_node_ram_cost);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof HacknetServer && node.maxRam >= HacknetServerConstants.MaxRam) {\n return false;\n }\n\n if (node instanceof HacknetNode && node.ram >= HacknetNodeConstants.MaxRam) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n if (node instanceof HacknetServer) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > HacknetServerConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetServerConstants.MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof HacknetNode) {\n if (node.ram * Math.pow(2, sanitizedLevels) > HacknetNodeConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetNodeConstants.MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeRam(sanitizedLevels, player.mults.hacknet_node_money);\n\n return true;\n}\n\nexport function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.mults.hacknet_node_core_cost);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // Fail if we're already at max\n if (node.cores >= (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n return false;\n }\n\n // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n if (node.cores + sanitizedLevels > (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCore(sanitizedLevels, player.mults.hacknet_node_money);\n\n return true;\n}\n\nexport function purchaseCacheUpgrade(player: IPlayer, node: HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof HacknetServer)) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n }\n\n // Fail if we're already at max\n if (node.cache + sanitizedLevels > HacknetServerConstants.MaxCache) {\n const diff = Math.max(0, HacknetServerConstants.MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCache(sanitizedLevels);\n\n return true;\n}\n\nexport function processHacknetEarnings(player: IPlayer, numCycles: number): number {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof HacknetNode) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player: IPlayer, numCycles: number): number {\n let total = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player: IPlayer, numCycles: number, nodeObj: HacknetNode): number {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings, \"hacknet\");\n\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player: IPlayer, numCycles: number): number {\n if (!(player.hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacketNode`);\n const hserver = GetServer(ip);\n if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.mults.hacknet_node_money);\n const h = hserver.process(numCycles);\n hashes += h;\n }\n\n const wastedHashes = player.hashManager.storeHashes(hashes);\n if (wastedHashes > 0) {\n const upgrade = HashUpgrades[\"Sell for Money\"];\n if (upgrade === null) throw new Error(\"Could not get the hash upgrade\");\n if (!upgrade.cost) throw new Error(\"Upgrade is not properly configured\");\n\n const multiplier = wastedHashes / upgrade.cost;\n if (multiplier > 0) {\n player.gainMoney(upgrade.value * multiplier, \"hacknet\");\n }\n }\n\n return hashes;\n}\n\nexport function updateHashManagerCapacity(player: IPlayer): void {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n const ip = nodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should be string but isn't`);\n const h = GetServer(ip);\n if (!(h instanceof HacknetServer)) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\n\nexport function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget: string): boolean {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return false;\n }\n\n // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n if (player.hashManager.upgrade(upgName)) {\n const upg = HashUpgrades[upgName];\n\n switch (upgName) {\n case \"Sell for Money\": {\n player.gainMoney(upg.value, \"hacknet\");\n break;\n }\n case \"Sell for Corporation Funds\": {\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n corp.funds = corp.funds + upg.value;\n break;\n }\n case \"Reduce Minimum Security\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Increase Maximum Money\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMaximumMoney(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Improve Studying\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Improve Gym Training\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Exchange for Corporation Research\": {\n // This will throw if player doesn't have a corporation\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n for (const division of corp.divisions) {\n division.sciResearch.qty += upg.value;\n }\n break;\n }\n case \"Exchange for Bladeburner Rank\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n bladeburner.changeRank(player, upg.value);\n break;\n }\n case \"Exchange for Bladeburner SP\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n bladeburner.skillPoints += upg.value;\n break;\n }\n case \"Generate Coding Contract\": {\n generateRandomContract();\n break;\n }\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { Industry } from \"./Industry\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Material } from \"./Material\";\nimport { Product } from \"./Product\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationUnlockUpgrade } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade } from \"./data/CorporationUpgrades\";\nimport { Cities } from \"../Locations/Cities\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ResearchMap } from \"./ResearchMap\";\nimport { isRelevantMaterial } from \"./ui/Helpers\";\n\nexport function NewIndustry(corporation: ICorporation, industry: string, name: string): void {\n if (corporation.divisions.find(({ type }) => industry == type))\n throw new Error(`You have already expanded into the ${industry} industry!`);\n\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n }\n }\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n if (corporation.funds < cost) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds - cost;\n corporation.divisions.push(\n new Industry({\n corp: corporation,\n name: name,\n type: industry,\n }),\n );\n }\n}\n\nexport function NewCity(corporation: ICorporation, division: IIndustry, city: string): void {\n if (corporation.funds < CorporationConstants.OfficeInitialCost) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n }\n if (division.offices[city]) {\n throw new Error(`You have already expanded into ${city} for ${division.name}`);\n }\n corporation.funds = corporation.funds - CorporationConstants.OfficeInitialCost;\n division.offices[city] = new OfficeSpace({\n loc: city,\n size: CorporationConstants.OfficeInitialSize,\n });\n}\n\nexport function UnlockUpgrade(corporation: ICorporation, upgrade: CorporationUnlockUpgrade): void {\n if (corporation.funds < upgrade.price) {\n throw new Error(\"Insufficient funds\");\n }\n if (corporation.unlockUpgrades[upgrade.index] === 1) {\n throw new Error(`You have already unlocked the ${upgrade.name} upgrade!`);\n }\n corporation.unlock(upgrade);\n}\n\nexport function LevelUpgrade(corporation: ICorporation, upgrade: CorporationUpgrade): void {\n const baseCost = upgrade.basePrice;\n const priceMult = upgrade.priceMult;\n const level = corporation.upgrades[upgrade.index];\n const cost = baseCost * Math.pow(priceMult, level);\n if (corporation.funds < cost) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\n\nexport function IssueDividends(corporation: ICorporation, rate: number): void {\n if (isNaN(rate) || rate < 0 || rate > CorporationConstants.DividendMaxRate) {\n throw new Error(`Invalid value. Must be an number between 0 and ${CorporationConstants.DividendMaxRate}`);\n }\n\n corporation.dividendRate = rate;\n}\n\nexport function SellMaterial(mat: Material, amt: string, price: string): void {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MPe]/g, \"\"); //Sanitize cost\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n }\n\n //Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, mat.maxsll.toString());\n tempQty = tempQty.replace(/PROD/g, mat.prd.toString());\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty)) || parseFloat(tempQty) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n if (isNaN(q)) {\n q = 0;\n }\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\n\nexport function SellProduct(product: Product, city: string, amt: string, price: string, all: boolean): void {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field.\");\n }\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n product.sCost = cost;\n }\n\n // Array of all cities. Used later\n const cities = Object.keys(Cities);\n\n // Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, product.maxsll.toString());\n temp = temp.replace(/PROD/g, product.data[city][1].toString());\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let qty = parseFloat(amt);\n if (isNaN(qty)) {\n qty = 0;\n }\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n}\n\nexport function SetSmartSupply(warehouse: Warehouse, smartSupply: boolean): void {\n warehouse.smartSupplyEnabled = smartSupply;\n}\n\nexport function SetSmartSupplyUseLeftovers(warehouse: Warehouse, material: Material, useLeftover: boolean): void {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name.replace(/ /g, \"\")))\n throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name.replace(/ /g, \"\")] = useLeftover;\n}\n\nexport function BuyMaterial(material: Material, amt: number): void {\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n material.buy = amt;\n}\n\nexport function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material: Material, amt: number): void {\n const matSize = MaterialSizes[material.name];\n const maxAmount = (warehouse.size - warehouse.sizeUsed) / matSize;\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid input amount`);\n }\n if (amt > maxAmount) {\n throw new Error(`You do not have enough warehouse size to fit this purchase`);\n }\n const cost = amt * material.bCost;\n if (corp.funds >= cost) {\n corp.funds = corp.funds - cost;\n material.qty += amt;\n } else {\n throw new Error(`You cannot afford this purchase.`);\n }\n}\n\nexport function SellShares(corporation: ICorporation, player: IPlayer, numShares: number): number {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to sell!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n if (corporation.shareSaleCooldown) throw new Error(\"Share sale on cooldown!\");\n const stockSaleResults = corporation.calculateShareSale(numShares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n\n corporation.numShares -= numShares;\n corporation.issuedShares += numShares;\n corporation.sharePrice = newSharePrice;\n corporation.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n corporation.shareSaleCooldown = CorporationConstants.SellSharesCooldown;\n player.gainMoney(profit, \"corporation\");\n return profit;\n}\n\nexport function BuyBackShares(corporation: ICorporation, player: IPlayer, numShares: number): boolean {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.issuedShares) throw new Error(\"You don't have that many shares to buy!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n const buybackPrice = corporation.sharePrice * 1.1;\n if (player.money < numShares * buybackPrice) throw new Error(\"You cant afford that many shares!\");\n corporation.numShares += numShares;\n corporation.issuedShares -= numShares;\n player.loseMoney(numShares * buybackPrice, \"corporation\");\n return true;\n}\n\nexport function AssignJob(office: OfficeSpace, employeeName: string, job: string): void {\n const employee = office.employees.find((e) => e.name === employeeName);\n\n if (!employee) throw new Error(`Could not find employee '${name}'.`);\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n\n office.assignSingleJob(employee, job);\n}\n\nexport function AutoAssignJob(office: OfficeSpace, job: string, count: number): boolean {\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n\n return office.autoAssignJob(job, count);\n}\n\nexport function UpgradeOfficeSize(corp: ICorporation, office: OfficeSpace, size: number): void {\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const cost = CorporationConstants.OfficeInitialCost * mult;\n if (corp.funds < cost) return;\n office.size += size;\n corp.funds = corp.funds - cost;\n}\n\nexport function BuyCoffee(corp: ICorporation, office: OfficeSpace): boolean {\n const cost = office.getCoffeeCost();\n if (corp.funds < cost) {\n return false;\n }\n\n if (!office.setCoffee()) {\n return false;\n }\n corp.funds -= cost;\n\n return true;\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const mult = 1 + costPerEmployee / 10e6;\n const cost = costPerEmployee * office.employees.length;\n if (corp.funds < cost) {\n return 0;\n }\n\n if (!office.setParty(mult)) {\n return 0;\n }\n corp.funds -= cost;\n\n return mult;\n}\n\nexport function PurchaseWarehouse(corp: ICorporation, division: IIndustry, city: string): void {\n if (corp.funds < CorporationConstants.WarehouseInitialCost) return;\n if (division.warehouses[city] instanceof Warehouse) return;\n division.warehouses[city] = new Warehouse({\n corp: corp,\n industry: division,\n loc: city,\n size: CorporationConstants.WarehouseInitialSize,\n });\n corp.funds = corp.funds - CorporationConstants.WarehouseInitialCost;\n}\n\nexport function UpgradeWarehouseCost(warehouse: Warehouse, amt: number): number {\n return Array.from(Array(amt).keys()).reduce(\n (acc, index) => acc + CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1 + index),\n 0,\n );\n}\n\nexport function UpgradeWarehouse(corp: ICorporation, division: IIndustry, warehouse: Warehouse, amt = 1): void {\n const sizeUpgradeCost = UpgradeWarehouseCost(warehouse, amt);\n if (corp.funds < sizeUpgradeCost) return;\n warehouse.level += amt;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n}\n\nexport function HireAdVert(corp: ICorporation, division: IIndustry): void {\n const cost = division.getAdVertCost();\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.applyAdVert(corp);\n}\n\nexport function MakeProduct(\n corp: ICorporation,\n division: IIndustry,\n city: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n): void {\n if (designInvest < 0) {\n designInvest = 0;\n }\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n if (!division.makesProducts) {\n throw new Error(\"You cannot create products for this industry!\");\n }\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n if (corp.funds < designInvest + marketingInvest) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n let maxProducts = 3;\n if (division.hasResearch(\"uPgrade: Capacity.II\")) {\n maxProducts = 5;\n } else if (division.hasResearch(\"uPgrade: Capacity.I\")) {\n maxProducts = 4;\n }\n const products = division.products;\n if (Object.keys(products).length >= maxProducts) {\n throw new Error(`You are already at the max products (${maxProducts}) for division: ${division.name}!`);\n }\n\n const product = new Product({\n name: productName.replace(/[<>]/g, \"\").trim(), //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest,\n });\n if (products[product.name] instanceof Product) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds - (designInvest + marketingInvest);\n products[product.name] = product;\n}\n\nexport function Research(division: IIndustry, researchName: string): void {\n const researchTree = IndustryResearchTrees[division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = ResearchMap[researchName];\n\n if (division.sciResearch.qty < research.cost)\n throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost;\n\n // Get the Node from the Research Tree and set its 'researched' property\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\n\nexport function ExportMaterial(\n divisionName: string,\n cityName: string,\n material: Material,\n amt: string,\n division?: Industry,\n): void {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\").toUpperCase();\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n if (!division || !isRelevantMaterial(material.name, division)) {\n throw new Error(`You cannot export material: ${material.name} to division: ${divisionName}!`);\n }\n\n const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };\n material.exp.push(exportObj);\n}\n\nexport function CancelExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt)\n continue;\n material.exp.splice(i, 1);\n break;\n }\n}\n\nexport function LimitProductProduction(product: Product, cityName: string, qty: number): void {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n product.prdman[cityName][1] = 0;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\n\nexport function LimitMaterialProduction(material: Material, qty: number): void {\n if (qty < 0 || isNaN(qty)) {\n material.prdman[0] = false;\n material.prdman[1] = 0;\n } else {\n material.prdman[0] = true;\n material.prdman[1] = qty;\n }\n}\n\nexport function SetMaterialMarketTA1(material: Material, on: boolean): void {\n material.marketTa1 = on;\n}\n\nexport function SetMaterialMarketTA2(material: Material, on: boolean): void {\n material.marketTa2 = on;\n}\n\nexport function SetProductMarketTA1(product: Product, on: boolean): void {\n product.marketTa1 = on;\n}\n\nexport function SetProductMarketTA2(product: Product, on: boolean): void {\n product.marketTa2 = on;\n}\n","import { CityName } from \"./../../Locations/data/CityNames\";\nexport const BladeburnerConstants: {\n CityNames: string[];\n CyclesPerSecond: number;\n StaminaGainPerSecond: number;\n BaseStaminaLoss: number;\n MaxStaminaToGainFactor: number;\n DifficultyToTimeFactor: number;\n DiffMultExponentialFactor: number;\n DiffMultLinearFactor: number;\n EffAgiLinearFactor: number;\n EffDexLinearFactor: number;\n EffAgiExponentialFactor: number;\n EffDexExponentialFactor: number;\n BaseRecruitmentTimeNeeded: number;\n PopulationThreshold: number;\n PopulationExponent: number;\n ChaosThreshold: number;\n BaseStatGain: number;\n BaseIntGain: number;\n ActionCountGrowthPeriod: number;\n RankToFactionRepFactor: number;\n RankNeededForFaction: number;\n ContractSuccessesPerLevel: number;\n OperationSuccessesPerLevel: number;\n RanksPerSkillPoint: number;\n ContractBaseMoneyGain: number;\n HrcHpGain: number;\n HrcStaminaGain: number;\n} = {\n CityNames: [\n CityName.Aevum,\n CityName.Chongqing,\n CityName.Sector12,\n CityName.NewTokyo,\n CityName.Ishima,\n CityName.Volhaven,\n ],\n CyclesPerSecond: 5, // Game cycle is 200 ms\n\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285, // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000, // Max Stamina is divided by this to get bonus stamina gain\n\n DifficultyToTimeFactor: 10, // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n\n BaseRecruitmentTimeNeeded: 300, // Base time needed (s) to complete a Recruitment action\n\n PopulationThreshold: 1e9, // Population which determines baseline success rate\n PopulationExponent: 0.7, // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50, // City chaos level after which it starts making tasks harder\n\n BaseStatGain: 1, // Base stat gain per second\n BaseIntGain: 0.003, // Base intelligence stat gain\n\n ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value\n\n RankToFactionRepFactor: 2, // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n\n ContractSuccessesPerLevel: 3, // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5, // How many successes you need to level up an op\n\n RanksPerSkillPoint: 3, // How many ranks needed to get 1 Skill Point\n\n ContractBaseMoneyGain: 250e3, // Base Money Gained per contract\n\n HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n};\n","export enum BlackOperationNames {\n OperationTyphoon = \"Operation Typhoon\",\n OperationZero = \"Operation Zero\",\n OperationX = \"Operation X\",\n OperationTitan = \"Operation Titan\",\n OperationAres = \"Operation Ares\",\n OperationArchangel = \"Operation Archangel\",\n OperationJuggernaut = \"Operation Juggernaut\",\n OperationRedDragon = \"Operation Red Dragon\",\n OperationK = \"Operation K\",\n OperationDeckard = \"Operation Deckard\",\n OperationTyrell = \"Operation Tyrell\",\n OperationWallace = \"Operation Wallace\",\n OperationShoulderOfOrion = \"Operation Shoulder of Orion\",\n OperationHyron = \"Operation Hyron\",\n OperationMorpheus = \"Operation Morpheus\",\n OperationIonStorm = \"Operation Ion Storm\",\n OperationAnnihilus = \"Operation Annihilus\",\n OperationUltron = \"Operation Ultron\",\n OperationCenturion = \"Operation Centurion\",\n OperationVindictus = \"Operation Vindictus\",\n OperationDaedalus = \"Operation Daedalus\",\n}\n","import { IPlayer } from \"../IPlayer\";\nimport { PlayerObject } from \"./PlayerObject\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CodingContractRewardType, ICodingContractReward } from \"../../CodingContracts\";\nimport { Company } from \"../../Company/Company\";\nimport { Companies } from \"../../Company/Companies\";\nimport { getNextCompanyPositionHelper } from \"../../Company/GetNextCompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { resetGangs } from \"../../Gang/AllGangs\";\nimport { Cities } from \"../../Locations/Cities\";\nimport { Locations } from \"../../Locations/Locations\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport {\n calculateSkill as calculateSkillF,\n calculateSkillProgress as calculateSkillProgressF,\n ISkillProgress,\n} from \"../formulas/skill\";\nimport { calculateIntelligenceBonus } from \"../formulas/intelligence\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { safetlyCreateUniqueServer } from \"../../Server/ServerHelpers\";\n\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { applySourceFile } from \"../../SourceFile/applySourceFile\";\nimport { applyExploit } from \"../../Exploits/applyExploits\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { ITaskTracker } from \"../ITaskTracker\";\nimport { IPerson } from \"../IPerson\";\nimport { Player } from \"../../Player\";\n\nimport { isCompanyWork } from \"../../Work/CompanyWork\";\nimport { defaultMultipliers } from \"../Multipliers\";\nimport { serverMetadata } from \"../../Server/data/servers\";\n\nexport function init(this: IPlayer): void {\n /* Initialize Player's home computer */\n const t_homeComp = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: \"home\",\n ip: createUniqueRandomIp(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true,\n });\n this.currentServer = SpecialServers.Home;\n AddToAllServers(t_homeComp);\n\n this.getHomeComputer().programs.push(Programs.NukeProgram.name);\n}\n\nexport function prestigeAugmentation(this: PlayerObject): void {\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n\n //Reset stats\n this.hacking = 1;\n\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n this.charisma = 1;\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n this.money = 1000 + CONSTANTS.Donations;\n\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n this.jobs = {};\n\n this.purchasedServers = [];\n\n this.factions = [];\n this.factionInvitations = [];\n\n this.queuedAugmentations = [];\n\n const numSleeves = Math.min(3, this.sourceFileLvl(10) + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new Sleeve(this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.lastUpdate = new Date().getTime();\n\n // Statistics Trackers\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n\n this.hacknetNodes.length = 0;\n this.hashManager.prestige();\n\n // Reapply augs, re-calculate skills and reset HP\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n\n this.finishWork(true);\n}\n\nexport function prestigeSourceFile(this: IPlayer): void {\n this.entropy = 0;\n this.prestigeAugmentation();\n this.karma = 0;\n // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new Sleeve(this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n // Gang\n this.gang = null;\n resetGangs();\n\n // Reset Stock market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n // BitNode 3: Corporatocracy\n this.corporation = null;\n\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\n\nexport function receiveInvite(this: IPlayer, factionName: string): void {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n this.factionInvitations.push(factionName);\n}\n\n//Calculates skill level based on experience. The same formula will be used for every skill\nexport function calculateSkill(this: IPerson, exp: number, mult = 1): number {\n return calculateSkillF(exp, mult);\n}\n\n//Calculates skill level progress based on experience. The same formula will be used for every skill\nexport function calculateSkillProgress(this: IPlayer, exp: number, mult = 1): ISkillProgress {\n return calculateSkillProgressF(exp, mult);\n}\n\nexport function updateSkillLevels(this: IPlayer): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.hacking_exp, this.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.strength_exp, this.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier),\n ),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.defense_exp, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.dexterity_exp, this.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.agility_exp, this.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.charisma_exp, this.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier),\n ),\n );\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\n\nexport function resetMultipliers(this: IPlayer): void {\n this.mults = defaultMultipliers();\n}\n\nexport function hasProgram(this: IPlayer, programName: string): boolean {\n const home = this.getHomeComputer();\n if (home == null) {\n return false;\n }\n\n for (let i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n return false;\n}\n\nexport function setMoney(this: PlayerObject, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = money;\n}\n\nexport function gainMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money + money;\n this.recordMoneySource(money, source);\n}\n\nexport function loseMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money === Infinity && money === Infinity) return;\n this.money = this.money - money;\n this.recordMoneySource(-1 * money, source);\n}\n\nexport function canAfford(this: IPlayer, cost: number): boolean {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n return this.money >= cost;\n}\n\nexport function recordMoneySource(this: PlayerObject, amt: number, source: string): void {\n if (!(this.moneySourceA instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new MoneySourceTracker();\n }\n if (!(this.moneySourceB instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new MoneySourceTracker();\n }\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\n\nexport function gainHackingExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n this.hacking_exp += exp;\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking = calculateSkillF(this.hacking_exp, this.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier);\n}\n\nexport function gainStrengthExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n this.strength_exp += exp;\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = calculateSkillF(this.strength_exp, this.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier);\n}\n\nexport function gainDefenseExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n this.defense_exp += exp;\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = calculateSkillF(this.defense_exp, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier);\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\n\nexport function gainDexterityExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n this.dexterity_exp += exp;\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = calculateSkillF(\n this.dexterity_exp,\n this.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n}\n\nexport function gainAgilityExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n this.agility_exp += exp;\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = calculateSkillF(this.agility_exp, this.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier);\n}\n\nexport function gainCharismaExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n this.charisma_exp += exp;\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = calculateSkillF(this.charisma_exp, this.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier);\n}\n\nexport function gainIntelligenceExp(this: IPerson, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n if (Player.sourceFileLvl(5) > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp, 1));\n }\n}\n\nexport function gainStats(this: IPerson, retValue: ITaskTracker): void {\n this.gainHackingExp(retValue.hack * this.mults.hacking_exp);\n this.gainStrengthExp(retValue.str * this.mults.strength_exp);\n this.gainDefenseExp(retValue.def * this.mults.defense_exp);\n this.gainDexterityExp(retValue.dex * this.mults.dexterity_exp);\n this.gainAgilityExp(retValue.agi * this.mults.agility_exp);\n this.gainCharismaExp(retValue.cha * this.mults.charisma_exp);\n this.gainIntelligenceExp(retValue.int);\n}\n\n//Given a string expression like \"str\" or \"strength\", returns the given stat\nexport function queryStatFromString(this: IPlayer, str: string): number {\n const tempStr = str.toLowerCase();\n if (tempStr.includes(\"hack\")) {\n return this.hacking;\n }\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n return 0;\n}\n\nexport function startFocusing(this: IPlayer): void {\n this.focus = true;\n}\n\nexport function stopFocusing(this: IPlayer): void {\n this.focus = false;\n}\n\n// Returns true if hospitalized, false otherwise\nexport function takeDamage(this: IPlayer, amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\n\nexport function regenerateHp(this: IPerson, amt: number): void {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n this.hp += amt;\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\n\nexport function hospitalize(this: IPlayer): number {\n const cost = getHospitalizationCost(this);\n SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, ToastVariant.WARNING, 2000);\n\n this.loseMoney(cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\nexport function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (!(company instanceof Company)) {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return false;\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position
\" + getJobRequirementText(company, pos));\n }\n return false;\n }\n\n if (!company.hasPosition(pos)) {\n console.error(`Company ${company.name} does not have position ${pos}. Player.applyToCompany() failed`);\n return false;\n }\n\n while (true) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null) break;\n if (company.hasPosition(nextPos) && this.isQualified(company, nextPos)) {\n pos = nextPos;\n } else break;\n }\n\n //Check if player already has the assigned job\n if (this.jobs[company.name] === pos.name) {\n if (!sing) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null || !company.hasPosition(nextPos)) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n } else {\n const reqText = getJobRequirementText(company, nextPos);\n dialogBoxCreate(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n }\n }\n return false;\n }\n\n this.jobs[company.name] = pos.name;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations! You were offered a new job at \" + company.name + \" as a \" + pos.name + \"!\");\n }\n return true;\n}\n\n//Returns your next position at a company given the field (software, business, etc.)\nexport function getNextCompanyPosition(\n this: IPlayer,\n company: Company,\n entryPosType: CompanyPosition,\n): CompanyPosition | null {\n const currCompany = Companies[company.name];\n\n //Not employed at this company, so return the entry position\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n }\n\n //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n const currentPositionName = this.jobs[company.name];\n if (!currentPositionName) return entryPosType;\n const currentPosition = CompanyPositions[currentPositionName];\n if (\n (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||\n (currentPosition.isITJob() && entryPosType.isITJob()) ||\n (currentPosition.isBusinessJob() && entryPosType.isBusinessJob()) ||\n (currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||\n (currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||\n (currentPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||\n (currentPosition.isAgentJob() && entryPosType.isAgentJob()) ||\n (currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||\n (currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||\n (currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob())\n ) {\n return getNextCompanyPositionHelper(currentPosition);\n }\n\n return entryPosType;\n}\n\nexport function quitJob(this: IPlayer, company: string): void {\n if (isCompanyWork(this.currentWork) && this.currentWork.companyName === company) {\n this.finishWork(true);\n }\n delete this.jobs[company];\n}\n\n/**\n * Method to see if the player has at least one job assigned to them\n * @param this The player instance\n * @returns Whether the user has at least one job\n */\nexport function hasJob(this: IPlayer): boolean {\n return Boolean(Object.keys(this.jobs).length);\n}\n\nexport function applyForSoftwareJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareCompanyPositions[0]], sing);\n}\n\nexport function applyForSoftwareConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForItJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.ITCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]])) {\n return this.applyForJob(CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]], sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForNetworkEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForBusinessJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessCompanyPositions[0]], sing);\n}\n\nexport function applyForBusinessConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityJob(this: IPlayer, sing = false): boolean {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(CompanyPositions[posNames.SecurityCompanyPositions[2]], sing);\n}\n\nexport function applyForAgentJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.AgentCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.AgentCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed part-time at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a part-time waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\n//Checks if the Player is qualified for a certain position\nexport function isQualified(this: IPlayer, company: Company, position: CompanyPosition): boolean {\n const offset = company.jobStatReqOffset;\n const reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n const reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n const reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n const reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n return (\n this.hacking >= reqHacking &&\n this.strength >= reqStrength &&\n this.defense >= reqDefense &&\n this.dexterity >= reqDexterity &&\n this.agility >= reqAgility &&\n this.charisma >= reqCharisma &&\n company.playerReputation >= position.requiredReputation\n );\n}\n\n/********** Reapplying Augmentations and Source File ***********/\nexport function reapplyAllAugmentations(this: IPlayer, resetMultipliers = true): void {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const playerAug = this.augmentations[i];\n const augName = playerAug.name;\n\n if (augName == AugmentationNames.NeuroFluxGovernor) {\n for (let j = 0; j < playerAug.level; ++j) {\n applyAugmentation(this.augmentations[i], true);\n }\n continue;\n }\n applyAugmentation(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\n\nexport function reapplyAllSourceFiles(this: IPlayer): void {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n const srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n const sourceFileObject = SourceFiles[srcFileKey];\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n applySourceFile(this.sourceFiles[i]);\n }\n applyExploit();\n this.updateSkillLevels();\n}\n\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\nexport function checkForFactionInvitations(this: IPlayer): Faction[] {\n const invitedFactions: Faction[] = []; //Array which will hold all Factions the player should be invited to\n\n const numAugmentations = this.augmentations.length;\n\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs);\n\n // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n function getCompanyRep(companyName: string): number {\n const company = Companies[companyName];\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n }\n\n // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n function checkMegacorpRequirements(companyName: string): boolean {\n const serverMeta = serverMetadata.find((s) => s.specialName === companyName);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n const bonus = (server as Server).backdoorInstalled ? -100e3 : 0;\n return (\n allCompanies.includes(companyName) && getCompanyRep(companyName) > CONSTANTS.CorpFactionRepRequirement + bonus\n );\n }\n\n //Illuminati\n const illuminatiFac = Factions[FactionNames.Illuminati];\n if (\n !illuminatiFac.isBanned &&\n !illuminatiFac.isMember &&\n !illuminatiFac.alreadyInvited &&\n numAugmentations >= 30 &&\n this.money >= 150000000000 &&\n this.hacking >= 1500 &&\n this.strength >= 1200 &&\n this.defense >= 1200 &&\n this.dexterity >= 1200 &&\n this.agility >= 1200\n ) {\n invitedFactions.push(illuminatiFac);\n }\n\n //Daedalus\n const daedalusFac = Factions[FactionNames.Daedalus];\n if (\n !daedalusFac.isBanned &&\n !daedalusFac.isMember &&\n !daedalusFac.alreadyInvited &&\n numAugmentations >= BitNodeMultipliers.DaedalusAugsRequirement &&\n this.money >= 100000000000 &&\n (this.hacking >= 2500 ||\n (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))\n ) {\n invitedFactions.push(daedalusFac);\n }\n\n //The Covenant\n const covenantFac = Factions[FactionNames.TheCovenant];\n if (\n !covenantFac.isBanned &&\n !covenantFac.isMember &&\n !covenantFac.alreadyInvited &&\n numAugmentations >= 20 &&\n this.money >= 75000000000 &&\n this.hacking >= 850 &&\n this.strength >= 850 &&\n this.defense >= 850 &&\n this.dexterity >= 850 &&\n this.agility >= 850\n ) {\n invitedFactions.push(covenantFac);\n }\n\n //ECorp\n const ecorpFac = Factions[FactionNames.ECorp];\n if (\n !ecorpFac.isBanned &&\n !ecorpFac.isMember &&\n !ecorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumECorp)\n ) {\n invitedFactions.push(ecorpFac);\n }\n\n //MegaCorp\n const megacorpFac = Factions[FactionNames.MegaCorp];\n if (\n !megacorpFac.isBanned &&\n !megacorpFac.isMember &&\n !megacorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12MegaCorp)\n ) {\n invitedFactions.push(megacorpFac);\n }\n\n //Bachman & Associates\n const bachmanandassociatesFac = Factions[FactionNames.BachmanAssociates];\n if (\n !bachmanandassociatesFac.isBanned &&\n !bachmanandassociatesFac.isMember &&\n !bachmanandassociatesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumBachmanAndAssociates)\n ) {\n invitedFactions.push(bachmanandassociatesFac);\n }\n\n //Blade Industries\n const bladeindustriesFac = Factions[FactionNames.BladeIndustries];\n if (\n !bladeindustriesFac.isBanned &&\n !bladeindustriesFac.isMember &&\n !bladeindustriesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12BladeIndustries)\n ) {\n invitedFactions.push(bladeindustriesFac);\n }\n\n //NWO\n const nwoFac = Factions[FactionNames.NWO];\n if (\n !nwoFac.isBanned &&\n !nwoFac.isMember &&\n !nwoFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenNWO)\n ) {\n invitedFactions.push(nwoFac);\n }\n\n //Clarke Incorporated\n const clarkeincorporatedFac = Factions[FactionNames.ClarkeIncorporated];\n if (\n !clarkeincorporatedFac.isBanned &&\n !clarkeincorporatedFac.isMember &&\n !clarkeincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumClarkeIncorporated)\n ) {\n invitedFactions.push(clarkeincorporatedFac);\n }\n\n //OmniTek Incorporated\n const omnitekincorporatedFac = Factions[FactionNames.OmniTekIncorporated];\n if (\n !omnitekincorporatedFac.isBanned &&\n !omnitekincorporatedFac.isMember &&\n !omnitekincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenOmniTekIncorporated)\n ) {\n invitedFactions.push(omnitekincorporatedFac);\n }\n\n //Four Sigma\n const foursigmaFac = Factions[FactionNames.FourSigma];\n if (\n !foursigmaFac.isBanned &&\n !foursigmaFac.isMember &&\n !foursigmaFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12FourSigma)\n ) {\n invitedFactions.push(foursigmaFac);\n }\n\n //KuaiGong International\n const kuaigonginternationalFac = Factions[FactionNames.KuaiGongInternational];\n if (\n !kuaigonginternationalFac.isBanned &&\n !kuaigonginternationalFac.isMember &&\n !kuaigonginternationalFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.ChongqingKuaiGongInternational)\n ) {\n invitedFactions.push(kuaigonginternationalFac);\n }\n\n //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n const fulcrumsecrettechonologiesFac = Factions[FactionNames.FulcrumSecretTechnologies];\n const fulcrumSecretServer = GetServer(SpecialServers.FulcrumSecretTechnologies);\n if (!(fulcrumSecretServer instanceof Server))\n throw new Error(`${FactionNames.FulcrumSecretTechnologies} should be normal server`);\n if (fulcrumSecretServer == null) {\n console.error(`Could not find ${FactionNames.FulcrumSecretTechnologies} Server`);\n } else if (\n !fulcrumsecrettechonologiesFac.isBanned &&\n !fulcrumsecrettechonologiesFac.isMember &&\n !fulcrumsecrettechonologiesFac.alreadyInvited &&\n fulcrumSecretServer.backdoorInstalled &&\n checkMegacorpRequirements(LocationName.AevumFulcrumTechnologies)\n ) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n\n //BitRunners\n const bitrunnersFac = Factions[FactionNames.BitRunners];\n const bitrunnersServer = GetServer(SpecialServers.BitRunnersServer);\n if (!(bitrunnersServer instanceof Server)) throw new Error(`${FactionNames.BitRunners} should be normal server`);\n if (bitrunnersServer == null) {\n console.error(`Could not find ${FactionNames.BitRunners} Server`);\n } else if (\n !bitrunnersFac.isBanned &&\n !bitrunnersFac.isMember &&\n bitrunnersServer.backdoorInstalled &&\n !bitrunnersFac.alreadyInvited\n ) {\n invitedFactions.push(bitrunnersFac);\n }\n\n //The Black Hand\n\n const theblackhandFac = Factions[FactionNames.TheBlackHand];\n const blackhandServer = GetServer(SpecialServers.TheBlackHandServer);\n if (!(blackhandServer instanceof Server)) throw new Error(`${FactionNames.TheBlackHand} should be normal server`);\n if (blackhandServer == null) {\n console.error(`Could not find ${FactionNames.TheBlackHand} Server`);\n } else if (\n !theblackhandFac.isBanned &&\n !theblackhandFac.isMember &&\n blackhandServer.backdoorInstalled &&\n !theblackhandFac.alreadyInvited\n ) {\n invitedFactions.push(theblackhandFac);\n }\n\n //NiteSec\n const nitesecFac = Factions[FactionNames.NiteSec];\n const nitesecServer = GetServer(SpecialServers.NiteSecServer);\n if (!(nitesecServer instanceof Server)) throw new Error(`${FactionNames.NiteSec} should be normal server`);\n if (nitesecServer == null) {\n console.error(`Could not find ${FactionNames.NiteSec} Server`);\n } else if (\n !nitesecFac.isBanned &&\n !nitesecFac.isMember &&\n nitesecServer.backdoorInstalled &&\n !nitesecFac.alreadyInvited\n ) {\n invitedFactions.push(nitesecFac);\n }\n\n //Chongqing\n const chongqingFac = Factions[FactionNames.Chongqing];\n if (\n !chongqingFac.isBanned &&\n !chongqingFac.isMember &&\n !chongqingFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.Chongqing\n ) {\n invitedFactions.push(chongqingFac);\n }\n\n //Sector-12\n const sector12Fac = Factions[FactionNames.Sector12];\n if (\n !sector12Fac.isBanned &&\n !sector12Fac.isMember &&\n !sector12Fac.alreadyInvited &&\n this.money >= 15000000 &&\n this.city == CityName.Sector12\n ) {\n invitedFactions.push(sector12Fac);\n }\n\n //New Tokyo\n const newtokyoFac = Factions[FactionNames.NewTokyo];\n if (\n !newtokyoFac.isBanned &&\n !newtokyoFac.isMember &&\n !newtokyoFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.NewTokyo\n ) {\n invitedFactions.push(newtokyoFac);\n }\n\n //Aevum\n const aevumFac = Factions[FactionNames.Aevum];\n if (\n !aevumFac.isBanned &&\n !aevumFac.isMember &&\n !aevumFac.alreadyInvited &&\n this.money >= 40000000 &&\n this.city == CityName.Aevum\n ) {\n invitedFactions.push(aevumFac);\n }\n\n //Ishima\n const ishimaFac = Factions[FactionNames.Ishima];\n if (\n !ishimaFac.isBanned &&\n !ishimaFac.isMember &&\n !ishimaFac.alreadyInvited &&\n this.money >= 30000000 &&\n this.city == CityName.Ishima\n ) {\n invitedFactions.push(ishimaFac);\n }\n\n //Volhaven\n const volhavenFac = Factions[FactionNames.Volhaven];\n if (\n !volhavenFac.isBanned &&\n !volhavenFac.isMember &&\n !volhavenFac.alreadyInvited &&\n this.money >= 50000000 &&\n this.city == CityName.Volhaven\n ) {\n invitedFactions.push(volhavenFac);\n }\n\n //Speakers for the Dead\n const speakersforthedeadFac = Factions[FactionNames.SpeakersForTheDead];\n if (\n !speakersforthedeadFac.isBanned &&\n !speakersforthedeadFac.isMember &&\n !speakersforthedeadFac.alreadyInvited &&\n this.hacking >= 100 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.numPeopleKilled >= 30 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(speakersforthedeadFac);\n }\n\n //The Dark Army\n const thedarkarmyFac = Factions[FactionNames.TheDarkArmy];\n if (\n !thedarkarmyFac.isBanned &&\n !thedarkarmyFac.isMember &&\n !thedarkarmyFac.alreadyInvited &&\n this.hacking >= 300 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.city == CityName.Chongqing &&\n this.numPeopleKilled >= 5 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thedarkarmyFac);\n }\n\n //The Syndicate\n const thesyndicateFac = Factions[FactionNames.TheSyndicate];\n if (\n !thesyndicateFac.isBanned &&\n !thesyndicateFac.isMember &&\n !thesyndicateFac.alreadyInvited &&\n this.hacking >= 200 &&\n this.strength >= 200 &&\n this.defense >= 200 &&\n this.dexterity >= 200 &&\n this.agility >= 200 &&\n (this.city == CityName.Aevum || this.city == CityName.Sector12) &&\n this.money >= 10000000 &&\n this.karma <= -90 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thesyndicateFac);\n }\n\n //Silhouette\n const silhouetteFac = Factions[FactionNames.Silhouette];\n if (\n !silhouetteFac.isBanned &&\n !silhouetteFac.isMember &&\n !silhouetteFac.alreadyInvited &&\n (allPositions.includes(\"Chief Technology Officer\") ||\n allPositions.includes(\"Chief Financial Officer\") ||\n allPositions.includes(\"Chief Executive Officer\")) &&\n this.money >= 15000000 &&\n this.karma <= -22\n ) {\n invitedFactions.push(silhouetteFac);\n }\n\n //Tetrads\n const tetradsFac = Factions[FactionNames.Tetrads];\n if (\n !tetradsFac.isBanned &&\n !tetradsFac.isMember &&\n !tetradsFac.alreadyInvited &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima) &&\n this.strength >= 75 &&\n this.defense >= 75 &&\n this.dexterity >= 75 &&\n this.agility >= 75 &&\n this.karma <= -18\n ) {\n invitedFactions.push(tetradsFac);\n }\n\n //SlumSnakes\n const slumsnakesFac = Factions[FactionNames.SlumSnakes];\n if (\n !slumsnakesFac.isBanned &&\n !slumsnakesFac.isMember &&\n !slumsnakesFac.alreadyInvited &&\n this.strength >= 30 &&\n this.defense >= 30 &&\n this.dexterity >= 30 &&\n this.agility >= 30 &&\n this.karma <= -9 &&\n this.money >= 1000000\n ) {\n invitedFactions.push(slumsnakesFac);\n }\n\n //Netburners\n const netburnersFac = Factions[FactionNames.Netburners];\n let totalHacknetRam = 0;\n let totalHacknetCores = 0;\n let totalHacknetLevels = 0;\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n const v = this.hacknetNodes[i];\n if (typeof v === \"string\") {\n const hserver = GetServer(v);\n if (hserver === null || !(hserver instanceof HacknetServer))\n throw new Error(\"player hacknet server was not HacknetServer\");\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n } else {\n totalHacknetLevels += v.level;\n totalHacknetRam += v.ram;\n totalHacknetCores += v.cores;\n }\n }\n if (\n !netburnersFac.isBanned &&\n !netburnersFac.isMember &&\n !netburnersFac.alreadyInvited &&\n this.hacking >= 80 &&\n totalHacknetRam >= 8 &&\n totalHacknetCores >= 4 &&\n totalHacknetLevels >= 100\n ) {\n invitedFactions.push(netburnersFac);\n }\n\n //Tian Di Hui\n const tiandihuiFac = Factions[FactionNames.TianDiHui];\n if (\n !tiandihuiFac.isBanned &&\n !tiandihuiFac.isMember &&\n !tiandihuiFac.alreadyInvited &&\n this.money >= 1000000 &&\n this.hacking >= 50 &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima)\n ) {\n invitedFactions.push(tiandihuiFac);\n }\n\n //CyberSec\n const cybersecFac = Factions[FactionNames.CyberSec];\n const cybersecServer = GetServer(SpecialServers.CyberSecServer);\n if (!(cybersecServer instanceof Server)) throw new Error(`${FactionNames.CyberSec} should be normal server`);\n if (cybersecServer == null) {\n console.error(`Could not find ${FactionNames.CyberSec} Server`);\n } else if (\n !cybersecFac.isBanned &&\n !cybersecFac.isMember &&\n cybersecServer.backdoorInstalled &&\n !cybersecFac.alreadyInvited\n ) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n\n/************* BitNodes **************/\nexport function setBitNodeNumber(this: IPlayer, n: number): void {\n this.bitNodeN = n;\n}\n\nexport function queueAugmentation(this: IPlayer, name: string): void {\n for (const aug of this.queuedAugmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const aug of this.augmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.queuedAugmentations.push(new PlayerOwnedAugmentation(name));\n}\n\n/************* Coding Contracts **************/\nexport function gainCodingContractReward(this: IPlayer, reward: ICodingContractReward, difficulty = 1): string {\n if (reward == null || reward.type == null) {\n return `No reward for this contract`;\n }\n\n /* eslint-disable no-case-declarations */\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation:\n if (reward.name == null || !(Factions[reward.name] instanceof Faction)) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n Factions[reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n case CodingContractRewardType.FactionReputationAll:\n const totalGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n\n // Ignore Bladeburners and other special factions for this calculation\n const specialFactions = [FactionNames.Bladeburners as string];\n const factions = this.factions.slice().filter((f) => {\n return !specialFactions.includes(f);\n });\n\n // If the player was only part of the special factions, we'll just give money\n if (factions.length == 0) {\n reward.type = CodingContractRewardType.Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n for (const facName of factions) {\n if (!(Factions[facName] instanceof Faction)) {\n continue;\n }\n Factions[facName].playerReputation += gainPerFaction;\n }\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n case CodingContractRewardType.CompanyReputation: {\n if (reward.name == null || !(Companies[reward.name] instanceof Company)) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseCompanyRepGain * difficulty;\n Companies[reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n }\n case CodingContractRewardType.Money:\n default: {\n const moneyGain = CONSTANTS.CodingContractBaseMoneyGain * difficulty * BitNodeMultipliers.CodingContractMoney;\n this.gainMoney(moneyGain, \"codingcontract\");\n return `Gained ${numeralWrapper.formatMoney(moneyGain)}`;\n }\n }\n /* eslint-enable no-case-declarations */\n}\n\nexport function travel(this: IPlayer, to: CityName): boolean {\n if (Cities[to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n this.city = to;\n\n return true;\n}\n\nexport function gotoLocation(this: IPlayer, to: LocationName): boolean {\n if (Locations[to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n this.location = to;\n\n return true;\n}\n\nexport function canAccessGrafting(this: IPlayer): boolean {\n return this.bitNodeN === 10 || this.sourceFileLvl(10) > 0;\n}\n\nexport function giveExploit(this: IPlayer, exploit: Exploit): void {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n SnackbarEvents.emit(\"SF -1 acquired!\", ToastVariant.SUCCESS, 2000);\n }\n}\n\nexport function giveAchievement(this: IPlayer, achievementId: string): void {\n const achievement = achievements[achievementId];\n if (!achievement) return;\n if (!this.achievements.map((a) => a.ID).includes(achievementId)) {\n this.achievements.push({ ID: achievementId, unlockedOn: new Date().getTime() });\n SnackbarEvents.emit(`Unlocked Achievement: \"${achievement.Name}\"`, ToastVariant.SUCCESS, 2000);\n }\n}\n\nexport function getIntelligenceBonus(this: IPlayer, weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n}\n\nexport function getCasinoWinnings(this: IPlayer): number {\n return this.moneySourceA.casino;\n}\n\nexport function canAccessCotMG(this: IPlayer): boolean {\n return this.bitNodeN === 13 || this.sourceFileLvl(13) > 0;\n}\n\nexport function sourceFileLvl(this: IPlayer, n: number): number {\n const sf = this.sourceFiles.find((sf) => sf.n === n);\n if (!sf) return 0;\n return sf.lvl;\n}\n\nexport function focusPenalty(this: IPlayer): number {\n let focus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n return focus;\n}\n","import { Program } from \"./Program\";\nimport { programsMetadata } from \"./data/ProgramsMetadata\";\nimport { IMap } from \"../types\";\n\nexport const Programs: IMap = {};\n\nfor (const params of programsMetadata) {\n Programs[params.key] = new Program(params.name, params.create, params.run);\n}\n","export enum FragmentType {\n // Special fragments for the UI\n None,\n Delete,\n\n // Stats boosting fragments\n HackingChance,\n HackingSpeed,\n HackingMoney,\n HackingGrow,\n Hacking,\n Strength,\n Defense,\n Dexterity,\n Agility,\n Charisma,\n HacknetMoney,\n HacknetCost,\n Rep,\n WorkMoney,\n Crime,\n Bladeburner,\n\n // utility fragments.\n Booster,\n}\n\nexport function Effect(tpe: FragmentType): string {\n switch (tpe) {\n case FragmentType.HackingChance: {\n return \"+x% hack() success chance\";\n }\n case FragmentType.HackingSpeed: {\n return \"+x% faster hack(), grow(), and weaken()\";\n }\n case FragmentType.HackingMoney: {\n return \"+x% hack() power\";\n }\n case FragmentType.HackingGrow: {\n return \"+x% grow() power\";\n }\n case FragmentType.Hacking: {\n return \"+x% hacking skill\";\n }\n case FragmentType.Strength: {\n return \"+x% strength skill\";\n }\n case FragmentType.Defense: {\n return \"+x% defense skill\";\n }\n case FragmentType.Dexterity: {\n return \"+x% dexterity skill\";\n }\n case FragmentType.Agility: {\n return \"+x% agility skill\";\n }\n case FragmentType.Charisma: {\n return \"+x% charisma skill\";\n }\n case FragmentType.HacknetMoney: {\n return \"+x% hacknet production\";\n }\n case FragmentType.HacknetCost: {\n return \"-x% cheaper hacknet cost\";\n }\n case FragmentType.Rep: {\n return \"+x% reputation from factions and companies\";\n }\n case FragmentType.WorkMoney: {\n return \"+x% work money\";\n }\n case FragmentType.Crime: {\n return \"+x% crime money\";\n }\n case FragmentType.Bladeburner: {\n return \"+x% all bladeburner stats\";\n }\n }\n throw new Error(\"Calling effect for fragment type that doesn't have an effect \" + tpe);\n}\n","import { IMap } from \"../../types\";\n\nexport const LiteratureNames: IMap = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\",\n};\n","/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nexport enum SleeveTaskType {\n // Same Order as selectable order in UI\n Idle,\n Company,\n Faction,\n Crime,\n Class,\n Gym,\n Bladeburner,\n Recovery,\n Synchro,\n}\n","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\n}\n","import React from \"react\";\nimport { TableCell as MuiTableCell, TableCellProps, Table as MuiTable, TableProps } from \"@mui/material\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nconst useStyles = makeStyles({\n root: {\n borderBottom: \"none\",\n },\n small: {\n width: \"1px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\nexport const Table: React.FC = (props: TableProps) => {\n return (\n \n );\n};\n","import { Augmentation } from \"./Augmentation\";\nimport { IMap } from \"../types\";\n\nexport const StaticAugmentations: IMap = {};\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companiesMetadata } from \"./data/CompaniesMetadata\";\nimport { Company, IConstructorParams } from \"./Company\";\nimport { IMap } from \"../types\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Companies: IMap = {};\n\nfunction addCompany(params: IConstructorParams): void {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n Companies[params.name] = new Company(params);\n}\n\n// Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\nexport function initCompanies(): void {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies;\n\n // Re-construct all Companies\n Companies = {};\n companiesMetadata.forEach((e) => {\n addCompany(e);\n });\n\n // Reset data\n for (const companyName of Object.keys(Companies)) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n if (!(oldCompany instanceof Company)) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n}\n\n// Used to load Companies map from a save\nexport function loadCompanies(saveString: string): void {\n Companies = JSON.parse(saveString, Reviver);\n}\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\ninterface GangTerritory {\n power: number;\n territory: number;\n}\n\nexport let AllGangs: {\n [key: string]: GangTerritory;\n} = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n};\n\nexport function resetGangs(): void {\n AllGangs = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n };\n}\n\nexport function loadAllGangs(saveString: string): void {\n AllGangs = JSON.parse(saveString, Reviver);\n}\n","import React from \"react\";\n\nimport { Typography, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { characterOverviewStyles as useStyles } from \"./CharacterOverview\";\nimport { ClassNameMap } from \"@material-ui/core/styles/withStyles\";\n\ninterface ITableRowData {\n content?: string;\n level?: number;\n exp?: number;\n}\n\ninterface IProps {\n name: string;\n color: string;\n classes?: ClassNameMap;\n data?: ITableRowData;\n children?: React.ReactElement;\n}\n\nexport const StatsRow = ({ name, color, classes = useStyles(), children, data }: IProps): React.ReactElement => {\n let content = \"\";\n\n if (data) {\n if (data.content !== undefined) {\n content = data.content;\n } else if (data.level !== undefined && data.exp !== undefined) {\n content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;\n } else if (data.level !== undefined && data.exp === undefined) {\n content = `${formatNumber(data.level, 0)}`;\n }\n }\n\n return (\n \n \n {name}\n \n \n {content ? {content} : <>}\n {children}\n \n \n );\n};\n","import { Crime } from \"./Crime\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nimport { CrimeType } from \"../utils/WorkType\";\n\nexport const Crimes: IMap = {\n Shoplift: new Crime(\"Shoplift\", CrimeType.Shoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n dexterity_exp: 2,\n agility_exp: 2,\n }),\n\n RobStore: new Crime(\"Rob Store\", CrimeType.RobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Mug: new Crime(\"Mug\", CrimeType.Mug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5,\n }),\n\n Larceny: new Crime(\"Larceny\", CrimeType.Larceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n DealDrugs: new Crime(\"Deal Drugs\", CrimeType.Drugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n }),\n\n BondForgery: new Crime(\"Bond Forgery\", CrimeType.BondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n\n intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n TraffickArms: new Crime(\"Traffick Arms\", CrimeType.TraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n }),\n\n Homicide: new Crime(\"Homicide\", CrimeType.Homicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n\n kills: 1,\n }),\n\n GrandTheftAuto: new Crime(\"Grand Theft Auto\", CrimeType.GrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n\n intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Kidnap: new Crime(\"Kidnap\", CrimeType.Kidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Assassination: new Crime(\"Assassination\", CrimeType.Assassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n\n kills: 1,\n }),\n\n Heist: new Crime(\"Heist\", CrimeType.Heist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n\n intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n};\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nexport function removeLeadingSlash(s: string): string {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\nexport function removeTrailingSlash(s: string): string {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\nexport function isValidFilename(filename: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/;\n\n // match() returns null if no match is found\n return filename.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\nexport function isValidDirectoryName(name: string): boolean {\n // A valid directory name:\n // Must be at least 1 character long\n // Can only include characters in the character set [-.%a-zA-Z0-9_]\n // Cannot end with a '.'\n const regex = /^.?[a-zA-Z0-9_-]+$/;\n\n // match() returns null if no match is found\n return name.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\nexport function isValidDirectoryPath(path: string): boolean {\n let t_path: string = path;\n\n if (t_path.length === 0) {\n return false;\n }\n if (t_path.length === 1) {\n return t_path === \"/\";\n }\n\n // A full path must have a leading slash, but we'll ignore it for the checks\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n }\n\n // Trailing slash does not matter\n t_path = removeTrailingSlash(t_path);\n\n // Check that every section of the path is a valid directory name\n const dirs = t_path.split(\"/\");\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\nexport function isValidFilePath(path: string): boolean {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n const t_path = path;\n\n // Impossible for filename to have less than length of 3\n if (t_path.length < 3) {\n return false;\n }\n\n // Full filepath can't end with trailing slash because it must be a file\n if (t_path.endsWith(\"/\")) {\n return false;\n }\n\n // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n const fnSeparator = t_path.lastIndexOf(\"/\");\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\nexport function getFirstParentDirectory(path: string): string {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\nexport function getAllParentDirectories(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n\n/**\n * Given a destination that only contains a directory part, returns the\n * path to the source filename inside the new destination directory.\n * Otherwise, returns the path to the destination file.\n * @param destination The destination path or file name\n * @param source The source path\n * @param cwd The current working directory\n * @returns A file path which may be absolute or relative\n */\nexport function getDestinationFilepath(destination: string, source: string, cwd: string): string {\n const dstDir = evaluateDirectoryPath(destination, cwd);\n // If evaluating the directory for this destination fails, we have a filename or full path.\n if (dstDir === null) {\n return destination;\n } else {\n // Append the filename to the directory provided.\n const t_path = removeTrailingSlash(dstDir);\n const fileName = getFileName(source);\n return t_path + \"/\" + fileName;\n }\n}\n\n/**\n * Given a filepath, returns the file name (e.g. without directory parts)\n * For example:\n * /home/var/test.js -> test.js\n * ./var/test.js -> test.js\n * test.js -> test.js\n */\nexport function getFileName(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return t_path;\n }\n\n return t_path.slice(lastSlash + 1);\n}\n\n/**\n * Checks if a file path refers to a file in the root directory.\n */\nexport function isInRootDirectory(path: string): boolean {\n if (!isValidFilePath(path)) {\n return false;\n }\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateDirectoryPath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateFilePath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\nexport function areFilesEqual(f0: string, f1: string): boolean {\n if (!f0.startsWith(\"/\")) f0 = \"/\" + f0;\n if (!f1.startsWith(\"/\")) f1 = \"/\" + f1;\n return f0 === f1;\n}\n\nexport function areImportsEquals(f0: string, f1: string): boolean {\n if (!f0.endsWith(\".ns\") && !f0.endsWith(\".js\")) f0 = f0 + \".js\";\n if (!f1.endsWith(\".ns\") && !f1.endsWith(\".js\")) f1 = f1 + \".js\";\n return areFilesEqual(f0, f1);\n}\n","import { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\n","import * as React from \"react\";\n\nexport function trusted(f: () => void): (event: React.MouseEvent) => void {\n return function (event: React.MouseEvent): void {\n if (!event.isTrusted) return;\n f();\n };\n}\n","/* Holds IP of Special Servers */\nexport const SpecialServers: {\n [key: string]: string | undefined;\n\n Home: string;\n FulcrumSecretTechnologies: string;\n CyberSecServer: string;\n NiteSecServer: string;\n TheBlackHandServer: string;\n BitRunnersServer: string;\n TheDarkArmyServer: string;\n DaedalusServer: string;\n WorldDaemon: string;\n DarkWeb: string;\n} = {\n Home: \"home\",\n FulcrumSecretTechnologies: \"fulcrumassets\",\n CyberSecServer: \"CSEC\",\n NiteSecServer: \"avmnite-02h\",\n TheBlackHandServer: \"I.I.I.I\",\n BitRunnersServer: \"run4theh111z\",\n TheDarkArmyServer: \".\",\n DaedalusServer: \"The-Cave\",\n WorldDaemon: \"w0r1d_d43m0n\",\n DarkWeb: \"darkweb\",\n};\n","import React from \"react\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Money } from \"../ui/React/Money\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateClassEarnings as calculateClassEarningsRate } from \"./formulas/Class\";\nimport { Work, WorkType } from \"./Work\";\nimport { applyWorkStats, newWorkStats, sumWorkStats, WorkStats } from \"./WorkStats\";\n\nexport enum ClassType {\n StudyComputerScience = \"StudyComputerScience\",\n DataStructures = \"DataStructures\",\n Networks = \"Networks\",\n Algorithms = \"Algorithms\",\n\n Management = \"Management\",\n Leadership = \"Leadership\",\n\n GymStrength = \"GymStrength\",\n GymDefense = \"GymDefense\",\n GymDexterity = \"GymDexterity\",\n GymAgility = \"GymAgility\",\n}\n\nexport interface Class {\n youAreCurrently: string;\n type: ClassType;\n earnings: WorkStats;\n}\n\nexport const Classes: Record = {\n [ClassType.StudyComputerScience]: {\n youAreCurrently: \"studying Computer Science\",\n type: ClassType.StudyComputerScience,\n earnings: newWorkStats({ hackExp: 0.5, intExp: 0.01 }),\n },\n [ClassType.DataStructures]: {\n youAreCurrently: \"taking a Data Structures course\",\n type: ClassType.DataStructures,\n earnings: newWorkStats({\n money: -40,\n hackExp: 1,\n intExp: 0.01,\n }),\n },\n [ClassType.Networks]: {\n youAreCurrently: \"taking a Networks course\",\n type: ClassType.Networks,\n earnings: newWorkStats({\n money: -80,\n hackExp: 2,\n intExp: 0.01,\n }),\n },\n [ClassType.Algorithms]: {\n youAreCurrently: \"taking an Algorithms course\",\n type: ClassType.Algorithms,\n earnings: newWorkStats({\n money: -320,\n hackExp: 4,\n intExp: 0.01,\n }),\n },\n [ClassType.Management]: {\n youAreCurrently: \"taking a Management course\",\n type: ClassType.Management,\n earnings: newWorkStats({\n money: -160,\n chaExp: 2,\n intExp: 0.01,\n }),\n },\n [ClassType.Leadership]: {\n youAreCurrently: \"taking a Leadership course\",\n type: ClassType.Leadership,\n earnings: newWorkStats({\n money: -320,\n chaExp: 4,\n intExp: 0.01,\n }),\n },\n [ClassType.GymStrength]: {\n youAreCurrently: \"training your strength at a gym\",\n type: ClassType.GymStrength,\n earnings: newWorkStats({\n money: -120,\n strExp: 1,\n }),\n },\n [ClassType.GymDefense]: {\n youAreCurrently: \"training your defense at a gym\",\n type: ClassType.GymDefense,\n earnings: newWorkStats({\n money: -120,\n defExp: 1,\n }),\n },\n [ClassType.GymDexterity]: {\n youAreCurrently: \"training your dexterity at a gym\",\n type: ClassType.GymDexterity,\n earnings: newWorkStats({\n money: -120,\n dexExp: 1,\n }),\n },\n [ClassType.GymAgility]: {\n youAreCurrently: \"training your agility at a gym\",\n type: ClassType.GymAgility,\n earnings: newWorkStats({\n money: -120,\n agiExp: 1,\n }),\n },\n};\n\ninterface ClassWorkParams {\n classType: ClassType;\n location: LocationName;\n singularity: boolean;\n}\n\nexport const isClassWork = (w: Work | null): w is ClassWork => w !== null && w.type === WorkType.CLASS;\n\nexport class ClassWork extends Work {\n classType: ClassType;\n location: LocationName;\n earnings = newWorkStats();\n\n constructor(params?: ClassWorkParams) {\n super(WorkType.CLASS, params?.singularity ?? true);\n this.classType = params?.classType ?? ClassType.StudyComputerScience;\n this.location = params?.location ?? LocationName.Sector12RothmanUniversity;\n }\n\n isGym(): boolean {\n return [ClassType.GymAgility, ClassType.GymDefense, ClassType.GymDexterity, ClassType.GymStrength].includes(\n this.classType,\n );\n }\n\n getClass(): Class {\n return Classes[this.classType];\n }\n\n calculateRates(player: IPlayer): WorkStats {\n return calculateClassEarningsRate(player, this);\n }\n\n process(player: IPlayer, cycles: number): boolean {\n this.cyclesWorked += cycles;\n const rate = this.calculateRates(player);\n const earnings = applyWorkStats(player, rate, cycles, \"class\");\n this.earnings = sumWorkStats(this.earnings, earnings);\n return false;\n }\n\n finish(): void {\n if (!this.singularity) {\n dialogBoxCreate(\n <>\n After {this.getClass().youAreCurrently} for{\" \"}\n {convertTimeMsToTimeElapsedString(this.cyclesWorked * CONSTANTS._idleSpeed)},
\n you spent a total of .
\n
\n You earned a total of:
\n {numeralWrapper.formatExp(this.earnings.hackExp)} hacking exp
\n {numeralWrapper.formatExp(this.earnings.strExp)} strength exp
\n {numeralWrapper.formatExp(this.earnings.defExp)} defense exp
\n {numeralWrapper.formatExp(this.earnings.dexExp)} dexterity exp
\n {numeralWrapper.formatExp(this.earnings.agiExp)} agility exp
\n {numeralWrapper.formatExp(this.earnings.chaExp)} charisma exp\n
\n ,\n );\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"ClassWork\", this);\n }\n\n /**\n * Initiatizes a ClassWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): ClassWork {\n return Generic_fromJSON(ClassWork, value.data);\n }\n}\n\nReviver.constructors.ClassWork = ClassWork;\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IEngine } from \"../IEngine\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { saveObject } from \"../SaveObject\";\nimport { onExport } from \"../ExportBonus\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { ITutorial, iTutorialStart } from \"../InteractiveTutorial\";\nimport { InteractiveTutorialRoot } from \"./InteractiveTutorial/InteractiveTutorialRoot\";\nimport { ITutorialEvents } from \"./InteractiveTutorial/ITutorialEvents\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { dialogBoxCreate } from \"./React/DialogBox\";\nimport { GetAllServers } from \"../Server/AllServers\";\nimport { Factions } from \"../Faction/Factions\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport {\n cancelOrder,\n eventEmitterForUiReset,\n initStockMarketFn,\n placeOrder,\n StockMarket,\n} from \"../StockMarket/StockMarket\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { Page, IRouter, ScriptEditorRouteOptions } from \"./Router\";\nimport { Overview } from \"./React/Overview\";\nimport { SidebarRoot } from \"../Sidebar/ui/SidebarRoot\";\nimport { AugmentationsRoot } from \"../Augmentation/ui/AugmentationsRoot\";\nimport { DevMenuRoot } from \"../DevMenu\";\nimport { BladeburnerRoot } from \"../Bladeburner/ui/BladeburnerRoot\";\nimport { GangRoot } from \"../Gang/ui/GangRoot\";\nimport { CorporationRoot } from \"../Corporation/ui/CorporationRoot\";\nimport { InfiltrationRoot } from \"../Infiltration/ui/InfiltrationRoot\";\nimport { GraftingRoot } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { WorkInProgressRoot } from \"./WorkInProgressRoot\";\nimport { GameOptionsRoot } from \"../GameOptions/ui/GameOptionsRoot\";\nimport { SleeveRoot } from \"../PersonObjects/Sleeve/ui/SleeveRoot\";\nimport { HacknetRoot } from \"../Hacknet/ui/HacknetRoot\";\nimport { GenericLocation } from \"../Locations/ui/GenericLocation\";\nimport { LocationCity } from \"../Locations/ui/City\";\nimport { ProgramsRoot } from \"../Programs/ui/ProgramsRoot\";\nimport { Root as ScriptEditorRoot } from \"../ScriptEditor/ui/ScriptEditorRoot\";\nimport { MilestonesRoot } from \"../Milestones/ui/MilestonesRoot\";\nimport { TerminalRoot } from \"../Terminal/ui/TerminalRoot\";\nimport { TutorialRoot } from \"../Tutorial/ui/TutorialRoot\";\nimport { ActiveScriptsRoot } from \"./ActiveScripts/ActiveScriptsRoot\";\nimport { FactionsRoot } from \"../Faction/ui/FactionsRoot\";\nimport { FactionRoot } from \"../Faction/ui/FactionRoot\";\nimport { CharacterStats } from \"./CharacterStats\";\nimport { TravelAgencyRoot } from \"../Locations/ui/TravelAgencyRoot\";\nimport { StockMarketRoot } from \"../StockMarket/ui/StockMarketRoot\";\nimport { BitverseRoot } from \"../BitNode/ui/BitverseRoot\";\nimport { StaneksGiftRoot } from \"../CotMG/ui/StaneksGiftRoot\";\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar, SnackbarProvider } from \"./React/Snackbar\";\nimport { LogBoxManager } from \"./React/LogBoxManager\";\nimport { AlertManager } from \"./React/AlertManager\";\nimport { PromptManager } from \"./React/PromptManager\";\nimport { InvitationModal } from \"../Faction/ui/InvitationModal\";\nimport { calculateAchievements } from \"../Achievements/Achievements\";\n\nimport { enterBitNode } from \"../RedPill\";\nimport { Context } from \"./Context\";\nimport { RecoveryMode, RecoveryRoot } from \"./React/RecoveryRoot\";\nimport { AchievementsRoot } from \"../Achievements/AchievementsRoot\";\nimport { ErrorBoundary } from \"./ErrorBoundary\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeBrowser } from \"../Themes/ui/ThemeBrowser\";\nimport { ImportSaveRoot } from \"./React/ImportSaveRoot\";\nimport { BypassWrapper } from \"./React/BypassWrapper\";\n\nimport _wrap from \"lodash/wrap\";\nimport _functions from \"lodash/functions\";\nimport { Apr1 } from \"./Apr1\";\nimport { isFactionWork } from \"../Work/FactionWork\";\n\nconst htmlLocation = location;\n\ninterface IProps {\n terminal: ITerminal;\n player: IPlayer;\n engine: IEngine;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n \"-ms-overflow-style\": \"none\" /* for Internet Explorer, Edge */,\n \"scrollbar-width\": \"none\" /* for Firefox */,\n margin: theme.spacing(0),\n flexGrow: 1,\n display: \"block\",\n padding: \"8px\",\n minHeight: \"100vh\",\n boxSizing: \"border-box\",\n },\n }),\n);\n\nconst uninitialized = (): void => {\n throw new Error(\"Router called before initialization\");\n};\n\nexport let Router: IRouter = {\n isInitialized: false,\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n allowRouting: uninitialized,\n toActiveScripts: uninitialized,\n toAugmentations: uninitialized,\n toBitVerse: uninitialized,\n toBladeburner: uninitialized,\n toStats: uninitialized,\n toCity: uninitialized,\n toCorporation: uninitialized,\n toCreateProgram: uninitialized,\n toDevMenu: uninitialized,\n toFaction: uninitialized,\n toFactions: uninitialized,\n toGameOptions: uninitialized,\n toGang: uninitialized,\n toHacknetNodes: uninitialized,\n toInfiltration: uninitialized,\n toJob: uninitialized,\n toMilestones: uninitialized,\n toGrafting: uninitialized,\n toScriptEditor: uninitialized,\n toSleeves: uninitialized,\n toStockMarket: uninitialized,\n toTerminal: uninitialized,\n toTravel: uninitialized,\n toTutorial: uninitialized,\n toWork: uninitialized,\n toBladeburnerCinematic: uninitialized,\n toLocation: uninitialized,\n toStaneksGift: uninitialized,\n toAchievements: uninitialized,\n toThemeBrowser: uninitialized,\n toImportSave: uninitialized,\n};\n\nfunction determineStartPage(player: IPlayer): Page {\n if (RecoveryMode) return Page.Recovery;\n if (player.currentWork !== null) return Page.Work;\n return Page.Terminal;\n}\n\nexport function GameRoot({ player, engine, terminal }: IProps): React.ReactElement {\n const classes = useStyles();\n const [{ files, vim }, setEditorOptions] = useState({ files: {}, vim: false });\n const [page, setPage] = useState(determineStartPage(player));\n const setRerender = useState(0)[1];\n const [augPage, setAugPage] = useState(false);\n const [faction, setFaction] = useState(\n isFactionWork(player.currentWork) ? Factions[player.currentWork.factionName] : (undefined as unknown as Faction),\n );\n if (faction === undefined && page === Page.Faction)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [flume, setFlume] = useState(false);\n const [quick, setQuick] = useState(false);\n const [location, setLocation] = useState(undefined as unknown as Location);\n if (location === undefined && (page === Page.Infiltration || page === Page.Location || page === Page.Job))\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [cinematicText, setCinematicText] = useState(\"\");\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0);\n const [sidebarOpened, setSideBarOpened] = useState(Settings.IsSidebarOpened);\n\n const [importString, setImportString] = useState(undefined as unknown as string);\n const [importAutomatic, setImportAutomatic] = useState(false);\n if (importString === undefined && page === Page.ImportSave)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [allowRoutingCalls, setAllowRoutingCalls] = useState(true);\n\n function resetErrorBoundary(): void {\n setErrorBoundaryKey(errorBoundaryKey + 1);\n }\n\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n\n function killAllScripts(): void {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n saveObject.saveGame();\n setTimeout(() => htmlLocation.reload(), 2000);\n }\n\n Router = {\n isInitialized: true,\n page: () => page,\n allowRouting: (value: boolean) => setAllowRoutingCalls(value),\n toActiveScripts: () => setPage(Page.ActiveScripts),\n toAugmentations: () => setPage(Page.Augmentations),\n toBladeburner: () => setPage(Page.Bladeburner),\n toStats: () => setPage(Page.Stats),\n toCorporation: () => setPage(Page.Corporation),\n toCreateProgram: () => setPage(Page.CreateProgram),\n toDevMenu: () => setPage(Page.DevMenu),\n toFaction: (faction: Faction, augPage = false) => {\n setAugPage(augPage);\n setPage(Page.Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(Page.Factions),\n toGameOptions: () => setPage(Page.Options),\n toGang: () => setPage(Page.Gang),\n toHacknetNodes: () => setPage(Page.Hacknet),\n toMilestones: () => setPage(Page.Milestones),\n toGrafting: () => setPage(Page.Grafting),\n toScriptEditor: (files: Record, options?: ScriptEditorRouteOptions) => {\n setEditorOptions({\n files,\n vim: !!options?.vim,\n });\n setPage(Page.ScriptEditor);\n },\n toSleeves: () => setPage(Page.Sleeves),\n toStockMarket: () => setPage(Page.StockMarket),\n toTerminal: () => setPage(Page.Terminal),\n toTutorial: () => setPage(Page.Tutorial),\n toJob: (location: Location) => {\n setLocation(location);\n setPage(Page.Job);\n },\n toCity: () => {\n setPage(Page.City);\n },\n toTravel: () => {\n player.gotoLocation(LocationName.TravelAgency);\n setPage(Page.Travel);\n },\n toBitVerse: (flume: boolean, quick: boolean) => {\n setFlume(flume);\n setQuick(quick);\n calculateAchievements();\n setPage(Page.BitVerse);\n },\n toInfiltration: (location: Location) => {\n setLocation(location);\n setPage(Page.Infiltration);\n },\n toWork: () => setPage(Page.Work),\n toBladeburnerCinematic: () => {\n setPage(Page.BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: (location: Location) => {\n setLocation(location);\n setPage(Page.Location);\n },\n toStaneksGift: () => {\n setPage(Page.StaneksGift);\n },\n toAchievements: () => {\n setPage(Page.Achievements);\n },\n toThemeBrowser: () => {\n setPage(Page.ThemeBrowser);\n },\n toImportSave: (base64save: string, automatic = false) => {\n setImportString(base64save);\n setImportAutomatic(automatic);\n setPage(Page.ImportSave);\n },\n };\n\n useEffect(() => {\n // Wrap Router navigate functions to be able to disable the execution\n _functions(Router)\n .filter((fnName) => fnName.startsWith(\"to\"))\n .forEach((fnName) => {\n // @ts-ignore - tslint does not like this, couldn't find a way to make it cooperate\n Router[fnName] = _wrap(Router[fnName], (func, ...args) => {\n if (!allowRoutingCalls) {\n // Let's just log to console.\n console.error(`Routing is currently disabled - Attempted router.${fnName}()`);\n return;\n }\n\n // Call the function normally\n return func(...args);\n });\n });\n });\n\n useEffect(() => {\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n function softReset(): void {\n dialogBoxCreate(\"Soft Reset!\");\n installAugmentations(true);\n resetErrorBoundary();\n Router.toTerminal();\n }\n\n let mainPage = Cannot load;\n let withSidebar = true;\n let withPopups = true;\n let bypassGame = false;\n switch (page) {\n case Page.Recovery: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n break;\n }\n case Page.BitVerse: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Infiltration: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.BladeburnerCinematic: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Work: {\n mainPage = ;\n withSidebar = false;\n break;\n }\n case Page.Terminal: {\n mainPage = ;\n break;\n }\n case Page.Sleeves: {\n mainPage = ;\n break;\n }\n case Page.StaneksGift: {\n mainPage = ;\n break;\n }\n case Page.Stats: {\n mainPage = ;\n break;\n }\n case Page.ScriptEditor: {\n mainPage = (\n \n );\n break;\n }\n case Page.ActiveScripts: {\n mainPage = ;\n break;\n }\n case Page.Hacknet: {\n mainPage = ;\n break;\n }\n case Page.CreateProgram: {\n mainPage = ;\n break;\n }\n case Page.Factions: {\n mainPage = ;\n break;\n }\n case Page.Faction: {\n mainPage = ;\n break;\n }\n case Page.Milestones: {\n mainPage = ;\n break;\n }\n case Page.Tutorial: {\n mainPage = (\n {\n prestigeAugmentation();\n Router.toTerminal();\n iTutorialStart();\n }}\n />\n );\n break;\n }\n case Page.DevMenu: {\n mainPage = ;\n break;\n }\n case Page.Gang: {\n mainPage = ;\n break;\n }\n case Page.Corporation: {\n mainPage = ;\n break;\n }\n case Page.Bladeburner: {\n mainPage = ;\n break;\n }\n case Page.Grafting: {\n mainPage = ;\n break;\n }\n case Page.Travel: {\n mainPage = ;\n break;\n }\n case Page.StockMarket: {\n mainPage = (\n \n );\n break;\n }\n case Page.City: {\n mainPage = ;\n break;\n }\n case Page.Job:\n case Page.Location: {\n mainPage = ;\n break;\n }\n case Page.Options: {\n mainPage = (\n saveObject.saveGame()}\n export={() => {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n forceKill={killAllScripts}\n softReset={softReset}\n />\n );\n break;\n }\n case Page.Augmentations: {\n mainPage = (\n {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n installAugmentationsFn={() => {\n installAugmentations();\n }}\n />\n );\n break;\n }\n case Page.Achievements: {\n mainPage = ;\n break;\n }\n case Page.ThemeBrowser: {\n mainPage = ;\n break;\n }\n case Page.ImportSave: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n }\n }\n\n return (\n \n \n \n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} killScripts={killAllScripts} />\n ) : (\n \n )}\n \n {withSidebar ? (\n \n {\n setSideBarOpened(isOpened);\n Settings.IsSidebarOpened = isOpened;\n }}\n />\n {mainPage}\n \n ) : (\n {mainPage}\n )}\n \n {withPopups && (\n <>\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n );\n}\n","/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { HacknetServerConstants } from \"./data/Constants\";\nimport {\n calculateHashGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateCacheUpgradeCost,\n} from \"./formulas/HacknetServers\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\nexport class HacknetServer extends BaseServer implements IHacknetNode {\n // Cache level. Affects hash Capacity\n cache = 1;\n\n // Number of cores. Improves hash production\n cores = 1;\n\n // Number of hashes that can be stored by this Hacknet Server\n hashCapacity = 0;\n\n // Hashes produced per second\n hashRate = 0;\n\n // Similar to Node level. Improves hash production\n level = 1;\n\n // How long this HacknetServer has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Total number of hashes earned by this server\n totalHashesGenerated = 0;\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = true;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels: number): number {\n return calculateCacheUpgradeCost(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels: number, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels: number, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels: number, costMult: number): number {\n return calculateRamUpgradeCost(this.maxRam, levels, costMult);\n }\n\n // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n this.onlineTimeSeconds += seconds;\n\n const hashes = this.hashRate * seconds;\n this.totalHashesGenerated += hashes;\n\n return hashes;\n }\n\n upgradeCache(levels: number): void {\n this.cache = Math.min(HacknetServerConstants.MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels: number, prodMult: number): void {\n this.cores = Math.min(HacknetServerConstants.MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n this.cpuCores = this.cores;\n }\n\n upgradeLevel(levels: number, prodMult: number): void {\n this.level = Math.min(HacknetServerConstants.MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels: number, prodMult: number): boolean {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n\n return true;\n }\n\n // Whenever a script is run, we must update this server's hash rate\n runScript(script: RunningScript, prodMult?: number): void {\n super.runScript(script);\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n super.updateRamUsed(ram, player);\n this.updateHashRate(player.mults.hacknet_node_money);\n }\n\n updateHashCapacity(): void {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult: number): void {\n this.hashRate = calculateHashGainRate(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(\n `Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`,\n false,\n );\n }\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): IReviverValue {\n return Generic_toJSON(\"HacknetServer\", this);\n }\n\n // Initializes a HacknetServer Object from a JSON save state\n static fromJSON(value: IReviverValue): HacknetServer {\n return Generic_fromJSON(HacknetServer, value.data);\n }\n}\n\nReviver.constructors.HacknetServer = HacknetServer;\n","import React, { useEffect } from \"react\";\nimport { useSnackbar, SnackbarProvider as SB } from \"notistack\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Alert from \"@mui/material/Alert\";\nimport Paper from \"@mui/material/Paper\";\nimport { logBoxBaseZIndex } from \"./LogBoxManager\";\n\ninterface IProps {\n children: React.ReactNode | React.ReactNode[];\n}\n\nexport enum ToastVariant {\n SUCCESS = \"success\",\n WARNING = \"warning\",\n ERROR = \"error\",\n INFO = \"info\",\n}\n\nconst useStyles = makeStyles(() => ({\n snackbar: {\n // Log popup z-index increments, so let's add a padding to be well above them.\n zIndex: `${logBoxBaseZIndex + 1000} !important` as any,\n\n \"& .MuiAlert-icon\": {\n alignSelf: \"center\",\n },\n },\n}));\n\nexport function SnackbarProvider(props: IProps): React.ReactElement {\n const classes = useStyles();\n return (\n \n {props.children}\n \n );\n}\n\nexport const SnackbarEvents = new EventEmitter<[string | React.ReactNode, ToastVariant, number]>();\n\nexport function Snackbar(): React.ReactElement {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n useEffect(() =>\n SnackbarEvents.subscribe((s, variant, duration) => {\n const id = enqueueSnackbar({s}, {\n content: (k, m) => {m},\n variant: variant,\n autoHideDuration: duration,\n onClick: () => closeSnackbar(id),\n });\n }),\n );\n return <>;\n}\n","import { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const StockSymbols: IMap = {};\n\n// Stocks for companies at which you can work\nStockSymbols[LocationName.AevumECorp] = \"ECP\";\nStockSymbols[LocationName.Sector12MegaCorp] = \"MGCP\";\nStockSymbols[LocationName.Sector12BladeIndustries] = \"BLD\";\nStockSymbols[LocationName.AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[LocationName.VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[LocationName.Sector12FourSigma] = \"FSIG\";\nStockSymbols[LocationName.ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[LocationName.AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[LocationName.IshimaStormTechnologies] = \"STM\";\nStockSymbols[LocationName.NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[LocationName.VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[LocationName.NewTokyoVitaLife] = \"VITA\";\nStockSymbols[LocationName.Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[LocationName.Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[LocationName.AevumAeroCorp] = \"AERO\";\nStockSymbols[LocationName.VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[LocationName.ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[LocationName.NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[LocationName.IshimaNovaMedical] = \"NVMD\";\nStockSymbols[LocationName.AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[LocationName.VolhavenLexoCorp] = \"LXO\";\nStockSymbols[LocationName.AevumRhoConstruction] = \"RHOC\";\nStockSymbols[LocationName.Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[LocationName.VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[LocationName.VolhavenCompuTek] = \"CTK\";\nStockSymbols[LocationName.AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[LocationName.IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[LocationName.Sector12FoodNStuff] = \"FNS\";\nStockSymbols[LocationName.Sector12JoesGuns] = \"JGN\";\n\n// Stocks for other companies\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n","export const validScriptExtensions: Array = [`.js`, `.script`, `.ns`];\n\nexport function isScriptFilename(f: string): boolean {\n return validScriptExtensions.some((ext) => f.endsWith(ext));\n}\n","import { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { Server } from \"./Server/Server\";\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nexport function calculateHackingChance(server: Server, player: IPlayer): number {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance =\n skillChance * difficultyMult * player.mults.hacking_chance * calculateIntelligenceBonus(player.intelligence, 1);\n if (chance > 1) {\n return 1;\n }\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\nexport function calculateHackingExpGain(server: Server, player: IPlayer): number {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * diffFactor;\n\n return expGain * player.mults.hacking_exp * BitNodeMultipliers.HackExpGain;\n}\n\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\nexport function calculatePercentMoneyHacked(server: Server, player: IPlayer): number {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;\n const percentMoneyHacked =\n (difficultyMult * skillMult * player.mults.hacking_money * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;\n if (percentMoneyHacked < 0) {\n return 0;\n }\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked;\n}\n\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\nexport function calculateHackingTime(server: Server, player: IPlayer): number {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff;\n // tslint:disable-next-line\n skillFactor /= player.hacking + baseSkill;\n\n const hackTimeMultiplier = 5;\n const hackingTime =\n (hackTimeMultiplier * skillFactor) /\n (player.mults.hacking_speed * calculateIntelligenceBonus(player.intelligence, 1));\n\n return hackingTime;\n}\n\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\nexport function calculateGrowTime(server: Server, player: IPlayer): number {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\nexport function calculateWeakenTime(server: Server, player: IPlayer): number {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n","export enum FactionWorkType {\n HACKING = \"HACKING\",\n FIELD = \"FIELD\",\n SECURITY = \"SECURITY\",\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { StaneksGift } from \"./StaneksGift\";\n\nexport let staneksGift: IStaneksGift = new StaneksGift();\n\nexport function loadStaneksGift(saveString: string): void {\n if (saveString) {\n staneksGift = JSON.parse(saveString, Reviver);\n } else {\n staneksGift = new StaneksGift();\n }\n}\n\nexport function zeros(width: number, height: number): number[][] {\n const array = [];\n\n for (let i = 0; i < width; ++i) {\n array.push(Array(height).fill(0));\n }\n\n return array;\n}\n\nexport function calculateGrid(gift: IStaneksGift): number[][] {\n const newgrid = zeros(gift.width(), gift.height()) as unknown as number[][];\n for (let i = 0; i < gift.width(); i++) {\n for (let j = 0; j < gift.height(); j++) {\n const fragment = gift.fragmentAt(i, j);\n if (!fragment) continue;\n newgrid[i][j] = 1;\n }\n }\n\n return newgrid;\n}\n","import { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { processOrders } from \"./OrderProcessing\";\nimport { Stock } from \"./Stock\";\nimport { TicksPerCycle } from \"./StockMarketConstants\";\nimport { InitStockMetadata } from \"./data/InitStockMetadata\";\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { StockSymbols } from \"./data/StockSymbols\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IMap } from \"../types\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let StockMarket: IStockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n} as IStockMarket; // Maps full stock name -> Stock object\nexport const SymbolToStockMap: IMap = {}; // Maps symbol -> Stock object\n\nexport function placeOrder(\n stock: Stock,\n shares: number,\n price: number,\n type: OrderTypes,\n position: PositionTypes,\n workerScript: WorkerScript | null = null,\n): boolean {\n if (!(stock instanceof Stock)) {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid stock: '${stock}'`);\n } else {\n dialogBoxCreate(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n return false;\n }\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n dialogBoxCreate(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n return false;\n }\n\n const order = new Order(stock.symbol, shares, price, type, position);\n if (StockMarket[\"Orders\"] == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stk = StockMarket[name];\n if (!(stk instanceof Stock)) {\n continue;\n }\n orders[stk.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n }\n StockMarket[\"Orders\"][stock.symbol].push(order);\n\n // Process to see if it should be executed immediately\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n processOrders(stock, order.type, order.pos, processOrderRefs);\n\n return true;\n}\n\n// Returns true if successfully cancels an order, false otherwise\nexport interface ICancelOrderParams {\n order?: Order;\n pos?: PositionTypes;\n price?: number;\n shares?: number;\n stock?: Stock;\n type?: OrderTypes;\n}\nexport function cancelOrder(params: ICancelOrderParams, workerScript: WorkerScript | null = null): boolean {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n if (params.order && params.order instanceof Order) {\n const order = params.order;\n // An 'Order' object is passed in\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n return false;\n } else if (\n params.stock &&\n params.shares &&\n params.price &&\n params.type &&\n params.pos &&\n params.stock instanceof Stock\n ) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + numeralWrapper.formatMoney(params.price);\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n if (\n params.shares === order.shares &&\n params.price === order.price &&\n params.type === order.type &&\n params.pos === order.pos\n ) {\n stockOrders.splice(i, 1);\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n return true;\n }\n }\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n return false;\n }\n return false;\n}\n\nexport function loadStockMarket(saveString: string): void {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n } else {\n StockMarket = JSON.parse(saveString, Reviver);\n }\n}\n\nexport function deleteStockMarket(): void {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n}\n\nexport function initStockMarket(): void {\n for (const stk of Object.keys(StockMarket)) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of InitStockMetadata) {\n const name = metadata.name;\n StockMarket[name] = new Stock(metadata);\n }\n\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = TicksPerCycle;\n}\n\nexport function initSymbolToStockMap(): void {\n for (const name of Object.keys(StockSymbols)) {\n if (StockSymbols.hasOwnProperty(name)) {\n const stock = StockMarket[name];\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n const symbol = StockSymbols[name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\n\nfunction stockMarketCycle(): void {\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n\n const roll = Math.random();\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n}\n\n// Stock prices updated every 6 seconds\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / CONSTANTS.MilliPerCycle;\nexport function processStockPrices(numCycles = 1): void {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n }\n\n // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n const timeNow = new Date().getTime();\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate;\n\n // Cycle\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n --StockMarket.ticksUntilCycle;\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n let av = (v * stock.mv) / 100;\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n stock.b = false;\n }\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2);\n\n // Shares required for price movement gradually approaches max over time\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\n\nexport function initStockMarketFn(): void {\n initStockMarket();\n initSymbolToStockMap();\n}\n\nexport const eventEmitterForUiReset = new EventEmitter<[]>();\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companyPositionMetadata } from \"./data/CompanyPositionsMetadata\";\nimport { CompanyPosition, IConstructorParams } from \"./CompanyPosition\";\nimport { IMap } from \"../types\";\n\nexport const CompanyPositions: IMap = {};\n\nfunction addCompanyPosition(params: IConstructorParams): void {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n CompanyPositions[params.name] = new CompanyPosition(params);\n}\n\ncompanyPositionMetadata.forEach((e) => {\n addCompanyPosition(e);\n});\n","import { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { Faction } from \"./Faction\";\nimport { Factions } from \"./Factions\";\nimport { Player } from \"../Player\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Settings } from \"../Settings/Settings\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { InvitationEvent } from \"./ui/InvitationModal\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { SFC32RNG } from \"../Casino/RNG\";\nimport { isFactionWork } from \"../Work/FactionWork\";\n\nexport function inviteToFaction(faction: Faction): void {\n Player.receiveInvite(faction.name);\n faction.alreadyInvited = true;\n if (!Settings.SuppressFactionInvites) {\n InvitationEvent.emit(faction);\n }\n}\n\nexport function joinFaction(faction: Faction): void {\n if (faction.isMember) return;\n faction.isMember = true;\n Player.factions.push(faction.name);\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n Player.factions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n const factionInfo = faction.getInfo();\n\n //Determine what factions you are banned from now that you have joined this faction\n for (const enemy of factionInfo.enemies) {\n if (Factions[enemy] instanceof Faction) {\n Factions[enemy].isBanned = true;\n }\n }\n for (let i = 0; i < Player.factionInvitations.length; ++i) {\n if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {\n Player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\n\n//Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\nexport function hasAugmentationPrereqs(aug: Augmentation): boolean {\n return aug.prereqs.every((aug) => Player.hasAugmentation(aug));\n}\n\nexport function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = false): string {\n const hasPrereqs = hasAugmentationPrereqs(aug);\n const augCosts = aug.getCost(Player);\n if (!hasPrereqs) {\n const txt = `You must first purchase or install ${aug.prereqs\n .filter((req) => !Player.hasAugmentation(req))\n .join(\",\")} before you can purchase this one.`;\n if (sing) {\n return txt;\n } else {\n dialogBoxCreate(txt);\n }\n } else if (augCosts.moneyCost !== 0 && Player.money < augCosts.moneyCost) {\n const txt = \"You don't have enough money to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (fac.playerReputation < augCosts.repCost) {\n const txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {\n const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n queuedAugmentation.level = aug.getLevel(Player);\n }\n Player.queuedAugmentations.push(queuedAugmentation);\n\n Player.loseMoney(augCosts.moneyCost, \"augmentations\");\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else if (!Settings.SuppressBuyAugmentationConfirmation) {\n dialogBoxCreate(\n \"You purchased \" +\n aug.name +\n \". Its enhancements will not take \" +\n \"effect until they are installed. To install your augmentations, go to the \" +\n \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" +\n \"augmentations will now be more expensive.\",\n );\n }\n } else {\n dialogBoxCreate(\n \"Hmm, something went wrong when trying to purchase an Augmentation. \" +\n \"Please report this to the game developer with an explanation of how to \" +\n \"reproduce this.\",\n );\n }\n return \"\";\n}\n\nexport function processPassiveFactionRepGain(numCycles: number): void {\n for (const name of Object.keys(Factions)) {\n if (isFactionWork(Player.currentWork) && name === Player.currentWork.factionName) continue;\n if (!Factions.hasOwnProperty(name)) continue;\n const faction = Factions[name];\n if (!faction.isMember) continue;\n // No passive rep for special factions\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No passive rep for gangs.\n if (Player.getGangName() === name) continue;\n // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01);\n // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n\n faction.playerReputation += rate * numCycles * Player.mults.faction_rep * BitNodeMultipliers.FactionPassiveRepGain;\n }\n}\n\nexport const getFactionAugmentationsFiltered = (player: IPlayer, faction: Faction): string[] => {\n // If player has a gang with this faction, return (almost) all augmentations\n if (player.hasGangWith(faction.name)) {\n let augs = Object.values(StaticAugmentations);\n\n // Remove special augs\n augs = augs.filter((a) => !a.isSpecial && a.name !== AugmentationNames.CongruityImplant);\n\n if (player.bitNodeN === 2) {\n // TRP is not available outside of BN2 for Gangs\n augs.push(StaticAugmentations[AugmentationNames.TheRedPill]);\n }\n\n const rng = SFC32RNG(`BN${player.bitNodeN}.${player.sourceFileLvl(player.bitNodeN)}`);\n // Remove faction-unique augs that don't belong to this faction\n const uniqueFilter = (a: Augmentation): boolean => {\n // Keep all the non-unique one\n if (a.factions.length > 1) {\n return true;\n }\n // Keep all the ones that this faction has anyway.\n if (faction.augmentations.includes(a.name)) {\n return true;\n }\n\n return rng() >= 1 - BitNodeMultipliers.GangUniqueAugs;\n };\n augs = augs.filter(uniqueFilter);\n\n return augs.map((a) => a.name);\n }\n\n return faction.augmentations.slice();\n};\n","/*\nThe game cannot block every possible exploits. Specially since one of them is\nthat you can just edit your save file and that's impragmatic to prevent.\n\nSo instead we have source file minus 1. It is not obtained by destroying a\nBitNode but instead it is awarded when the player finds innovative ways to break\nthe game, this serves 2 purpose, [one] the developpers don't have to spend time\ntrying to implement anti-cheat measures and [two] finding ways to break a\nhacking game is very much in the spirit of the game.\nSource-File minus 1 is extremely weak because it can be fully level up quickly.\n*/\n\nexport enum Exploit {\n Bypass = \"Bypass\",\n PrototypeTampering = \"PrototypeTampering\",\n Unclickable = \"Unclickable\",\n UndocumentedFunctionCall = \"UndocumentedFunctionCall\",\n TimeCompression = \"TimeCompression\",\n RealityAlteration = \"RealityAlteration\",\n N00dles = \"N00dles\",\n YoureNotMeantToAccessThis = \"YoureNotMeantToAccessThis\",\n TrueRecursion = \"TrueRecursion\",\n INeedARainbow = \"INeedARainbow\",\n // To the players reading this. Yes you're supposed to add EditSaveFile by\n // editing your save file, yes you could add them all, no we don't care\n // that's not the point.\n EditSaveFile = \"EditSaveFile\",\n}\n\nconst names: {\n [key: string]: string;\n} = {\n Bypass: \"by circumventing the ram cost of document.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n TimeCompression: \"by compressing time.\",\n Unclickable: \"by clicking the unclickable.\",\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n RealityAlteration: \"by altering reality to suit your whims.\",\n N00dles: \"by harnessing the power of the n00dles.\",\n YoureNotMeantToAccessThis: \"by accessing the dev menu.\",\n TrueRecursion: \"by truly recursing.\",\n INeedARainbow: \"by using the power of the rainbow.\",\n};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n return [...new Set(exploits)];\n}\n","import { loadAliases, loadGlobalAliases, Aliases, GlobalAliases } from \"./Alias\";\nimport { Companies, loadCompanies } from \"./Company/Companies\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, loadFactions } from \"./Faction/Factions\";\nimport { loadAllGangs, AllGangs } from \"./Gang/AllGangs\";\nimport { Player, loadPlayer } from \"./Player\";\nimport {\n saveAllServers,\n loadAllServers,\n GetAllServers,\n createUniqueRandomIp,\n AddToAllServers,\n GetServer,\n} from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\nimport { staneksGift, loadStaneksGift } from \"./CotMG/Helper\";\n\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\n\nimport * as ExportBonus from \"./ExportBonus\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"./utils/JSONReviver\";\nimport { save } from \"./db\";\nimport { AwardNFG, v1APIBreak } from \"./utils/v1APIBreak\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"./Augmentation/PlayerOwnedAugmentation\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\nimport { SxProps } from \"@mui/system\";\nimport { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { pushGameSaved } from \"./Electron\";\nimport { defaultMonacoTheme } from \"./ScriptEditor/ui/themes\";\nimport { FactionNames } from \"./Faction/data/FactionNames\";\nimport { Faction } from \"./Faction/Faction\";\nimport { safetlyCreateUniqueServer } from \"./Server/ServerHelpers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nexport interface SaveData {\n playerIdentifier: string;\n fileName: string;\n save: string;\n savedOn: number;\n}\n\nexport interface ImportData {\n base64: string;\n playerData?: ImportPlayerData;\n}\n\nexport interface ImportPlayerData {\n identifier: string;\n lastSave: number;\n totalPlaytime: number;\n\n money: number;\n hacking: number;\n\n augmentations: number;\n factions: number;\n achievements: number;\n\n bitNode: number;\n bitNodeLevel: number;\n sourceFiles: number;\n}\n\nclass BitburnerSaveObject {\n PlayerSave = \"\";\n AllServersSave = \"\";\n CompaniesSave = \"\";\n FactionsSave = \"\";\n AliasesSave = \"\";\n GlobalAliasesSave = \"\";\n StockMarketSave = \"\";\n SettingsSave = \"\";\n VersionSave = \"\";\n AllGangsSave = \"\";\n LastExportBonus = \"\";\n StaneksGiftSave = \"\";\n\n getSaveString(excludeRunningScripts = false): string {\n this.PlayerSave = JSON.stringify(Player);\n\n this.AllServersSave = saveAllServers(excludeRunningScripts);\n this.CompaniesSave = JSON.stringify(Companies);\n this.FactionsSave = JSON.stringify(Factions);\n this.AliasesSave = JSON.stringify(Aliases);\n this.GlobalAliasesSave = JSON.stringify(GlobalAliases);\n this.StockMarketSave = JSON.stringify(StockMarket);\n this.SettingsSave = JSON.stringify(Settings);\n this.VersionSave = JSON.stringify(CONSTANTS.VersionNumber);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\n this.StaneksGiftSave = JSON.stringify(staneksGift);\n\n if (Player.inGang()) {\n this.AllGangsSave = JSON.stringify(AllGangs);\n }\n const saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n\n return saveString;\n }\n\n saveGame(emitToastEvent = true): Promise {\n const savedOn = new Date().getTime();\n Player.lastSave = savedOn;\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n return new Promise((resolve, reject) => {\n save(saveString)\n .then(() => {\n const saveData: SaveData = {\n playerIdentifier: Player.identifier,\n fileName: this.getSaveFileName(),\n save: saveString,\n savedOn,\n };\n pushGameSaved(saveData);\n\n if (emitToastEvent) {\n SnackbarEvents.emit(\"Game Saved!\", ToastVariant.INFO, 2000);\n }\n return resolve();\n })\n .catch((err) => {\n console.error(err);\n return reject();\n });\n });\n }\n\n getSaveFileName(isRecovery = false): string {\n // Save file name is based on current timestamp and BitNode\n const epochTime = Math.round(Date.now() / 1000);\n const bn = Player.bitNodeN;\n let filename = `bitburnerSave_${epochTime}_BN${bn}x${Player.sourceFileLvl(bn) + 1}.json`;\n if (isRecovery) filename = \"RECOVERY\" + filename;\n return filename;\n }\n\n exportGame(): void {\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n const filename = this.getSaveFileName();\n download(filename, saveString);\n }\n\n importGame(base64Save: string, reload = true): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n return save(base64Save).then(() => {\n if (reload) setTimeout(() => location.reload(), 1000);\n return Promise.resolve();\n });\n }\n\n getImportStringFromFile(files: FileList | null): Promise {\n if (files === null) return Promise.reject(new Error(\"No file selected\"));\n const file = files[0];\n if (!file) return Promise.reject(new Error(\"Invalid file selected\"));\n\n const reader = new FileReader();\n const promise: Promise = new Promise((resolve, reject) => {\n reader.onload = function (this: FileReader, e: ProgressEvent) {\n const target = e.target;\n if (target === null) {\n return reject(new Error(\"Error importing file\"));\n }\n const result = target.result;\n if (typeof result !== \"string\") {\n return reject(new Error(\"FileReader event was not type string\"));\n }\n const contents = result;\n resolve(contents);\n };\n });\n reader.readAsText(file);\n return promise;\n }\n\n async getImportDataFromString(base64Save: string): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n\n let newSave;\n try {\n newSave = window.atob(base64Save);\n newSave = newSave.trim();\n } catch (error) {\n console.error(error); // We'll handle below\n }\n\n if (!newSave || newSave === \"\") {\n return Promise.reject(new Error(\"Save game had not content or was not base64 encoded\"));\n }\n\n let parsedSave;\n try {\n parsedSave = JSON.parse(newSave);\n } catch (error) {\n console.error(error); // We'll handle below\n }\n\n if (!parsedSave || parsedSave.ctor !== \"BitburnerSaveObject\" || !parsedSave.data) {\n return Promise.reject(new Error(\"Save game did not seem valid\"));\n }\n\n const data: ImportData = {\n base64: base64Save,\n };\n\n const importedPlayer = PlayerObject.fromJSON(JSON.parse(parsedSave.data.PlayerSave));\n\n const playerData: ImportPlayerData = {\n identifier: importedPlayer.identifier,\n lastSave: importedPlayer.lastSave,\n totalPlaytime: importedPlayer.totalPlaytime,\n\n money: importedPlayer.money,\n hacking: importedPlayer.hacking,\n\n augmentations: importedPlayer.augmentations?.reduce((total, current) => (total += current.level), 0) ?? 0,\n factions: importedPlayer.factions?.length ?? 0,\n achievements: importedPlayer.achievements?.length ?? 0,\n\n bitNode: importedPlayer.bitNodeN,\n bitNodeLevel: importedPlayer.sourceFileLvl(Player.bitNodeN) + 1,\n sourceFiles: importedPlayer.sourceFiles?.reduce((total, current) => (total += current.lvl), 0) ?? 0,\n };\n\n data.playerData = playerData;\n return Promise.resolve(data);\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"BitburnerSaveObject\", this);\n }\n\n static fromJSON(value: IReviverValue): BitburnerSaveObject {\n return Generic_fromJSON(BitburnerSaveObject, value.data);\n }\n}\n\n// Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\nfunction evaluateVersionCompatibility(ver: string | number): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\n if (typeof ver === \"string\") {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (anyPlayer.companyPosition != null && typeof anyPlayer.companyPosition !== \"string\") {\n anyPlayer.companyPosition = anyPlayer.companyPosition.data.positionName;\n if (anyPlayer.companyPosition == null) {\n anyPlayer.companyPosition = \"\";\n }\n }\n\n // The \"companyName\" property of all Companies is renamed to \"name\"\n interface Company0_41_2 {\n name: string | number;\n companyName: string;\n companyPositions: Record;\n }\n for (const companyName of Object.keys(Companies)) {\n const company = Companies[companyName] as unknown as Company0_41_2;\n if (company.name == 0 && company.companyName != null) {\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n const pos: Record = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n company.companyPositions = pos;\n }\n }\n }\n\n // This version allowed players to hold multiple jobs\n if (ver < \"0.43.0\") {\n if (anyPlayer.companyName !== \"\" && anyPlayer.companyPosition != null && anyPlayer.companyPosition !== \"\") {\n anyPlayer.jobs[anyPlayer.companyName] = anyPlayer.companyPosition;\n }\n\n delete anyPlayer.companyPosition;\n }\n if (ver < \"0.56.0\") {\n for (const q of anyPlayer.queuedAugmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n for (const q of anyPlayer.augmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n if (ver < \"0.56.1\") {\n if (anyPlayer.bladeburner === 0) {\n anyPlayer.bladeburner = null;\n }\n if (anyPlayer.gang === 0) {\n anyPlayer.gang = null;\n }\n if (anyPlayer.corporation === 0) {\n anyPlayer.corporation = null;\n }\n // convert all Messages to just filename to save space.\n const home = anyPlayer.getHomeComputer();\n for (let i = 0; i < home.messages.length; i++) {\n if (home.messages[i].filename) {\n home.messages[i] = home.messages[i].filename;\n }\n }\n }\n if (ver < \"0.58.0\") {\n const changes: [RegExp, string][] = [\n [/getStockSymbols/g, \"stock.getSymbols\"],\n [/getStockPrice/g, \"stock.getPrice\"],\n [/getStockAskPrice/g, \"stock.getAskPrice\"],\n [/getStockBidPrice/g, \"stock.getBidPrice\"],\n [/getStockPosition/g, \"stock.getPosition\"],\n [/getStockMaxShares/g, \"stock.getMaxShares\"],\n [/getStockPurchaseCost/g, \"stock.getPurchaseCost\"],\n [/getStockSaleGain/g, \"stock.getSaleGain\"],\n [/buyStock/g, \"stock.buy\"],\n [/sellStock/g, \"stock.sell\"],\n [/shortStock/g, \"stock.short\"],\n [/sellShort/g, \"stock.sellShort\"],\n [/placeOrder/g, \"stock.placeOrder\"],\n [/cancelOrder/g, \"stock.cancelOrder\"],\n [/getOrders/g, \"stock.getOrders\"],\n [/getStockVolatility/g, \"stock.getVolatility\"],\n [/getStockForecast/g, \"stock.getForecast\"],\n [/purchase4SMarketData/g, \"stock.purchase4SMarketData\"],\n [/purchase4SMarketDataTixApi/g, \"stock.purchase4SMarketDataTixApi\"],\n ];\n function convert(code: string): string {\n for (const change of changes) {\n code = code.replace(change[0], change[1]);\n }\n return code;\n }\n for (const server of GetAllServers()) {\n for (const script of server.scripts) {\n script.code = convert(script.code);\n }\n }\n }\n v1APIBreak();\n ver = 1;\n }\n if (typeof ver === \"number\") {\n if (ver < 2) {\n AwardNFG(10);\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 3) {\n anyPlayer.money = parseFloat(anyPlayer.money);\n if (anyPlayer.corporation) {\n anyPlayer.corporation.funds = parseFloat(anyPlayer.corporation.funds);\n anyPlayer.corporation.revenue = parseFloat(anyPlayer.corporation.revenue);\n anyPlayer.corporation.expenses = parseFloat(anyPlayer.corporation.expenses);\n\n for (let i = 0; i < anyPlayer.corporation.divisions.length; ++i) {\n const ind = anyPlayer.corporation.divisions[i];\n ind.lastCycleRevenue = parseFloat(ind.lastCycleRevenue);\n ind.lastCycleExpenses = parseFloat(ind.lastCycleExpenses);\n ind.thisCycleRevenue = parseFloat(ind.thisCycleRevenue);\n ind.thisCycleExpenses = parseFloat(ind.thisCycleExpenses);\n }\n }\n }\n if (ver < 9) {\n if (StockMarket.hasOwnProperty(\"Joes Guns\")) {\n const s = StockMarket[\"Joes Guns\"];\n delete StockMarket[\"Joes Guns\"];\n StockMarket[LocationName.Sector12JoesGuns] = s;\n }\n }\n if (ver < 10) {\n // Augmentation name was changed in 0.56.0 but sleeves aug list was missed.\n if (anyPlayer.sleeves && anyPlayer.sleeves.length > 0) {\n for (const sleeve of anyPlayer.sleeves) {\n if (!sleeve.augmentations || sleeve.augmentations.length === 0) continue;\n for (const augmentation of sleeve.augmentations) {\n if (augmentation.name !== \"Graphene BranchiBlades Upgrade\") continue;\n augmentation.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n }\n if (ver < 12) {\n if (anyPlayer.resleeves !== undefined) {\n delete anyPlayer.resleeves;\n }\n }\n if (ver < 15) {\n Settings.EditorTheme = { ...defaultMonacoTheme };\n }\n //Fix contract names\n if (ver < 16) {\n Factions[FactionNames.ShadowsOfAnarchy] = new Faction(FactionNames.ShadowsOfAnarchy);\n //Iterate over all contracts on all servers\n for (const server of GetAllServers()) {\n for (const contract of server.contracts) {\n //Rename old \"HammingCodes: Integer to encoded Binary\" contracts\n //to \"HammingCodes: Integer to Encoded Binary\"\n if (contract.type == \"HammingCodes: Integer to encoded Binary\") {\n contract.type = \"HammingCodes: Integer to Encoded Binary\";\n }\n }\n }\n }\n\n // Fix bugged NFG accumulation in owned augmentations\n if (ver < 17) {\n let ownedNFGs = [...Player.augmentations];\n ownedNFGs = ownedNFGs.filter((aug) => aug.name === AugmentationNames.NeuroFluxGovernor);\n const newNFG = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n newNFG.level = 0;\n\n for (const nfg of ownedNFGs) {\n newNFG.level += nfg.level;\n }\n\n Player.augmentations = [\n ...Player.augmentations.filter((aug) => aug.name !== AugmentationNames.NeuroFluxGovernor),\n newNFG,\n ];\n\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 20) {\n // Create the darkweb for everyone but it won't be linked\n const dw = GetServer(SpecialServers.DarkWeb);\n if (!dw) {\n const darkweb = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: SpecialServers.DarkWeb,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1,\n });\n AddToAllServers(darkweb);\n }\n }\n if (ver < 21) {\n // 2.0.0 work rework\n AwardNFG(10);\n const create = anyPlayer[\"createProgramName\"];\n if (create) Player.getHomeComputer().pushProgram(create);\n const graft = anyPlayer[\"graftAugmentationName\"];\n if (graft) Player.augmentations.push({ name: graft, level: 1 });\n }\n }\n}\n\nfunction loadGame(saveString: string): boolean {\n createScamUpdateText();\n if (!saveString) return false;\n saveString = decodeURIComponent(escape(atob(saveString)));\n\n const saveObj = JSON.parse(saveString, Reviver);\n\n loadPlayer(saveObj.PlayerSave);\n loadAllServers(saveObj.AllServersSave);\n loadCompanies(saveObj.CompaniesSave);\n loadFactions(saveObj.FactionsSave);\n\n if (saveObj.hasOwnProperty(\"StaneksGiftSave\")) {\n loadStaneksGift(saveObj.StaneksGiftSave);\n } else {\n console.warn(`Could not load Staneks Gift from save`);\n loadStaneksGift(\"\");\n }\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n loadAliases(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n loadAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n loadAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n loadGlobalAliases(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n loadGlobalAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n loadGlobalAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n loadStockMarket(saveObj.StockMarketSave);\n } catch (e) {\n loadStockMarket(\"\");\n }\n } else {\n loadStockMarket(\"\");\n }\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n Settings.load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n Settings.init();\n }\n } else {\n Settings.init();\n }\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n ExportBonus.setLastExportBonus(JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n ExportBonus.setLastExportBonus(new Date().getTime());\n console.error(\"ERROR: Failed to parse last export bonus Settings \" + err);\n }\n }\n if (Player.inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n loadAllGangs(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n const ver = JSON.parse(saveObj.VersionSave, Reviver);\n evaluateVersionCompatibility(ver);\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver !== CONSTANTS.VersionNumber) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n return true;\n}\n\nfunction createScamUpdateText(): void {\n if (navigator.userAgent.indexOf(\"wv\") !== -1 && navigator.userAgent.indexOf(\"Chrome/\") !== -1) {\n setInterval(() => {\n dialogBoxCreate(\"SCAM ALERT. This app is not official and you should uninstall it.\");\n }, 1000);\n }\n}\n\nconst resets: SxProps = {\n \"& h1, & h2, & h3, & h4, & p, & a, & ul\": {\n margin: 0,\n color: Settings.theme.primary,\n whiteSpace: \"initial\",\n },\n \"& ul\": {\n paddingLeft: \"1.5em\",\n lineHeight: 1.5,\n },\n};\n\nfunction createNewUpdateText(): void {\n setTimeout(\n () =>\n dialogBoxCreate(\n \"New update!
\" +\n \"Please report any bugs/issues through the GitHub repository \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

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

\" +\n CONSTANTS.LatestUpdate,\n resets,\n );\n}\n\nfunction download(filename: string, content: string): void {\n const file = new Blob([content], { type: \"text/plain\" });\n\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n}\n\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame, download };\n\nconst saveObject = new BitburnerSaveObject();\n","import { Augmentation } from \"./Augmentation\";\nimport { StaticAugmentations } from \"./StaticAugmentations\";\nimport { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from \"./PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Player } from \"../Player\";\nimport { prestigeAugmentation } from \"../Prestige\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { clearObject } from \"../utils/helpers/clearObject\";\n\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport {\n initBladeburnerAugmentations,\n initChurchOfTheMachineGodAugmentations,\n initGeneralAugmentations,\n initSoAAugmentations,\n initNeuroFluxGovernor,\n initUnstableCircadianModulator,\n} from \"./data/AugmentationCreator\";\nimport { Router } from \"../ui/GameRoot\";\nimport { mergeMultipliers } from \"../PersonObjects/Multipliers\";\n\nexport function AddToStaticAugmentations(aug: Augmentation): void {\n const name = aug.name;\n StaticAugmentations[name] = aug;\n}\n\nfunction createAugmentations(): void {\n [\n initNeuroFluxGovernor(),\n initUnstableCircadianModulator(),\n ...initGeneralAugmentations(),\n ...initSoAAugmentations(),\n ...(factionExists(FactionNames.Bladeburners) ? initBladeburnerAugmentations() : []),\n ...(factionExists(FactionNames.ChurchOfTheMachineGod) ? initChurchOfTheMachineGodAugmentations() : []),\n ].map(resetAugmentation);\n}\n\nfunction resetFactionAugmentations(): void {\n for (const name of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(name)) {\n Factions[name].augmentations = [];\n }\n }\n}\n\nfunction initAugmentations(): void {\n resetFactionAugmentations();\n clearObject(StaticAugmentations);\n createAugmentations();\n Player.reapplyAllAugmentations();\n}\n\nexport function getBaseAugmentationPriceMultiplier(): number {\n return CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][Player.sourceFileLvl(11)];\n}\nexport function getGenericAugmentationPriceMultiplier(): number {\n return Math.pow(getBaseAugmentationPriceMultiplier(), Player.queuedAugmentations.length);\n}\n\n//Resets an Augmentation during (re-initizliation)\nfunction resetAugmentation(aug: Augmentation): void {\n aug.addToFactions(aug.factions);\n const name = aug.name;\n if (augmentationExists(name)) {\n delete StaticAugmentations[name];\n }\n AddToStaticAugmentations(aug);\n}\n\nfunction applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void {\n const staticAugmentation = StaticAugmentations[aug.name];\n\n // Apply multipliers\n Player.mults = mergeMultipliers(Player.mults, staticAugmentation.mults);\n\n // Special logic for Congruity Implant\n if (aug.name === AugmentationNames.CongruityImplant && !reapply) {\n Player.entropy = 0;\n Player.applyEntropy(Player.entropy);\n }\n\n // Special logic for NeuroFlux Governor\n const ownedNfg = Player.augmentations.find((pAug) => pAug.name === AugmentationNames.NeuroFluxGovernor);\n if (aug.name === AugmentationNames.NeuroFluxGovernor && !reapply && ownedNfg) {\n ownedNfg.level = aug.level;\n return;\n }\n\n // Push onto Player's Augmentation list\n if (!reapply) {\n const ownedAug = new PlayerOwnedAugmentation(aug.name);\n\n Player.augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations(force?: boolean): boolean {\n if (Player.queuedAugmentations.length == 0 && !force) {\n dialogBoxCreate(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n let augmentationList = \"\";\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n const ownedAug = Player.queuedAugmentations[i];\n const aug = StaticAugmentations[ownedAug.name];\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(Player.queuedAugmentations[i]);\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n\n let level = \"\";\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n augmentationList += aug.name + level + \"
\";\n }\n Player.queuedAugmentations = [];\n if (!force) {\n dialogBoxCreate(\n \"You slowly drift to sleep as scientists put you under in order \" +\n \"to install the following Augmentations:
\" +\n augmentationList +\n \"
You wake up in your home...you feel different...\",\n );\n }\n prestigeAugmentation();\n Router.toTerminal();\n return true;\n}\n\nfunction augmentationExists(name: string): boolean {\n return StaticAugmentations.hasOwnProperty(name);\n}\n\nexport function isRepeatableAug(aug: Augmentation): boolean {\n const augName = aug instanceof Augmentation ? aug.name : aug;\n return augName === AugmentationNames.NeuroFluxGovernor;\n}\n\nexport { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };\n","import { isString } from \"./utils/helpers/isString\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ScriptDeath } from \"./Netscript/ScriptDeath\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { NetscriptContext } from \"./Netscript/APIWrapper\";\n\nexport function netscriptDelay(time: number, workerScript: WorkerScript): Promise {\n // Cancel any pre-existing netscriptDelay'ed function call\n // TODO: the rejection almost certainly ends up in the uncaught rejection handler.\n // Maybe reject with a stack-trace'd error message?\n if (workerScript.delayReject) workerScript.delayReject();\n\n return new Promise(function (resolve, reject) {\n workerScript.delay = window.setTimeout(() => {\n workerScript.delay = null;\n workerScript.delayReject = undefined;\n if (workerScript.env.stopFlag) reject(new ScriptDeath(workerScript));\n else resolve();\n }, time);\n workerScript.delayReject = reject;\n });\n}\n\nexport function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);\n }\n\n for (const scriptUrl of workerScript.scriptRef.dependencies) {\n // Return just the original msg if it's nullish so that we don't get a workerscript error\n msg = msg?.replace(new RegExp(scriptUrl.url, \"g\"), scriptUrl.filename) ?? msg;\n }\n\n return \"|DELIMITER|\" + server.hostname + \"|DELIMITER|\" + workerScript.name + \"|DELIMITER|\" + msg;\n}\n\nexport function resolveNetscriptRequestedThreads(ctx: NetscriptContext, requestedThreads?: number): number {\n const threads = ctx.workerScript.scriptRef.threads;\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n const requestedThreadsAsInt = requestedThreads | 0;\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(\n ctx.workerScript,\n `Invalid thread count passed to ${ctx.function}: ${requestedThreads}. Threads must be a positive number.`,\n );\n }\n if (requestedThreadsAsInt > threads) {\n throw makeRuntimeRejectMsg(\n ctx.workerScript,\n `Too many threads requested by ${ctx.function}. Requested: ${requestedThreads}. Has: ${threads}.`,\n );\n }\n return requestedThreadsAsInt;\n}\n\nexport function isScriptErrorMessage(msg: string): boolean {\n if (!isString(msg)) {\n return false;\n }\n const splitMsg = msg.split(\"|DELIMITER|\");\n return splitMsg.length == 4;\n}\n","import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc } from \"./data/codingcontracttypes\";\n\nimport { IMap } from \"./types\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"./utils/JSONReviver\";\nimport { CodingContractEvent } from \"./ui/React/CodingContractModal\";\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n desc: DescriptionFunc;\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n difficulty: number;\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n generate: GeneratorFunc;\n\n /**\n * Name of the type of problem\n */\n name: string;\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n numTries: number;\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n solver: SolverFunc;\n\n constructor(\n name: string,\n desc: DescriptionFunc,\n gen: GeneratorFunc,\n solver: SolverFunc,\n diff: number,\n numTries: number,\n ) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n}\n\n/* Contract Types */\n// tslint:disable-next-line\nexport const CodingContractTypes: IMap = {};\n\nfor (const md of codingContractTypesMetadata) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(\n md.name,\n md.desc,\n md.gen,\n md.solver,\n md.difficulty,\n md.numTries,\n );\n}\n\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\nexport enum CodingContractRewardType {\n FactionReputation,\n FactionReputationAll,\n CompanyReputation,\n Money, // This must always be the last reward type\n}\n\n/**\n * Enum representing the result when trying to solve the Contract\n */\nexport enum CodingContractResult {\n Success,\n Failure,\n Cancelled,\n}\n\n/**\n * A class that represents the type of reward a contract gives\n */\nexport interface ICodingContractReward {\n /* Name of Company/Faction name for reward, if applicable */\n name?: string;\n type: CodingContractRewardType;\n}\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nexport class CodingContract {\n /* Relevant data for the contract's problem */\n data: unknown;\n\n /* Contract's filename */\n fn: string;\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n reward: ICodingContractReward | null;\n\n /* Number of times the Contract has been attempted */\n tries = 0;\n\n /* String representing the contract's type. Must match type in ContractTypes */\n type: string;\n\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward: ICodingContractReward | null = null) {\n this.fn = fn;\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n }\n\n // tslint:disable-next-line\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData(): unknown {\n return this.data;\n }\n\n getDescription(): string {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty(): number {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries(): number {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType(): string {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution: string): boolean {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n async prompt(): Promise {\n return new Promise((resolve) => {\n const props = {\n c: this,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n },\n onAttempt: (val: string) => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n },\n };\n CodingContractEvent.emit(props);\n });\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"CodingContract\", this);\n }\n\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n static fromJSON(value: IReviverValue): CodingContract {\n return Generic_fromJSON(CodingContract, value.data);\n }\n}\n\nReviver.constructors.CodingContract = CodingContract;\n","export enum OrderTypes {\n LimitBuy = \"Limit Buy Order\",\n LimitSell = \"Limit Sell Order\",\n StopBuy = \"Stop Buy Order\",\n StopSell = \"Stop Sell Order\",\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Money } from \"./Money\";\n\nexport function MoneyRate({ money }: { money: number }): JSX.Element {\n return ;\n}\n","import { FragmentType } from \"./FragmentType\";\nimport { Shapes } from \"./data/Shapes\";\n\nexport const Fragments: Fragment[] = [];\n\nexport class Fragment {\n id: number;\n shape: boolean[][];\n type: FragmentType;\n power: number;\n limit: number;\n\n constructor(id: number, shape: boolean[][], type: FragmentType, power: number, limit: number) {\n this.id = id;\n this.shape = shape;\n this.type = type;\n this.power = power;\n this.limit = limit;\n }\n\n fullAt(x: number, y: number, rotation: number): boolean {\n if (y < 0) return false;\n if (y >= this.height(rotation)) return false;\n if (x < 0) return false;\n if (x >= this.width(rotation)) return false;\n // start xy, modifier xy\n let [sx, sy, mx, my] = [0, 0, 1, 1];\n if (rotation === 1) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, 0, -1, 1];\n } else if (rotation === 2) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, this.height(rotation) - 1, -1, -1];\n } else if (rotation === 3) {\n [sx, sy, mx, my] = [0, this.height(rotation) - 1, 1, -1];\n }\n let [qx, qy] = [sx + mx * x, sy + my * y];\n if (rotation % 2 === 1) [qx, qy] = [qy, qx];\n return this.shape[qy][qx];\n }\n\n width(rotation: number): number {\n if (rotation % 2 === 0) return this.shape[0].length;\n return this.shape.length;\n }\n\n height(rotation: number): number {\n if (rotation % 2 === 0) return this.shape.length;\n return this.shape[0].length;\n }\n\n // List of direct neighboors of this fragment.\n neighboors(rotation: number): number[][] {\n const candidates: number[][] = [];\n\n const add = (x: number, y: number): void => {\n if (this.fullAt(x, y, rotation)) return;\n if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;\n candidates.push([x, y]);\n };\n for (let y = 0; y < this.height(rotation); y++) {\n for (let x = 0; x < this.width(rotation); x++) {\n // This cell is full, add all it's neighboors.\n if (!this.fullAt(x, y, rotation)) continue;\n add(x - 1, y);\n add(x + 1, y);\n add(x, y - 1);\n add(x, y + 1);\n }\n }\n const cells: number[][] = [];\n for (const candidate of candidates) {\n if (cells.some((cell) => cell[0] === candidate[0] && cell[1] === candidate[1])) continue;\n cells.push(candidate);\n }\n\n return cells;\n }\n\n copy(): Fragment {\n return Object.assign({}, this);\n }\n}\n\nexport function FragmentById(id: number): Fragment | null {\n for (const fragment of Fragments) {\n if (fragment.id === id) return fragment;\n }\n return null;\n}\n\n(function () {\n const _ = false;\n const X = true;\n Fragments.push(\n new Fragment(\n 0, // id\n Shapes.S,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 1, // id\n Shapes.Z,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 5, // id\n Shapes.T,\n FragmentType.HackingSpeed, // type\n 1.3,\n 1, // limit\n ),\n );\n\n Fragments.push(\n new Fragment(\n 6, // id\n Shapes.I,\n FragmentType.HackingMoney, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 7, // id\n Shapes.J,\n FragmentType.HackingGrow, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 10, // id\n Shapes.T,\n FragmentType.Strength, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 12, // id\n Shapes.L,\n FragmentType.Defense, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 14, // id\n Shapes.L,\n FragmentType.Dexterity, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 16, // id\n Shapes.S,\n FragmentType.Agility, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 18, // id\n Shapes.S,\n FragmentType.Charisma, // type\n 3, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 20, // id\n Shapes.I,\n FragmentType.HacknetMoney, // type\n 1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 21, // id\n Shapes.O,\n FragmentType.HacknetCost, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 25, // id\n Shapes.J,\n FragmentType.Rep, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 27, // id\n Shapes.J,\n FragmentType.WorkMoney, // type\n 10, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 28, // id\n Shapes.L,\n FragmentType.Crime, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 30, // id\n Shapes.S,\n FragmentType.Bladeburner, // type\n 0.4, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 100, // id\n [\n // shape\n [_, X, X],\n [X, X, _],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 101, // id\n [\n // shape\n [X, X, X, X],\n [X, _, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 102, // id\n [\n // shape\n [_, X, X, X],\n [X, X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 103, // id\n [\n // shape\n [X, X, X, _],\n [_, _, X, X],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 104, // id\n [\n // shape\n [_, X, X],\n [_, X, _],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 105, // id\n [\n // shape\n [_, _, X],\n [_, X, X],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 106, // id\n [\n // shape\n [X, _, _],\n [X, X, X],\n [X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 107, // id\n [\n // shape\n [_, X, _],\n [X, X, X],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n})();\n\nexport const NoneFragment = new Fragment(-2, [], FragmentType.None, 0, Infinity);\nexport const DeleteFragment = new Fragment(-2, [], FragmentType.Delete, 0, Infinity);\n","import * as monaco from \"monaco-editor\";\nimport type { Monaco } from \"@monaco-editor/react\";\n\nexport interface IScriptEditorTheme {\n base: \"vs\" | \"vs-dark\" | \"hc-black\";\n inherit: boolean;\n common: {\n accent: string;\n bg: string;\n fg: string;\n };\n syntax: {\n tag: string;\n entity: string;\n string: string;\n regexp: string;\n markup: string;\n keyword: string;\n comment: string;\n constant: string;\n error: string;\n };\n ui: {\n line: string;\n panel: {\n bg: string;\n selected: string;\n border: string;\n };\n selection: {\n bg: string;\n };\n };\n}\n\nexport const defaultMonacoTheme: IScriptEditorTheme = {\n base: \"vs-dark\",\n inherit: true,\n common: {\n accent: \"B5CEA8\",\n bg: \"1E1E1E\",\n fg: \"D4D4D4\",\n },\n syntax: {\n tag: \"569CD6\",\n entity: \"569CD6\",\n string: \"CE9178\",\n regexp: \"646695\",\n markup: \"569CD6\",\n keyword: \"569CD6\",\n comment: \"6A9955\",\n constant: \"569CD6\",\n error: \"F44747\",\n },\n ui: {\n line: \"1E1E1E\",\n panel: {\n bg: \"252526\",\n selected: \"252526\",\n border: \"1E1E1E\",\n },\n selection: {\n bg: \"ADD6FF26\",\n },\n },\n};\n\n// Regex used for token color validation\n// https://github.com/microsoft/vscode/blob/973684056e67153952f495fce93bf50d0ec0b892/src/vs/editor/common/languages/supports/tokenization.ts#L153\nconst colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;\n\n// Recursively sanitize the theme data to prevent errors\n// Invalid data will be replaced with FF0000 (bright red)\nexport const sanitizeTheme = (theme: IScriptEditorTheme): void => {\n for (const [k, v] of Object.entries(theme)) {\n switch (k) {\n case \"base\":\n if (![\"vs-dark\", \"vs\"].includes(theme.base)) theme.base = \"vs-dark\";\n continue;\n case \"inherit\":\n if (typeof theme.inherit !== \"boolean\") theme.inherit = true;\n continue;\n }\n\n const repairBlock = (block: { [key: string]: object | string }): void => {\n for (const [k, v] of Object.entries(block)) {\n if (typeof v === \"object\") {\n repairBlock(v as { [key: string]: string });\n } else if (!v.match(colorRegExp)) block[k] = \"FF0000\";\n }\n };\n repairBlock(v);\n }\n};\n\nexport function makeTheme(theme: IScriptEditorTheme): monaco.editor.IStandaloneThemeData {\n const themeRules = [\n {\n token: \"\",\n background: theme.ui.line,\n foreground: theme.common.fg,\n },\n {\n token: \"identifier\",\n foreground: theme.common.accent,\n },\n {\n token: \"keyword\",\n foreground: theme.syntax.keyword,\n },\n {\n token: \"string\",\n foreground: theme.syntax.string,\n },\n {\n token: \"string.escape\",\n foreground: theme.syntax.regexp,\n },\n {\n token: \"comment\",\n foreground: theme.syntax.comment,\n },\n {\n token: \"constant\",\n foreground: theme.syntax.constant,\n },\n {\n token: \"entity\",\n foreground: theme.syntax.entity,\n },\n {\n token: \"type\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"tag\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"regexp\",\n foreground: theme.syntax.regexp,\n },\n {\n token: \"attribute\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"constructor\",\n foreground: theme.syntax.markup,\n },\n {\n token: \"invalid\",\n foreground: theme.syntax.error,\n },\n {\n token: \"number\",\n foreground: theme.common.accent,\n },\n {\n token: \"delimiter\",\n foreground: theme.common.fg,\n },\n // Custom tokens\n {\n token: \"ns\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"netscriptfunction\",\n foreground: theme.syntax.markup,\n },\n {\n token: \"otherkeywords\",\n foreground: theme.syntax.keyword,\n },\n {\n token: \"otherkeyvars\",\n foreground: theme.common.accent,\n },\n {\n token: \"this\",\n foreground: theme.syntax.tag,\n },\n ];\n\n const themeColors = Object.fromEntries(\n [\n [\"editor.background\", theme.common.bg],\n [\"editor.foreground\", theme.common.fg],\n [\"editor.lineHighlightBackground\", theme.ui.line],\n [\"editor.selectionBackground\", theme.ui.selection.bg],\n\n [\"editorSuggestWidget.background\", theme.ui.panel.bg],\n [\"editorSuggestWidget.border\", theme.ui.panel.border],\n [\"editorSuggestWidget.selectedBackground\", theme.ui.panel.selected],\n\n [\"editorHoverWidget.background\", theme.ui.panel.bg],\n [\"editorHoverWidget.border\", theme.ui.panel.border],\n\n [\"editorWidget.background\", theme.ui.panel.bg],\n [\"editorWidget.border\", theme.ui.panel.border],\n\n [\"input.background\", theme.ui.panel.bg],\n [\"input.border\", theme.ui.panel.border],\n ].map(([k, v]) => [k, \"#\" + v]),\n );\n\n return { base: theme.base, inherit: theme.inherit, rules: themeRules, colors: themeColors };\n}\n\nexport async function loadThemes(monaco: Monaco): Promise {\n monaco.editor.defineTheme(\"monokai\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"272822\",\n token: \"\",\n },\n {\n foreground: \"75715e\",\n token: \"comment\",\n },\n {\n foreground: \"e6db74\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"ae81ff\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"ae81ff\",\n },\n {\n foreground: \"ae81ff\",\n token: \"function\",\n },\n {\n foreground: \"f92672\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"ae81ff\",\n },\n {\n token: \"ns\",\n foreground: \"97d92b\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"53d3e4\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"53d3e4\",\n },\n {\n token: \"this\",\n foreground: \"fd971f\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#F8F8F2\",\n \"editor.background\": \"#272822\",\n \"editor.selectionBackground\": \"#49483E\",\n \"editor.lineHighlightBackground\": \"#3E3D32\",\n \"editorCursor.foreground\": \"#F8F8F0\",\n \"editorWhitespace.foreground\": \"#3B3A32\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-dark\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"002b36\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"00afaf\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"00afaf\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"cb4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#839496\",\n \"editor.background\": \"#002b36\",\n \"editor.selectionBackground\": \"#073642\",\n \"editor.lineHighlightBackground\": \"#073642\",\n \"editorCursor.foreground\": \"#819090\",\n \"editorWhitespace.foreground\": \"#073642\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-light\", {\n base: \"vs\",\n inherit: true,\n rules: [\n {\n foreground: \"657b83\",\n background: \"fdf6e3\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"2aa198\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"2aa198\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"bc4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#657b83\",\n \"editor.background\": \"#fdf6e3\",\n \"editor.selectionBackground\": \"#eee8d5\",\n \"editor.lineHighlightBackground\": \"#eee8d5\",\n \"editorCursor.foreground\": \"#657b83\",\n \"editorWhitespace.foreground\": \"#eee8d5\",\n \"editorIndentGuide.activeBackground\": \"#eee8d5\",\n \"editor.selectionHighlightBorder\": \"#073642\",\n },\n });\n\n monaco.editor.defineTheme(\"dracula\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"282A36\",\n foreground: \"F8F8F2\",\n token: \"\",\n },\n {\n foreground: \"6272A4\",\n token: \"comment\",\n },\n {\n foreground: \"F1FA8C\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"BD93F9\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"BD93F9\",\n },\n {\n foreground: \"FF79C6\",\n token: \"function\",\n },\n {\n foreground: \"FF79C6\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"FF79C6\",\n },\n {\n token: \"ns\",\n foreground: \"FFB86C\",\n fontStyle: \"italic\",\n },\n\n {\n token: \"netscriptfunction\",\n foreground: \"FF79C6\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"FF68A7\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"7EE9FD\",\n fontStyle: \"italic\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"delimiter.parenthesis.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"this\",\n foreground: \"BD93F9\",\n fontStyle: \"italic\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#F8F8F2\",\n \"editor.background\": \"#282A36\",\n \"editorLineNumber.foreground\": \"#6272A4\",\n \"editor.selectionBackground\": \"#44475A\",\n \"editor.selectionHighlightBackground\": \"#424450\",\n \"editor.foldBackground\": \"#21222C\",\n \"editor.wordHighlightBackground\": \"#8BE9FD50\",\n \"editor.wordHighlightStrongBackground\": \"#50FA7B50\",\n \"editor.findMatchBackground\": \"#FFB86C80\",\n \"editor.findMatchHighlightBackground\": \"#FFFFFF40\",\n \"editor.findRangeHighlightBackground\": \"#44475A75\",\n \"editor.hoverHighlightBackground\": \"#8BE9FD50\",\n \"editor.lineHighlightBorder\": \"#44475A\",\n \"editor.rangeHighlightBackground\": \"#BD93F915\",\n \"editor.snippetTabstopHighlightBackground\": \"#282A36\",\n \"editor.snippetTabstopHighlightBorder\": \"#6272A4\",\n \"editor.snippetFinalTabstopHighlightBackground\": \"#282A36\",\n \"editor.snippetFinalTabstopHighlightBorder\": \"#50FA7B\",\n },\n });\n\n monaco.editor.defineTheme(\"one-dark\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n token: \"\",\n background: \"333842\",\n foreground: \"ABB2BF\",\n },\n {\n token: \"comment\",\n foreground: \"5C6370\",\n },\n {\n token: \"string\",\n foreground: \"98C379\",\n },\n {\n token: \"number\",\n foreground: \"D19A66\",\n },\n {\n token: \"function\",\n foreground: \"C678DD\",\n },\n {\n token: \"keyword\",\n foreground: \"C678DD\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"D19A66\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"C678DD\",\n },\n {\n token: \"ns\",\n foreground: \"E06C75\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"61AFEF\",\n },\n {\n token: \"type.identifier\",\n foreground: \"E5C07B\",\n },\n {\n token: \"delimiter\",\n foreground: \"ABB2BF\",\n },\n {\n token: \"this\",\n foreground: \"E06C75\",\n },\n ],\n colors: {\n \"editor.background\": \"#282C34\",\n \"editor.foreground\": \"#ABB2BF\",\n \"editor.lineHighlightBackground\": \"#99BBFF0A\",\n \"editor.selectionBackground\": \"#3E4451\",\n \"editor.findMatchHighlightBackground\": \"#528BFF3D\",\n \"editorCursor.foreground\": \"#528BFF\",\n \"editorHoverWidget.background\": \"#21252B\",\n \"editorHoverWidget.border\": \"#181A1F\",\n \"editorIndentGuide.background\": \"#ABB2BF26\",\n \"editorIndentGuide.activeBackground\": \"#626772\",\n \"editorLineNumber.foreground\": \"#636D83\",\n \"editorLineNumber.activeForeground\": \"#ABB2BF\",\n \"editorSuggestWidget.background\": \"#21252B\",\n \"editorSuggestWidget.border\": \"#181A1F\",\n \"editorSuggestWidget.selectedBackground\": \"#2C313A\",\n \"editorWhitespace.foreground\": \"#ABB2BF26\",\n \"editorWidget.background\": \"#21252B\",\n \"editorWidget.border\": \"#3A3F4B\",\n \"input.background\": \"#1B1D23\",\n \"input.border\": \"#181A1F\",\n \"peekView.border\": \"#528BFF\",\n \"peekViewResult.background\": \"#21252B\",\n \"peekViewResult.selectionBackground\": \"#2C313A\",\n \"peekViewTitle.background\": \"#1B1D23\",\n \"peekViewEditor.background\": \"#1B1D23\",\n \"scrollbarSlider.background\": \"#4E566680\",\n \"scrollbarSlider.activeBackground\": \"#747D9180\",\n \"scrollbarSlider.hoverBackground\": \"#5A637580\",\n },\n });\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nfunction uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport class EventEmitter {\n subscribers: { [key: string]: (...args: [...T]) => void | undefined } = {};\n\n subscribe(s: (...args: [...T]) => void): () => void {\n let uuid = uuidv4();\n while (this.subscribers[uuid] !== undefined) uuid = uuidv4();\n this.subscribers[uuid] = s;\n\n return () => {\n delete this.subscribers[uuid];\n };\n }\n\n emit(...args: [...T]): void {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n if (sub === undefined) continue;\n\n sub(...args);\n }\n }\n}\n","import React, { useState } from \"react\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n label: string;\n placeholder: string;\n add: (x: number) => void;\n subtract: (x: number) => void;\n tons: () => void;\n reset: () => void;\n}\n\nexport function Adjuster(props: IProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setValue(\"\");\n else setValue(parseFloat(event.target.value));\n }\n\n const { label, placeholder, add, subtract, reset, tons } = props;\n return (\n <>\n \n \n \n \n \n \n \n add(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n ),\n endAdornment: (\n <>\n \n subtract(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n \n \n \n \n \n ),\n }}\n />\n \n );\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\n\nexport function random(min: number, max: number): number {\n return Math.random() * (max - min) + min;\n}\n\nexport const upArrowSymbol = \"↑\";\nexport const downArrowSymbol = \"↓\";\nexport const leftArrowSymbol = \"←\";\nexport const rightArrowSymbol = \"→\";\n\nexport function getArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.UP_ARROW:\n case KEY.W:\n return upArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return leftArrowSymbol;\n case KEY.DOWN_ARROW:\n case KEY.S:\n return downArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return rightArrowSymbol;\n }\n return \"\";\n}\n\nexport function getInverseArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.DOWN_ARROW:\n case KEY.S:\n return upArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return leftArrowSymbol;\n case KEY.UP_ARROW:\n case KEY.W:\n return downArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return rightArrowSymbol;\n }\n return \"\";\n}\n","import { Operation, IOperationParams } from \"./Operation\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport class BlackOperation extends Operation {\n constructor(params: IOperationParams | null = null) {\n super(params);\n this.count = 1;\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1.5;\n }\n\n getChaosCompetencePenalty(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n getChaosDifficultyBonus(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"BlackOperation\", this);\n }\n\n static fromJSON(value: IReviverValue): Operation {\n return Generic_fromJSON(BlackOperation, value.data);\n }\n}\n\nReviver.constructors.BlackOperation = BlackOperation;\n","// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\nimport { Research } from \"../Research\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { ResearchTree, Node } from \"../ResearchTree\";\n\nfunction makeNode(name: string): Node {\n const research: Research | null = ResearchMap[name];\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new Node({ text: research.name, cost: research.cost });\n}\n\n// Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\nfunction createBaseResearchTreeNodes(): Node {\n const rootNode: Node = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew: Node = makeNode(\"AutoBrew\");\n const autoParty: Node = makeNode(\"AutoPartyManager\");\n const autoDrugs: Node = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing: Node = makeNode(\"Bulk Purchasing\");\n const cph4: Node = makeNode(\"CPH4 Injections\");\n const drones: Node = makeNode(\"Drones\");\n const dronesAssembly: Node = makeNode(\"Drones - Assembly\");\n const dronesTransport: Node = makeNode(\"Drones - Transport\");\n const goJuice: Node = makeNode(\"Go-Juice\");\n const hrRecruitment: Node = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining: Node = makeNode(\"HRBuddy-Training\");\n const joywire: Node = makeNode(\"JoyWire\");\n const marketta1: Node = makeNode(\"Market-TA.I\");\n const marketta2: Node = makeNode(\"Market-TA.II\");\n const overclock: Node = makeNode(\"Overclock\");\n const scAssemblers: Node = makeNode(\"Self-Correcting Assemblers\");\n const stimu: Node = makeNode(\"Sti.mu\");\n\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n\n hrRecruitment.addChild(hrTraining);\n\n marketta1.addChild(marketta2);\n\n overclock.addChild(stimu);\n\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n\n return rootNode;\n}\n\nexport function getBaseResearchTreeCopy(): ResearchTree {\n const baseResearchTree: ResearchTree = new ResearchTree();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n\n return baseResearchTree;\n}\n\n// Base Research Tree for Industry's that make products\nexport function getProductIndustryResearchTreeCopy(): ResearchTree {\n const researchTree: ResearchTree = new ResearchTree();\n const root = createBaseResearchTreeNodes();\n\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n\n researchTree.setRoot(root);\n\n return researchTree;\n}\n","import { GetServer, createUniqueRandomIp, ipExists } from \"./AllServers\";\nimport { Server, IConstructorParams } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { calculateServerGrowth } from \"./formulas/grow\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\n\nimport { isValidNumber } from \"../utils/helpers/isValidNumber\";\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\nexport function safetlyCreateUniqueServer(params: IConstructorParams): Server {\n let hostname: string = params.hostname.replace(/ /g, `-`);\n\n if (params.ip != null && ipExists(params.ip)) {\n params.ip = createUniqueRandomIp();\n }\n\n if (GetServer(hostname) != null) {\n hostname = `${hostname}-0`;\n\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n for (let i = 0; i < 200; ++i) {\n hostname = hostname.replace(/-[0-9]+$/, `-${i}`);\n if (GetServer(hostname) == null) {\n break;\n }\n }\n }\n\n params.hostname = hostname;\n return new Server(params);\n}\n\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowth(server: Server, growth: number, p: IPlayer, cores = 1): number {\n let ajdGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n if (ajdGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n ajdGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n\n const coreBonus = 1 + (cores - 1) / 16;\n const cycles =\n Math.log(growth) /\n (Math.log(ajdGrowthRate) *\n p.mults.hacking_grow *\n serverGrowthPercentage *\n BitNodeMultipliers.ServerGrowthRate *\n coreBonus);\n\n return cycles;\n}\n\n/**\n * Replacement function for the above function that accounts for the +$1/thread functionality of grow\n * with parameters that are the same (for compatibility), but functionality is slightly different.\n * This function can ONLY be used to calculate the threads needed for a given server in its current state,\n * and so wouldn't be appropriate to use for formulas.exe or ns.growthAnalyze (as those are meant to\n * provide theoretical scenarios, or inverse hack respectively). Players COULD use this function with a\n * custom server object with the correct moneyAvailable and moneyMax amounts, combined with a multiplier\n * correctly calculated to bring the server to a new moneyAvailable (ie, passing in moneyAvailable 300 and x2\n * when you want the number of threads required to grow that particular server from 300 to 600), and this\n * function would pass back the correct number of threads. But the key thing is that it doesn't just\n * inverse/undo a hack (since the amount hacked from/to matters, not just the multiplier).\n * The above is also a rather unnecessarily obtuse way of thinking about it for a formulas.exe type of\n * application, so another function with different parameters is provided for that case below this one.\n * Instead this function is meant to hand-off from the old numCycleForGrowth function to the new one\n * where used internally for pro-rating or the like. Where you have applied a grow and want to determine\n * how many threads were needed for THAT SPECIFIC grow case using a multiplier.\n * Ideally, this function, and the original function above will be depreciated to use the methodology\n * and inputs of the new function below this one. Even for internal cases (it's actually easier to do so).\n * @param server - Server being grown\n * @param growth - How much the server money is expected to be multiplied by (e.g. 1.5 for *1.5 / +50%)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthTransition(server: Server, growth: number, p: IPlayer, cores = 1): number {\n return numCycleForGrowthCorrected(server, server.moneyAvailable * growth, server.moneyAvailable, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server from one $amount to a higher $amount\n * (ie, how many threads to grow this server from $200 to $600 for example). Used primarily for a formulas (or possibly growthAnalyze)\n * type of application. It lets you \"theorycraft\" and easily ask what-if type questions. It's also the one that implements the\n * main thread calculation algorithm, and so is the function all helper functions should call.\n * It protects the inputs (so putting in INFINITY for targetMoney will use moneyMax, putting in a negative for start will use 0, etc.)\n * @param server - Server being grown\n * @param targetMoney - How much you want the server grown TO (not by), for instance, to grow from 200 to 600, input 600\n * @param startMoney - How much you are growing the server from, for instance, to grow from 200 to 600, input 200\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthCorrected(\n server: Server,\n targetMoney: number,\n startMoney: number,\n p: IPlayer,\n cores = 1,\n): number {\n if (startMoney < 0) {\n startMoney = 0;\n } // servers \"can't\" have less than 0 dollars on them\n if (targetMoney > server.moneyMax) {\n targetMoney = server.moneyMax;\n } // can't grow a server to more than its moneyMax\n if (targetMoney <= startMoney) {\n return 0;\n } // no growth --> no threads\n\n // exponential base adjusted by security\n const adjGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n const exponentialBase = Math.min(adjGrowthRate, CONSTANTS.ServerMaxGrowthRate); // cap growth rate\n\n // total of all grow thread multipliers\n const serverGrowthPercentage = server.serverGrowth / 100.0;\n const coreMultiplier = 1 + (cores - 1) / 16;\n const threadMultiplier =\n serverGrowthPercentage * p.mults.hacking_grow * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;\n\n /* To understand what is done below we need to do some math. I hope the explanation is clear enough.\n * First of, the names will be shortened for ease of manipulation:\n * n:= targetMoney (n for new), o:= startMoney (o for old), b:= exponentialBase, t:= threadMultiplier, c:= cycles/threads\n * c is what we are trying to compute.\n *\n * After growing, the money on a server is n = (o + c) * b^(c*t)\n * c appears in an exponent and outside it, this is usually solved using the productLog/lambert's W special function\n * this function will be noted W in the following\n * The idea behind lambert's W function is W(x)*exp(W(x)) = x, or in other words, solving for y, y*exp(y) = x, as a function of x\n * This function is provided in some advanced math library but we will compute it ourself here.\n *\n * Let's get back to solving the equation. It cannot be rewrote using W immediately because the base of the exponentiation is b\n * b^(c*t) = exp(ln(b)*c*t) (this is how a^b is defined on reals, it matches the definition on integers)\n * so n = (o + c) * exp(ln(b)*c*t) , W still cannot be used directly. We want to eliminate the other terms in 'o + c' and 'ln(b)*c*t'.\n *\n * A change of variable will do. The idea is to add an equation introducing a new variable (w here) in the form c = f(w) (for some f)\n * With this equation we will eliminate all references to c, then solve for w and plug the result in the new equation to get c.\n * The change of variable performed here should get rid of the unwanted terms mentionned above, c = w/(ln(b)*t) - o should help.\n * This change of variable is allowed because whatever the value of c is, there is a value of w such that this equation holds:\n * w = (c + o)*ln(b)*t (see how we used the terms we wanted to eliminate in order to build this variable change)\n *\n * We get n = (o + w/(ln(b)*t) - o) * exp(ln(b)*(w/(ln(b)*t) - o)*t) [ = w/(ln(b)*t) * exp(w - ln(b)*o*t) ]\n * The change of variable exposed exp(w - o*ln(b)*t), we can rewrite that with exp(a - b) = exp(a)/exp(b) to isolate 'w*exp(w)'\n * n = w/(ln(b)*t) * exp(w)/exp(ln(b)*o*t) [ = w*exp(w) / (ln(b) * t * b^(o*t)) ]\n * Almost there, we just need to cancel the denominator on the right side of the equation:\n * n * ln(b) * t * b^(o*t) = w*exp(w), Thus w = W(n * ln(b) * t * b^(o*t))\n * Finally we invert the variable change: c = W(n * ln(b) * t * b^(o*t))/(ln(b)*t) - o\n *\n * There is still an issue left: b^(o*t) doesn't fit inside a double precision float\n * because the typical amount of money on servers is arround 10^6~10^9\n * We need to get an approximation of W without computing the power when o is huge\n * Thankfully an approximation giving ~30% error uses log immediately so we will use\n * W(n * ln(b) * t * b^(o*t)) ~= log(n * ln(b) * t * b^(o*t)) = log(n * ln(b) * t) + log(exp(ln(b) * o * t))\n * = log(n * ln(b) * t) + ln(b) * o * t\n * (thanks to Drak for the grow formula, f4113nb34st and Wolfram Alpha for the rewrite, dwRchyngqxs for the explanation)\n */\n const x = threadMultiplier * Math.log(exponentialBase);\n const y = startMoney * x + Math.log(targetMoney * x);\n /* Code for the approximation of lambert's W function is adapted from\n * https://git.savannah.gnu.org/cgit/gsl.git/tree/specfunc/lambert.c\n * using the articles [1] https://doi.org/10.1007/BF02124750 (algorithm above)\n * and [2] https://doi.org/10.1145/361952.361970 (initial approximation when x < 2.5)\n */\n let w;\n if (y < Math.log(2.5)) {\n /* exp(y) can be safely computed without overflow.\n * The relative error on the result is better when exp(y) < 2.5\n * using Padé rational fraction approximation [2](5)\n */\n const ey = Math.exp(y);\n w = (ey + (4 / 3) * ey * ey) / (1 + (7 / 3) * ey + (5 / 6) * ey * ey);\n } else {\n /* obtain initial approximation from rough asymptotic [1](4.18)\n * w = y [- log y when 0 <= y]\n */\n w = y;\n if (y > 0) w -= Math.log(y);\n }\n let cycles = w / x - startMoney;\n\n /* Iterative refinement, the goal is to correct c until |(o + c) * b^(c*t) - n| < 1\n * or the correction on the approximation is less than 1\n * The Newton-Raphson method will be used, this method is a classic to find roots of functions\n * (given f, find c such that f(c) = 0).\n *\n * The idea of this method is to take the horizontal position at which the horizontal axis\n * intersects with of the tangent of the function's curve as the next approximation.\n * It is equivalent to treating the curve as a line (it is called a first order approximation)\n * If the current approximation is c then the new approximated value is c - f(c)/f'(c)\n * (where f' is the derivative of f).\n *\n * In our case f(c) = (o + c) * b^(c*t) - n, f'(c) = d((o + c) * b^(c*t) - n)/dc\n * = (ln(b)*t * (c + o) + 1) * b^(c*t)\n * And the update step is c[new] = c[old] - ((o + c) * b^(c*t) - n)/((ln(b)*t * (o + c) + 1) * b^(c*t))\n *\n * The main question to ask when using this method is \"does it converges?\"\n * (are the approximations getting better?), if it does then it does quickly.\n * DOES IT CONVERGES? In the present case it does. The reason why doesn't help explaining the algorithm.\n * If you are intrested then check out the wikipedia page.\n */\n const bt = exponentialBase ** threadMultiplier;\n let corr = Infinity;\n // Two sided error because we do not want to get stuck if the error stays on the wrong side\n do {\n // c should be above 0 so Halley's method can't be used, we have to stick to Newton-Raphson\n const bct = bt ** cycles;\n const opc = startMoney + cycles;\n const diff = opc * bct - targetMoney;\n corr = diff / (opc * x + 1.0) / bct;\n cycles -= corr;\n } while (Math.abs(corr) >= 1);\n /* c is now within +/- 1 of the exact result.\n * We want the ceiling of the exact result, so the floor if the approximation is above,\n * the ceiling if the approximation is in the same unit as the exact result,\n * and the ceiling + 1 if the approximation is below.\n */\n const fca = Math.floor(cycles);\n if (targetMoney <= (startMoney + fca) * Math.pow(exponentialBase, fca * threadMultiplier)) {\n return fca;\n }\n const cca = Math.ceil(cycles);\n if (targetMoney <= (startMoney + cca) * Math.pow(exponentialBase, cca * threadMultiplier)) {\n return cca;\n }\n return cca + 1;\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on a pre-hack money and hackAmt\n * (ie, if you're hacking a server with $1e6 moneyAvail for 60%, this function will tell you how many threads to regrow it\n * A good replacement for the current ns.growthAnalyze if you want players to have more control/responsibility\n * @param server - Server being grown\n * @param hackProp - the proportion of money hacked (total, not per thread, like 0.60 for hacking 60% of available money)\n * @param prehackMoney - how much money the server had before being hacked (like 200000 for hacking a server that had $200000 on it at time of hacking)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed to reverse the described hack\n */\nexport function numCycleForGrowthByHackAmt(\n server: Server,\n hackProp: number,\n prehackMoney: number,\n p: IPlayer,\n cores = 1,\n): number {\n if (prehackMoney > server.moneyMax) prehackMoney = server.moneyMax;\n const posthackMoney = Math.floor(prehackMoney * Math.min(1, Math.max(0, 1 - hackProp)));\n return numCycleForGrowthCorrected(server, prehackMoney, posthackMoney, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on an expected growth multiplier assuming it will max out\n * (ie, if you expect to grow a server by 60% to reach maxMoney, this function will tell you how many threads to grow it)\n * PROBABLY the best replacement for the current ns.growthAnalyze to maintain existing scripts\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, as a multiple in DECIMAL form (e.g. 1.5 rather than 50). Infinity is acceptable.\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthByMultiplier(server: Server, growth: number, p: IPlayer, cores = 1): number {\n if (growth < 1.0) growth = 1.0;\n const targetMoney = server.moneyMax;\n const startingMoney = server.moneyMax / growth;\n return numCycleForGrowthCorrected(server, targetMoney, startingMoney, p, cores);\n}\n\n//Applied server growth for a single server. Returns the percentage growth\nexport function processSingleServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n let serverGrowth = calculateServerGrowth(server, threads, p, cores);\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n server.moneyAvailable *= serverGrowth;\n\n // in case of data corruption\n if (isValidNumber(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // cap at max\n if (isValidNumber(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // if there was any growth at all, increase security\n if (oldMoneyAvailable !== server.moneyAvailable) {\n let usedCycles = numCycleForGrowthCorrected(server, server.moneyAvailable, oldMoneyAvailable, p, cores);\n // Growing increases server security twice as much as hacking\n usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);\n }\n return server.moneyAvailable / oldMoneyAvailable;\n}\n\nexport function prestigeHomeComputer(player: IPlayer, homeComp: Server): void {\n const hasBitflume = homeComp.programs.includes(Programs.BitFlume.name);\n\n homeComp.programs.length = 0; //Remove programs\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(Programs.NukeProgram.name);\n if (hasBitflume) {\n homeComp.programs.push(Programs.BitFlume.name);\n }\n\n //Update RAM usage on all scripts\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(player, homeComp.scripts);\n });\n\n homeComp.messages.length = 0; //Remove .lit and .msg files\n homeComp.messages.push(LiteratureNames.HackersStartingHandbook);\n}\n\n// Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\nexport function getServerOnNetwork(server: BaseServer, i: number): BaseServer | null {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return GetServer(server.serversOnNetwork[i]);\n}\n\nexport function isBackdoorInstalled(server: BaseServer): boolean {\n if (server instanceof Server) {\n return server.backdoorInstalled;\n }\n return false;\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { ICorporation } from \"../ICorporation\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number;\n corp: ICorporation;\n}\n\nexport function MoneyCost(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (!(props.corp.funds > props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","export const SkillNames: {\n BladesIntuition: string;\n Cloak: string;\n Marksman: string;\n WeaponProficiency: string;\n ShortCircuit: string;\n DigitalObserver: string;\n Tracer: string;\n Overclock: string;\n Reaper: string;\n EvasiveSystem: string;\n Datamancer: string;\n CybersEdge: string;\n HandsOfMidas: string;\n Hyperdrive: string;\n} = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\",\n};\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n reputation: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Reputation({ reputation }: { reputation: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n \n {typeof reputation === \"number\" ? numeralWrapper.formatReputation(reputation) : reputation}\n \n );\n}\n","import React, { useContext } from \"react\";\nimport { IGang } from \"../IGang\";\n\nexport const Context: {\n Gang: React.Context;\n} = {\n Gang: React.createContext({} as IGang),\n};\n\nexport const useGang = (): IGang => useContext(Context.Gang);\n","/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\nimport { ScriptDeath } from \"./ScriptDeath\";\nimport { WorkerScript } from \"./WorkerScript\";\nimport { workerScripts } from \"./WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./WorkerScriptStartStopEventEmitter\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { AddRecentScript } from \"./RecentScripts\";\nimport { Player } from \"../Player\";\n\nexport type killScriptParams = WorkerScript | number | { runningScript: RunningScript; hostname: string };\n\nexport function killWorkerScript(params: killScriptParams): boolean {\n if (params instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(params);\n\n return true;\n } else if (typeof params === \"number\") {\n return killWorkerScriptByPid(params);\n } else {\n // Try to kill by PID\n const res = killWorkerScriptByPid(params.runningScript.pid);\n if (res) {\n return res;\n }\n\n // If for some reason that doesn't work, we'll try the old way\n for (const ws of workerScripts.values()) {\n if (\n ws.name == params.runningScript.filename &&\n ws.hostname == params.hostname &&\n compareArrays(ws.args, params.runningScript.args)\n ) {\n stopAndCleanUpWorkerScript(ws);\n\n return true;\n }\n }\n\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid: number): boolean {\n const ws = workerScripts.get(pid);\n if (ws instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(ws);\n\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript: WorkerScript): void {\n if (typeof workerScript.atExit === \"function\") {\n try {\n workerScript.atExit();\n } catch (e: unknown) {\n dialogBoxCreate(\n `Error trying to call atExit for script ${workerScript.name} on ${workerScript.hostname} ${\n workerScript.scriptRef.args\n } ${String(e)}`,\n );\n }\n workerScript.atExit = undefined;\n }\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript);\n}\n\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\nfunction removeWorkerScript(workerScript: WorkerScript): void {\n const ip = workerScript.hostname;\n const name = workerScript.name;\n\n // Get the server on which the script runs\n const server = GetServer(ip);\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n }\n\n // Delete the RunningScript object from that server\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n if (runningScript.filename === name && compareArrays(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n }\n\n // Recalculate ram used on that server\n\n server.updateRamUsed(0, Player);\n for (const rs of server.runningScripts) server.updateRamUsed(server.ramUsed + rs.ramUsage * rs.threads, Player);\n\n // Delete script from global pool (workerScripts)\n workerScripts.delete(workerScript.pid);\n // const res = workerScripts.delete(workerScript.pid);\n // if (!res) {\n // console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n // console.warn(workerScript);\n // }\n AddRecentScript(workerScript);\n\n WorkerScriptStartStopEventEmitter.emit();\n}\n\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\nfunction killNetscriptDelay(workerScript: WorkerScript): void {\n if (workerScript instanceof WorkerScript) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n if (workerScript.delayReject) {\n workerScript.delayReject(new ScriptDeath(workerScript));\n }\n }\n }\n}\n","/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\nexport function isString(value: unknown): value is string {\n return typeof value === \"string\" || value instanceof String;\n}\n","import { FormControlLabel, Switch, Tooltip, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n checked: boolean;\n onChange: (newValue: boolean, error?: string) => void;\n text: React.ReactNode;\n tooltip: React.ReactNode;\n}\n\nexport function OptionSwitch({ checked, onChange, text, tooltip }: IProps): React.ReactElement {\n const [value, setValue] = useState(checked);\n\n function handleSwitchChange(event: React.ChangeEvent): void {\n setValue(event.target.checked);\n }\n\n useEffect(() => onChange(value), [value]);\n\n return (\n }\n label={\n {tooltip}
}>\n {text}\n \n }\n />\n );\n}\n","import React from \"react\";\nimport { BitNodeMultipliers, IBitNodeMultipliers } from \"./BitNodeMultipliers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { CityName } from \"../Locations/data/CityNames\";\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n desc: string;\n\n // A long, detailed overview of the BitNode\n info: JSX.Element;\n\n // Name of BitNode\n name: string;\n\n // BitNode number\n number: number;\n\n difficulty: 0 | 1 | 2;\n\n constructor(n: number, difficulty: 0 | 1 | 2, name: string, desc = \"\", info: JSX.Element = <>) {\n this.number = n;\n this.difficulty = difficulty;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n}\n\nexport const BitNodes: IMap = {};\n\nBitNodes[\"BitNode1\"] = new BitNode(\n 1,\n 0,\n \"Source Genesis\",\n \"The original BitNode\",\n (\n <>\n The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and\n testing-grounds for all of the BitNodes that followed.\n
\n
\n This is the first BitNode that you play through. It has no special modifications or mechanics.\n
\n
\n Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when\n entering a new BitNode, and also increases all of the player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nBitNodes[\"BitNode2\"] = new BitNode(\n 2,\n 0,\n \"Rise of the Underworld\",\n \"From the shadows, they rose\", //Gangs\n (\n <>\n From the shadows, they rose.\n
\n
\n Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the\n 2050s. As society and civilization broke down, people quickly succumbed to the innate human impulse of evil and\n savagery. The organized crime factions quickly rose to the top of the modern world.\n
\n
\n Certain Factions ({FactionNames.SlumSnakes}, {FactionNames.Tetrads}, {FactionNames.TheSyndicate},{\" \"}\n {FactionNames.TheDarkArmy}, {FactionNames.SpeakersForTheDead}, {FactionNames.NiteSec}, {FactionNames.TheBlackHand}\n ) give the player the ability to form and manage their own gangs. These gangs will earn the player money and\n reputation with the corresponding Faction\n
\n Every Augmentation in the game will be available through the Factions listed above\n
\n
\n Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases\n to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nBitNodes[\"BitNode3\"] = new BitNode(\n 3,\n 0,\n \"Corporatocracy\",\n \"The Price of Civilization\",\n (\n <>\n Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\n
\n
\n Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy,\n and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own\n community, and evict their neighbors from houses in their desperate bid to increase their wealth.\n
\n
\n In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential\n of generating massive profits.\n
\n
\n Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some\n BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers\n by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode4\"] = new BitNode(\n 4,\n 1,\n \"The Singularity\",\n \"The Man and the Machine\",\n (\n <>\n The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are\n more machine than man.
\n
\n
\n In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These\n functions allow you to control most aspects of the game through scripts, including working for factions/companies,\n purchasing/installing Augmentations, and creating programs.\n
\n
\n Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes.\n Each level of this Source-File reduces the RAM cost of singularity functions.\n \n ),\n);\nBitNodes[\"BitNode5\"] = new BitNode(\n 5,\n 1,\n \"Artificial Intelligence\",\n \"Posthuman\",\n (\n <>\n They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't\n be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that\n couldn't be modeled by 1's and 0's. They were wrong.\n
\n
\n Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is\n unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence\n experience is much slower than other stats. Higher Intelligence levels will boost your production for many actions\n in the game.
\n
\n In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with\n Formulas.exe, and will also raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode6\"] = new BitNode(\n 6,\n 1,\n FactionNames.Bladeburners,\n \"Like Tears in Rain\",\n (\n <>\n In the middle of the 21st century, {FactionNames.OmniTekIncorporated} began designing and manufacturing advanced\n synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth\n generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was\n the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more\n intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} Division at the NSA, which provides a\n new mechanic for progression.\n
\n
\n Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionNames.Bladeburners} Division\n in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your\n combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode7\"] = new BitNode(\n 7,\n 2,\n `${FactionNames.Bladeburners} 2079`,\n \"More human than humans\",\n (\n <>\n In the middle of the 21st century, you were doing cutting-edge work at {FactionNames.OmniTekIncorporated} as part\n of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major\n technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a\n hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models\n that were stronger, faster, and more intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} API, which allows you to access{\" \"}\n {FactionNames.Bladeburners}\n functionality through Netscript.\n
\n
\n Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the {FactionNames.Bladeburners} Netscript API in\n other BitNodes. In addition, this Source-File will increase all of your {FactionNames.Bladeburners} multipliers\n by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode8\"] = new BitNode(\n 8,\n 2,\n \"Ghost of Wall Street\",\n \"Money never sleeps\",\n (\n <>\n You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\n
\n
\n In this BitNode:\n
\n
\n You start with $250 million\n
\n You start with a WSE membership and access to the TIX API\n
\n You are able to short stocks and place different types of orders (limit/stop)\n
\n
\n Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nBitNodes[\"BitNode9\"] = new BitNode(\n 9,\n 2,\n \"Hacktocracy\",\n \"Hacknet Unleashed\",\n (\n <>\n When {FactionNames.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became\n the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the\n Hacknet, a global, decentralized network used for nefarious purposes. {FactionNames.FulcrumSecretTechnologies}{\" \"}\n quickly abandoned the project and dissociated themselves from it.\n
\n
\n This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes,\n which can be spent on a variety of different upgrades.\n
\n
\n Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode10\"] = new BitNode(\n 10,\n 2,\n \"Digital Carbon\",\n \"Your body is not who you are\",\n (\n <>\n In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their\n consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the\n digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally\n achieved immortality - at least for those that could afford it.\n
\n
\n This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\n
\n
\n 1. Grafting: Visit VitaLife in New Tokyo to be able to obtain Augmentations without needing to install\n
\n 2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks\n synchronously.\n
\n
\n Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this\n Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nBitNodes[\"BitNode11\"] = new BitNode(\n 11,\n 1,\n \"The Big Crash\",\n \"Okay. Sell it all.\",\n (\n <>\n The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around\n the world. It was this period of disorder that eventually lead to the governmental reformation of many global\n superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark\n times, financial catastrophe hit.\n
\n
\n In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of\n this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic\n banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the\n world is slowly crumbling in the middle of the biggest economic crisis of all time.\n
\n
\n Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and\n reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also\n increases the player's company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nBitNodes[\"BitNode12\"] = new BitNode(\n 12,\n 0,\n \"The Recursion\",\n \"Repeat.\",\n (\n <>\n To iterate is human, to recurse divine.\n
\n
\n Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you\n Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for\n Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the\n level of this source file.\n \n ),\n);\nBitNodes[\"BitNode13\"] = new BitNode(\n 13,\n 2,\n \"They're lunatics\",\n \"1 step back, 2 steps forward\",\n (\n <>\n With the invention of Augmentations in the 2040s a religious group known as the{\" \"}\n {FactionNames.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.\n
\n
\n Their leader, Allison \"Mother\" Stanek is said to have created her own Augmentation whose power goes beyond any\n other. Find her in {CityName.Chongqing} and gain her trust.\n
\n
\n Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the {FactionNames.ChurchOfTheMachineGod} appear in other\n BitNodes.\n
\n
\n Each level of this Source-File increases the size of Stanek's Gift.\n \n ),\n);\n\nexport const defaultMultipliers: IBitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n\n HomeComputerRamCost: 1,\n\n PurchasedServerCost: 1,\n PurchasedServerSoftcap: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n\n CorporationValuation: 1,\n CorporationSoftcap: 1,\n\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n GangSoftcap: 1,\n GangUniqueAugs: 1,\n\n DaedalusAugsRequirement: 30,\n\n StaneksGiftPowerMultiplier: 1,\n StaneksGiftExtraSize: 0,\n\n WorldDaemonDifficulty: 1,\n};\n\nObject.freeze(defaultMultipliers);\n\nexport function getBitNodeMultipliers(n: number, lvl: number): IBitNodeMultipliers {\n const mults = Object.assign({}, defaultMultipliers);\n switch (n) {\n case 1: {\n return mults;\n }\n case 2: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.8,\n ServerGrowthRate: 0.8,\n ServerMaxMoney: 0.2,\n ServerStartingMoney: 0.4,\n CrimeMoney: 3,\n InfiltrationMoney: 3,\n FactionWorkRepGain: 0.5,\n FactionPassiveRepGain: 0,\n StaneksGiftPowerMultiplier: 2,\n StaneksGiftExtraSize: -6,\n PurchasedServerSoftcap: 1.3,\n CorporationSoftcap: 0.9,\n WorldDaemonDifficulty: 5,\n });\n }\n case 3: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.8,\n RepToDonateToFaction: 0.5,\n AugmentationRepCost: 3,\n AugmentationMoneyCost: 3,\n ServerMaxMoney: 0.2,\n ServerStartingMoney: 0.2,\n ServerGrowthRate: 0.2,\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.25,\n CrimeMoney: 0.25,\n HacknetNodeMoney: 0.25,\n HomeComputerRamCost: 1.5,\n PurchasedServerCost: 2,\n StaneksGiftPowerMultiplier: 0.75,\n StaneksGiftExtraSize: -2,\n PurchasedServerSoftcap: 1.3,\n GangSoftcap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.5,\n });\n }\n case 4: {\n return Object.assign(mults, {\n ServerMaxMoney: 0.15,\n ServerStartingMoney: 0.75,\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.1,\n CrimeMoney: 0.2,\n HacknetNodeMoney: 0.05,\n CompanyWorkExpGain: 0.5,\n ClassGymExpGain: 0.5,\n FactionWorkExpGain: 0.5,\n HackExpGain: 0.4,\n CrimeExpGain: 0.5,\n FactionWorkRepGain: 0.75,\n StaneksGiftPowerMultiplier: 1.5,\n StaneksGiftExtraSize: 0,\n PurchasedServerSoftcap: 1.2,\n WorldDaemonDifficulty: 3,\n GangUniqueAugs: 0.5,\n });\n }\n case 5: {\n return Object.assign(mults, {\n ServerMaxMoney: 2,\n ServerStartingSecurity: 2,\n ServerStartingMoney: 0.5,\n ScriptHackMoney: 0.15,\n HacknetNodeMoney: 0.2,\n CrimeMoney: 0.5,\n InfiltrationRep: 1.5,\n InfiltrationMoney: 1.5,\n AugmentationMoneyCost: 2,\n HackExpGain: 0.5,\n CorporationValuation: 0.5,\n StaneksGiftPowerMultiplier: 1.3,\n StaneksGiftExtraSize: 0,\n PurchasedServerSoftcap: 1.2,\n WorldDaemonDifficulty: 1.5,\n GangUniqueAugs: 0.5,\n });\n }\n case 6: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.35,\n ServerMaxMoney: 0.4,\n ServerStartingMoney: 0.5,\n ServerStartingSecurity: 1.5,\n ScriptHackMoney: 0.75,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.75,\n InfiltrationMoney: 0.75,\n CorporationValuation: 0.2,\n HacknetNodeMoney: 0.2,\n HackExpGain: 0.25,\n DaedalusAugsRequirement: 35,\n PurchasedServerSoftcap: 2,\n StaneksGiftPowerMultiplier: 0.5,\n StaneksGiftExtraSize: 2,\n GangSoftcap: 0.7,\n CorporationSoftcap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.2,\n });\n }\n case 7: {\n return Object.assign(mults, {\n BladeburnerRank: 0.6,\n BladeburnerSkillCost: 2,\n AugmentationMoneyCost: 3,\n HackingLevelMultiplier: 0.35,\n ServerMaxMoney: 0.4,\n ServerStartingMoney: 0.5,\n ServerStartingSecurity: 1.5,\n ScriptHackMoney: 0.5,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.75,\n InfiltrationMoney: 0.75,\n CorporationValuation: 0.2,\n HacknetNodeMoney: 0.2,\n HackExpGain: 0.25,\n FourSigmaMarketDataCost: 2,\n FourSigmaMarketDataApiCost: 2,\n DaedalusAugsRequirement: 35,\n PurchasedServerSoftcap: 2,\n StaneksGiftPowerMultiplier: 0.9,\n StaneksGiftExtraSize: -1,\n GangSoftcap: 0.7,\n CorporationSoftcap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.2,\n });\n }\n case 8: {\n return Object.assign(mults, {\n ScriptHackMoney: 0.3,\n ScriptHackMoneyGain: 0,\n ManualHackMoney: 0,\n CompanyWorkMoney: 0,\n CrimeMoney: 0,\n HacknetNodeMoney: 0,\n InfiltrationMoney: 0,\n RepToDonateToFaction: 0,\n CorporationValuation: 0,\n CodingContractMoney: 0,\n StaneksGiftExtraSize: -99,\n PurchasedServerSoftcap: 4,\n GangSoftcap: 0,\n CorporationSoftcap: 0,\n GangUniqueAugs: 0,\n });\n }\n case 9: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.5,\n StrengthLevelMultiplier: 0.45,\n DefenseLevelMultiplier: 0.45,\n DexterityLevelMultiplier: 0.45,\n AgilityLevelMultiplier: 0.45,\n CharismaLevelMultiplier: 0.45,\n PurchasedServerLimit: 0,\n HomeComputerRamCost: 5,\n CrimeMoney: 0.5,\n ScriptHackMoney: 0.1,\n HackExpGain: 0.05,\n ServerStartingMoney: 0.1,\n ServerMaxMoney: 0.1,\n ServerStartingSecurity: 2.5,\n CorporationValuation: 0.5,\n FourSigmaMarketDataCost: 5,\n FourSigmaMarketDataApiCost: 4,\n BladeburnerRank: 0.9,\n BladeburnerSkillCost: 1.2,\n StaneksGiftPowerMultiplier: 0.5,\n StaneksGiftExtraSize: 2,\n GangSoftcap: 0.8,\n CorporationSoftcap: 0.7,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.25,\n });\n }\n case 10: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.35,\n StrengthLevelMultiplier: 0.4,\n DefenseLevelMultiplier: 0.4,\n DexterityLevelMultiplier: 0.4,\n AgilityLevelMultiplier: 0.4,\n CharismaLevelMultiplier: 0.4,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.5,\n HacknetNodeMoney: 0.5,\n ManualHackMoney: 0.5,\n ScriptHackMoney: 0.5,\n CodingContractMoney: 0.5,\n InfiltrationMoney: 0.5,\n CorporationValuation: 0.5,\n AugmentationMoneyCost: 5,\n AugmentationRepCost: 2,\n HomeComputerRamCost: 1.5,\n PurchasedServerCost: 5,\n PurchasedServerLimit: 0.6,\n PurchasedServerMaxRam: 0.5,\n BladeburnerRank: 0.8,\n StaneksGiftPowerMultiplier: 0.75,\n StaneksGiftExtraSize: -3,\n PurchasedServerSoftcap: 1.1,\n GangSoftcap: 0.9,\n CorporationSoftcap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.25,\n });\n }\n case 11: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.6,\n HackExpGain: 0.5,\n ServerMaxMoney: 0.1,\n ServerStartingMoney: 0.1,\n ServerGrowthRate: 0.2,\n ServerWeakenRate: 2,\n CrimeMoney: 3,\n CompanyWorkMoney: 0.5,\n HacknetNodeMoney: 0.1,\n AugmentationMoneyCost: 2,\n InfiltrationMoney: 2.5,\n InfiltrationRep: 2.5,\n CorporationValuation: 0.1,\n CodingContractMoney: 0.25,\n FourSigmaMarketDataCost: 4,\n FourSigmaMarketDataApiCost: 4,\n PurchasedServerSoftcap: 2,\n CorporationSoftcap: 0.9,\n WorldDaemonDifficulty: 1.5,\n GangUniqueAugs: 0.75,\n });\n }\n case 12: {\n const inc = Math.pow(1.02, lvl);\n const dec = 1 / inc;\n\n return Object.assign(mults, {\n DaedalusAugsRequirement: Math.floor(Math.min(mults.DaedalusAugsRequirement + inc, 40)),\n\n HackingLevelMultiplier: dec,\n StrengthLevelMultiplier: dec,\n DefenseLevelMultiplier: dec,\n DexterityLevelMultiplier: dec,\n AgilityLevelMultiplier: dec,\n CharismaLevelMultiplier: dec,\n\n ServerMaxMoney: dec,\n ServerStartingMoney: dec,\n ServerGrowthRate: dec,\n ServerWeakenRate: dec,\n\n //Does not scale, otherwise security might start at 300+\n ServerStartingSecurity: 1.5,\n\n HomeComputerRamCost: inc,\n\n PurchasedServerCost: inc,\n PurchasedServerLimit: dec,\n PurchasedServerMaxRam: dec,\n PurchasedServerSoftcap: inc,\n\n ManualHackMoney: dec,\n ScriptHackMoney: dec,\n CompanyWorkMoney: dec,\n CrimeMoney: dec,\n HacknetNodeMoney: dec,\n CodingContractMoney: dec,\n\n CompanyWorkExpGain: dec,\n ClassGymExpGain: dec,\n FactionWorkExpGain: dec,\n HackExpGain: dec,\n CrimeExpGain: dec,\n\n FactionWorkRepGain: dec,\n FactionPassiveRepGain: dec,\n RepToDonateToFaction: inc,\n\n AugmentationRepCost: inc,\n AugmentationMoneyCost: inc,\n\n InfiltrationMoney: dec,\n InfiltrationRep: dec,\n\n FourSigmaMarketDataCost: inc,\n FourSigmaMarketDataApiCost: inc,\n\n CorporationValuation: dec,\n\n BladeburnerRank: dec,\n BladeburnerSkillCost: inc,\n\n StaneksGiftPowerMultiplier: inc,\n StaneksGiftExtraSize: inc,\n GangSoftcap: 0.8,\n CorporationSoftcap: 0.8,\n WorldDaemonDifficulty: inc,\n\n GangUniqueAugs: dec,\n });\n }\n case 13: {\n return Object.assign(mults, {\n PurchasedServerSoftcap: 1.6,\n\n HackingLevelMultiplier: 0.25,\n StrengthLevelMultiplier: 0.7,\n DefenseLevelMultiplier: 0.7,\n DexterityLevelMultiplier: 0.7,\n AgilityLevelMultiplier: 0.7,\n\n ServerMaxMoney: 0.45,\n ServerStartingMoney: 0.75,\n\n ServerStartingSecurity: 3,\n\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.4,\n CrimeMoney: 0.4,\n HacknetNodeMoney: 0.4,\n CodingContractMoney: 0.4,\n\n CompanyWorkExpGain: 0.5,\n ClassGymExpGain: 0.5,\n FactionWorkExpGain: 0.5,\n HackExpGain: 0.1,\n CrimeExpGain: 0.5,\n\n FactionWorkRepGain: 0.6,\n\n FourSigmaMarketDataCost: 10,\n FourSigmaMarketDataApiCost: 10,\n\n CorporationValuation: 0.001,\n\n BladeburnerRank: 0.45,\n BladeburnerSkillCost: 2,\n StaneksGiftPowerMultiplier: 2,\n StaneksGiftExtraSize: 1,\n GangSoftcap: 0.3,\n CorporationSoftcap: 0.3,\n WorldDaemonDifficulty: 3,\n GangUniqueAugs: 0.1,\n });\n }\n default: {\n throw new Error(\"Invalid BitNodeN\");\n }\n }\n}\n\nexport function initBitNodeMultipliers(p: IPlayer): void {\n Object.assign(BitNodeMultipliers, getBitNodeMultipliers(p.bitNodeN, p.sourceFileLvl(p.bitNodeN)));\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IReviverValue } from \"../utils/JSONReviver\";\n\nexport abstract class Work {\n type: WorkType;\n singularity: boolean;\n cyclesWorked: number;\n\n constructor(type: WorkType, singularity: boolean) {\n this.type = type;\n this.singularity = singularity;\n this.cyclesWorked = 0;\n }\n\n abstract process(player: IPlayer, cycles: number): boolean;\n abstract finish(player: IPlayer, cancelled: boolean): void;\n abstract toJSON(): IReviverValue;\n}\n\nexport enum WorkType {\n CRIME = \"CRIME\",\n CLASS = \"CLASS\",\n CREATE_PROGRAM = \"CREATE_PROGRAM\",\n GRAFTING = \"GRAFTING\",\n FACTION = \"FACTION\",\n COMPANY = \"COMPANY\",\n}\n","import { IMinMaxRange } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nexport const StockForecastInfluenceLimit = 5;\n\nexport interface IConstructorParams {\n b: boolean;\n initPrice: number | IMinMaxRange;\n marketCap: number;\n mv: number | IMinMaxRange;\n name: string;\n otlkMag: number;\n spreadPerc: number | IMinMaxRange;\n shareTxForMovement: number | IMinMaxRange;\n symbol: string;\n}\n\nconst defaultConstructorParams: IConstructorParams = {\n b: true,\n initPrice: 10e3,\n marketCap: 1e12,\n mv: 1,\n name: \"\",\n otlkMag: 0,\n spreadPerc: 0,\n shareTxForMovement: 1e6,\n symbol: \"\",\n};\n\n// Helper function that convert a IMinMaxRange to a number\nfunction toNumber(n: number | IMinMaxRange): number {\n let value: number;\n switch (typeof n) {\n case \"number\": {\n return n;\n }\n case \"object\": {\n const range = n;\n value = getRandomInt(range.min, range.max);\n break;\n }\n default:\n throw Error(`Do not know how to convert the type '${typeof n}' to a number`);\n }\n\n if (typeof n === \"object\" && typeof n.divisor === \"number\") {\n return value / n.divisor;\n }\n\n return value;\n}\n\n/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\nexport class Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n b: boolean;\n\n /**\n * Maximum price of a stock (per share)\n */\n readonly cap: number;\n\n /**\n * Stocks previous share price\n */\n lastPrice: number;\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n readonly maxShares: number;\n\n /**\n * Maximum volatility\n */\n readonly mv: number;\n\n /**\n * Name of the company that the stock is for\n */\n readonly name: string;\n\n /**\n * Outlook magnitude. Represents the stock's forecast and likelihood\n * of increasing/decreasing (based on whether its in bear or bull mode)\n */\n otlkMag: number;\n\n /**\n * Forecast of outlook magnitude. Essentially a second-order forecast.\n * Unlike 'otlkMag', this number is on an absolute scale from 0-100 (rather than 0-50)\n */\n otlkMagForecast: number;\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n playerAvgPx: number;\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n playerAvgShortPx: number;\n\n /**\n * Number of shares the player owns in the LONG position\n */\n playerShares: number;\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n playerShortShares: number;\n\n /**\n * Stock's share price\n */\n price: number;\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n readonly shareTxForMovement: number;\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n shareTxUntilMovement: number;\n\n /**\n * Spread percentage. The bid/ask prices for this stock are N% above or below\n * the \"real price\" to emulate spread.\n */\n readonly spreadPerc: number;\n\n /**\n * The stock's ticker symbol\n */\n readonly symbol: string;\n\n /**\n * Total number of shares of this stock\n * This is different than maxShares, as this is like authorized stock while\n * maxShares is outstanding stock.\n */\n readonly totalShares: number;\n\n constructor(p: IConstructorParams = defaultConstructorParams) {\n this.name = p.name;\n this.symbol = p.symbol;\n this.price = toNumber(p.initPrice);\n this.lastPrice = this.price;\n this.playerShares = 0;\n this.playerAvgPx = 0;\n this.playerShortShares = 0;\n this.playerAvgShortPx = 0;\n this.mv = toNumber(p.mv);\n this.b = p.b;\n this.otlkMag = p.otlkMag;\n this.otlkMagForecast = this.getAbsoluteForecast();\n this.cap = getRandomInt(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement;\n\n // Total shares is determined by market cap, and is rounded to nearest 100k\n const totalSharesUnrounded: number = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5;\n\n // Max Shares (Outstanding shares) is a percentage of total shares\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round((this.totalShares * outstandingSharePercentage) / 1e5) * 1e5;\n }\n\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n changeForecastForecast(newff: number): void {\n this.otlkMagForecast = newff;\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n changePrice(newPrice: number): void {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\n\n /**\n * Change the stock's forecast during a stock market 'tick'.\n * The way a stock's forecast changes depends on various internal properties,\n * but is ultimately determined by RNG\n */\n cycleForecast(changeAmt = 0.1): void {\n const increaseChance = this.getForecastIncreaseChance();\n\n if (Math.random() < increaseChance) {\n // Forecast increases\n if (this.b) {\n this.otlkMag += changeAmt;\n } else {\n this.otlkMag -= changeAmt;\n }\n } else if (this.b) {\n // Forecast decreases\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\n }\n\n /**\n * Change's the stock's second-order forecast during a stock market 'tick'.\n * The change for the second-order forecast to increase is 50/50\n */\n cycleForecastForecast(changeAmt = 0.1): void {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\n }\n\n /**\n * \"Flip\" the stock's second-order forecast. This can occur during a\n * stock market \"cycle\" (determined by RNG). It is used to simulate\n * RL stock market cycles and introduce volatility\n */\n flipForecastForecast(): void {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n getAbsoluteForecast(): number {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n getAskPrice(): number {\n return this.price * (1 + this.spreadPerc / 100);\n }\n\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n getBidPrice(): number {\n return this.price * (1 - this.spreadPerc / 100);\n }\n\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n getForecastIncreaseChance(): number {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\n\n /**\n * Changes a stock's forecast. This is used when the stock is influenced\n * by a transaction. The stock's forecast always goes towards 50, but the\n * movement is capped by a certain threshold/limit\n */\n influenceForecast(change: number): void {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\n }\n\n /**\n * Changes a stock's second-order forecast. This is used when the stock is\n * influenced by a transaction. The stock's second-order forecast always\n * goes towards 50.\n */\n influenceForecastForecast(change: number): void {\n if (this.otlkMagForecast > 50) {\n this.otlkMagForecast -= change;\n this.otlkMagForecast = Math.max(50, this.otlkMagForecast);\n } else if (this.otlkMagForecast < 50) {\n this.otlkMagForecast += change;\n this.otlkMagForecast = Math.min(50, this.otlkMagForecast);\n }\n }\n\n /**\n * Serialize the Stock to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Stock\", this);\n }\n\n /**\n * Initializes a Stock from a JSON save state\n */\n static fromJSON(value: IReviverValue): Stock {\n return Generic_fromJSON(Stock, value.data);\n }\n}\n\nReviver.constructors.Stock = Stock;\n","/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nimport { City } from \"./City\";\nimport { IMap } from \"../types\";\n\nexport const Cities: IMap = {};\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetServerConstants } from \"../data/Constants\";\n\nexport function calculateHashGainRate(\n level: number,\n ramUsed: number,\n maxRam: number,\n cores: number,\n mult: number,\n): number {\n const baseGain = HacknetServerConstants.HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetServerConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * HacknetServerConstants.BaseCost * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetServerConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetServerConstants.RamBaseCost;\n const mult = Math.pow(HacknetServerConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCores: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= HacknetServerConstants.MaxCores) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n totalCost *= HacknetServerConstants.CoreBaseCost;\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCacheUpgradeCost(startingCache: number, extraLevels = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= HacknetServerConstants.MaxCache) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n totalCost *= HacknetServerConstants.CacheBaseCost;\n\n return totalCost;\n}\n\nexport function calculateServerCost(n: number, mult = 1): number {\n if (n - 1 >= HacknetServerConstants.MaxServers) {\n return Infinity;\n }\n\n return HacknetServerConstants.BaseCost * Math.pow(HacknetServerConstants.PurchaseMult, n - 1) * mult;\n}\n","import { IMap } from \"./types\";\nimport { Terminal } from \"./Terminal\";\n\nexport let Aliases: IMap = {};\nexport let GlobalAliases: IMap = {};\n\nexport function loadAliases(saveString: string): void {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\n\nexport function loadGlobalAliases(saveString: string): void {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n}\n\n// Prints all aliases to terminal\nexport function printAliases(): void {\n for (const name of Object.keys(Aliases)) {\n if (Aliases.hasOwnProperty(name)) {\n Terminal.print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n for (const name of Object.keys(GlobalAliases)) {\n if (GlobalAliases.hasOwnProperty(name)) {\n Terminal.print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n}\n\n// Returns true if successful, false otherwise\nexport function parseAliasDeclaration(dec: string, global = false): boolean {\n const re = /^([\\w|!%,@-]+)=((\"(.+)\")|('(.+)'))$/;\n const matches = dec.match(re);\n if (matches == null || matches.length != 7) {\n return false;\n }\n\n if (global) {\n addGlobalAlias(matches[1], matches[4] || matches[6]);\n } else {\n addAlias(matches[1], matches[4] || matches[6]);\n }\n return true;\n}\n\nfunction addAlias(name: string, value: string): void {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name: string, value: string): void {\n if (name in Aliases) {\n delete Aliases[name];\n }\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name: string): string | null {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name: string): string | null {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n return null;\n}\n\nexport function removeAlias(name: string): boolean {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\nexport function substituteAliases(origCommand: string): string {\n const commandArray = origCommand.split(\" \");\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n depth++;\n somethingSubstituted = false;\n const alias = getAlias(commandArray[0])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias);\n //commandArray[0] = alias;\n }\n for (let i = 0; i < commandArray.length; ++i) {\n const alias = getGlobalAlias(commandArray[i])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1;\n //commandArray[i] = alias;\n }\n }\n }\n }\n return commandArray.join(\" \");\n}\n","/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\nimport { City } from \"./City\";\nimport { Cities } from \"./Cities\";\nimport { Location, IConstructorParams } from \"./Location\";\nimport { CityName } from \"./data/CityNames\";\nimport { LocationsMetadata } from \"./data/LocationsMetadata\";\n\nimport { IMap } from \"../types\";\n\nexport const Locations: IMap = {};\n\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\nfunction constructLocation(p: IConstructorParams): Location {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof Location) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new Location(p);\n\n return Locations[p.name];\n}\n\n// First construct all cities\nCities[CityName.Aevum] = new City(CityName.Aevum);\nCities[CityName.Chongqing] = new City(CityName.Chongqing);\nCities[CityName.Ishima] = new City(CityName.Ishima);\nCities[CityName.NewTokyo] = new City(CityName.NewTokyo);\nCities[CityName.Sector12] = new City(CityName.Sector12);\nCities[CityName.Volhaven] = new City(CityName.Volhaven);\n\nCities[CityName.Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\nCities[CityName.Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A------G-- \n / 39 | 41 [church] \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\nCities[CityName.Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x [glitch] \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ H \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\nCities[CityName.NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n [arcade] E [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n `;\nCities[CityName.Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\nCities[CityName.Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `;\n\n// Then construct all locations, and add them to the cities as we go.\nfor (const metadata of LocationsMetadata) {\n const loc = constructLocation(metadata);\n\n const cityName = loc.city;\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city of Object.keys(Cities)) {\n Cities[city].addLocation(loc.name);\n }\n } else {\n Cities[cityName].addLocation(loc.name);\n }\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport interface WorkStats {\n money: number;\n reputation: number;\n hackExp: number;\n strExp: number;\n defExp: number;\n dexExp: number;\n agiExp: number;\n chaExp: number;\n intExp: number;\n}\n\ninterface newWorkStatsParams {\n money?: number;\n reputation?: number;\n hackExp?: number;\n strExp?: number;\n defExp?: number;\n dexExp?: number;\n agiExp?: number;\n chaExp?: number;\n intExp?: number;\n}\n\nexport const newWorkStats = (params?: newWorkStatsParams): WorkStats => {\n return {\n money: params?.money ?? 0,\n reputation: params?.reputation ?? 0,\n hackExp: params?.hackExp ?? 0,\n strExp: params?.strExp ?? 0,\n defExp: params?.defExp ?? 0,\n dexExp: params?.dexExp ?? 0,\n agiExp: params?.agiExp ?? 0,\n chaExp: params?.chaExp ?? 0,\n intExp: params?.intExp ?? 0,\n };\n};\n\nexport const sumWorkStats = (w0: WorkStats, w1: WorkStats): WorkStats => {\n return {\n money: w0.money + w1.money,\n reputation: w0.reputation + w1.reputation,\n hackExp: w0.hackExp + w1.hackExp,\n strExp: w0.strExp + w1.strExp,\n defExp: w0.defExp + w1.defExp,\n dexExp: w0.dexExp + w1.dexExp,\n agiExp: w0.agiExp + w1.agiExp,\n chaExp: w0.chaExp + w1.chaExp,\n intExp: w0.intExp + w1.intExp,\n };\n};\n\nexport const scaleWorkStats = (w: WorkStats, n: number): WorkStats => {\n return {\n money: w.money * n,\n reputation: w.reputation * n,\n hackExp: w.hackExp * n,\n strExp: w.strExp * n,\n defExp: w.defExp * n,\n dexExp: w.dexExp * n,\n agiExp: w.agiExp * n,\n chaExp: w.chaExp * n,\n intExp: w.intExp * n,\n };\n};\n\nexport const applyWorkStats = (player: IPlayer, workStats: WorkStats, cycles: number, source: string): WorkStats => {\n const gains = {\n money: workStats.money * cycles,\n reputation: 0,\n hackExp: workStats.hackExp * cycles,\n strExp: workStats.strExp * cycles,\n defExp: workStats.defExp * cycles,\n dexExp: workStats.dexExp * cycles,\n agiExp: workStats.agiExp * cycles,\n chaExp: workStats.chaExp * cycles,\n intExp: workStats.intExp * cycles,\n };\n player.gainHackingExp(gains.hackExp);\n player.gainStrengthExp(gains.strExp);\n player.gainDefenseExp(gains.defExp);\n player.gainDexterityExp(gains.dexExp);\n player.gainAgilityExp(gains.agiExp);\n player.gainCharismaExp(gains.chaExp);\n player.gainIntelligenceExp(gains.intExp);\n player.gainMoney(gains.money, source);\n return gains;\n};\n","/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nexport class Literature {\n title: string;\n fn: string;\n txt: string;\n\n constructor(title: string, filename: string, txt: string) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n}\n","import React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n value: string;\n color?: string;\n variant?:\n | \"button\"\n | \"caption\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"overline\"\n | \"inherit\"\n | undefined;\n};\n\nexport function CopyableText(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n function copy(): void {\n const copyText = document.createElement(\"textarea\");\n copyText.value = props.value;\n document.body.appendChild(copyText);\n copyText.select();\n copyText.setSelectionRange(0, 1e10);\n document.execCommand(\"copy\");\n document.body.removeChild(copyText);\n setOpen(true);\n setTimeout(() => setOpen(false), 1000);\n }\n\n return (\n Copied!}>\n \n {props.value}\n \n \n );\n}\n","import React from \"react\";\nimport { createTheme, ThemeProvider, Theme, StyledEngineProvider } from \"@mui/material/styles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport const ThemeEvents = new EventEmitter<[]>();\n\ndeclare module \"@mui/material/styles\" {\n interface Theme {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n interface ThemeOptions {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n}\n\nlet theme: Theme;\n\nexport function refreshTheme(): void {\n theme = createTheme({\n colors: {\n hp: Settings.theme.hp,\n money: Settings.theme.money,\n hack: Settings.theme.hack,\n combat: Settings.theme.combat,\n cha: Settings.theme.cha,\n int: Settings.theme.int,\n rep: Settings.theme.rep,\n backgroundprimary: Settings.theme.backgroundprimary,\n backgroundsecondary: Settings.theme.backgroundsecondary,\n button: Settings.theme.button,\n successlight: Settings.theme.successlight,\n success: Settings.theme.success,\n successdark: Settings.theme.successdark,\n white: Settings.theme.white,\n black: Settings.theme.black,\n },\n palette: {\n primary: {\n light: Settings.theme.primarylight,\n main: Settings.theme.primary,\n dark: Settings.theme.primarydark,\n },\n secondary: {\n light: Settings.theme.secondarylight,\n main: Settings.theme.secondary,\n dark: Settings.theme.secondarydark,\n },\n error: {\n light: Settings.theme.errorlight,\n main: Settings.theme.error,\n dark: Settings.theme.errordark,\n },\n info: {\n light: Settings.theme.infolight,\n main: Settings.theme.info,\n dark: Settings.theme.infodark,\n },\n warning: {\n light: Settings.theme.warninglight,\n main: Settings.theme.warning,\n dark: Settings.theme.warningdark,\n },\n success: {\n light: Settings.theme.successlight,\n main: Settings.theme.success,\n dark: Settings.theme.successdark,\n },\n background: {\n default: Settings.theme.backgroundprimary,\n paper: Settings.theme.well,\n },\n action: {\n disabled: Settings.theme.disabled,\n },\n },\n typography: {\n fontFamily: Settings.styles.fontFamily,\n button: {\n textTransform: \"none\",\n },\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n color: Settings.theme.primary,\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: Settings.theme.primarydark,\n },\n },\n },\n },\n\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n borderBottomColor: \"#fff\",\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: Settings.theme.primarydark,\n },\n \"&:before\": {\n borderBottomColor: Settings.theme.primary,\n },\n \"&:after\": {\n borderBottomColor: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primarydark, // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiButtonGroup: {\n styleOverrides: {\n root: {\n \"& .MuiButton-root:not(:last-of-type)\": {\n marginRight: \"1px\",\n },\n },\n },\n },\n\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.button,\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n\n borderRadius: 0,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: Settings.theme.primary,\n },\n },\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTextField: {\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTypography: {\n defaultProps: {\n color: \"primary\",\n },\n styleOverrides: {\n root: {\n lineHeight: Settings.styles.lineHeight,\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\",\n },\n },\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n borderRadius: 0,\n border: \"2px solid white\",\n maxWidth: \"100vh\",\n },\n },\n defaultProps: {\n disableInteractive: true,\n },\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: Settings.theme.primarydark,\n },\n track: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: Settings.theme.primary,\n },\n selectLabel: {\n color: Settings.theme.primary,\n },\n displayedRows: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n textColorPrimary: {\n color: Settings.theme.secondary,\n \"&.Mui-selected\": {\n color: Settings.theme.primary,\n },\n },\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.well,\n margin: \"3px\",\n\n \"&.Mui-selected\": {\n backgroundColor: Settings.theme.button,\n },\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n scrollButtons: {\n backgroundColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n margin: \"3px\",\n opacity: 1,\n width: \"fit-content\",\n\n \"&.Mui-disabled\": {\n opacity: 0.5,\n },\n },\n },\n defaultProps: {\n TabIndicatorProps: {\n style: {\n display: \"none\",\n },\n },\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.black,\n borderRadius: 0,\n border: \"1px solid \" + Settings.theme.well,\n },\n standardSuccess: {\n color: Settings.theme.successlight,\n },\n standardError: {\n color: Settings.theme.errorlight,\n },\n standardWarning: {\n color: Settings.theme.warninglight,\n },\n standardInfo: {\n color: Settings.theme.infolight,\n },\n },\n },\n },\n });\n\n document.body.style.backgroundColor = theme.colors.backgroundprimary?.toString() ?? \"black\";\n}\nrefreshTheme();\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element;\n}\n\nexport const TTheme = ({ children }: IProps): React.ReactElement => (\n \n {children}\n \n);\n","// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum PurchaseAugmentationsOrderSetting {\n Cost,\n Default,\n Reputation,\n Purchasable,\n}\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum OwnedAugmentationsOrderSetting {\n Alphabetically,\n AcquirementTime,\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Draggable, { DraggableEvent } from \"react-draggable\";\nimport { ResizableBox } from \"react-resizable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport ArrowForwardIosIcon from \"@mui/icons-material/ArrowForwardIos\";\nimport { workerScripts } from \"../../Netscript/WorkerScripts\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { Player } from \"../../Player\";\nimport { debounce } from \"lodash\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { ANSIITypography } from \"./ANSIITypography\";\nimport { ScriptArg } from \"../../Netscript/ScriptArg\";\n\nlet layerCounter = 0;\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\nexport const LogBoxCloserEvents = new EventEmitter<[number]>();\nexport const LogBoxClearEvents = new EventEmitter<[]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nlet logs: Log[] = [];\n\nexport function LogBoxManager(): React.ReactElement {\n const setRerender = useState(true)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: ScriptArg): string => `${x}`).join(\"-\");\n if (logs.find((l) => l.id === id)) return;\n logs.push({\n id: id,\n script: script,\n });\n rerender();\n }),\n [],\n );\n\n //Event used by ns.closeTail to close tail windows\n useEffect(\n () =>\n LogBoxCloserEvents.subscribe((pid: number) => {\n closePid(pid);\n }),\n [],\n );\n\n useEffect(() =>\n LogBoxClearEvents.subscribe(() => {\n logs = [];\n rerender();\n }),\n );\n\n //Close tail windows by their id\n function close(id: string): void {\n logs = logs.filter((l) => l.id !== id);\n rerender();\n }\n\n //Close tail windows by their pid\n function closePid(pid: number): void {\n logs = logs.filter((log) => log.script.pid != pid);\n rerender();\n }\n\n return (\n <>\n {logs.map((log) => (\n close(log.id)} />\n ))}\n \n );\n}\n\ninterface IProps {\n script: RunningScript;\n id: string;\n onClose: () => void;\n}\n\nconst useStyles = makeStyles(() =>\n createStyles({\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n flexDirection: \"column-reverse\",\n whiteSpace: \"pre-wrap\",\n wordWrap: \"break-word\",\n },\n titleButton: {\n padding: \"1px 0\",\n height: \"100%\",\n },\n }),\n);\n\nexport const logBoxBaseZIndex = 1500;\n\nfunction LogWindow(props: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const rootRef = useRef(null);\n const [script, setScript] = useState(props.script);\n const classes = useStyles();\n const container = useRef(null);\n const setRerender = useState(false)[1];\n const [minimized, setMinimized] = useState(false);\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // useEffect(\n // () =>\n // WorkerScriptStartStopEventEmitter.subscribe(() => {\n // setTimeout(() => {\n // const server = GetServer(script.server);\n // if (server === null) return;\n // const exisitingScript = findRunningScript(script.filename, script.args, server);\n // if (exisitingScript) {\n // exisitingScript.logs = script.logs.concat(exisitingScript.logs)\n // setScript(exisitingScript)\n // }\n // rerender();\n // }, 100)\n // }),\n // [],\n // );\n\n useEffect(() => {\n updateLayer();\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript({ runningScript: script, hostname: script.server });\n }\n\n function run(): void {\n const server = GetServer(script.server);\n if (server === null) return;\n const s = findRunningScript(script.filename, script.args, server);\n if (s === null) {\n startWorkerScript(Player, script, server);\n } else {\n setScript(s);\n }\n }\n\n function updateLayer(): void {\n const c = container.current;\n if (c === null) return;\n c.style.zIndex = logBoxBaseZIndex + layerCounter + \"\";\n layerCounter++;\n rerender();\n }\n\n function title(full = false): string {\n const maxLength = 30;\n const t = `${script.filename} ${script.args.map((x: ScriptArg): string => `${x}`).join(\" \")}`;\n if (full || t.length <= maxLength) {\n return t;\n }\n return t.slice(0, maxLength - 3) + \"...\";\n }\n\n function minimize(): void {\n setMinimized(!minimized);\n }\n\n function lineColor(s: string): \"error\" | \"success\" | \"warn\" | \"info\" | \"primary\" {\n if (s.match(/(^\\[[^\\]]+\\] )?ERROR/) || s.match(/(^\\[[^\\]]+\\] )?FAIL/)) {\n return \"error\";\n }\n if (s.match(/(^\\[[^\\]]+\\] )?SUCCESS/)) {\n return \"success\";\n }\n if (s.match(/(^\\[[^\\]]+\\] )?WARN/)) {\n return \"warn\";\n }\n if (s.match(/(^\\[[^\\]]+\\] )?INFO/)) {\n return \"info\";\n }\n return \"primary\";\n }\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", onResize);\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n const onResize = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n if (!isOnScreen(node)) {\n resetPosition();\n }\n }, 100);\n\n const isOnScreen = (node: HTMLDivElement): boolean => {\n const bounds = node.getBoundingClientRect();\n\n return !(bounds.right < 0 || bounds.bottom < 0 || bounds.left > innerWidth || bounds.top > outerWidth);\n };\n\n const resetPosition = (): void => {\n const node = rootRef?.current;\n if (!node) return;\n const state = node.state as { x: number; y: number };\n state.x = 0;\n state.y = 0;\n node.setState(state);\n };\n\n const boundToBody = (e: DraggableEvent): void | false => {\n if (\n e instanceof MouseEvent &&\n (e.clientX < 0 || e.clientY < 0 || e.clientX > innerWidth || e.clientY > innerHeight)\n )\n return false;\n };\n\n // Max [width, height]\n const minConstraints: [number, number] = [250, 33];\n\n return (\n \n \n \n \n \n }\n >\n <>\n \n \n {title(true)}\n \n\n \n {!workerScripts.has(script.pid) ? (\n \n ) : (\n \n )}\n \n \n \n \n\n \n \n {script.logs.map(\n (line: string, i: number): JSX.Element => (\n \n \n \n ),\n )}\n \n \n \n \n \n \n );\n}\n","import { IMap } from \"../types\";\n\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nexport const MaterialSizes: IMap = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0.005,\n \"Real Estate\": 0.005,\n \"AI Cores\": 0.1,\n};\n","export function calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\n\nexport function calculateExp(skill: number, mult = 1): number {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\nexport function calculateSkillProgress(exp: number, mult = 1): ISkillProgress {\n const currentSkill = calculateSkill(exp, mult);\n const nextSkill = currentSkill + 1;\n\n let baseExperience = calculateExp(currentSkill, mult);\n if (baseExperience < 0) baseExperience = 0;\n\n let nextExperience = calculateExp(nextSkill, mult);\n if (nextExperience < 0) nextExperience = 0;\n\n const normalize = (value: number): number => ((value - baseExperience) * 100) / (nextExperience - baseExperience);\n let progress = nextExperience - baseExperience !== 0 ? normalize(exp) : 99.99;\n\n // Clamp progress: When sleeves are working out, the player gets way too much progress\n if (progress < 0) progress = 0;\n if (progress > 100) progress = 100;\n\n // Clamp floating point imprecisions\n let currentExperience = exp - baseExperience;\n let remainingExperience = nextExperience - exp;\n if (currentExperience < 0) currentExperience = 0;\n if (remainingExperience < 0) remainingExperience = 0;\n\n return {\n currentSkill,\n nextSkill,\n baseExperience,\n experience: exp,\n nextExperience,\n currentExperience,\n remainingExperience,\n progress,\n };\n}\n\nexport interface ISkillProgress {\n currentSkill: number;\n nextSkill: number;\n baseExperience: number;\n experience: number;\n nextExperience: number;\n currentExperience: number;\n remainingExperience: number;\n progress: number;\n}\n\nexport function getEmptySkillProgress(): ISkillProgress {\n return {\n currentSkill: 0,\n nextSkill: 0,\n baseExperience: 0,\n experience: 0,\n nextExperience: 0,\n currentExperience: 0,\n remainingExperience: 0,\n progress: 0,\n };\n}\n","export interface IMults {\n hack?: number;\n str?: number;\n def?: number;\n dex?: number;\n agi?: number;\n cha?: number;\n}\n\nexport enum UpgradeType {\n Weapon = \"w\",\n Armor = \"a\",\n Vehicle = \"v\",\n Rootkit = \"r\",\n Augmentation = \"g\",\n}\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\ninterface IGangMemberUpgradeMetadata {\n cost: number;\n mults: IMults;\n name: string;\n upgType: UpgradeType;\n}\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nexport const gangMemberUpgradesMetadata: IGangMemberUpgradeMetadata[] = [\n {\n cost: 1e6,\n mults: { str: 1.04, def: 1.04 },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 12e6,\n mults: { str: 1.08, def: 1.08, dex: 1.08 },\n name: \"Katana\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 25e6,\n mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 50e6,\n mults: { str: 1.12, def: 1.1, agi: 1.1 },\n name: \"P90C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 60e6,\n mults: { str: 1.2, def: 1.15 },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 100e6,\n mults: { str: 1.25, def: 1.2 },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 150e6,\n mults: { str: 1.3, def: 1.25 },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 225e6,\n mults: { str: 1.3, dex: 1.25, agi: 1.3 },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 2e6,\n mults: { def: 1.04 },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 5e6,\n mults: { def: 1.08 },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 25e6,\n mults: { def: 1.15, agi: 1.15 },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 40e6,\n mults: { def: 1.2 },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 3e6,\n mults: { agi: 1.04, cha: 1.04 },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 9e6,\n mults: { agi: 1.08, cha: 1.08 },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 18e6,\n mults: { agi: 1.12, cha: 1.12 },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 30e6,\n mults: { agi: 1.16, cha: 1.16 },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 5e6,\n mults: { hack: 1.05 },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 25e6,\n mults: { hack: 1.1 },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 40e6,\n mults: { hack: 1.12 },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 10e9,\n mults: { str: 1.3, dex: 1.3 },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { agi: 1.6 },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 20e9,\n mults: { str: 1.4, def: 1.4 },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 12e9,\n mults: { str: 1.2, def: 1.2 },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 25e9,\n mults: { str: 1.5, agi: 1.5 },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.3, def: 1.3 },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 5e9,\n mults: { hack: 1.05 },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { hack: 1.15 },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 7.5e9,\n mults: { hack: 1.1 },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 50e9,\n mults: { str: 1.7, def: 1.7 },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation,\n },\n];\n","import { FactionInfo, FactionInfos } from \"./FactionInfo\";\nimport { favorToRep, repToFavor } from \"./formulas/favor\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport class Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n alreadyInvited = false;\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n augmentations: string[] = [];\n\n /**\n * Amount of favor the player has with this faction.\n */\n favor = 0;\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n isBanned = false;\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n isMember = false;\n\n /**\n * Name of faction\n */\n name = \"\";\n\n /**\n * Amount of reputation player has with this faction\n */\n playerReputation = 0;\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n getInfo(): FactionInfo {\n const info = FactionInfos[this.name];\n if (info == null) {\n throw new Error(\n `Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,\n );\n }\n\n return info;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n //Returns an array with [How much favor would be gained, how much rep would be left over]\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Faction\", this);\n }\n\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Faction {\n return Generic_fromJSON(Faction, value.data);\n }\n}\n\nReviver.constructors.Faction = Faction;\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport const GangConstants: {\n GangRespectToReputationRatio: number;\n MaximumGangMembers: number;\n CyclesPerTerritoryAndPowerUpdate: number;\n AscensionMultiplierRatio: number;\n Names: string[];\n GangKarmaRequirement: number;\n} = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 75,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\n FactionNames.SlumSnakes,\n FactionNames.Tetrads,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n FactionNames.NiteSec,\n FactionNames.TheBlackHand,\n ],\n GangKarmaRequirement: -54000,\n};\n","import { WorkerScript } from \"./WorkerScript\";\n\n/**\n * Script death marker.\n *\n * IMPORTANT: the game engine should not base any of it's decisions on the data\n * carried in a ScriptDeath instance.\n *\n * This is because ScriptDeath instances are thrown through player code when a\n * script is killed. Which grants the player access to the class and the ability\n * to construct new instances with arbitrary data.\n */\nexport class ScriptDeath {\n /** Process ID number. */\n pid: number;\n\n /** Filename of the script. */\n name: string;\n\n /** IP Address on which the script was running */\n hostname: string;\n\n /** Status message in case of script error. */\n errorMessage = \"\";\n\n constructor(ws: WorkerScript) {\n this.pid = ws.pid;\n this.name = ws.name;\n this.hostname = ws.hostname;\n this.errorMessage = ws.errorMessage;\n\n Object.freeze(this);\n }\n}\n\nObject.freeze(ScriptDeath);\nObject.freeze(ScriptDeath.prototype);\n","/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { ScriptDeath } from \"./Netscript/ScriptDeath\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\nimport { generateNextPid } from \"./Netscript/Pid\";\n\nimport { CONSTANTS } from \"./Constants\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { isScriptErrorMessage, makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { NetscriptFunctions } from \"./NetscriptFunctions\";\nimport { executeJSScript, Node } from \"./NetscriptJSEvaluator\";\nimport { NetscriptPort, IPort } from \"./NetscriptPort\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport { getRamUsageFromRunningScript } from \"./Script/RunningScriptHelpers\";\nimport { scriptCalculateOfflineProduction } from \"./Script/ScriptHelpers\";\nimport { Script } from \"./Script/Script\";\nimport { GetAllServers } from \"./Server/AllServers\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Settings } from \"./Settings/Settings\";\n\nimport { generate } from \"escodegen\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { roundToTwo } from \"./utils/helpers/roundToTwo\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { sprintf } from \"sprintf-js\";\n\nimport { parse } from \"acorn\";\nimport { simple as walksimple } from \"acorn-walk\";\nimport { areFilesEqual } from \"./Terminal/DirectoryHelpers\";\nimport { Player } from \"./Player\";\nimport { Terminal } from \"./Terminal\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { ScriptArg } from \"./Netscript/ScriptArg\";\n\n// Netscript Ports are instantiated here\nexport const NetscriptPorts: IPort[] = [];\nfor (let i = 0; i < CONSTANTS.NumNetscriptPorts; ++i) {\n NetscriptPorts.push(NetscriptPort());\n}\n\nexport function prestigeWorkerScripts(): void {\n for (const ws of workerScripts.values()) {\n ws.env.stopFlag = true;\n killWorkerScript(ws);\n }\n for (const port of NetscriptPorts) {\n port.clear();\n }\n\n WorkerScriptStartStopEventEmitter.emit();\n workerScripts.clear();\n}\n\n// JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\nfunction startNetscript2Script(player: IPlayer, workerScript: WorkerScript): Promise {\n workerScript.running = true;\n\n // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n let runningFn: string | null = null;\n\n // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n function wrap(propName: string, f: (...args: unknown[]) => Promise): (...args: unknown[]) => Promise {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args: unknown[]) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw new ScriptDeath(workerScript);\n }\n\n if (propName === \"asleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg =\n \"Concurrent calls to Netscript functions are not allowed! \" +\n \"Did you forget to await hack(), grow(), or some other \" +\n \"promise-returning function? (Currently running: %s tried to run: %s)\";\n if (runningFn) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, sprintf(msg, runningFn, propName));\n throw new ScriptDeath(workerScript);\n }\n runningFn = propName;\n\n // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n let result;\n try {\n result = f(...args);\n } catch (e: unknown) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n function wrapObject(vars: unknown, ...tree: string[]): void {\n const isObject = (x: unknown): x is { [key: string]: unknown } => typeof x === \"object\";\n if (!isObject(vars)) throw new Error(\"wrong argument sent to wrapObject\");\n for (const prop of Object.keys(vars)) {\n let e = vars[prop];\n switch (typeof e) {\n case \"function\": {\n e = wrap([...tree, prop].join(\".\"), e as any);\n break;\n }\n case \"object\": {\n if (Array.isArray(e)) continue;\n wrapObject(e, ...tree, prop);\n break;\n }\n }\n }\n }\n wrapObject(workerScript.env.vars);\n\n // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n return new Promise((resolve, reject) => {\n executeJSScript(player, workerScript.getServer().scripts, workerScript)\n .then(() => {\n resolve();\n })\n .catch((e) => reject(e));\n }).catch((e) => {\n if (e instanceof Error) {\n if (e instanceof SyntaxError) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + \" (sorry we can't be more helpful)\");\n } else {\n workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\n );\n }\n throw new ScriptDeath(workerScript);\n } else if (isScriptErrorMessage(e)) {\n workerScript.errorMessage = e;\n throw new ScriptDeath(workerScript);\n } else if (e instanceof ScriptDeath) {\n throw e;\n }\n\n // Don't know what to do with it, let's try making an error message out of it\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, \"\" + e);\n throw new ScriptDeath(workerScript);\n });\n}\n\nfunction startNetscript1Script(workerScript: WorkerScript): Promise {\n const code = workerScript.code;\n workerScript.running = true;\n\n //Process imports\n let codeWithImports, codeLineOffset;\n try {\n const importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e: unknown) {\n dialogBoxCreate(\"Error processing Imports in \" + workerScript.name + \":
\" + String(e));\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n\n const interpreterInitialization = function (int: Interpreter, scope: unknown): void {\n //Add the Netscript environment\n const ns = NetscriptFunctions(workerScript);\n for (const name of Object.keys(ns)) {\n const entry = ns[name];\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n const asyncFuncs = [\"hack\", \"grow\", \"weaken\", \"sleep\", \"prompt\", \"manualHack\", \"scp\", \"write\", \"share\", \"wget\"];\n\n if (asyncFuncs.includes(name)) {\n const tempWrapper = function (...args: unknown[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length - 1; ++i) {\n if (typeof args[i] === \"object\" || Array.isArray(args[i])) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n const callb = args[args.length - 1];\n const fnPromise = entry(...fnArgs);\n fnPromise\n .then(function (res: unknown) {\n if (typeof callb === \"function\") {\n callb(res);\n }\n })\n .catch(function (err: unknown) {\n if (typeof err === \"string\") {\n console.error(err);\n const errorTextArray = err.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `${scriptName}@${hostname}
`;\n msg += \"
\";\n msg += errorMsg;\n dialogBoxCreate(msg);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n });\n };\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (\n name === \"sprintf\" ||\n name === \"vsprintf\" ||\n name === \"scp\" ||\n name == \"write\" ||\n name === \"tryWrite\" ||\n name === \"run\" ||\n name === \"exec\"\n ) {\n const tempWrapper = function (...args: unknown[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length; ++i) {\n if (typeof args[i] === \"object\" || Array.isArray(args[i])) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n\n return entry(...fnArgs);\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n const tempWrapper = function (...args: unknown[]): unknown {\n const res = entry(...args);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n }\n\n //Add the arguments\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n let interpreter: Interpreter;\n try {\n interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e: unknown) {\n dialogBoxCreate(\"Syntax ERROR in \" + workerScript.name + \":
\" + String(e));\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter(): void {\n try {\n if (workerScript.env.stopFlag) {\n return reject(new ScriptDeath(workerScript));\n }\n\n let more = true;\n let i = 0;\n while (i < 3 && more) {\n more = more && interpreter.step();\n i++;\n }\n\n if (more) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve();\n }\n } catch (_e: unknown) {\n let e = String(_e);\n if (!isScriptErrorMessage(e)) {\n e = makeRuntimeRejectMsg(workerScript, e);\n }\n workerScript.errorMessage = e;\n return reject(new ScriptDeath(workerScript));\n }\n }\n\n try {\n runInterpreter();\n } catch (e: unknown) {\n if (isString(e)) {\n workerScript.errorMessage = e;\n return reject(new ScriptDeath(workerScript));\n } else if (e instanceof ScriptDeath) {\n return reject(e);\n } else {\n console.error(e);\n return reject(new ScriptDeath(workerScript));\n }\n }\n });\n}\n\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\nfunction processNetscript1Imports(code: string, workerScript: WorkerScript): { code: string; lineOffset: number } {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast: Node = parse(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n const server = workerScript.getServer();\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName: string): Script | null {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n let hasImports = false;\n\n // Walk over the tree and process ImportDeclaration nodes\n walksimple(ast, {\n ImportDeclaration: (node: Node) => {\n hasImports = true;\n let scriptName = node.source.value;\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n const script = getScript(scriptName);\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n const scriptAst = parse(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n const namespace = node.specifiers[0].local.name;\n const fnNames: string[] = []; //Names only\n const fnDeclarations: Node[] = []; //FunctionDeclaration Node objects\n walksimple(scriptAst, {\n FunctionDeclaration: (node: Node) => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n },\n });\n\n //Now we have to generate the code that would create the namespace\n generatedCode += `var ${namespace};\\n(function (namespace) {\\n`;\n\n //Add the function declarations\n fnDeclarations.forEach((fn: Node) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n\n //Add functions to namespace\n fnNames.forEach((fnName) => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n });\n\n //Finish\n generatedCode += `})(${namespace} || (\" + namespace + \" = {}));\\n`;\n } else {\n //import {...} from script\n\n //Get array of all fns to import\n const fnsToImport: string[] = [];\n node.specifiers.forEach((e: Node) => {\n fnsToImport.push(e.local.name);\n });\n\n //Walk through script and get FunctionDeclaration code for all specified fns\n const fnDeclarations: Node[] = [];\n walksimple(scriptAst, {\n FunctionDeclaration: (node: Node) => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n },\n });\n\n //Convert FunctionDeclarations into code\n fnDeclarations.forEach((fn: Node) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n }\n },\n });\n\n //If there are no imports, just return the original code\n if (!hasImports) {\n return { code: code, lineOffset: 0 };\n }\n\n //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n let linesRemoved = 0;\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n }\n\n //Calculated line offset\n const lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved;\n\n //Convert the AST back into code\n code = generate(ast);\n\n //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n code = generatedCode + code;\n\n const res = {\n code: code,\n lineOffset: lineOffset,\n };\n return res;\n}\n\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n */\nexport function startWorkerScript(\n player: IPlayer,\n runningScript: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): number {\n if (createAndAddWorkerScript(player, runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript);\n\n // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n return runningScript.pid;\n }\n\n return 0;\n}\n\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\nfunction createAndAddWorkerScript(\n player: IPlayer,\n runningScriptObj: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): boolean {\n // Update server's ram usage\n let threads = 1;\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n const oneRamUsage = getRamUsageFromRunningScript(runningScriptObj);\n const ramUsage = roundToTwo(oneRamUsage * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n if (ramUsage > ramAvailable + 0.001) {\n dialogBoxCreate(\n `Not enough RAM to run script ${runningScriptObj.filename} with args ` +\n `${arrayToString(runningScriptObj.args)}. This likely occurred because you re-loaded ` +\n `the game and the script's RAM usage increased (either because of an update to the game or ` +\n `your changes to the script.)`,\n );\n return false;\n }\n\n server.updateRamUsed(roundToTwo(server.ramUsed + ramUsage), Player);\n\n // Get the pid\n const pid = generateNextPid();\n if (pid === -1) {\n throw new Error(\n `Failed to start script because could not find available PID. This is most ` +\n `because you have too many scripts running.`,\n );\n }\n\n // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n const workerScript = new WorkerScript(runningScriptObj, pid, NetscriptFunctions);\n workerScript.ramUsage = oneRamUsage;\n\n // Add the WorkerScript to the global pool\n workerScripts.set(pid, workerScript);\n WorkerScriptStartStopEventEmitter.emit();\n\n // Start the script's execution\n let scriptExecution: Promise | null = null; // Script's resulting promise\n if (workerScript.name.endsWith(\".js\") || workerScript.name.endsWith(\".ns\")) {\n scriptExecution = startNetscript2Script(player, workerScript);\n } else {\n scriptExecution = startNetscript1Script(workerScript);\n if (!(scriptExecution instanceof Promise)) {\n return false;\n }\n }\n\n // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n scriptExecution\n .then(function () {\n workerScript.running = false;\n workerScript.env.stopFlag = true;\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent !== undefined) {\n if (parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n }\n }\n\n killWorkerScript(workerScript);\n workerScript.log(\"\", () => \"Script finished running\");\n })\n .catch(function (e) {\n if (e instanceof Error) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + e.toString());\n return;\n } else if (e instanceof ScriptDeath) {\n if (isScriptErrorMessage(workerScript.errorMessage)) {\n const errorTextArray = workerScript.errorMessage.split(\"|DELIMITER|\");\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + workerScript.errorMessage);\n return;\n }\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `RUNTIME ERROR
${scriptName}@${hostname} (PID - ${workerScript.pid})
`;\n if (workerScript.args.length > 0) {\n msg += `Args: ${arrayToString(workerScript.args)}
`;\n }\n msg += \"
\";\n msg += errorMsg;\n\n dialogBoxCreate(msg);\n workerScript.log(\"\", () => \"Script crashed with runtime error\");\n } else {\n workerScript.log(\"\", () => \"Script killed\");\n return; // Already killed, so stop here\n }\n } else if (isScriptErrorMessage(e)) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\n \"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" +\n e.toString(),\n );\n return;\n } else {\n dialogBoxCreate(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(e);\n }\n\n killWorkerScript(workerScript);\n });\n\n return true;\n}\n\n/**\n * Updates the online running time stat of all running scripts\n */\nexport function updateOnlineScriptTimes(numCycles = 1): void {\n const time = (numCycles * CONSTANTS._idleSpeed) / 1000; //seconds\n for (const ws of workerScripts.values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\nexport function loadAllRunningScripts(player: IPlayer): void {\n const skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n if (skipScriptLoad) {\n Terminal.warn(\"Skipped loading player scripts during startup\");\n console.info(\"Skipping the load of any scripts during startup\");\n }\n for (const server of GetAllServers()) {\n // Reset each server's RAM usage to 0\n server.ramUsed = 0;\n\n // Reset modules on all scripts\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n const fileName = server.runningScripts[j].filename;\n createAndAddWorkerScript(player, server.runningScripts[j], server);\n\n if (!server.runningScripts[j]) {\n // createAndAddWorkerScript can modify the server.runningScripts array if a script is invalid\n console.error(`createAndAddWorkerScript removed ${fileName} from ${server}`);\n continue;\n }\n\n // Offline production\n scriptCalculateOfflineProduction(server.runningScripts[j]);\n }\n }\n }\n}\n\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\nexport function runScriptFromScript(\n player: IPlayer,\n caller: string,\n server: BaseServer,\n scriptname: string,\n args: ScriptArg[],\n workerScript: WorkerScript,\n threads = 1,\n): number {\n // Sanitize arguments\n if (!(workerScript instanceof WorkerScript)) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n }\n\n args.forEach((arg, i) => {\n if (typeof arg !== \"string\" && typeof arg !== \"number\" && typeof arg !== \"boolean\")\n throw new Error(\n \"Only strings, numbers, and booleans can be passed as arguments to other scripts.\\n\" +\n `${scriptname} argument index ${i} is of type ${typeof arg} and value ${JSON.stringify(arg)}`,\n );\n });\n\n // Check if the script is already running\n const runningScriptObj = server.getRunningScript(scriptname, args);\n if (runningScriptObj != null) {\n workerScript.log(caller, () => `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n }\n\n // 'null/undefined' arguments are not allowed\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, () => \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; ++i) {\n if (!areFilesEqual(server.scripts[i].filename, scriptname)) continue;\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.floor(Number(threads));\n if (threads === 0) {\n return 0;\n }\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, () => `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable + 0.001) {\n workerScript.log(\n caller,\n () =>\n `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,\n );\n return 0;\n }\n // Able to run script\n workerScript.log(\n caller,\n () => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,\n );\n const runningScriptObj = new RunningScript(script, args);\n runningScriptObj.threads = threads;\n runningScriptObj.server = server.hostname;\n\n return startWorkerScript(player, runningScriptObj, server, workerScript);\n }\n\n workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const workerScripts: Map = new Map();\n","import React from \"react\";\n\nimport { Table, TableCell } from \"./Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table as MuiTable } from \"@mui/material\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n rows: React.ReactNode[][];\n title?: string;\n wide?: boolean;\n}\n\nexport function StatsTable({ rows, title, wide }: IProps): React.ReactElement {\n const T = wide ? MuiTable : Table;\n return (\n <>\n {title && {title}}\n \n \n {rows.map((row: React.ReactNode[], i: number) => (\n \n {row.map((elem: React.ReactNode, i: number) => (\n \n {elem}\n \n ))}\n \n ))}\n \n \n \n );\n}\n","import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { Export } from \"./Export\";\n\ninterface IConstructorParams {\n name?: string;\n}\n\nexport class Material {\n // Name of material\n name = \"InitName\";\n\n // Amount of material owned\n qty = 0;\n\n // Material's \"quality\". Unbounded\n qlt = 0;\n\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n dmd = 0;\n dmdR: number[] = [0, 0];\n\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n cmp = 0;\n cmpR: number[] = [0, 0];\n\n // Maximum volatility of this Materials stats\n mv = 0;\n\n // Markup. Determines how high of a price you can charge on the material\n // compared to the market price without suffering loss in # of sales\n // Quality is divided by this to determine markup limits\n // e,g, If mku is 10 and quality is 100 then you can markup prices by 100/10 = 10\n mku = 0;\n\n // How much of this material is being bought, sold, imported and produced every second\n buy = 0;\n sll = 0;\n prd = 0;\n imp = 0;\n\n // Exports of this material to another warehouse/industry\n exp: Export[] = [];\n\n // Total amount of this material exported in the last cycle\n totalExp = 0;\n\n // Cost / sec to buy this material. AKA Market Price\n bCost = 0;\n\n // Cost / sec to sell this material\n sCost: string | number = 0;\n\n // Flags to keep track of whether production and/or sale of this material is limited\n // [Whether production/sale is limited, limit amount]\n prdman: [boolean, number] = [false, 0]; // Production\n sllman: [boolean, string | number] = [false, 0]; // Sale\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price = 0;\n\n // Determines the maximum amount of this material that can be sold in one market cycle\n maxsll = 0;\n\n constructor(params: IConstructorParams = {}) {\n if (params.name) {\n this.name = params.name;\n }\n this.init();\n }\n\n getMarkupLimit(): number {\n return this.qlt / this.mku;\n }\n\n init(): void {\n switch (this.name) {\n case \"Water\":\n this.dmd = 75;\n this.dmdR = [65, 85];\n this.cmp = 50;\n this.cmpR = [40, 60];\n this.bCost = 1500;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Energy\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 2000;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Food\":\n this.dmd = 80;\n this.dmdR = [70, 90];\n this.cmp = 60;\n this.cmpR = [35, 85];\n this.bCost = 5000;\n this.mv = 1;\n this.mku = 3;\n break;\n case \"Plants\":\n this.dmd = 70;\n this.dmdR = [20, 90];\n this.cmp = 50;\n this.cmpR = [30, 70];\n this.bCost = 3000;\n this.mv = 0.6;\n this.mku = 3.75;\n break;\n case \"Metal\":\n this.dmd = 80;\n this.dmdR = [75, 85];\n this.cmp = 70;\n this.cmpR = [60, 80];\n this.bCost = 2650;\n this.mv = 1;\n this.mku = 6;\n break;\n case \"Hardware\":\n this.dmd = 85;\n this.dmdR = [80, 90];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 8e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"Chemicals\":\n this.dmd = 55;\n this.dmdR = [40, 70];\n this.cmp = 60;\n this.cmpR = [40, 80];\n this.bCost = 9e3;\n this.mv = 1.2;\n this.mku = 2;\n break;\n case \"Real Estate\":\n this.dmd = 50;\n this.dmdR = [5, 99];\n this.cmp = 50;\n this.cmpR = [25, 75];\n this.bCost = 80e3;\n this.mv = 1.5; //Less mv bc its processed twice\n this.mku = 1.5;\n break;\n case \"Drugs\":\n this.dmd = 60;\n this.dmdR = [45, 75];\n this.cmp = 70;\n this.cmpR = [40, 99];\n this.bCost = 40e3;\n this.mv = 1.6;\n this.mku = 1;\n break;\n case \"Robots\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 99];\n this.bCost = 75e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"AI Cores\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 99];\n this.bCost = 15e3;\n this.mv = 0.8; //Less mv bc its processed twice\n this.mku = 0.5;\n break;\n case \"Scientific Research\":\n case \"InitName\":\n break;\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n }\n\n // Process change in demand, competition, and buy cost of this material\n processMarket(): void {\n // The price will change in accordance with demand and competition.\n // e.g. If demand goes up, then so does price. If competition goes up, price goes down\n const priceVolatility: number = (Math.random() * this.mv) / 300;\n const priceChange: number = 1 + priceVolatility;\n\n //This 1st random check determines whether competition increases or decreases\n const compVolatility: number = (Math.random() * this.mv) / 100;\n const compChange: number = 1 + compVolatility;\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n this.bCost *= priceChange; // Competition decreases, so price goes up\n }\n\n // This 2nd random check determines whether demand increases or decreases\n const dmdVolatility: number = (Math.random() * this.mv) / 100;\n const dmdChange: number = 1 + dmdVolatility;\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n this.bCost *= 1 / priceChange;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Material\", this);\n }\n\n // Initiatizes a Material object from a JSON save state.\n static fromJSON(value: IReviverValue): Material {\n return Generic_fromJSON(Material, value.data);\n }\n}\n\nReviver.constructors.Material = Material;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberTask } from \"../GangMemberTask\";\n\nexport interface FormulaGang {\n respect: number;\n territory: number;\n wantedLevel: number;\n}\n\nexport function calculateWantedPenalty(gang: FormulaGang): number {\n return gang.respect / (gang.respect + gang.wantedLevel);\n}\n\nexport function calculateRespectGain(gang: FormulaGang, member: GangMember, task: GangMemberTask): number {\n if (task.baseRespect === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.respect) / 100);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateWantedLevelGain(gang: FormulaGang, member: GangMember, task: GangMemberTask): number {\n if (task.baseWanted === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n const calc = (7 * task.baseWanted) / Math.pow(3 * statWeight * territoryMult, 0.8);\n\n // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n return Math.min(100, calc);\n}\n\nexport function calculateMoneyGain(gang: FormulaGang, member: GangMember, task: GangMemberTask): number {\n if (task.baseMoney === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateAscensionPointsGain(exp: number): number {\n return Math.max(exp - 1000, 0);\n}\n\nexport function calculateAscensionMult(points: number): number {\n return Math.max(Math.pow(points / 2000, 0.5), 1);\n}\n","import { Paper } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { use } from \"../../ui/Context\";\nimport { ProgressBar } from \"../../ui/React/Progress\";\n\ninterface IProps {\n millis: number;\n onExpire: () => void;\n noPaper?: boolean;\n}\n\nexport function GameTimer(props: IProps): React.ReactElement {\n const player = use.Player();\n const [v, setV] = useState(100);\n const totalMillis = (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.3 : 1) * props.millis;\n\n const tick = 200;\n useEffect(() => {\n const intervalId = setInterval(() => {\n setV((old) => {\n if (old <= 0) props.onExpire();\n return old - (tick / totalMillis) * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n return props.noPaper ? (\n \n ) : (\n \n \n \n );\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IActionIdentifier } from \"./IActionIdentifier\";\nimport { ActionIdentifier } from \"./ActionIdentifier\";\nimport { ActionTypes } from \"./data/ActionTypes\";\nimport { Growths } from \"./data/Growths\";\nimport { BlackOperations } from \"./BlackOperations\";\nimport { BlackOperation } from \"./BlackOperation\";\nimport { Operation } from \"./Operation\";\nimport { Contract } from \"./Contract\";\nimport { GeneralActions } from \"./GeneralActions\";\nimport { formatNumber } from \"../utils/StringHelperFunctions\";\nimport { Skills } from \"./Skills\";\nimport { Skill } from \"./Skill\";\nimport { City } from \"./City\";\nimport { IAction } from \"./IAction\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { createTaskTracker, ITaskTracker } from \"../PersonObjects/ITaskTracker\";\nimport { IPerson } from \"../PersonObjects/IPerson\";\nimport { IRouter } from \"../ui/Router\";\nimport { ConsoleHelpText } from \"./data/Help\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { calculateHospitalizationCost } from \"../Hospital/Hospital\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { KEY } from \"../utils/helpers/keyCodes\";\n\ninterface BlackOpsAttempt {\n error?: string;\n isAvailable?: boolean;\n action?: BlackOperation;\n}\n\nexport class Bladeburner implements IBladeburner {\n numHosp = 0;\n moneyLost = 0;\n rank = 0;\n maxRank = 0;\n\n skillPoints = 0;\n totalSkillPoints = 0;\n\n teamSize = 0;\n sleeveSize = 0;\n teamLost = 0;\n hpLost = 0;\n\n storedCycles = 0;\n\n randomEventCounter: number = getRandomInt(240, 600);\n\n actionTimeToComplete = 0;\n actionTimeCurrent = 0;\n actionTimeOverflow = 0;\n\n action: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n\n cities: Record = {};\n city: string = BladeburnerConstants.CityNames[2];\n skills: Record = {};\n skillMultipliers: Record = {};\n staminaBonus = 0;\n maxStamina = 0;\n stamina = 0;\n contracts: Record = {};\n operations: Record = {};\n blackops: Record = {};\n logging = {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true,\n };\n automateEnabled = false;\n automateActionHigh: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshHigh = 0;\n automateActionLow: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshLow = 0;\n consoleHistory: string[] = [];\n consoleLogs: string[] = [\"Bladeburner Console\", \"Type 'help' to see console commands\"];\n\n constructor(player?: IPlayer) {\n for (let i = 0; i < BladeburnerConstants.CityNames.length; ++i) {\n this.cities[BladeburnerConstants.CityNames[i]] = new City(BladeburnerConstants.CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity(): City {\n const city = this.cities[this.city];\n if (!(city instanceof City)) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n return city;\n }\n\n calculateStaminaPenalty(): number {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n canAttemptBlackOp(actionId: IActionIdentifier): BlackOpsAttempt {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n return { error: \"Tried to start a Black Operation that had already been completed\" };\n }\n\n const action = this.getActionObject(actionId);\n if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);\n if (action == null) throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n\n if (action.reqdRank > this.rank) {\n return { error: \"Tried to start a Black Operation without the rank requirement\" };\n }\n\n // Can't start a BlackOp if you haven't done the one before it\n const blackops = [];\n for (const nm of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n blackops.sort(function (a, b) {\n return BlackOperations[a].reqdRank - BlackOperations[b].reqdRank; // Sort black ops in intended order\n });\n\n const i = blackops.indexOf(actionId.name);\n if (i === -1) {\n return { error: `Invalid Black Op: '${name}'` };\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n return { error: `Preceding Black Op must be completed before starting '${actionId.name}'.` };\n }\n\n return { isAvailable: true, action };\n }\n\n startAction(person: IPerson, actionId: IActionIdentifier): void {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n switch (actionId.type) {\n case ActionTypes[\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n case ActionTypes[\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this, person);\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n break;\n case ActionTypes[\"Operation\"]: {\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n if (actionId.name === \"Raid\" && this.getCurrentCity().comms === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this, person);\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const testBlackOp = this.canAttemptBlackOp(actionId);\n if (!testBlackOp.isAvailable) {\n this.resetAction();\n this.log(`Error: ${testBlackOp.error}`);\n break;\n }\n if (testBlackOp.action === undefined) {\n throw new Error(\"action should not be null\");\n }\n this.actionTimeToComplete = testBlackOp.action.getActionTime(this, person);\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(person);\n break;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n this.actionTimeToComplete = 60;\n break;\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n }\n }\n\n upgradeSkill(skill: Skill, count = 1): void {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n if (this.skills[skillName]) {\n this.skills[skillName] += count;\n } else {\n this.skills[skillName] = count;\n }\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player: IPlayer, commands: string): void {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n }\n\n postToConsole(input: string, saveToLogs = true): void {\n const MaxConsoleEntries = 100;\n if (saveToLogs) {\n this.consoleLogs.push(input);\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input: string): void {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${getTimestamp()}] ${input}`);\n }\n\n resetAction(): void {\n this.action = new ActionIdentifier({ type: ActionTypes.Idle });\n this.actionTimeCurrent = 0;\n this.actionTimeToComplete = 0;\n }\n\n clearConsole(): void {\n this.consoleLogs.length = 0;\n }\n\n prestige(): void {\n this.resetAction();\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0): void {\n this.storedCycles += numCycles;\n }\n\n // working on\n getActionIdFromTypeAndName(type = \"\", name = \"\"): IActionIdentifier | null {\n if (type === \"\" || name === \"\") {\n return null;\n }\n const action = new ActionIdentifier();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = ActionTypes[\"Contract\"];\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = ActionTypes[\"Operation\"];\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = ActionTypes[\"BlackOp\"];\n if (BlackOperations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = ActionTypes[\"Training\"];\n action.name = \"Training\";\n break;\n case \"recruitment\":\n case \"recruit\":\n action.type = ActionTypes[\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = ActionTypes[\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n case \"diplomacy\":\n action.type = ActionTypes[\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n case \"hyperbolic regeneration chamber\":\n action.type = ActionTypes[\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n case \"incite violence\":\n action.type = ActionTypes[\"Incite Violence\"];\n action.name = \"Incite Violence\";\n break;\n default:\n return null;\n }\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player: IPlayer, args: string[]): void {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n const name = args[2];\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[name] != null) {\n this.action.type = ActionTypes[name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = ActionTypes.Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = ActionTypes.Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (BlackOperations[name] != null) {\n this.action.type = ActionTypes.BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args: string[]): void {\n switch (args.length) {\n case 1: {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n case 2: {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(Skills);\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = Skills[skillNames[i]];\n let level = 0;\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level, 0));\n }\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multKeys.length; ++i) {\n const mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n const mults = formatNumber(mult, 3);\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mults);\n break;\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mults);\n break;\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mults);\n break;\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mults);\n break;\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mults);\n break;\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mults);\n break;\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mults);\n break;\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mults);\n break;\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mults);\n break;\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mults);\n break;\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mults);\n break;\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mults);\n break;\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mults);\n break;\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mults);\n break;\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mults);\n break;\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n case 3: {\n const skillName = args[2];\n const skill = Skills[skillName];\n if (skill == null || !(skill instanceof Skill)) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n break;\n }\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const pointCost = skill.calculateCost(currentLevel);\n if (skill.maxLvl !== 0 && currentLevel >= skill.maxLvl) {\n this.postToConsole(`This skill ${skill.name} is already at max level (${currentLevel}/${skill.maxLvl}).`);\n } else if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\n \"You do not have enough Skill Points to upgrade this. You need \" + formatNumber(pointCost, 0),\n );\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n default: {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args: string[]): void {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\n \"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\",\n );\n break;\n }\n }\n\n executeHelpConsoleCommand(args: string[]): void {\n if (args.length === 1) {\n for (const line of ConsoleHelpText.helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in ConsoleHelpText)) continue;\n const helpText = ConsoleHelpText[args[i]];\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args: string[]): void {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\n \"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\",\n );\n return;\n }\n\n // Enable/Disable\n if (args.length === 2) {\n const flag = args[1];\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\n \"When your stamina drops to \" +\n formatNumber(this.automateThreshLow, 0) +\n \", you will automatically switch to \" +\n this.automateActionLow.name +\n \". When your stamina recovers to \" +\n formatNumber(this.automateThreshHigh, 0) +\n \", you will automatically \" +\n \"switch to \" +\n this.automateActionHigh.name +\n \".\",\n );\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (\n !(this.automateActionLow instanceof ActionIdentifier) ||\n !(this.automateActionHigh instanceof ActionIdentifier)\n ) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n return;\n }\n\n // Set variables\n if (args.length === 4) {\n const variable = args[1].toLowerCase(); // allows Action Type to be with or without capitalisation.\n const val = args[2];\n\n let highLow = false; // True for high, false for low\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes[val],\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Contract,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Operation,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n break;\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n break;\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command: string): string[] {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n while (i < command.length) {\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === KEY.SPACE) {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n ++i;\n }\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n return args;\n }\n\n executeConsoleCommand(player: IPlayer, command: string): void {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n case \"stop\":\n this.resetAction();\n break;\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName: string): void {\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n const rand = Math.random();\n let percentage = getRandomInt(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= getRandomInt(2, 4); // Migration increases population change\n --sourceCity.comms;\n ++destCity.comms;\n }\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName: string, chance: number): void {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n if (chance > 1) {\n chance /= 100;\n }\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent(): void {\n const chance = Math.random();\n\n // Choose random source/destination city for events\n const sourceCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n if (!(sourceCity instanceof City)) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof City) || !(destCity instanceof City)) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms;\n\n // Change pop\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\",\n );\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = getRandomInt(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a large number of Synthoids migrated from \" +\n sourceCityName +\n \" to some other city\",\n );\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + getRandomInt(5, 20) / 100;\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = getRandomInt(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n }\n // 10% chance of nothing happening\n }\n\n /**\n * Return stat to be gained from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n getActionStats(action: IAction, success: boolean): ITaskTracker {\n const difficulty = action.getDifficulty();\n\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n const difficultyMult =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n\n const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * BladeburnerConstants.BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n\n return {\n hack: unweightedGain * action.weights.hack * skillMult,\n str: unweightedGain * action.weights.str * skillMult,\n def: unweightedGain * action.weights.def * skillMult,\n dex: unweightedGain * action.weights.dex * skillMult,\n agi: unweightedGain * action.weights.agi * skillMult,\n cha: unweightedGain * action.weights.cha * skillMult,\n int: unweightedIntGain * action.weights.int * skillMult,\n money: 0,\n };\n }\n\n getDiplomacyEffectiveness(person: IPerson): number {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n\n const charismaEff = Math.pow(person.charisma, CharismaExponentialFactor) + person.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(person: IPerson): number {\n return Math.pow(person.charisma, 0.45) / (this.teamSize - this.sleeveSize + 1);\n }\n\n getRecruitmentTime(person: IPerson): number {\n const effCharisma = person.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(BladeburnerConstants.BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n sleeveSupport(joining: boolean): void {\n if (joining) {\n this.sleeveSize += 1;\n this.teamSize += 1;\n } else {\n this.sleeveSize -= 1;\n this.teamSize -= 1;\n }\n }\n\n resetSkillMultipliers(): void {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1,\n };\n }\n\n updateSkillMultipliers(): void {\n this.resetSkillMultipliers();\n for (const skillName of Object.keys(this.skills)) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = Skills[skillName];\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n const level = this.skills[skillName];\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success: boolean, player: IPlayer): void {\n if (this.action.type !== ActionTypes.Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n // Calculate team losses\n const teamCount = action.teamCount;\n if (teamCount >= 1) {\n let max;\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n const losses = getRandomInt(0, max);\n this.teamSize -= losses;\n if (this.teamSize < this.sleeveSize) {\n const sup = player.sleeves.filter((x) => x.bbAction == \"Support main sleeve\");\n for (let i = 0; i > this.teamSize - this.sleeveSize; i--) {\n const r = Math.floor(Math.random() * sup.length);\n sup[r].takeDamage(sup[r].max_hp);\n sup.splice(r, 1);\n }\n this.teamSize += this.sleeveSize;\n }\n this.teamLost += losses;\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + formatNumber(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n break;\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n break;\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByCount(0.1);\n break;\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true,\n });\n --city.comms;\n } else {\n const change = getRandomInt(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false,\n });\n }\n city.changeChaosByPercentage(getRandomInt(1, 5));\n break;\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByPercentage(getRandomInt(-3, -1));\n break;\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n }\n city.changeChaosByPercentage(getRandomInt(-5, 5));\n break;\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId: IActionIdentifier): IAction | null {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n return this.contracts[actionId.name];\n case ActionTypes[\"Operation\"]:\n return this.operations[actionId.name];\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return BlackOperations[actionId.name];\n case ActionTypes[\"Training\"]:\n return GeneralActions[\"Training\"];\n case ActionTypes[\"Field Analysis\"]:\n return GeneralActions[\"Field Analysis\"];\n case ActionTypes[\"Recruitment\"]:\n return GeneralActions[\"Recruitment\"];\n case ActionTypes[\"Diplomacy\"]:\n return GeneralActions[\"Diplomacy\"];\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return GeneralActions[\"Hyperbolic Regeneration Chamber\"];\n case ActionTypes[\"Incite Violence\"]:\n return GeneralActions[\"Incite Violence\"];\n default:\n return null;\n }\n }\n\n completeContract(success: boolean, actionIdent: IActionIdentifier): void {\n if (actionIdent.type !== ActionTypes.Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n const city = this.getCurrentCity();\n if (success) {\n switch (actionIdent.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(getRandomInt(100, 1e3));\n break;\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.02);\n break;\n case \"Retirement\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.04);\n break;\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + actionIdent.name);\n }\n }\n }\n\n completeAction(player: IPlayer, person: IPerson, actionIdent: IActionIdentifier, isPlayer = true): ITaskTracker {\n let retValue = createTaskTracker();\n switch (actionIdent.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]: {\n try {\n const isOperation = actionIdent.type === ActionTypes[\"Operation\"];\n const action = this.getActionObject(actionIdent);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + actionIdent.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n\n if (isPlayer) {\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n }\n\n // Process Contract/Operation success/failure\n if (action.attempt(this, person)) {\n retValue = this.getActionStats(action, true);\n ++action.successes;\n --action.count;\n\n // Earn money for contracts\n let moneyGain = 0;\n if (!isOperation) {\n moneyGain = BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n retValue.money = moneyGain;\n }\n\n if (isOperation) {\n action.setMaxLevel(BladeburnerConstants.OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(BladeburnerConstants.ContractSuccessesPerLevel);\n }\n if (action.rankGain) {\n const gain = addOffset(action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(person, gain);\n if (isOperation && this.logging.ops) {\n this.log(\n `${person.whoAmI()}: ` +\n action.name +\n \" successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank\",\n );\n } else if (!isOperation && this.logging.contracts) {\n this.log(\n `${person.whoAmI()}: ` +\n action.name +\n \" contract successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank and \" +\n numeralWrapper.formatMoney(moneyGain),\n );\n }\n }\n isOperation ? this.completeOperation(true, player) : this.completeContract(true, actionIdent);\n } else {\n retValue = this.getActionStats(action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n if (action.rankLoss) {\n loss = addOffset(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(person, -1 * loss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n this.hpLost += damage;\n const cost = calculateHospitalizationCost(player, damage);\n if (person.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n let logLossText = \"\";\n if (loss > 0) {\n logLossText += \"Lost \" + formatNumber(loss, 3) + \" rank. \";\n }\n if (damage > 0) {\n logLossText += \"Took \" + formatNumber(damage, 0) + \" damage.\";\n }\n if (isOperation && this.logging.ops) {\n this.log(`${person.whoAmI()}: ` + action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(`${person.whoAmI()}: ` + action.name + \" contract failed! \" + logLossText);\n }\n isOperation ? this.completeOperation(false, player) : this.completeContract(false, actionIdent);\n }\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const action = this.getActionObject(actionIdent);\n if (action == null || !(action instanceof BlackOperation)) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + actionIdent.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Team loss variables\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this, person)) {\n retValue = this.getActionStats(action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n if (action.rankGain) {\n rankGain = addOffset(action.rankGain * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(person, rankGain);\n }\n teamLossMax = Math.ceil(teamCount / 2);\n\n if (this.logging.blackops) {\n this.log(\n `${person.whoAmI()}: ` + action.name + \" successful! Gained \" + formatNumber(rankGain, 1) + \" rank\",\n );\n }\n } else {\n retValue = this.getActionStats(action, false);\n let rankLoss = 0;\n let damage = 0;\n if (action.rankLoss) {\n rankLoss = addOffset(action.rankLoss, 10);\n this.changeRank(person, -1 * rankLoss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n const cost = calculateHospitalizationCost(player, damage);\n if (person.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(\n `${person.whoAmI()}: ` +\n action.name +\n \" failed! Lost \" +\n formatNumber(rankLoss, 1) +\n \" rank and took \" +\n formatNumber(damage, 0) +\n \" damage\",\n );\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n\n // Calculate team lossses\n if (teamCount >= 1) {\n const losses = getRandomInt(1, teamLossMax);\n this.teamSize -= losses;\n if (this.teamSize < this.sleeveSize) {\n const sup = player.sleeves.filter((x) => x.bbAction == \"Support main sleeve\");\n for (let i = 0; i > this.teamSize - this.sleeveSize; i--) {\n const r = Math.floor(Math.random() * sup.length);\n sup[r].takeDamage(sup[r].max_hp);\n sup.splice(r, 1);\n }\n this.teamSize += this.sleeveSize;\n }\n this.teamLost += losses;\n if (this.logging.blackops) {\n this.log(`${person.whoAmI()}: You lost ${formatNumber(losses, 0)} team members during ${action.name}`);\n }\n }\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Training\"]: {\n this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss;\n const strExpGain = 30 * person.mults.strength_exp,\n defExpGain = 30 * person.mults.defense_exp,\n dexExpGain = 30 * person.mults.dexterity_exp,\n agiExpGain = 30 * person.mults.agility_exp,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n retValue.str = strExpGain;\n retValue.def = defExpGain;\n retValue.dex = dexExpGain;\n retValue.agi = agiExpGain;\n this.staminaBonus += staminaGain;\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: ` +\n \"Training completed. Gained: \" +\n formatNumber(strExpGain, 1) +\n \" str exp, \" +\n formatNumber(defExpGain, 1) +\n \" def exp, \" +\n formatNumber(dexExpGain, 1) +\n \" dex exp, \" +\n formatNumber(agiExpGain, 1) +\n \" agi exp, \" +\n formatNumber(staminaGain, 3) +\n \" max stamina\",\n );\n }\n break;\n }\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]: {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff =\n 0.04 * Math.pow(person.hacking, 0.3) +\n 0.04 * Math.pow(person.intelligence, 0.9) +\n 0.02 * Math.pow(person.charisma, 0.3);\n eff *= person.mults.bladeburner_analysis;\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n const hackingExpGain = 20 * person.mults.hacking_exp;\n const charismaExpGain = 20 * person.mults.charisma_exp;\n const rankGain = 0.1 * BitNodeMultipliers.BladeburnerRank;\n retValue.hack = hackingExpGain;\n retValue.cha = charismaExpGain;\n retValue.int = BladeburnerConstants.BaseIntGain;\n this.changeRank(person, rankGain);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: ` +\n `Field analysis completed. Gained ${formatNumber(rankGain, 2)} rank, ` +\n `${formatNumber(hackingExpGain, 1)} hacking exp, and ` +\n `${formatNumber(charismaExpGain, 1)} charisma exp`,\n );\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]: {\n const successChance = this.getRecruitmentSuccessChance(person);\n const recruitTime = this.getRecruitmentTime(person) * 1000;\n if (Math.random() < successChance) {\n const expGain = 2 * BladeburnerConstants.BaseStatGain * recruitTime;\n retValue.cha = expGain;\n ++this.teamSize;\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: ` +\n \"Successfully recruited a team member! Gained \" +\n formatNumber(expGain, 1) +\n \" charisma exp\",\n );\n }\n } else {\n const expGain = BladeburnerConstants.BaseStatGain * recruitTime;\n retValue.cha = expGain;\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: ` +\n \"Failed to recruit a team member. Gained \" +\n formatNumber(expGain, 1) +\n \" charisma exp\",\n );\n }\n }\n break;\n }\n case ActionTypes[\"Diplomacy\"]: {\n const eff = this.getDiplomacyEffectiveness(person);\n this.getCurrentCity().chaos *= eff;\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: Diplomacy completed. Chaos levels in the current city fell by ${numeralWrapper.formatPercentage(\n 1 - eff,\n )}`,\n );\n }\n break;\n }\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]: {\n person.regenerateHp(BladeburnerConstants.HrcHpGain);\n\n const staminaGain = this.maxStamina * (BladeburnerConstants.HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n if (this.logging.general) {\n this.log(\n `${person.whoAmI()}: Rested in Hyperbolic Regeneration Chamber. Restored ${\n BladeburnerConstants.HrcHpGain\n } HP and gained ${numeralWrapper.formatStamina(staminaGain)} stamina`,\n );\n }\n break;\n }\n case ActionTypes[\"Incite Violence\"]: {\n for (const contract of Object.keys(this.contracts)) {\n const growthF = Growths[contract];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + contract);\n this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const operation of Object.keys(this.operations)) {\n const growthF = Growths[operation];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + operation);\n this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n if (this.logging.general) {\n this.log(`${person.whoAmI()}: Incited violence in the synthoid communities.`);\n }\n for (const cityName of Object.keys(this.cities)) {\n const city = this.cities[cityName];\n city.chaos += 10;\n city.chaos += city.chaos / (Math.log(city.chaos) / Math.log(10));\n }\n break;\n }\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${actionIdent.type}`);\n break;\n }\n return retValue;\n }\n\n infiltrateSynthoidCommunities(p: IPlayer): void {\n const infilSleeves = p.sleeves.filter((s) => s.bbAction === \"Infiltrate synthoids\").length;\n const amt = Math.pow(infilSleeves, -0.5) / 2;\n for (const contract of Object.keys(this.contracts)) {\n this.contracts[contract].count += amt;\n }\n for (const operation of Object.keys(this.operations)) {\n this.operations[operation].count += amt;\n }\n if (this.logging.general) {\n this.log(`Sleeve: Infiltrate the synthoid communities.`);\n }\n }\n\n changeRank(person: IPerson, change: number): void {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n this.rank += change;\n if (this.rank < 0) {\n this.rank = 0;\n }\n this.maxRank = Math.max(this.rank, this.maxRank);\n\n const bladeburnersFactionName = FactionNames.Bladeburners;\n if (factionExists(bladeburnersFactionName)) {\n const bladeburnerFac = Factions[bladeburnersFactionName];\n if (!(bladeburnerFac instanceof Faction)) {\n throw new Error(\n `Could not properly get ${FactionNames.Bladeburners} Faction object in ${FactionNames.Bladeburners} UI Overview Faction button`,\n );\n }\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation +=\n BladeburnerConstants.RankToFactionRepFactor * change * person.mults.faction_rep * favorBonus;\n }\n }\n\n // Gain skill points\n const rankNeededForSp = (this.totalSkillPoints + 1) * BladeburnerConstants.RanksPerSkillPoint;\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor(\n (this.maxRank - rankNeededForSp) / BladeburnerConstants.RanksPerSkillPoint + 1,\n );\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router: IRouter, player: IPlayer, seconds: number): void {\n if (this.action.type === ActionTypes[\"Idle\"]) return;\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n if (!(this.action instanceof ActionIdentifier)) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n }\n\n // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n const action = this.getActionObject(this.action);\n const retValue = this.completeAction(player, player, this.action);\n player.gainMoney(retValue.money, \"bladeburner\");\n player.gainStats(retValue);\n // Operation Daedalus\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n } else if (this.action.type != ActionTypes[\"BlackOperation\"] && this.action.type != ActionTypes[\"BlackOp\"]) {\n this.startAction(player, this.action); // Repeat action\n }\n }\n }\n\n calculateStaminaGainPerSecond(player: IPlayer): number {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;\n const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.mults.bladeburner_stamina_gain);\n }\n\n calculateMaxStamina(player: IPlayer): void {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina =\n (Math.pow(effAgility, 0.8) + this.staminaBonus) *\n this.skillMultipliers.stamina *\n player.mults.bladeburner_max_stamina;\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = (this.maxStamina * this.stamina) / oldMax;\n }\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create(): void {\n this.contracts[\"Tracking\"] = new Contract({\n name: \"Tracking\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: getRandomInt(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1,\n },\n isStealth: true,\n });\n this.contracts[\"Bounty Hunter\"] = new Contract({\n name: \"Bounty Hunter\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n this.contracts[\"Retirement\"] = new Contract({\n name: \"Retirement\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n\n this.operations[\"Investigation\"] = new Operation({\n name: \"Investigation\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1,\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Undercover Operation\"] = new Operation({\n name: \"Undercover Operation\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Sting Operation\"] = new Operation({\n name: \"Sting Operation\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Raid\"] = new Operation({\n name: \"Raid\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isKill: true,\n });\n this.operations[\"Stealth Retirement Operation\"] = new Operation({\n name: \"Stealth Retirement Operation\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isStealth: true,\n isKill: true,\n });\n this.operations[\"Assassination\"] = new Operation({\n name: \"Assassination\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8,\n },\n isStealth: true,\n isKill: true,\n });\n }\n\n process(router: IRouter, player: IPlayer): void {\n // Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized.\n if (!router.isInitialized) return;\n\n // If the Player starts doing some other actions, set action to idle and alert\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true) && player.currentWork) {\n if (this.action.type !== ActionTypes[\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n if (!Settings.SuppressBladeburnerPopup) {\n dialogBoxCreate(msg);\n }\n }\n this.resetAction();\n }\n\n // If the Player has no Stamina, set action to idle\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n }\n\n // A 'tick' for this mechanic is one second (= 5 game cycles)\n if (this.storedCycles >= BladeburnerConstants.CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / BladeburnerConstants.CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n this.storedCycles -= seconds * BladeburnerConstants.CyclesPerSecond;\n\n // Stamina\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina);\n\n // Count increase for contracts/operations\n for (const contract of Object.values(this.contracts)) {\n const growthF = Growths[contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const op of Object.values(this.operations)) {\n const growthF = Growths[op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n if (growthF !== undefined) {\n op.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n }\n\n // Chaos goes down very slowly\n for (const cityName of BladeburnerConstants.CityNames) {\n const city = this.cities[cityName];\n if (!(city instanceof City)) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n }\n\n // Random Events\n this.randomEventCounter -= seconds;\n if (this.randomEventCounter <= 0) {\n this.randomEvent();\n // Add instead of setting because we might have gone over the required time for the event\n this.randomEventCounter += getRandomInt(240, 600);\n }\n\n this.processAction(router, player, seconds);\n\n // Automation\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name,\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name,\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId: IActionIdentifier): {\n type: string;\n name: string;\n } {\n const res = { type: \"\", name: \"\" };\n const types = Object.keys(ActionTypes);\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === ActionTypes[types[i]]) {\n res.type = types[i];\n break;\n }\n }\n const gen = [\n \"Training\",\n \"Recruitment\",\n \"FieldAnalysis\",\n \"Field Analysis\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n ];\n if (gen.includes(res.type)) {\n res.type = \"General\";\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn(): string[] {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn(): string[] {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn(): string[] {\n return Object.keys(BlackOperations);\n }\n\n getGeneralActionNamesNetscriptFn(): string[] {\n return Object.keys(GeneralActions);\n }\n\n getSkillNamesNetscriptFn(): string[] {\n return Object.keys(Skills);\n }\n\n startActionNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n\n // Special logic for Black Ops\n if (actionId.type === ActionTypes[\"BlackOp\"]) {\n const canRunOp = this.canAttemptBlackOp(actionId);\n if (!canRunOp.isAvailable) {\n workerScript.log(\"bladeburner.startAction\", () => canRunOp.error + \"\");\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Starting bladeburner action with type '${type}' and name '${name}'`,\n );\n return true;\n } catch (e: unknown) {\n console.error(e);\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(person: IPerson, type: string, name: string): number | string {\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n return \"bladeburner.getActionTime\";\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n return \"bladeburner.getActionTime\";\n }\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getActionTime(this, person) * 1000;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30000;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(person) * 1000;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return 60000;\n default:\n return \"bladeburner.getActionTime\";\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(person: IPerson, type: string, name: string): [number, number] | string {\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n return \"bladeburner.getActionEstimatedSuccessChance\";\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n return \"bladeburner.getActionEstimatedSuccessChance\";\n }\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this, person);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return [1, 1];\n case ActionTypes[\"Recruitment\"]: {\n const recChance = this.getRecruitmentSuccessChance(person);\n return [recChance, recChance];\n }\n default:\n return \"bladeburner.getActionEstimatedSuccessChance\";\n }\n }\n\n getActionCountRemainingNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n return Math.floor(actionObj.count);\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Recruitment\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return Infinity;\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName: string, count: number, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = Skills[skillName];\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0, count);\n } else {\n return skill.calculateCost(this.skills[skillName], count);\n }\n }\n\n upgradeSkillNetscriptFn(skillName: string, count: number, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid skill: '${skillName}'`;\n if (!Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => errorLogText);\n return false;\n }\n\n const skill = Skills[skillName];\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const cost = skill.calculateCost(currentLevel, count);\n\n if (skill.maxLvl && currentLevel + count > skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => `Skill '${skillName}' cannot be upgraded ${count} time(s).`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\n \"bladeburner.upgradeSkill\",\n () =>\n `You do not have enough skill points to upgrade ${skillName} ${count} time(s). (You have ${this.skillPoints}, you need ${cost})`,\n );\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill, count);\n workerScript.log(\"bladeburner.upgradeSkill\", () => `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type === ActionTypes[\"Operation\"] ||\n actionId.type === ActionTypes[\"BlackOp\"] ||\n actionId.type === ActionTypes[\"BlackOperation\"]\n ) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type: string, name: string, size: number, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type !== ActionTypes[\"Operation\"] &&\n actionId.type !== ActionTypes[\"BlackOp\"] &&\n actionId.type !== ActionTypes[\"BlackOperation\"]\n ) {\n workerScript.log(\"bladeburner.setTeamSize\", () => \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", () => `Invalid size: ${size}`);\n return -1;\n }\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", () => `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript: WorkerScript): boolean {\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", () => `Joined ${FactionNames.Bladeburners} faction.`);\n return true;\n } else {\n workerScript.log(\n \"bladeburner.joinBladeburnerFaction\",\n () => `You do not have the required rank (${this.rank}/${BladeburnerConstants.RankNeededForFaction}).`,\n );\n return false;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Bladeburner\", this);\n }\n\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Bladeburner {\n return Generic_fromJSON(Bladeburner, value.data);\n }\n}\n\nReviver.constructors.Bladeburner = Bladeburner;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetNodeConstants } from \"../data/Constants\";\n\nexport function calculateMoneyGainRate(level: number, ram: number, cores: number, mult: number): number {\n const gainPerLevel = HacknetNodeConstants.MoneyGainPerLevel;\n\n const levelMult = level * gainPerLevel;\n const ramMult = Math.pow(1.035, ram - 1);\n const coresMult = (cores + 5) / 6;\n return levelMult * ramMult * coresMult * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetNodeConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetNodeConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetNodeConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetNodeConstants.RamBaseCost;\n const mult = Math.pow(HacknetNodeConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCore: number, extraLevels = 1, costMult = 1): number {\n const sanitizedCores = Math.round(extraLevels);\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= HacknetNodeConstants.MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = HacknetNodeConstants.CoreBaseCost;\n const mult = HacknetNodeConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateNodeCost(n: number, mult = 1): number {\n if (n <= 0) {\n return 0;\n }\n return HacknetNodeConstants.BaseCost * Math.pow(HacknetNodeConstants.PurchaseNextMult, n - 1) * mult;\n}\n","import * as React from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nconst gainLimit = 10e9;\n\nexport function win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n}\n\nexport function reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n}\n\nexport class Game extends React.Component {\n win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n }\n\n reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n }\n}\n","const _ = false;\nconst X = true;\nexport const Shapes: {\n O: boolean[][];\n I: boolean[][];\n L: boolean[][];\n J: boolean[][];\n S: boolean[][];\n Z: boolean[][];\n T: boolean[][];\n} = {\n O: [\n [X, X],\n [X, X],\n ],\n I: [[X, X, X, X]],\n L: [\n [_, _, X],\n [X, X, X],\n ],\n J: [\n [X, _, _],\n [X, X, X],\n ],\n S: [\n [_, X, X],\n [X, X, _],\n ],\n Z: [\n [X, X, _],\n [_, X, X],\n ],\n T: [\n [X, X, X],\n [_, X, _],\n ],\n};\n","interface DifficultySetting {\n [key: string]: number;\n}\n\ninterface DifficultySettings {\n Trivial: DifficultySetting;\n Normal: DifficultySetting;\n Hard: DifficultySetting;\n Impossible: DifficultySetting;\n}\n\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nexport function interpolate(settings: DifficultySettings, n: number, out: DifficultySetting): DifficultySetting {\n // interpolates between 2 difficulties.\n function lerpD(a: DifficultySetting, b: DifficultySetting, t: number): DifficultySetting {\n // interpolates between 2 numbers.\n function lerp(x: number, y: number, t: number): number {\n return (1 - t) * x + t * y;\n }\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n return a;\n }\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n","import React, { useEffect } from \"react\";\n\ninterface IProps {\n onKeyDown: (this: Document, event: KeyboardEvent) => void;\n onFailure: (options?: { automated: boolean }) => void;\n}\n\nexport function KeyHandler(props: IProps): React.ReactElement {\n useEffect(() => {\n function press(this: Document, event: KeyboardEvent): void {\n if (!event.isTrusted) return;\n const f = props.onKeyDown.bind(this);\n f(event);\n }\n document.addEventListener(\"keydown\", press);\n return () => document.removeEventListener(\"keydown\", press);\n });\n\n // invisible autofocused element that eats all the keypress for the minigames.\n return <>;\n}\n","import React from \"react\";\nimport { Work, WorkType } from \"./Work\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { applyWorkStats, WorkStats } from \"./WorkStats\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reputation } from \"../ui/React/Reputation\";\nimport {\n getFactionFieldWorkRepGain,\n getFactionSecurityWorkRepGain,\n getHackingWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\nimport { CONSTANTS } from \"../Constants\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { calculateFactionExp } from \"./formulas/Faction\";\nimport { FactionWorkType } from \"./data/FactionWorkType\";\n\ninterface FactionWorkParams {\n singularity: boolean;\n factionWorkType: FactionWorkType;\n faction: string;\n}\n\nexport const isFactionWork = (w: Work | null): w is FactionWork => w !== null && w.type === WorkType.FACTION;\n\nexport class FactionWork extends Work {\n factionWorkType: FactionWorkType;\n factionName: string;\n\n constructor(params?: FactionWorkParams) {\n super(WorkType.FACTION, params?.singularity ?? true);\n this.factionWorkType = params?.factionWorkType ?? FactionWorkType.HACKING;\n this.factionName = params?.faction ?? FactionNames.Sector12;\n }\n\n getFaction(): Faction {\n const f = Factions[this.factionName];\n if (!f) throw new Error(`Faction work started with invalid / unknown faction: '${this.factionName}'`);\n return f;\n }\n\n getReputationRate(player: IPlayer): number {\n const faction = this.getFaction();\n const repFormulas = {\n [FactionWorkType.HACKING]: getHackingWorkRepGain,\n [FactionWorkType.FIELD]: getFactionFieldWorkRepGain,\n [FactionWorkType.SECURITY]: getFactionSecurityWorkRepGain,\n };\n const rep = repFormulas[this.factionWorkType](player, faction);\n let focusBonus = 1;\n if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n return rep * focusBonus;\n }\n\n getExpRates(player: IPlayer): WorkStats {\n return calculateFactionExp(player, this.factionWorkType);\n }\n\n process(player: IPlayer, cycles: number): boolean {\n this.cyclesWorked += cycles;\n this.getFaction().playerReputation += this.getReputationRate(player) * cycles;\n\n const rate = this.getExpRates(player);\n applyWorkStats(player, rate, cycles, \"class\");\n\n return false;\n }\n\n finish(): void {\n if (!this.singularity) {\n dialogBoxCreate(\n <>\n You worked for {this.getFaction().name}.\n
\n They now have a total of reputation.\n ,\n );\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"FactionWork\", this);\n }\n\n /**\n * Initiatizes a FactionWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): FactionWork {\n return Generic_fromJSON(FactionWork, value.data);\n }\n}\n\nReviver.constructors.FactionWork = FactionWork;\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\nexport function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n {typeof hashes === \"number\" ? numeralWrapper.formatHashes(hashes) : hashes}\n );\n}\n","/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { CONSTANTS } from \"../Constants\";\n\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateCoreUpgradeCost,\n calculateRamUpgradeCost,\n} from \"./formulas/HacknetNodes\";\nimport { HacknetNodeConstants } from \"./data/Constants\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { ObjectValidator, minMax } from \"../utils/Validator\";\n\nexport class HacknetNode implements IHacknetNode {\n static validationData: ObjectValidator = {\n cores: minMax(1, 1, HacknetNodeConstants.MaxCores),\n level: minMax(1, 1, HacknetNodeConstants.MaxLevel),\n ram: minMax(1, 1, HacknetNodeConstants.MaxRam),\n onlineTimeSeconds: minMax(0, 0, Infinity),\n totalMoneyGenerated: minMax(0, 0, Infinity),\n };\n\n // Node's number of cores\n cores = 1;\n\n // Node's Level\n level = 1;\n\n // Node's production per second\n moneyGainRatePerSecond = 0;\n\n // Identifier for Node. Includes the full \"name\" (hacknet-node-N)\n name: string;\n\n // How long this Node has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Node's RAM (GB)\n ram = 1;\n\n // Total money earned by this Node\n totalMoneyGenerated = 0;\n\n constructor(name = \"\", prodMult = 1) {\n this.name = name;\n\n this.updateMoneyGainRate(prodMult);\n }\n\n // Get the cost to upgrade this Node's number of cores\n calculateCoreUpgradeCost(levels = 1, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's level\n calculateLevelUpgradeCost(levels = 1, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's RAM\n calculateRamUpgradeCost(levels = 1, costMult: number): number {\n return calculateRamUpgradeCost(this.ram, levels, costMult);\n }\n\n // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n\n return gain;\n }\n\n // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n upgradeCore(levels = 1, prodMult: number): void {\n this.cores = Math.min(HacknetNodeConstants.MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n upgradeLevel(levels = 1, prodMult: number): void {\n this.level = Math.min(HacknetNodeConstants.MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n upgradeRam(levels = 1, prodMult: number): void {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n this.updateMoneyGainRate(prodMult);\n }\n\n // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n updateMoneyGainRate(prodMult: number): void {\n this.moneyGainRatePerSecond = calculateMoneyGainRate(this.level, this.ram, this.cores, prodMult);\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n dialogBoxCreate(\"Error in calculating Hacknet Node production. Please report to game developer\");\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"HacknetNode\", this);\n }\n\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): HacknetNode {\n return Generic_fromJSON(HacknetNode, value.data);\n }\n}\n\nReviver.constructors.HacknetNode = HacknetNode;\n","/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\nimport { AddToAllServers, createUniqueRandomIp } from \"./AllServers\";\nimport { safetlyCreateUniqueServer } from \"./ServerHelpers\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isPowerOfTwo } from \"../utils/helpers/isPowerOfTwo\";\n\n// Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\nexport function getPurchaseServerCost(ram: number): number {\n const sanitizedRam = Math.round(ram);\n if (isNaN(sanitizedRam) || !isPowerOfTwo(sanitizedRam) || !(Math.sign(sanitizedRam) === 1)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);\n\n return (\n sanitizedRam *\n CONSTANTS.BaseCostFor1GBOfRamServer *\n BitNodeMultipliers.PurchasedServerCost *\n Math.pow(BitNodeMultipliers.PurchasedServerSoftcap, upg)\n );\n}\n\nexport function getPurchaseServerLimit(): number {\n return Math.round(CONSTANTS.PurchasedServerLimit * BitNodeMultipliers.PurchasedServerLimit);\n}\n\nexport function getPurchaseServerMaxRam(): number {\n const ram = Math.round(CONSTANTS.PurchasedServerMaxRam * BitNodeMultipliers.PurchasedServerMaxRam);\n\n // Round this to the nearest power of 2\n return 1 << (31 - Math.clz32(ram));\n}\n\n// Manually purchase a server (NOT through Netscript)\nexport function purchaseServer(hostname: string, ram: number, cost: number, p: IPlayer): void {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You don't have enough money to purchase this server!\");\n return;\n }\n\n //Maximum server limit\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n dialogBoxCreate(\n \"You have reached the maximum limit of \" +\n getPurchaseServerLimit() +\n \" servers. \" +\n \"You cannot purchase any more. You can \" +\n \"delete some of your purchased servers using the deleteServer() Netscript function in a script\",\n );\n return;\n }\n\n if (hostname == \"\") {\n dialogBoxCreate(\"You must enter a hostname for your new server!\");\n return;\n }\n\n // Create server\n const newServ = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: hostname,\n ip: createUniqueRandomIp(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true,\n });\n AddToAllServers(newServ);\n\n // Add to Player's purchasedServers array\n p.purchasedServers.push(newServ.hostname);\n\n // Connect new server to home computer\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n\n p.loseMoney(cost, \"servers\");\n\n dialogBoxCreate(\"Server successfully purchased with hostname \" + newServ.hostname);\n}\n\n// Manually upgrade RAM on home computer (NOT through Netscript)\nexport function purchaseRamForHomeComputer(p: IPlayer): void {\n const cost = p.getUpgradeHomeRamCost();\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n dialogBoxCreate(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost, \"servers\");\n}\n","import { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"./utils/JSONReviver\";\nimport { removeLeadingSlash, isInRootDirectory } from \"./Terminal/DirectoryHelpers\";\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\nexport class TextFile {\n /**\n * The full file name.\n */\n fn: string;\n\n /**\n * The content of the file.\n */\n text: string;\n\n /**\n * The full file name.\n */\n get filename(): string {\n return this.fn;\n }\n\n /**\n * The full file name.\n */\n set filename(value: string) {\n this.fn = value;\n }\n\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n\n /**\n * Concatenates the raw values to the end of current content.\n */\n append(txt: string): void {\n this.text += txt;\n }\n\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n download(): void {\n const file: Blob = new Blob([this.text], { type: \"text/plain\" });\n const a: HTMLAnchorElement = document.createElement(\"a\");\n const url: string = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n\n /**\n * Retrieve the content of the file.\n */\n read(): string {\n return this.text;\n }\n\n /**\n * Shows the content to the user via the game's dialog box.\n */\n show(): void {\n dialogBoxCreate(`${this.fn}

${this.text}`);\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"TextFile\", this);\n }\n\n /**\n * Replaces the current content with the text provided.\n */\n write(txt: string): void {\n this.text = txt;\n }\n\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n static fromJSON(value: IReviverValue): TextFile {\n return Generic_fromJSON(TextFile, value.data);\n }\n}\n\nReviver.constructors.TextFile = TextFile;\n\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\nexport function getTextFile(fn: string, server: BaseServer): TextFile | null {\n let filename: string = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n if (isInRootDirectory(filename)) {\n filename = removeLeadingSlash(filename);\n }\n\n for (const file of server.textFiles) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\nexport function createTextFile(fn: string, txt: string, server: BaseServer): TextFile | undefined {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n\n return undefined;\n }\n const file: TextFile = new TextFile(fn, txt);\n server.textFiles.push(file);\n\n return file;\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\n\nimport { NS as INS } from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport { INetscriptExtra } from \"../NetscriptFunctions/Extra\";\n\ntype RamCostTree = {\n [Property in keyof API]: API[Property] extends () => void\n ? number | ((p: IPlayer) => void)\n : API[Property] extends object\n ? RamCostTree\n : never;\n};\n\n// TODO remember to update RamCalculations.js and WorkerScript.js\n\n// RAM costs for Netscript functions\nexport const RamCostConstants: IMap = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptCorporationRamCost: 1024 - 1.6,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptWeakenAnalyzeRamCost: 1,\n ScriptScanRamCost: 0.2,\n ScriptRecentScriptsRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n ScriptGetOwnedSourceFiles: 5,\n ScriptClearTerminalCost: 0.2,\n\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n\n ScriptGangApiBaseRamCost: 4,\n\n ScriptBladeburnerApiBaseRamCost: 4,\n\n ScriptStanekWidth: 0.4,\n ScriptStanekHeight: 0.4,\n ScriptStanekCharge: 0.4,\n ScriptStanekFragmentDefinitions: 0,\n ScriptStanekPlacedFragments: 5,\n ScriptStanekClear: 0,\n ScriptStanekCanPlace: 0.5,\n ScriptStanekPlace: 5,\n ScriptStanekFragmentAt: 2,\n ScriptStanekDeleteAt: 0.15,\n ScriptInfiltrationCalculateDifficulty: 2.5,\n ScriptInfiltrationCalculateRewards: 2.5,\n ScriptInfiltrationGetLocations: 5,\n ScriptInfiltrationGetInfiltrations: 15,\n ScriptStanekAcceptGift: 2,\n};\n\nfunction SF4Cost(cost: number): (player: IPlayer) => number {\n return (player: IPlayer): number => {\n if (player.bitNodeN === 4) return cost;\n const sf4 = player.sourceFileLvl(4);\n if (sf4 <= 1) return cost * 16;\n if (sf4 === 2) return cost * 4;\n return cost;\n };\n}\n\n// Hacknet API\nconst hacknet = {\n numNodes: 0,\n purchaseNode: 0,\n getPurchaseNodeCost: 0,\n getNodeStats: 0,\n upgradeLevel: 0,\n upgradeRam: 0,\n upgradeCore: 0,\n upgradeCache: 0,\n getLevelUpgradeCost: 0,\n getRamUpgradeCost: 0,\n getCoreUpgradeCost: 0,\n getCacheUpgradeCost: 0,\n numHashes: 0,\n hashCost: 0,\n spendHashes: 0,\n maxNumNodes: 0,\n hashCapacity: 0,\n getHashUpgrades: 0,\n getHashUpgradeLevel: 0,\n getStudyMult: 0,\n getTrainingMult: 0,\n};\n\n// Stock API\nconst stock = {\n getSymbols: RamCostConstants.ScriptGetStockRamCost,\n getPrice: RamCostConstants.ScriptGetStockRamCost,\n getAskPrice: RamCostConstants.ScriptGetStockRamCost,\n getBidPrice: RamCostConstants.ScriptGetStockRamCost,\n getPosition: RamCostConstants.ScriptGetStockRamCost,\n getMaxShares: RamCostConstants.ScriptGetStockRamCost,\n getPurchaseCost: RamCostConstants.ScriptGetStockRamCost,\n getSaleGain: RamCostConstants.ScriptGetStockRamCost,\n buyStock: RamCostConstants.ScriptBuySellStockRamCost,\n sellStock: RamCostConstants.ScriptBuySellStockRamCost,\n short: RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: RamCostConstants.ScriptBuySellStockRamCost,\n getVolatility: RamCostConstants.ScriptBuySellStockRamCost,\n getForecast: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseWseAccount: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n};\n\n// Singularity API\nconst singularity = {\n universityCourse: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n gymWorkout: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n travelToCity: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n goToLocation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseTor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseProgram: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getCurrentServer: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n connect: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n manualHack: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n installBackdoor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getDarkwebProgramCost: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getDarkwebPrograms: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getStats: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getCharacterInformation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n hospitalize: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n isBusy: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n stopAction: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 2),\n upgradeHomeRam: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n upgradeHomeCores: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getUpgradeHomeRamCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n getUpgradeHomeCoresCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n workForCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n applyToCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n quitJob: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getCompanyRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n checkFactionInvitations: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n joinFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n workForFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getFactionRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n donateToFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n createProgram: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n commitCrime: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeChance: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getOwnedAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationsFromFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationCost: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrereq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrice: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationBasePrice: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationRepReq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseAugmentation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n softReset: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n installAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n isFocused: SF4Cost(0.1),\n setFocus: SF4Cost(0.1),\n b1tflum3: SF4Cost(16),\n destroyW0r1dD43m0n: SF4Cost(32),\n};\n\n// Gang API\nconst gang = {\n createGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,\n getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: 0,\n};\n\n// Bladeburner API\nconst bladeburner = {\n getContractNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: 0,\n};\n\nconst infiltration = {\n getPossibleLocations: RamCostConstants.ScriptInfiltrationGetLocations,\n getInfiltration: RamCostConstants.ScriptInfiltrationGetInfiltrations,\n};\n\n// Coding Contract API\nconst codingcontract = {\n attempt: RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: RamCostConstants.ScriptCodingContractBaseRamCost / 5,\n};\n\n// Duplicate Sleeve API\nconst sleeve = {\n getNumSleeves: RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: RamCostConstants.ScriptSleeveBaseRamCost,\n travel: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: RamCostConstants.ScriptSleeveBaseRamCost,\n setToBladeburnerAction: RamCostConstants.ScriptSleeveBaseRamCost,\n};\n\n// Stanek API\nconst stanek = {\n giftWidth: RamCostConstants.ScriptStanekWidth,\n giftHeight: RamCostConstants.ScriptStanekHeight,\n chargeFragment: RamCostConstants.ScriptStanekCharge,\n fragmentDefinitions: RamCostConstants.ScriptStanekFragmentDefinitions,\n activeFragments: RamCostConstants.ScriptStanekPlacedFragments,\n clearGift: RamCostConstants.ScriptStanekClear,\n canPlaceFragment: RamCostConstants.ScriptStanekCanPlace,\n placeFragment: RamCostConstants.ScriptStanekPlace,\n getFragment: RamCostConstants.ScriptStanekFragmentAt,\n removeFragment: RamCostConstants.ScriptStanekDeleteAt,\n acceptGift: RamCostConstants.ScriptStanekAcceptGift,\n};\n\n// UI API\nconst ui = {\n getTheme: 0,\n setTheme: 0,\n resetTheme: 0,\n getStyles: 0,\n setStyles: 0,\n resetStyles: 0,\n getGameInfo: 0,\n clearTerminal: 0,\n};\n\n// Grafting API\nconst grafting = {\n getAugmentationGraftPrice: 3.75,\n getAugmentationGraftTime: 3.75,\n getGraftableAugmentations: 5,\n graftAugmentation: 7.5,\n};\n\nconst corporation = {\n createCorporation: 0,\n hasUnlockUpgrade: 0,\n getUnlockUpgradeCost: 0,\n getUpgradeLevel: 0,\n getUpgradeLevelCost: 0,\n getExpandIndustryCost: 0,\n getExpandCityCost: 0,\n getInvestmentOffer: 0,\n acceptInvestmentOffer: 0,\n goPublic: 0,\n bribe: 0,\n getCorporation: 0,\n getDivision: 0,\n expandIndustry: 0,\n expandCity: 0,\n unlockUpgrade: 0,\n levelUpgrade: 0,\n issueDividends: 0,\n buyBackShares: 0,\n sellShares: 0,\n getBonusTime: 0,\n sellMaterial: 0,\n sellProduct: 0,\n discontinueProduct: 0,\n setSmartSupply: 0,\n setSmartSupplyUseLeftovers: 0,\n buyMaterial: 0,\n bulkPurchase: 0,\n getWarehouse: 0,\n getProduct: 0,\n getMaterial: 0,\n setMaterialMarketTA1: 0,\n setMaterialMarketTA2: 0,\n setProductMarketTA1: 0,\n setProductMarketTA2: 0,\n exportMaterial: 0,\n cancelExportMaterial: 0,\n purchaseWarehouse: 0,\n upgradeWarehouse: 0,\n makeProduct: 0,\n limitMaterialProduction: 0,\n limitProductProduction: 0,\n getPurchaseWarehouseCost: 0,\n getUpgradeWarehouseCost: 0,\n hasWarehouse: 0,\n assignJob: 0,\n hireEmployee: 0,\n upgradeOfficeSize: 0,\n throwParty: 0,\n buyCoffee: 0,\n hireAdVert: 0,\n research: 0,\n getOffice: 0,\n getEmployee: 0,\n getHireAdVertCost: 0,\n getHireAdVertCount: 0,\n getResearchCost: 0,\n hasResearched: 0,\n setAutoJobAssignment: 0,\n getOfficeSizeUpgradeCost: 0,\n};\n\nconst SourceRamCosts = {\n args: undefined as unknown as never[], // special use case\n enums: undefined as unknown as never,\n corporation,\n hacknet,\n stock,\n singularity,\n ...singularity, // singularity is in namespace & toplevel\n gang,\n bladeburner,\n infiltration,\n codingcontract,\n sleeve,\n stanek,\n ui,\n grafting,\n\n sprintf: 0,\n vsprintf: 0,\n scan: RamCostConstants.ScriptScanRamCost,\n hack: RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyze: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: 0,\n asleep: 0,\n share: 2.4,\n getSharePower: 0.2,\n grow: RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n growthAnalyzeSecurity: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: RamCostConstants.ScriptWeakenRamCost,\n weakenAnalyze: RamCostConstants.ScriptWeakenAnalyzeRamCost,\n print: 0,\n printf: 0,\n tprint: 0,\n tprintf: 0,\n clearLog: 0,\n disableLog: 0,\n enableLog: 0,\n isLogEnabled: 0,\n getScriptLogs: 0,\n nuke: RamCostConstants.ScriptPortProgramRamCost,\n brutessh: RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: RamCostConstants.ScriptPortProgramRamCost,\n httpworm: RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: RamCostConstants.ScriptPortProgramRamCost,\n run: RamCostConstants.ScriptRunRamCost,\n exec: RamCostConstants.ScriptExecRamCost,\n spawn: RamCostConstants.ScriptSpawnRamCost,\n kill: RamCostConstants.ScriptKillRamCost,\n killall: RamCostConstants.ScriptKillRamCost,\n exit: 0,\n atExit: 0,\n scp: RamCostConstants.ScriptScpRamCost,\n ls: RamCostConstants.ScriptScanRamCost,\n ps: RamCostConstants.ScriptScanRamCost,\n getRecentScripts: RamCostConstants.ScriptRecentScriptsRamCost,\n hasRootAccess: RamCostConstants.ScriptHasRootAccessRamCost,\n getHostname: RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: RamCostConstants.ScriptGetServerRamCost,\n getServerRam: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: RamCostConstants.ScriptGetServerUsedRam,\n serverExists: RamCostConstants.ScriptGetServerRamCost,\n fileExists: RamCostConstants.ScriptFileExistsRamCost,\n isRunning: RamCostConstants.ScriptIsRunningRamCost,\n getPurchasedServerLimit: RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: RamCostConstants.ScriptPurchaseServerRamCost,\n write: 0,\n tryWritePort: 0,\n read: 0,\n peek: 0,\n clear: 0,\n writePort: 0,\n readPort: 0,\n getPortHandle: 0,\n rm: RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: 0,\n getScriptRam: RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getTotalScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getTotalScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: 0,\n tFormat: 0,\n getTimeSinceLastAug: RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: 0,\n wget: 0,\n getFavorToDonate: RamCostConstants.ScriptGetFavorToDonate,\n getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n mv: 0,\n getOwnedSourceFiles: RamCostConstants.ScriptGetOwnedSourceFiles,\n tail: 0,\n toast: 0,\n closeTail: 0,\n clearPort: 0,\n openDevMenu: 0,\n alert: 0,\n flags: 0,\n exploit: 0,\n bypass: 0,\n alterReality: 0,\n rainbow: 0,\n heart: {\n // Easter egg function\n break: 0,\n },\n\n formulas: {\n reputation: {\n calculateFavorToRep: 0,\n calculateRepToFavor: 0,\n repFromDonation: 0,\n },\n skills: {\n calculateSkill: 0,\n calculateExp: 0,\n },\n hacking: {\n hackChance: 0,\n hackExp: 0,\n hackPercent: 0,\n growPercent: 0,\n hackTime: 0,\n growTime: 0,\n weakenTime: 0,\n },\n hacknetNodes: {\n moneyGainRate: 0,\n levelUpgradeCost: 0,\n ramUpgradeCost: 0,\n coreUpgradeCost: 0,\n hacknetNodeCost: 0,\n constants: 0,\n },\n hacknetServers: {\n hashGainRate: 0,\n levelUpgradeCost: 0,\n ramUpgradeCost: 0,\n coreUpgradeCost: 0,\n cacheUpgradeCost: 0,\n hashUpgradeCost: 0,\n hacknetServerCost: 0,\n constants: 0,\n },\n gang: {\n wantedPenalty: 0,\n respectGain: 0,\n wantedLevelGain: 0,\n moneyGain: 0,\n ascensionPointsGain: 0,\n ascensionMultiplier: 0,\n },\n },\n};\n\nexport const RamCosts: IMap = SourceRamCosts;\n\n// This line in particular is there so typescript typechecks that we are not missing any static ram cost.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst _typecheck: RamCostTree = SourceRamCosts;\n\nexport function getRamCost(player: IPlayer, ...args: string[]): number {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n if (typeof curr === \"number\") {\n return curr;\n }\n\n if (typeof curr === \"function\") {\n return curr(player);\n }\n\n console.warn(`Unexpected type (${curr}) for value [${args}]`);\n return 0;\n}\n","import { Skill } from \"./Skill\";\nimport { SkillNames } from \"./data/SkillNames\";\nimport { IMap } from \"../types\";\n\nexport const Skills: IMap = {};\n\n(function () {\n Skills[SkillNames.BladesIntuition] = new Skill({\n name: SkillNames.BladesIntuition,\n desc: \"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3,\n });\n Skills[SkillNames.Cloak] = new Skill({\n name: SkillNames.Cloak,\n desc:\n \"Each level of this skill increases your \" +\n \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5,\n });\n Skills[SkillNames.ShortCircuit] = new Skill({\n name: SkillNames.ShortCircuit,\n desc:\n \"Each level of this skill increases your success chance \" +\n \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5,\n });\n Skills[SkillNames.DigitalObserver] = new Skill({\n name: SkillNames.DigitalObserver,\n desc: \"Each level of this skill increases your success chance in all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4,\n });\n Skills[SkillNames.Tracer] = new Skill({\n name: SkillNames.Tracer,\n desc: \"Each level of this skill increases your success chance in all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4,\n });\n Skills[SkillNames.Overclock] = new Skill({\n name: SkillNames.Overclock,\n desc:\n \"Each level of this skill decreases the time it takes \" +\n \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1,\n });\n Skills[SkillNames.Reaper] = new Skill({\n name: SkillNames.Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2,\n });\n Skills[SkillNames.EvasiveSystem] = new Skill({\n name: SkillNames.EvasiveSystem,\n desc: \"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4,\n });\n Skills[SkillNames.Datamancer] = new Skill({\n name: SkillNames.Datamancer,\n desc:\n \"Each level of this skill increases your effectiveness in \" +\n \"synthoid population analysis and investigation by 5%. \" +\n \"This affects all actions that can potentially increase \" +\n \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5,\n });\n Skills[SkillNames.CybersEdge] = new Skill({\n name: SkillNames.CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2,\n });\n Skills[SkillNames.HandsOfMidas] = new Skill({\n name: SkillNames.HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10,\n });\n Skills[SkillNames.Hyperdrive] = new Skill({\n name: SkillNames.Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10,\n });\n})();\n","/**\n * Stock Market Helper Functions\n */\nimport { Stock } from \"./Stock\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { CONSTANTS } from \"../Constants\";\n\n// Amount by which a stock's forecast changes during each price movement\nexport const forecastChangePerPriceMovement = 0.006;\n\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\nexport function getBuyTransactionCost(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n\n // If the number of shares doesn't trigger a price movement, its a simple calculation\n if (isLong) {\n return shares * stock.getAskPrice() + CONSTANTS.StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + CONSTANTS.StockMarketCommission;\n }\n}\n\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\nexport function getSellTransactionGain(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n if (isLong) {\n return shares * stock.getBidPrice() - CONSTANTS.StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - CONSTANTS.StockMarketCommission;\n\n return origCost + profit;\n }\n}\n\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\nexport function processTransactionForecastMovement(stock: Stock, shares: number): void {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n // If there's only going to be one iteration at most\n const firstShares = stock.shareTxUntilMovement;\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n }\n\n // Calculate how many iterations of price changes we need to account for\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement);\n\n // If on the offchance we end up perfectly at the next price movement\n stock.shareTxUntilMovement =\n stock.shareTxForMovement - ((shares - stock.shareTxUntilMovement) % stock.shareTxForMovement);\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n }\n\n // Forecast always decreases in magnitude\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\nexport function calculateBuyMaxAmount(stock: Stock, posType: PositionTypes, money: number): number {\n if (!(stock instanceof Stock)) {\n return 0;\n }\n\n const isLong = posType === PositionTypes.Long;\n\n const remainingMoney = money - CONSTANTS.StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n\n return Math.floor(remainingMoney / currPrice);\n}\n","import { gangMemberUpgradesMetadata } from \"./data/upgrades\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\n\nexport const GangMemberUpgrades: {\n [key: string]: GangMemberUpgrade;\n} = {};\n\n(function () {\n gangMemberUpgradesMetadata.forEach((e) => {\n GangMemberUpgrades[e.name] = new GangMemberUpgrade(e.name, e.cost, e.upgType, e.mults);\n });\n})();\n","// Interface that defines a generic object used to track experience/money\n// earnings for tasks\nexport interface ITaskTracker {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n int: number;\n money: number;\n}\n\nexport function createTaskTracker(): ITaskTracker {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n int: 0,\n money: 0,\n };\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarket4SDataCost(): number {\n return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;\n}\n\nexport function getStockMarket4STixApiCost(): number {\n return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;\n}\n\nexport function getStockMarketWseCost(): number {\n return CONSTANTS.WSEAccountCost;\n}\n\nexport function getStockMarketTixApiCost(): number {\n return CONSTANTS.TIXAPICost;\n}\n","import { AugmentationStats } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport interface Multipliers {\n hacking_chance: number;\n hacking_speed: number;\n hacking_money: number;\n hacking_grow: number;\n hacking: number;\n hacking_exp: number;\n strength: number;\n strength_exp: number;\n defense: number;\n defense_exp: number;\n dexterity: number;\n dexterity_exp: number;\n agility: number;\n agility_exp: number;\n charisma: number;\n charisma_exp: number;\n hacknet_node_money: number;\n hacknet_node_purchase_cost: number;\n hacknet_node_ram_cost: number;\n hacknet_node_core_cost: number;\n hacknet_node_level_cost: number;\n company_rep: number;\n faction_rep: number;\n work_money: number;\n crime_success: number;\n crime_money: number;\n bladeburner_max_stamina: number;\n bladeburner_stamina_gain: number;\n bladeburner_analysis: number;\n bladeburner_success_chance: number;\n}\n\nexport const defaultMultipliers = (): Multipliers => {\n return {\n hacking_chance: 1,\n hacking_speed: 1,\n hacking_money: 1,\n hacking_grow: 1,\n hacking: 1,\n hacking_exp: 1,\n strength: 1,\n strength_exp: 1,\n defense: 1,\n defense_exp: 1,\n dexterity: 1,\n dexterity_exp: 1,\n agility: 1,\n agility_exp: 1,\n charisma: 1,\n charisma_exp: 1,\n hacknet_node_money: 1,\n hacknet_node_purchase_cost: 1,\n hacknet_node_ram_cost: 1,\n hacknet_node_core_cost: 1,\n hacknet_node_level_cost: 1,\n company_rep: 1,\n faction_rep: 1,\n work_money: 1,\n crime_success: 1,\n crime_money: 1,\n bladeburner_max_stamina: 1,\n bladeburner_stamina_gain: 1,\n bladeburner_analysis: 1,\n bladeburner_success_chance: 1,\n };\n};\n\nexport const mergeMultipliers = (m0: Multipliers, m1: AugmentationStats): Multipliers => {\n return {\n hacking_chance: m0.hacking_chance * (m1.hacking_chance ?? 1),\n hacking_speed: m0.hacking_speed * (m1.hacking_speed ?? 1),\n hacking_money: m0.hacking_money * (m1.hacking_money ?? 1),\n hacking_grow: m0.hacking_grow * (m1.hacking_grow ?? 1),\n hacking: m0.hacking * (m1.hacking ?? 1),\n hacking_exp: m0.hacking_exp * (m1.hacking_exp ?? 1),\n strength: m0.strength * (m1.strength ?? 1),\n strength_exp: m0.strength_exp * (m1.strength_exp ?? 1),\n defense: m0.defense * (m1.defense ?? 1),\n defense_exp: m0.defense_exp * (m1.defense_exp ?? 1),\n dexterity: m0.dexterity * (m1.dexterity ?? 1),\n dexterity_exp: m0.dexterity_exp * (m1.dexterity_exp ?? 1),\n agility: m0.agility * (m1.agility ?? 1),\n agility_exp: m0.agility_exp * (m1.agility_exp ?? 1),\n charisma: m0.charisma * (m1.charisma ?? 1),\n charisma_exp: m0.charisma_exp * (m1.charisma_exp ?? 1),\n hacknet_node_money: m0.hacknet_node_money * (m1.hacknet_node_money ?? 1),\n hacknet_node_purchase_cost: m0.hacknet_node_purchase_cost * (m1.hacknet_node_purchase_cost ?? 1),\n hacknet_node_ram_cost: m0.hacknet_node_ram_cost * (m1.hacknet_node_ram_cost ?? 1),\n hacknet_node_core_cost: m0.hacknet_node_core_cost * (m1.hacknet_node_core_cost ?? 1),\n hacknet_node_level_cost: m0.hacknet_node_level_cost * (m1.hacknet_node_level_cost ?? 1),\n company_rep: m0.company_rep * (m1.company_rep ?? 1),\n faction_rep: m0.faction_rep * (m1.faction_rep ?? 1),\n work_money: m0.work_money * (m1.work_money ?? 1),\n crime_success: m0.crime_success * (m1.crime_success ?? 1),\n crime_money: m0.crime_money * (m1.crime_money ?? 1),\n bladeburner_max_stamina: m0.bladeburner_max_stamina * (m1.bladeburner_max_stamina ?? 1),\n bladeburner_stamina_gain: m0.bladeburner_stamina_gain * (m1.bladeburner_stamina_gain ?? 1),\n bladeburner_analysis: m0.bladeburner_analysis * (m1.bladeburner_analysis ?? 1),\n bladeburner_success_chance: m0.bladeburner_success_chance * (m1.bladeburner_success_chance ?? 1),\n };\n};\n","/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\nimport { HashUpgrade, IConstructorParams } from \"./HashUpgrade\";\nimport { HashUpgradesMetadata } from \"./data/HashUpgradesMetadata\";\nimport { IMap } from \"../types\";\n\nexport const HashUpgrades: IMap = {};\n\nfunction createHashUpgrade(p: IConstructorParams): void {\n HashUpgrades[p.name] = new HashUpgrade(p);\n}\n\nfor (const metadata of HashUpgradesMetadata) {\n createHashUpgrade(metadata);\n}\n","import { gangMemberTasksMetadata } from \"./data/tasks\";\nimport { GangMemberTask } from \"./GangMemberTask\";\n\nexport const GangMemberTasks: {\n [key: string]: GangMemberTask;\n} = {};\n\n(function () {\n gangMemberTasksMetadata.forEach((e) => {\n GangMemberTasks[e.name] = new GangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n","import { Material } from \"./Material\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\n\ninterface IConstructorParams {\n corp?: ICorporation;\n industry?: IIndustry;\n loc?: string;\n size?: number;\n}\n\nexport class Warehouse {\n // Warehouse's level, which affects its maximum size\n level = 1;\n\n // City that this Warehouse is in\n loc: string;\n\n // Map of Materials held by this Warehouse\n materials: IMap;\n\n // Maximum amount warehouse can hold\n size: number;\n\n // Amount of space currently used by warehouse\n sizeUsed = 0;\n\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n smartSupplyEnabled = false;\n\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n smartSupplyUseLeftovers: { [key: string]: boolean | undefined } = {};\n\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n smartSupplyStore = 0;\n\n constructor(params: IConstructorParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n\n this.materials = {\n Water: new Material({ name: \"Water\" }),\n Energy: new Material({ name: \"Energy\" }),\n Food: new Material({ name: \"Food\" }),\n Plants: new Material({ name: \"Plants\" }),\n Metal: new Material({ name: \"Metal\" }),\n Hardware: new Material({ name: \"Hardware\" }),\n Chemicals: new Material({ name: \"Chemicals\" }),\n Drugs: new Material({ name: \"Drugs\" }),\n Robots: new Material({ name: \"Robots\" }),\n AICores: new Material({ name: \"AI Cores\" }),\n RealEstate: new Material({ name: \"Real Estate\" }),\n };\n\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true,\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n }\n\n // Default smart supply to being enabled if the upgrade is unlocked\n if (params.corp?.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n }\n\n // Re-calculate how much space is being used by this Warehouse\n updateMaterialSizeUsed(): void {\n this.sizeUsed = 0;\n for (const matName of Object.keys(this.materials)) {\n const mat = this.materials[matName];\n if (MaterialSizes.hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * MaterialSizes[matName];\n }\n }\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation: ICorporation, industry: IIndustry): void {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e: unknown) {\n exceptionAlert(e);\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Warehouse\", this);\n }\n\n // Initiatizes a Warehouse object from a JSON save state.\n static fromJSON(value: IReviverValue): Warehouse {\n return Generic_fromJSON(Warehouse, value.data);\n }\n}\n\nReviver.constructors.Warehouse = Warehouse;\n","/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\nimport { Stock } from \"./Stock\";\nimport {\n getBuyTransactionCost,\n getSellTransactionGain,\n processTransactionForecastMovement,\n} from \"./StockMarketHelpers\";\n\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { Player } from \"../Player\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nimport * as React from \"react\";\n\n/**\n * Each function takes an optional config object as its last argument\n */\ninterface IOptions {\n rerenderFn?: () => void;\n suppressDialog?: boolean;\n}\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function buyStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.buy\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n }\n\n // Does player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Long);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${numeralWrapper.formatShares(\n stock.maxShares,\n )} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n processTransactionForecastMovement(stock, shares);\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought ${numeralWrapper.formatShares(shares)} shares of ${\n stock.symbol\n } for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} in commission fees.`;\n workerScript.log(\"stock.buy\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid{\" \"}\n in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\nexport function sellStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.sell\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const gains = getSellTransactionGain(stock, shares, PositionTypes.Long);\n if (gains == null) {\n return false;\n }\n let netProfit = gains - stock.playerAvgPx * shares;\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n Player.gainMoney(gains, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n Player.scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`;\n workerScript.log(\"stock.sell\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of{\" \"}\n .\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function shortStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.short\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to initiate a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n return false;\n }\n\n // Does the player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Short);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n \"You do not have enough \" +\n \"money to purchase this short position. You need \" +\n numeralWrapper.formatMoney(totalPrice),\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this short position. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought a short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} ` +\n `for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} ` +\n `in commission fees.`;\n workerScript.log(\"stock.short\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for{\" \"}\n . Paid in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\nexport function sellShort(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"stock.sellShort\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n \"Failed to sell a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = getSellTransactionGain(stock, shares, PositionTypes.Short);\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\n \"stock.sellShort\",\n () => `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n }\n\n return false;\n }\n let profit = totalGain - origCost;\n if (isNaN(profit)) {\n profit = 0;\n }\n Player.gainMoney(totalGain, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n Player.scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold your short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`;\n workerScript.log(\"stock.sellShort\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions,\n you gained a total of \n ,\n );\n }\n\n return true;\n}\n","import React from \"react\";\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\nexport class Output {\n text: string;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n constructor(text: string, color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\") {\n if (Settings.TimestampsFormat) text = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class RawOutput {\n raw: React.ReactNode;\n constructor(node: React.ReactNode) {\n if (Settings.TimestampsFormat)\n node = (\n <>\n [{formatTime(Settings.TimestampsFormat)}] {node}\n \n );\n this.raw = node;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.TimestampsFormat) dashes = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + dashes;\n this.hostname = hostname;\n this.dashes = dashes;\n }\n}\n\nexport class TTimer {\n time: number;\n timeLeft: number;\n action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\";\n server?: BaseServer;\n\n constructor(time: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n this.server = server;\n }\n}\n\nexport interface ITerminal {\n action: TTimer | null;\n\n commandHistory: string[];\n commandHistoryIndex: number;\n\n outputHistory: (Output | Link | RawOutput)[];\n\n // True if a Coding Contract prompt is opened\n contractOpen: boolean;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir: string;\n\n print(s: string): void;\n printRaw(node: React.ReactNode): void;\n error(s: string): void;\n success(s: string): void;\n info(s: string): void;\n warn(s: string): void;\n\n clear(): void;\n startAnalyze(player: IPlayer): void;\n startBackdoor(player: IPlayer): void;\n startHack(player: IPlayer): void;\n startGrow(player: IPlayer): void;\n startWeaken(player: IPlayer): void;\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishGrow(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishWeaken(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAnalyze(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAction(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n getFilepath(filename: string): string;\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null;\n getScript(player: IPlayer, filename: string): Script | null;\n getTextFile(player: IPlayer, filename: string): TextFile | null;\n getLitFile(player: IPlayer, filename: string): string | null;\n cwd(): string;\n setcwd(dir: string): void;\n runContract(player: IPlayer, name: string): void;\n executeScanAnalyzeCommand(player: IPlayer, depth?: number, all?: boolean): void;\n connectToServer(player: IPlayer, server: string): void;\n executeCommand(router: IRouter, player: IPlayer, command: string): void;\n executeCommands(router: IRouter, player: IPlayer, commands: string): void;\n // If there was any changes, will return true, once.\n process(router: IRouter, player: IPlayer, cycles: number): void;\n prestige(): void;\n getProgressText(): string;\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\ninterface ISkillParams {\n name: string;\n desc: string;\n\n baseCost?: number;\n costInc?: number;\n maxLvl?: number;\n\n successChanceAll?: number;\n successChanceStealth?: number;\n successChanceKill?: number;\n successChanceContract?: number;\n successChanceOperation?: number;\n successChanceEstimate?: number;\n\n actionTime?: number;\n\n effHack?: number;\n effStr?: number;\n effDef?: number;\n effDex?: number;\n effAgi?: number;\n effCha?: number;\n\n stamina?: number;\n money?: number;\n expGain?: number;\n}\n\nexport class Skill {\n name: string;\n desc: string;\n // Cost is in Skill Points\n baseCost = 1;\n // Additive cost increase per level\n costInc = 1;\n maxLvl = 0;\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n successChanceAll = 0;\n successChanceStealth = 0;\n successChanceKill = 0;\n successChanceContract = 0;\n successChanceOperation = 0;\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n successChanceEstimate = 0;\n actionTime = 0;\n effHack = 0;\n effStr = 0;\n effDef = 0;\n effDex = 0;\n effAgi = 0;\n effCha = 0;\n stamina = 0;\n money = 0;\n expGain = 0;\n\n constructor(params: ISkillParams = { name: \"foo\", desc: \"foo\" }) {\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n if (params.money) {\n this.money = params.money;\n }\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel: number, count = 1): number {\n //Recursive mode does not handle invalid inputs properly, but it should never\n //be possible for it to run with them. For the sake of not crashing the game,\n const recursiveMode = (currentLevel: number, count: number): number => {\n if (count <= 1) {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost);\n } else {\n const thisUpgrade = Math.floor(\n (this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost,\n );\n return this.calculateCost(currentLevel + 1, count - 1) + thisUpgrade;\n }\n };\n\n //Count must be a positive integer.\n if (count < 0 || count % 1 != 0) {\n throw new Error(`${count} is an invalid number of upgrades`);\n }\n //Use recursive mode if count is small\n if (count <= 100) {\n return recursiveMode(currentLevel, count);\n }\n //Use optimized mode if count is large\n else {\n //unFloored is roughly equivalent to\n //(this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost\n //being repeated for increasing currentLevel\n const preMult = (count * (2 * this.baseCost + this.costInc * (2 * currentLevel + count + 1))) / 2;\n const unFloored = preMult * BitNodeMultipliers.BladeburnerSkillCost - count / 2;\n return Math.floor(unFloored);\n }\n }\n\n getMultiplier(name: string): number {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n\n if (name === \"actionTime\") return this.actionTime;\n\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n}\n","export enum CrimeType {\n None = \"\",\n Shoplift = \"shoplift\",\n RobStore = \"rob a store\",\n Mug = \"mug someone\",\n Larceny = \"commit larceny\",\n Drugs = \"deal drugs\",\n BondForgery = \"forge corporate bonds\",\n TraffickArms = \"traffick illegal arms\",\n Homicide = \"commit homicide\",\n GrandTheftAuto = \"commit grand theft auto\",\n Kidnap = \"kidnap someone for ransom\",\n Assassination = \"assassinate a high-profile target\",\n Heist = \"pull off the ultimate heist\",\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n confirmationText: string | React.ReactNode;\n additionalButton?: React.ReactNode;\n}\n\nexport function ConfirmationModal(props: IProps): React.ReactElement {\n return (\n \n <>\n {props.confirmationText}\n {\n props.onConfirm();\n }}\n >\n Confirm\n \n {props.additionalButton && <>{props.additionalButton}}\n \n \n );\n}\n","/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\ninterface IProgressBarConfiguration {\n /**\n * Current progress, taken as a decimal (i.e. '0.6' to represent '60%')\n */\n progress?: number;\n\n /**\n * Total number of ticks in progress bar. Preferably a factor of 100.\n */\n totalTicks?: number;\n}\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\ninterface IProgressBarConfigurationMaterialized extends IProgressBarConfiguration {\n progress: number;\n totalTicks: number;\n}\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nexport function createProgressBarText(params: IProgressBarConfiguration): string {\n // Default values\n const defaultParams: IProgressBarConfigurationMaterialized = {\n progress: 0,\n totalTicks: 20,\n };\n\n // tslint:disable-next-line:prefer-object-spread\n const derived: IProgressBarConfigurationMaterialized = Object.assign({}, defaultParams, params);\n // Ensure it is 0..1\n derived.progress = Math.max(Math.min(derived.progress, 1), 0);\n\n // This way there is always at least one bar filled in...\n const bars: number = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes: number = Math.max(derived.totalTicks - bars, 0);\n\n // String.prototype.repeat isn't completley supported, but good enough for our purposes\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n","export function hash(): string {\n try {\n if (__COMMIT_HASH__) {\n return __COMMIT_HASH__;\n }\n } catch (err) {}\n return \"DEV\";\n}\n","import { CompanyPosition } from \"./CompanyPosition\";\nimport * as posNames from \"./data/companypositionnames\";\nimport { favorToRep, repToFavor } from \"../Faction/formulas/favor\";\n\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n name: string;\n info: string;\n companyPositions: IMap;\n expMultiplier: number;\n salaryMultiplier: number;\n jobStatReqOffset: number;\n isMegacorp?: boolean;\n}\n\nconst DefaultConstructorParams: IConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n};\n\nexport class Company {\n /**\n * Company name\n */\n name: string;\n\n /**\n * Description and general information about company\n */\n info: string;\n\n /**\n * Has faction associated.\n */\n isMegacorp: boolean;\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n companyPositions: IMap;\n\n /**\n * Company-specific multiplier for earnings\n */\n expMultiplier: number;\n salaryMultiplier: number;\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n jobStatReqOffset: number;\n\n /**\n * Properties to track the player's progress in this company\n */\n isPlayerEmployed: boolean;\n playerReputation: number;\n favor: number;\n\n constructor(p: IConstructorParams = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.isMegacorp = false;\n if (p.isMegacorp) this.isMegacorp = true;\n }\n\n hasPosition(pos: CompanyPosition | string): boolean {\n if (pos instanceof CompanyPosition) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions(): boolean {\n return this.companyPositions[posNames.AgentCompanyPositions[0]] != null;\n }\n\n hasBusinessConsultantPositions(): boolean {\n return this.companyPositions[posNames.BusinessConsultantCompanyPositions[0]] != null;\n }\n\n hasBusinessPositions(): boolean {\n return this.companyPositions[posNames.BusinessCompanyPositions[0]] != null;\n }\n\n hasEmployeePositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[1]] != null;\n }\n\n hasITPositions(): boolean {\n return this.companyPositions[posNames.ITCompanyPositions[0]] != null;\n }\n\n hasSecurityPositions(): boolean {\n return this.companyPositions[posNames.SecurityCompanyPositions[2]] != null;\n }\n\n hasSoftwareConsultantPositions(): boolean {\n return this.companyPositions[posNames.SoftwareConsultantCompanyPositions[0]] != null;\n }\n\n hasSoftwarePositions(): boolean {\n return this.companyPositions[posNames.SoftwareCompanyPositions[0]] != null;\n }\n\n hasWaiterPositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[0]] != null;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Company\", this);\n }\n\n /**\n * Initiatizes a Company from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Company {\n return Generic_fromJSON(Company, value.data);\n }\n}\n\nReviver.constructors.Company = Company;\n","/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\nimport { calculateRamUsage, RamUsageEntry } from \"./RamCalculations\";\nimport { ScriptUrl } from \"./ScriptUrl\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { roundToTwo } from \"../utils/helpers/roundToTwo\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { ScriptModule } from \"./ScriptModule\";\n\nlet globalModuleSequenceNumber = 0;\n\ninterface ScriptReference {\n filename: string;\n server: string;\n}\n\nexport class Script {\n // Code for this script\n code = \"\";\n\n // Filename for the script file\n filename = \"\";\n\n // url of the script if any, only for NS2.\n url = \"\";\n\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n module: Promise | null = null;\n\n // The timestamp when when the script was last updated.\n moduleSequenceNumber: number;\n\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n dependencies: ScriptUrl[] = [];\n dependents: ScriptReference[] = [];\n\n // Amount of RAM this Script requres to run\n ramUsage = 0;\n ramUsageEntries?: RamUsageEntry[];\n\n // hostname of server that this script is on.\n server = \"\";\n\n constructor(player: IPlayer | null = null, fn = \"\", code = \"\", server = \"\", otherScripts: Script[] = []) {\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // hostname of server this script is on\n this.module = null;\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n if (this.code !== \"\" && player !== null) {\n this.updateRamUsage(player, otherScripts);\n }\n }\n\n /**\n * Download the script as a file\n */\n download(): void {\n const filename = this.filename;\n const file = new Blob([this.code], { type: \"text/plain\" });\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n markUpdated(): void {\n this.module = null;\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n saveScript(player: IPlayer, filename: string, code: string, hostname: string, otherScripts: Script[]): void {\n // Update code and filename\n this.code = Script.formatCode(code);\n\n this.filename = filename;\n this.server = hostname;\n this.updateRamUsage(player, otherScripts);\n this.markUpdated();\n for (const dependent of this.dependents) {\n const [dependentScript] = otherScripts.filter(\n (s) => s.filename === dependent.filename && s.server == dependent.server,\n );\n if (dependentScript !== null) dependentScript.markUpdated();\n }\n }\n\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n async updateRamUsage(player: IPlayer, otherScripts: Script[]): Promise {\n const res = await calculateRamUsage(player, this.code, otherScripts);\n if (res.cost > 0) {\n this.ramUsage = roundToTwo(res.cost);\n this.ramUsageEntries = res.entries;\n }\n this.markUpdated();\n }\n\n imports(): string[] {\n return [];\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Script\", this);\n }\n\n // Initializes a Script Object from a JSON save state\n static fromJSON(value: IReviverValue): Script {\n const s = Generic_fromJSON(Script, value.data);\n // Force the url to blank from the save data. Urls are not valid outside the current browser page load.\n s.url = \"\";\n s.dependents = [];\n return s;\n }\n\n /**\n * Formats code: Removes the starting & trailing whitespace\n * @param {string} code - The code to format\n * @returns The formatted code\n */\n static formatCode(code: string): string {\n return code.replace(/^\\s+|\\s+$/g, \"\");\n }\n}\n\nReviver.constructors.Script = Script;\n","import { DarkWebItem } from \"./DarkWebItem\";\nimport { IMap } from \"../types\";\nimport { Programs } from \"../Programs/Programs\";\n\nexport const DarkWebItems: IMap = {\n BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, \"Opens up SSH Ports.\"),\n FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports.\"),\n RelaySMTPProgram: new DarkWebItem(Programs.RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports.\"),\n HTTPWormProgram: new DarkWebItem(Programs.HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports.\"),\n SQLInjectProgram: new DarkWebItem(Programs.SQLInjectProgram.name, 250e6, \"Opens up SQL Ports.\"),\n ServerProfiler: new DarkWebItem(\n Programs.ServerProfiler.name,\n 500000,\n \"Displays detailed information about a server.\",\n ),\n DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5.\"),\n DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10.\"),\n AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'.\"),\n FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, \"Unlock access to the formulas API.\"),\n};\n","import { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\nconst actionNames: Array = [\n \"Training\",\n \"Field Analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n];\n\nfor (const actionName of actionNames) {\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n}\n","// Enum values are lowercased to match css classes\nexport enum Suit {\n Clubs = \"clubs\",\n Diamonds = \"diamonds\",\n Hearts = \"hearts\",\n Spades = \"spades\",\n}\n\nexport class Card {\n constructor(readonly value: number, readonly suit: Suit) {\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue(): string {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit(): boolean {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation(): string {\n const value = this.formatValue();\n\n return `${value} of ${this.suit}`;\n }\n}\n","import { IActionIdentifier } from \"./IActionIdentifier\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\ninterface IParams {\n name?: string;\n type?: number;\n}\n\nexport class ActionIdentifier implements IActionIdentifier {\n name = \"\";\n type = -1;\n\n constructor(params: IParams = {}) {\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"ActionIdentifier\", this);\n }\n\n static fromJSON(value: IReviverValue): ActionIdentifier {\n return Generic_fromJSON(ActionIdentifier, value.data);\n }\n}\n\nReviver.constructors.ActionIdentifier = ActionIdentifier;\n","import { BitNodes } from \"../BitNode/BitNode\";\n\nexport class SourceFile {\n info: JSX.Element;\n lvl = 1;\n n: number;\n name: string;\n owned = false;\n\n constructor(number: number, info: JSX.Element) {\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = BitNodes[bitnodeKey];\n if (bitnode == null) {\n throw new Error(\"Invalid Bit Node for this Source File\");\n }\n\n this.n = number;\n this.name = `Source-File ${number}: ${bitnode.name}`;\n this.info = info;\n }\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { Player } from \"../Player\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { RunningScript } from \"./RunningScript\";\nimport { processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\n\nexport function scriptCalculateOfflineProduction(runningScript: RunningScript): void {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n let confidence = runningScript.onlineRunningTime / 14400;\n if (confidence >= 1) {\n confidence = 1;\n }\n\n //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n\n // Grow\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][2] == 0 || runningScript.dataMap[hostname][2] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n const timesGrown = Math.round(\n ((0.5 * runningScript.dataMap[hostname][2]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n if (!(serv instanceof Server)) throw new Error(\"trying to grow a non-normal server\");\n const growth = processSingleServerGrowth(serv, timesGrown, Player, host.cpuCores);\n runningScript.log(\n `'${serv.hostname}' grown by ${numeralWrapper.format(growth * 100 - 100, \"0.000000%\")} while offline`,\n );\n }\n }\n\n // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n const expGain = confidence * (runningScript.onlineExpGained / runningScript.onlineRunningTime) * timePassed;\n Player.gainHackingExp(expGain);\n\n // Update script stats\n runningScript.offlineRunningTime += timePassed;\n runningScript.offlineExpGained += expGain;\n\n // Weaken\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][3] == 0 || runningScript.dataMap[hostname][3] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n\n if (!(serv instanceof Server)) throw new Error(\"trying to weaken a non-normal server\");\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n const timesWeakened = Math.round(\n ((0.5 * runningScript.dataMap[hostname][3]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n}\n\n//Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\nexport function findRunningScript(\n filename: string,\n args: (string | number | boolean)[],\n server: BaseServer,\n): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && compareArrays(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n\n//Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\nexport function findRunningScriptByPid(pid: number, server: BaseServer): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n","import React from \"react\";\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport function MathJaxWrapper({ children }: IProps): React.ReactElement {\n return (\n \n {children}\n \n );\n}\n","import { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ninterface IError {\n fileName?: string;\n lineNumber?: number;\n}\n\nexport const isIError = (v: unknown): v is IError => {\n if (typeof v !== \"object\" || v == null) return false;\n return v.hasOwnProperty(\"fileName\") && v.hasOwnProperty(\"lineNumber\");\n};\n\nexport function exceptionAlert(e: unknown): void {\n console.error(e);\n let msg = \"\";\n let file = \"UNKNOWN FILE NAME\";\n let line = \"UNKNOWN LINE NUMBER\";\n if (isIError(e)) {\n file = e.fileName ?? file;\n line = e.lineNumber?.toString() ?? line;\n } else {\n msg = String(e);\n }\n dialogBoxCreate(\n \"Caught an exception: \" +\n msg +\n \"

\" +\n \"Filename: \" +\n file +\n \"

\" +\n \"Line Number: \" +\n line +\n \"

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

\" +\n \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" +\n \"save doesn't get corrupted\",\n );\n}\n","export interface CorporationUnlockUpgrade {\n index: number;\n price: number;\n name: string;\n desc: string;\n}\n\nexport enum CorporationUnlockUpgradeIndex {\n Export = 0,\n SmartSupply = 1,\n MarketResearchDemand = 2,\n MarketDataCompetition = 3,\n VeChain = 4,\n ShadyAccounting = 5,\n GovernmentPartnership = 6,\n WarehouseAPI = 7,\n OfficeAPI = 8,\n}\n\n// Corporation Unlock Upgrades\n// Upgrades for entire corporation, unlocks features, either you have it or you dont\nexport const CorporationUnlockUpgrades: Record = {\n //Lets you export goods\n [CorporationUnlockUpgradeIndex.Export]: {\n index: 0,\n price: 20e9,\n name: \"Export\",\n desc:\n \"Develop infrastructure to export your materials to your other facilities. \" +\n \"This allows you to move materials around between different divisions and cities.\",\n },\n\n //Lets you buy exactly however many required materials you need for production\n [CorporationUnlockUpgradeIndex.SmartSupply]: {\n index: 1,\n price: 25e9,\n name: \"Smart Supply\",\n desc:\n \"Use advanced AI to anticipate your supply needs. \" +\n \"This allows you to purchase exactly however many materials you need for production.\",\n },\n\n //Displays each material/product's demand\n [CorporationUnlockUpgradeIndex.MarketResearchDemand]: {\n index: 2,\n price: 5e9,\n name: \"Market Research - Demand\",\n desc:\n \"Mine and analyze market data to determine the demand of all resources. \" +\n \"The demand attribute, which affects sales, will be displayed for every material and product.\",\n },\n\n //Display's each material/product's competition\n [CorporationUnlockUpgradeIndex.MarketDataCompetition]: {\n index: 3,\n price: 5e9,\n name: \"Market Data - Competition\",\n desc:\n \"Mine and analyze market data to determine how much competition there is on the market \" +\n \"for all resources. The competition attribute, which affects sales, will be displayed for \" +\n \"every material and product.\",\n },\n [CorporationUnlockUpgradeIndex.VeChain]: {\n index: 4,\n price: 10e9,\n name: \"VeChain\",\n desc:\n \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" +\n \"This upgrade will allow you to view a wide array of useful statistics about your \" +\n \"Corporation.\",\n },\n [CorporationUnlockUpgradeIndex.ShadyAccounting]: {\n index: 5,\n price: 500e12,\n name: \"Shady Accounting\",\n desc:\n \"Utilize unscrupulous accounting practices and pay off government officials to save money \" +\n \"on taxes. This reduces the dividend tax rate by 5%.\",\n },\n [CorporationUnlockUpgradeIndex.GovernmentPartnership]: {\n index: 6,\n price: 2e15,\n name: \"Government Partnership\",\n desc:\n \"Help national governments further their agendas in exchange for lowered taxes. \" +\n \"This reduces the dividend tax rate by 10%\",\n },\n [CorporationUnlockUpgradeIndex.WarehouseAPI]: {\n index: 7,\n price: 50e9,\n name: \"Warehouse API\",\n desc: \"Enables the warehouse API.\",\n },\n [CorporationUnlockUpgradeIndex.OfficeAPI]: {\n index: 8,\n price: 50e9,\n name: \"Office API\",\n desc: \"Enables the office API.\",\n },\n};\n","import { StaticAugmentations } from \"../../Augmentation/StaticAugmentations\";\nimport { GraftableAugmentation } from \"./GraftableAugmentation\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport const getGraftingAvailableAugs = (player: IPlayer): string[] => {\n const augs: string[] = [];\n\n for (const [augName, aug] of Object.entries(StaticAugmentations)) {\n if (aug.isSpecial) continue;\n augs.push(augName);\n }\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));\n};\n\nexport const graftingIntBonus = (player: IPlayer): number => {\n return 1 + (player.getIntelligenceBonus(3) - 1) / 3;\n};\n\nexport const calculateGraftingTimeWithBonus = (player: IPlayer, aug: GraftableAugmentation): number => {\n const baseTime = aug.time;\n return baseTime / graftingIntBonus(player);\n};\n","import { BlackOperation } from \"./BlackOperation\";\nimport { IMap } from \"../types\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\n\nexport const BlackOperations: IMap = {};\n\n(function () {\n BlackOperations[BlackOperationNames.OperationTyphoon] = new BlackOperation({\n name: BlackOperationNames.OperationTyphoon,\n baseDifficulty: 2000,\n reqdRank: 2.5e3,\n rankGain: 50,\n rankLoss: 10,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationZero] = new BlackOperation({\n name: BlackOperationNames.OperationZero,\n baseDifficulty: 2500,\n reqdRank: 5e3,\n rankGain: 60,\n rankLoss: 15,\n hpLoss: 50,\n weights: {\n hack: 0.2,\n str: 0.15,\n def: 0.15,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationX] = new BlackOperation({\n name: BlackOperationNames.OperationX,\n baseDifficulty: 3000,\n reqdRank: 7.5e3,\n rankGain: 75,\n rankLoss: 15,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationTitan] = new BlackOperation({\n name: BlackOperationNames.OperationTitan,\n baseDifficulty: 4000,\n reqdRank: 10e3,\n rankGain: 100,\n rankLoss: 20,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationAres] = new BlackOperation({\n name: BlackOperationNames.OperationAres,\n baseDifficulty: 5000,\n reqdRank: 12.5e3,\n rankGain: 125,\n rankLoss: 20,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationArchangel] = new BlackOperation({\n name: BlackOperationNames.OperationArchangel,\n baseDifficulty: 7500,\n reqdRank: 15e3,\n rankGain: 200,\n rankLoss: 20,\n hpLoss: 25,\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationJuggernaut] = new BlackOperation({\n name: BlackOperationNames.OperationJuggernaut,\n baseDifficulty: 10e3,\n reqdRank: 20e3,\n rankGain: 300,\n rankLoss: 40,\n hpLoss: 300,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationRedDragon] = new BlackOperation({\n name: BlackOperationNames.OperationRedDragon,\n baseDifficulty: 12.5e3,\n reqdRank: 25e3,\n rankGain: 500,\n rankLoss: 50,\n hpLoss: 500,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationK] = new BlackOperation({\n name: BlackOperationNames.OperationK,\n baseDifficulty: 15e3,\n reqdRank: 30e3,\n rankGain: 750,\n rankLoss: 60,\n hpLoss: 1000,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationDeckard] = new BlackOperation({\n name: BlackOperationNames.OperationDeckard,\n baseDifficulty: 20e3,\n reqdRank: 40e3,\n rankGain: 1e3,\n rankLoss: 75,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationTyrell] = new BlackOperation({\n name: BlackOperationNames.OperationTyrell,\n baseDifficulty: 25e3,\n reqdRank: 50e3,\n rankGain: 1.5e3,\n rankLoss: 100,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationWallace] = new BlackOperation({\n name: BlackOperationNames.OperationWallace,\n baseDifficulty: 30e3,\n reqdRank: 75e3,\n rankGain: 2e3,\n rankLoss: 150,\n hpLoss: 1500,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationShoulderOfOrion] = new BlackOperation({\n name: BlackOperationNames.OperationShoulderOfOrion,\n baseDifficulty: 35e3,\n reqdRank: 100e3,\n rankGain: 2.5e3,\n rankLoss: 500,\n hpLoss: 1500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationHyron] = new BlackOperation({\n name: BlackOperationNames.OperationHyron,\n baseDifficulty: 40e3,\n reqdRank: 125e3,\n rankGain: 3e3,\n rankLoss: 1e3,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationMorpheus] = new BlackOperation({\n name: BlackOperationNames.OperationMorpheus,\n baseDifficulty: 45e3,\n reqdRank: 150e3,\n rankGain: 4e3,\n rankLoss: 1e3,\n hpLoss: 100,\n weights: {\n hack: 0.05,\n str: 0.15,\n def: 0.15,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationIonStorm] = new BlackOperation({\n name: BlackOperationNames.OperationIonStorm,\n baseDifficulty: 50e3,\n reqdRank: 175e3,\n rankGain: 5e3,\n rankLoss: 1e3,\n hpLoss: 5000,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationAnnihilus] = new BlackOperation({\n name: BlackOperationNames.OperationAnnihilus,\n baseDifficulty: 55e3,\n reqdRank: 200e3,\n rankGain: 7.5e3,\n rankLoss: 1e3,\n hpLoss: 10e3,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationUltron] = new BlackOperation({\n name: BlackOperationNames.OperationUltron,\n baseDifficulty: 60e3,\n reqdRank: 250e3,\n rankGain: 10e3,\n rankLoss: 2e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationCenturion] = new BlackOperation({\n name: BlackOperationNames.OperationCenturion,\n baseDifficulty: 70e3,\n reqdRank: 300e3,\n rankGain: 15e3,\n rankLoss: 5e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[BlackOperationNames.OperationVindictus] = new BlackOperation({\n name: BlackOperationNames.OperationVindictus,\n baseDifficulty: 75e3,\n reqdRank: 350e3,\n rankGain: 20e3,\n rankLoss: 20e3,\n hpLoss: 20e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[BlackOperationNames.OperationDaedalus] = new BlackOperation({\n name: BlackOperationNames.OperationDaedalus,\n baseDifficulty: 80e3,\n reqdRank: 400e3,\n rankGain: 40e3,\n rankLoss: 10e3,\n hpLoss: 100e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n})();\n","import { Fragment, FragmentById } from \"./Fragment\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IActiveFragmentParams {\n x: number;\n y: number;\n rotation: number;\n fragment: Fragment;\n}\n\nexport class ActiveFragment {\n id: number;\n highestCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n\n constructor(params?: IActiveFragmentParams) {\n if (params) {\n this.id = params.fragment.id;\n this.x = params.x;\n this.y = params.y;\n this.highestCharge = 0;\n this.numCharge = 0;\n this.rotation = params.rotation;\n } else {\n this.id = -1;\n this.x = -1;\n this.y = -1;\n this.highestCharge = 0;\n this.numCharge = 0;\n this.rotation = 0;\n }\n }\n\n collide(other: ActiveFragment): boolean {\n const thisFragment = this.fragment();\n const otherFragment = other.fragment();\n // These 2 variables converts 'this' local coordinates to world to other local.\n const dx: number = other.x - this.x;\n const dy: number = other.y - this.y;\n const fragSize = Math.max(thisFragment.shape.length, thisFragment.shape[0].length);\n for (let j = 0; j < fragSize; j++) {\n for (let i = 0; i < fragSize; i++) {\n if (thisFragment.fullAt(i, j, this.rotation) && otherFragment.fullAt(i - dx, j - dy, other.rotation))\n return true;\n }\n }\n\n return false;\n }\n\n fragment(): Fragment {\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n return fragment;\n }\n\n fullAt(worldX: number, worldY: number): boolean {\n return this.fragment().fullAt(worldX - this.x, worldY - this.y, this.rotation);\n }\n\n neighboors(): number[][] {\n return this.fragment()\n .neighboors(this.rotation)\n .map((cell) => [this.x + cell[0], this.y + cell[1]]);\n }\n\n copy(): ActiveFragment {\n return Object.assign({}, this);\n }\n\n /**\n * Serialize an active fragment to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"ActiveFragment\", this);\n }\n\n /**\n * Initializes an acive fragment from a JSON save state\n */\n static fromJSON(value: IReviverValue): ActiveFragment {\n return Generic_fromJSON(ActiveFragment, value.data);\n }\n}\n\nReviver.constructors.ActiveFragment = ActiveFragment;\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IPerson } from \"../PersonObjects/IPerson\";\nimport { IRouter } from \"../ui/Router\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { CrimeType } from \"../utils/WorkType\";\nimport { CrimeWork } from \"../Work/CrimeWork\";\n\ninterface IConstructorParams {\n hacking_success_weight?: number;\n strength_success_weight?: number;\n defense_success_weight?: number;\n dexterity_success_weight?: number;\n agility_success_weight?: number;\n charisma_success_weight?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n intelligence_exp?: number;\n\n kills?: number;\n}\n\nexport class Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n difficulty = 0;\n\n // Amount of karma lost for SUCCESSFULLY committing this crime\n karma = 0;\n\n // How many people die as a result of this crime\n kills = 0;\n\n // How much money is given by the\n money = 0;\n\n // Name of crime\n name = \"\";\n\n // Milliseconds it takes to attempt the crime\n time = 0;\n\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n type: CrimeType;\n\n // Weighting factors that determine how stats affect the success rate of this crime\n hacking_success_weight = 0;\n strength_success_weight = 0;\n defense_success_weight = 0;\n dexterity_success_weight = 0;\n agility_success_weight = 0;\n charisma_success_weight = 0;\n\n // How much stat experience is granted by this crime\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n constructor(\n name = \"\",\n type: CrimeType,\n time = 0,\n money = 0,\n difficulty = 0,\n karma = 0,\n params: IConstructorParams = {},\n ) {\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(p: IPlayer, div = 1, workerScript: WorkerScript | null = null): number {\n if (div <= 0) {\n div = 1;\n }\n p.startWork(\n new CrimeWork({\n crimeType: this.type,\n singularity: workerScript !== null,\n }),\n );\n\n return this.time;\n }\n\n successRate(p: IPerson): number {\n let chance: number =\n this.hacking_success_weight * p.hacking +\n this.strength_success_weight * p.strength +\n this.defense_success_weight * p.defense +\n this.dexterity_success_weight * p.dexterity +\n this.agility_success_weight * p.agility +\n this.charisma_success_weight * p.charisma +\n CONSTANTS.IntelligenceCrimeWeight * p.intelligence;\n chance /= CONSTANTS.MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.mults.crime_success;\n chance *= p.getIntelligenceBonus(1);\n\n return Math.min(chance, 1);\n }\n}\n","/**\n * Returns the input array as a comma separated string.\n *\n * Does several things that Array.toString() doesn't do\n * - Adds brackets around the array\n * - Adds quotation marks around strings\n */\nexport function arrayToString(a: unknown[]): string {\n const vals: unknown[] = [];\n for (let i = 0; i < a.length; ++i) {\n let elem: unknown = a[i];\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n","import { IPlayer } from \"../IPlayer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CalculateShareMult } from \"../../NetworkShare/Share\";\n\nfunction mult(f: Faction): number {\n let favorMult = 1 + f.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return favorMult * BitNodeMultipliers.FactionWorkRepGain;\n}\n\nexport function getHackingWorkRepGain(p: IPlayer, f: Faction): number {\n return (\n ((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *\n p.mults.faction_rep *\n p.getIntelligenceBonus(1) *\n mult(f) *\n CalculateShareMult()\n );\n}\n\nexport function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 * (p.strength + p.defense + p.dexterity + p.agility + (p.hacking + p.intelligence) * CalculateShareMult())) /\n CONSTANTS.MaxSkillLevel /\n 4.5;\n return t * p.mults.faction_rep * mult(f) * p.getIntelligenceBonus(1);\n}\n\nexport function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength +\n p.defense +\n p.dexterity +\n p.agility +\n p.charisma +\n (p.hacking + p.intelligence) * CalculateShareMult())) /\n CONSTANTS.MaxSkillLevel /\n 5.5;\n return t * p.mults.faction_rep * mult(f) * p.getIntelligenceBonus(1);\n}\n","export enum GameOptionsTab {\n SYSTEM,\n INTERFACE,\n GAMEPLAY,\n MISC,\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Hashes } from \"./Hashes\";\n\nexport function HashRate({ hashes }: { hashes: number }): React.ReactElement {\n return ;\n}\n","import { MessageFilenames } from \"./MessageHelpers\";\n\nexport class Message {\n // Name of Message file\n filename: MessageFilenames;\n\n // The text contains in the Message\n msg: string;\n\n constructor(filename: MessageFilenames, msg: string) {\n this.filename = filename;\n this.msg = msg;\n }\n}\n","/**\n * React Component for a button that's used to apply for a job\n */\nimport * as React from \"react\";\n\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\n\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n company: Company;\n entryPosType: CompanyPosition;\n onClick: (e: React.MouseEvent) => void;\n text: string;\n};\n\nexport function ApplyToJobButton(props: IProps): React.ReactElement {\n const player = use.Player();\n\n function getJobRequirementTooltip(): string {\n const pos = player.getNextCompanyPosition(props.company, props.entryPosType);\n if (pos == null) {\n return \"\";\n }\n\n if (!props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return getJobRequirementText(props.company, pos, true);\n }\n\n return (\n <>\n }>\n \n \n \n );\n}\n","// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\nimport { Research, IConstructorParams } from \"./Research\";\nimport { researchMetadata } from \"./data/ResearchMetadata\";\nimport { IMap } from \"../types\";\n\nexport const ResearchMap: IMap = {};\n\nfunction addResearch(p: IConstructorParams): void {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n ResearchMap[p.name] = new Research(p);\n}\n\nfor (const metadata of researchMetadata) {\n addResearch(metadata);\n}\n","/**\n * Event emitter that triggers when scripts are started/stopped\n */\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nexport const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();\n","import { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { Terminal } from \"./Terminal\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\nimport { IMap, IReturnStatus } from \"./types\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ImportPlayerData, SaveData, saveObject } from \"./SaveObject\";\nimport { Settings } from \"./Settings/Settings\";\nimport { exportScripts } from \"./Terminal/commands/download\";\nimport { CONSTANTS } from \"./Constants\";\nimport { hash } from \"./hash/hash\";\n\ninterface IReturnWebStatus extends IReturnStatus {\n data?: Record;\n}\n\ndeclare global {\n interface Window {\n appNotifier: {\n terminal: (message: string, type?: string) => void;\n toast: (message: string, type: ToastVariant, duration?: number) => void;\n };\n appSaveFns: {\n triggerSave: () => Promise;\n triggerGameExport: () => void;\n triggerScriptsExport: () => void;\n getSaveData: () => { save: string; fileName: string };\n getSaveInfo: (base64save: string) => Promise;\n pushSaveData: (base64save: string, automatic?: boolean) => void;\n };\n electronBridge: {\n send: (channel: string, data?: unknown) => void;\n receive: (channel: string, func: (...args: unknown[]) => void) => void;\n };\n }\n interface Document {\n getFiles: () => IReturnWebStatus;\n deleteFile: (filename: string) => IReturnWebStatus;\n saveFile: (filename: string, code: string) => IReturnWebStatus;\n }\n}\n\nexport function initElectron(): void {\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\" electron/\") > -1) {\n // Electron-specific code\n document.achievements = [];\n initWebserver();\n initAppNotifier();\n initSaveFunctions();\n initElectronBridge();\n }\n}\n\nfunction initWebserver(): void {\n function normalizeFileName(filename: string): string {\n filename = filename.replace(/\\/\\/+/g, \"/\");\n filename = removeLeadingSlash(filename);\n if (filename.includes(\"/\")) {\n filename = \"/\" + removeLeadingSlash(filename);\n }\n return filename;\n }\n\n document.getFiles = function (): IReturnWebStatus {\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return {\n res: true,\n data: {\n files: home.scripts.map((script) => ({\n filename: script.filename,\n code: script.code,\n ramUsage: script.ramUsage,\n })),\n },\n };\n };\n\n document.deleteFile = function (filename: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return home.removeFile(filename);\n };\n\n document.saveFile = function (filename: string, code: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n\n code = Buffer.from(code, \"base64\").toString();\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n const { success, overwritten } = home.writeToScriptFile(Player, filename, code);\n let script;\n if (success) {\n script = home.getScript(filename);\n }\n return {\n res: success,\n data: {\n overwritten,\n ramUsage: script?.ramUsage,\n },\n };\n };\n}\n\n// Expose certain alert functions to allow the wrapper to sends message to the game\nfunction initAppNotifier(): void {\n const funcs = {\n terminal: (message: string, type?: string) => {\n const typesFn: IMap<(s: string) => void> = {\n info: Terminal.info,\n warn: Terminal.warn,\n error: Terminal.error,\n success: Terminal.success,\n };\n let fn;\n if (type) fn = typesFn[type];\n if (!fn) fn = Terminal.print;\n fn.bind(Terminal)(message);\n },\n toast: (message: string, type: ToastVariant, duration = 2000) => SnackbarEvents.emit(message, type, duration),\n };\n\n // Will be consumud by the electron wrapper.\n window.appNotifier = funcs;\n}\n\nfunction initSaveFunctions(): void {\n const funcs = {\n triggerSave: (): Promise => saveObject.saveGame(true),\n triggerGameExport: (): void => {\n try {\n saveObject.exportGame();\n } catch (error) {\n console.error(error);\n SnackbarEvents.emit(\"Could not export game.\", ToastVariant.ERROR, 2000);\n }\n },\n triggerScriptsExport: (): void => exportScripts(\"*\", Player.getHomeComputer()),\n getSaveData: (): { save: string; fileName: string } => {\n return {\n save: saveObject.getSaveString(Settings.ExcludeRunningScriptsFromSave),\n fileName: saveObject.getSaveFileName(),\n };\n },\n getSaveInfo: async (base64save: string): Promise => {\n try {\n const data = await saveObject.getImportDataFromString(base64save);\n return data.playerData;\n } catch (error) {\n console.error(error);\n return;\n }\n },\n pushSaveData: (base64save: string, automatic = false): void => Router.toImportSave(base64save, automatic),\n };\n\n // Will be consumud by the electron wrapper.\n window.appSaveFns = funcs;\n}\n\nfunction initElectronBridge(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.receive(\"get-save-data-request\", () => {\n const data = window.appSaveFns.getSaveData();\n bridge.send(\"get-save-data-response\", data);\n });\n bridge.receive(\"get-save-info-request\", async (save: unknown) => {\n if (typeof save !== \"string\") throw new Error(\"Error while trying to get save info\");\n const data = await window.appSaveFns.getSaveInfo(save);\n bridge.send(\"get-save-info-response\", data);\n });\n bridge.receive(\"push-save-request\", (params: unknown) => {\n if (typeof params !== \"object\") throw new Error(\"Error trying to push save request\");\n const { save, automatic = false } = params as { save: string; automatic: boolean };\n window.appSaveFns.pushSaveData(save, automatic);\n });\n bridge.receive(\"trigger-save\", () => {\n return window.appSaveFns\n .triggerSave()\n .then(() => {\n bridge.send(\"save-completed\");\n })\n .catch((error: unknown) => {\n console.error(error);\n SnackbarEvents.emit(\"Could not save game.\", ToastVariant.ERROR, 2000);\n });\n });\n bridge.receive(\"trigger-game-export\", () => {\n try {\n window.appSaveFns.triggerGameExport();\n } catch (error) {\n console.error(error);\n SnackbarEvents.emit(\"Could not export game.\", ToastVariant.ERROR, 2000);\n }\n });\n bridge.receive(\"trigger-scripts-export\", () => {\n try {\n window.appSaveFns.triggerScriptsExport();\n } catch (error) {\n console.error(error);\n SnackbarEvents.emit(\"Could not export scripts.\", ToastVariant.ERROR, 2000);\n }\n });\n}\n\nexport function pushGameSaved(data: SaveData): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-game-saved\", data);\n}\n\nexport function pushGameReady(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n // Send basic information to the electron wrapper\n bridge.send(\"push-game-ready\", {\n player: {\n identifier: Player.identifier,\n playtime: Player.totalPlaytime,\n lastSave: Player.lastSave,\n },\n game: {\n version: CONSTANTS.VersionString,\n hash: hash(),\n },\n });\n}\n\nexport function pushImportResult(wasImported: boolean): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-import-result\", { wasImported });\n pushDisableRestore();\n}\n\nexport function pushDisableRestore(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-disable-restore\", { duration: 1000 * 60 });\n}\n","import { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Work, WorkType } from \"./Work\";\nimport { Program } from \"../Programs/Program\";\n\nexport const isCreateProgramWork = (w: Work | null): w is CreateProgramWork =>\n w !== null && w.type === WorkType.CREATE_PROGRAM;\n\ninterface CreateProgramWorkParams {\n programName: string;\n singularity: boolean;\n player: IPlayer;\n}\n\nexport class CreateProgramWork extends Work {\n programName: string;\n // amount of effective work completed on the program (time boosted by skills).\n unitCompleted: number;\n\n constructor(params?: CreateProgramWorkParams) {\n super(WorkType.CREATE_PROGRAM, params?.singularity ?? true);\n this.unitCompleted = 0;\n this.programName = params?.programName ?? \"\";\n\n if (params?.player) {\n const player = params.player;\n for (let i = 0; i < player.getHomeComputer().programs.length; ++i) {\n const programFile = player.getHomeComputer().programs[i];\n if (programFile.startsWith(this.programName) && programFile.endsWith(\"%-INC\")) {\n const res = programFile.split(\"-\");\n if (res.length != 3) {\n break;\n }\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n this.unitCompleted = (percComplete / 100) * this.unitNeeded();\n player.getHomeComputer().programs.splice(i, 1);\n }\n }\n }\n }\n\n unitNeeded(): number {\n return this.getProgram().create?.time ?? 0;\n }\n\n getProgram(): Program {\n const p = Object.values(Programs).find((p) => p.name.toLowerCase() === this.programName.toLowerCase());\n if (!p) throw new Error(\"Create program work started with invalid program \" + this.programName);\n return p;\n }\n\n process(player: IPlayer, cycles: number): boolean {\n let focusBonus = 1;\n if (!player.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n //Higher hacking skill will allow you to create programs faster\n const reqLvl = this.getProgram().create?.level ?? 0;\n let skillMult = (player.hacking / reqLvl) * player.getIntelligenceBonus(3); //This should always be greater than 1;\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n skillMult *= focusBonus;\n //Skill multiplier directly applied to \"time worked\"\n this.cyclesWorked += cycles;\n this.unitCompleted += CONSTANTS._idleSpeed * cycles * skillMult;\n\n if (this.unitCompleted >= this.unitNeeded()) {\n return true;\n }\n return false;\n }\n finish(player: IPlayer, cancelled: boolean): void {\n const programName = this.programName;\n if (!cancelled) {\n //Complete case\n player.gainIntelligenceExp(\n (CONSTANTS.IntelligenceProgramBaseExpGain * this.cyclesWorked * CONSTANTS._idleSpeed) / 1000,\n );\n if (!this.singularity) {\n const lines = [\n `You've finished creating ${programName}!`,\n \"The new program can be found on your home computer.\",\n ];\n dialogBoxCreate(lines.join(\"
\"));\n }\n\n if (!player.getHomeComputer().programs.includes(programName)) {\n player.getHomeComputer().programs.push(programName);\n }\n } else if (!player.getHomeComputer().programs.includes(programName)) {\n //Incomplete case\n const perc = ((100 * this.unitCompleted) / this.unitNeeded()).toFixed(2);\n const incompleteName = programName + \"-\" + perc + \"%-INC\";\n player.getHomeComputer().programs.push(incompleteName);\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"CreateProgramWork\", this);\n }\n\n /**\n * Initiatizes a CreateProgramWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): CreateProgramWork {\n return Generic_fromJSON(CreateProgramWork, value.data);\n }\n}\n\nReviver.constructors.CreateProgramWork = CreateProgramWork;\n","import { PlayerObject } from \"src/PersonObjects/Player/PlayerObject\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { SkillNames } from \"../Bladeburner/data/SkillNames\";\nimport { Skills } from \"../Bladeburner/Skills\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Industries } from \"../Corporation/IndustryData\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport { Factions } from \"../Faction/Factions\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { hasHacknetServers } from \"../Hacknet/HacknetHelpers\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { GetAllServers, GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Server } from \"../Server/Server\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Page } from \"../ui/Router\";\nimport { IMap } from \"../types\";\nimport * as data from \"./AchievementData.json\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"../Bladeburner/data/BlackOperationNames\";\nimport { isClassWork } from \"../Work/ClassWork\";\n\n// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...\nconst achievementData = ((data)).achievements;\n\nexport interface Achievement {\n ID: string;\n Icon?: string;\n Name?: string;\n Description?: string;\n Secret?: boolean;\n Condition: () => boolean;\n Visible?: () => boolean;\n AdditionalUnlock?: string[]; // IDs of achievements that should be awarded when awarding this one\n}\n\nexport interface PlayerAchievement {\n ID: string;\n unlockedOn?: number;\n}\n\nexport interface AchievementDataJson {\n achievements: IMap;\n}\n\nexport interface AchievementData {\n ID: string;\n Name: string;\n Description: string;\n}\n\nfunction bitNodeFinishedState(): boolean {\n const wd = GetServer(SpecialServers.WorldDaemon);\n if (!(wd instanceof Server)) return false;\n if (wd.backdoorInstalled) return true;\n return (\n Player.bladeburner !== null && Player.bladeburner.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)\n );\n}\n\nfunction hasAccessToSF(player: PlayerObject, bn: number): boolean {\n return player.bitNodeN === bn || player.sourceFiles.some((a) => a.n === bn);\n}\n\nfunction knowsAboutBitverse(player: PlayerObject): boolean {\n return player.sourceFiles.some((a) => a.n === 1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction sfAchievement(): Achievement[] {\n const achs: Achievement[] = [];\n for (let i = 0; i <= 11; i++) {\n for (let j = 1; j <= 3; j++) {\n achs.push({\n ID: `SF${i}.${j}`,\n Condition: () => Player.sourceFileLvl(i) >= j,\n });\n }\n }\n return achs;\n}\n\nexport const achievements: IMap = {\n [FactionNames.CyberSec.toUpperCase()]: {\n ...achievementData[FactionNames.CyberSec.toUpperCase()],\n Icon: \"CSEC\",\n Condition: () => Player.factions.includes(FactionNames.CyberSec),\n },\n [FactionNames.NiteSec.toUpperCase()]: {\n ...achievementData[FactionNames.NiteSec.toUpperCase()],\n Icon: FactionNames.NiteSec,\n Condition: () => Player.factions.includes(FactionNames.NiteSec),\n },\n THE_BLACK_HAND: {\n ...achievementData[\"THE_BLACK_HAND\"],\n Icon: \"TBH\",\n Condition: () => Player.factions.includes(FactionNames.TheBlackHand),\n },\n [FactionNames.BitRunners.toUpperCase()]: {\n ...achievementData[FactionNames.BitRunners.toUpperCase()],\n Icon: FactionNames.BitRunners.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.BitRunners),\n },\n [FactionNames.Daedalus.toUpperCase()]: {\n ...achievementData[FactionNames.Daedalus.toUpperCase()],\n Icon: FactionNames.Daedalus.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Daedalus),\n },\n THE_COVENANT: {\n ...achievementData[\"THE_COVENANT\"],\n Icon: FactionNames.TheCovenant.toLowerCase().replace(/ /g, \"\"),\n Condition: () => Player.factions.includes(FactionNames.TheCovenant),\n },\n [FactionNames.Illuminati.toUpperCase()]: {\n ...achievementData[FactionNames.Illuminati.toUpperCase()],\n Icon: FactionNames.Illuminati.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Illuminati),\n },\n \"BRUTESSH.EXE\": {\n ...achievementData[\"BRUTESSH.EXE\"],\n Icon: \"p0\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.BruteSSHProgram.name),\n },\n \"FTPCRACK.EXE\": {\n ...achievementData[\"FTPCRACK.EXE\"],\n Icon: \"p1\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.FTPCrackProgram.name),\n },\n //-----------------------------------------------------\n \"RELAYSMTP.EXE\": {\n ...achievementData[\"RELAYSMTP.EXE\"],\n Icon: \"p2\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.RelaySMTPProgram.name),\n },\n \"HTTPWORM.EXE\": {\n ...achievementData[\"HTTPWORM.EXE\"],\n Icon: \"p3\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.HTTPWormProgram.name),\n },\n \"SQLINJECT.EXE\": {\n ...achievementData[\"SQLINJECT.EXE\"],\n Icon: \"p4\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.SQLInjectProgram.name),\n },\n \"FORMULAS.EXE\": {\n ...achievementData[\"FORMULAS.EXE\"],\n Icon: \"formulas\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.Formulas.name),\n },\n \"SF1.1\": {\n ...achievementData[\"SF1.1\"],\n Icon: \"SF1.1\",\n Visible: () => hasAccessToSF(Player, 1),\n Condition: () => Player.sourceFileLvl(1) >= 1,\n },\n \"SF2.1\": {\n ...achievementData[\"SF2.1\"],\n Icon: \"SF2.1\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.sourceFileLvl(2) >= 1,\n },\n \"SF3.1\": {\n ...achievementData[\"SF3.1\"],\n Icon: \"SF3.1\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.sourceFileLvl(3) >= 1,\n },\n \"SF4.1\": {\n ...achievementData[\"SF4.1\"],\n Icon: \"SF4.1\",\n Visible: () => hasAccessToSF(Player, 4),\n Condition: () => Player.sourceFileLvl(4) >= 1,\n },\n \"SF5.1\": {\n ...achievementData[\"SF5.1\"],\n Icon: \"SF5.1\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.sourceFileLvl(5) >= 1,\n },\n \"SF6.1\": {\n ...achievementData[\"SF6.1\"],\n Icon: \"SF6.1\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.sourceFileLvl(6) >= 1,\n },\n \"SF7.1\": {\n ...achievementData[\"SF7.1\"],\n Icon: \"SF7.1\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.sourceFileLvl(7) >= 1,\n },\n \"SF8.1\": {\n ...achievementData[\"SF8.1\"],\n Icon: \"SF8.1\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.sourceFileLvl(8) >= 1,\n },\n \"SF9.1\": {\n ...achievementData[\"SF9.1\"],\n Icon: \"SF9.1\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => Player.sourceFileLvl(9) >= 1,\n },\n \"SF10.1\": {\n ...achievementData[\"SF10.1\"],\n Icon: \"SF10.1\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sourceFileLvl(10) >= 1,\n },\n \"SF11.1\": {\n ...achievementData[\"SF11.1\"],\n Icon: \"SF11.1\",\n Visible: () => hasAccessToSF(Player, 11),\n Condition: () => Player.sourceFileLvl(11) >= 1,\n },\n \"SF12.1\": {\n ...achievementData[\"SF12.1\"],\n Icon: \"SF12.1\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 1,\n },\n MONEY_1Q: {\n ...achievementData[\"MONEY_1Q\"],\n Icon: \"$1Q\",\n Condition: () => Player.money >= 1e18,\n },\n MONEY_M1B: {\n ...achievementData[\"MONEY_M1B\"],\n Icon: \"-1b\",\n Secret: true,\n Condition: () => Player.money <= -1e9,\n },\n INSTALL_1: {\n ...achievementData[\"INSTALL_1\"],\n Icon: \"install\",\n Condition: () => Player.augmentations.length >= 1,\n },\n INSTALL_100: {\n ...achievementData[\"INSTALL_100\"],\n Icon: \"install_100\",\n Condition: () => Player.augmentations.length >= 100,\n },\n QUEUE_40: {\n ...achievementData[\"QUEUE_40\"],\n Icon: \"queue40\",\n Condition: () => Player.queuedAugmentations.length >= 40,\n },\n HACKING_100000: {\n ...achievementData[\"HACKING_100000\"],\n Icon: \"hack100000\",\n Condition: () => Player.hacking >= 100000,\n },\n COMBAT_3000: {\n ...achievementData[\"COMBAT_3000\"],\n Icon: \"combat3000\",\n Condition: () =>\n Player.strength >= 3000 && Player.defense >= 3000 && Player.dexterity >= 3000 && Player.agility >= 3000,\n },\n NEUROFLUX_255: {\n ...achievementData[\"NEUROFLUX_255\"],\n Icon: \"nf255\",\n Condition: () => Player.augmentations.some((a) => a.name === AugmentationNames.NeuroFluxGovernor && a.level >= 255),\n },\n NS2: {\n ...achievementData[\"NS2\"],\n Icon: \"ns2\",\n Condition: () =>\n Player.getHomeComputer().scripts.some((s) => s.filename.endsWith(\".js\") || s.filename.endsWith(\".ns\")),\n },\n FROZE: {\n ...achievementData[\"FROZE\"],\n Icon: \"forze\",\n Condition: () => location.href.includes(\"noScripts\"),\n },\n RUNNING_SCRIPTS_1000: {\n ...achievementData[\"RUNNING_SCRIPTS_1000\"],\n Icon: \"run1000\",\n Condition: (): boolean => {\n let running = 0;\n for (const s of GetAllServers()) {\n running += s.runningScripts.length;\n }\n return running >= 1000;\n },\n },\n DRAIN_SERVER: {\n ...achievementData[\"DRAIN_SERVER\"],\n Icon: \"drain\",\n Condition: (): boolean => {\n for (const s of GetAllServers()) {\n if (s instanceof Server) {\n if (s.moneyMax > 0 && s.moneyAvailable === 0) return true;\n }\n }\n return false;\n },\n },\n MAX_RAM: {\n ...achievementData[\"MAX_RAM\"],\n Icon: \"maxram\",\n Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,\n },\n MAX_CORES: {\n ...achievementData[\"MAX_CORES\"],\n Icon: \"maxcores\",\n Condition: () => Player.getHomeComputer().cpuCores === 8,\n },\n SCRIPTS_30: {\n ...achievementData[\"SCRIPTS_30\"],\n Icon: \"folders\",\n Condition: () => Player.getHomeComputer().scripts.length >= 30,\n },\n KARMA_1000000: {\n ...achievementData[\"KARMA_1000000\"],\n Icon: \"karma\",\n Secret: true,\n Condition: () => Player.karma <= -1e6,\n },\n STOCK_1q: {\n ...achievementData[\"STOCK_1q\"],\n Icon: \"$1Q\",\n Condition: () => Player.moneySourceB.stock >= 1e15,\n },\n DISCOUNT: {\n ...achievementData[\"DISCOUNT\"],\n Icon: \"discount\",\n Condition: (): boolean => {\n const p = GetServer(\"powerhouse-fitness\");\n if (!(p instanceof Server)) return false;\n return p.backdoorInstalled;\n },\n },\n SCRIPT_32GB: {\n ...achievementData[\"SCRIPT_32GB\"],\n Icon: \"bigcost\",\n Condition: () => Player.getHomeComputer().scripts.some((s) => s.ramUsage >= 32),\n },\n FIRST_HACKNET_NODE: {\n ...achievementData[\"FIRST_HACKNET_NODE\"],\n Icon: \"node\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n },\n \"30_HACKNET_NODE\": {\n ...achievementData[\"30_HACKNET_NODE\"],\n Icon: \"hacknet-all\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length >= 30,\n },\n MAX_HACKNET_NODE: {\n ...achievementData[\"MAX_HACKNET_NODE\"],\n Icon: \"hacknet-max\",\n Condition: (): boolean => {\n if (hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (!(h instanceof HacknetNode)) return false;\n if (\n h.ram === HacknetNodeConstants.MaxRam &&\n h.cores === HacknetNodeConstants.MaxCores &&\n h.level === HacknetNodeConstants.MaxLevel\n )\n return true;\n }\n return false;\n },\n },\n HACKNET_NODE_10M: {\n ...achievementData[\"HACKNET_NODE_10M\"],\n Icon: \"hacknet-10m\",\n Condition: () => !hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 10e6,\n },\n REPUTATION_10M: {\n ...achievementData[\"REPUTATION_10M\"],\n Icon: \"reputation\",\n Condition: () => Object.values(Factions).some((f) => f.playerReputation >= 10e6),\n },\n DONATION: {\n ...achievementData[\"DONATION\"],\n Icon: \"donation\",\n Condition: () => Object.values(Factions).some((f) => f.favor >= 150),\n },\n TRAVEL: {\n ...achievementData[\"TRAVEL\"],\n Icon: \"TRAVEL\",\n Condition: () => Player.city !== CityName.Sector12,\n },\n WORKOUT: {\n ...achievementData[\"WORKOUT\"],\n Icon: \"WORKOUT\",\n Condition: () => isClassWork(Player.currentWork),\n },\n TOR: {\n ...achievementData[\"TOR\"],\n Icon: \"TOR\",\n Condition: () => Player.hasTorRouter(),\n },\n HOSPITALIZED: {\n ...achievementData[\"HOSPITALIZED\"],\n Icon: \"OUCH\",\n Condition: () => Player.moneySourceB.hospitalization !== 0,\n },\n GANG: {\n ...achievementData[\"GANG\"],\n Icon: \"GANG\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null,\n },\n FULL_GANG: {\n ...achievementData[\"FULL_GANG\"],\n Icon: \"GANGMAX\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && Player.gang.members.length === GangConstants.MaximumGangMembers,\n },\n GANG_TERRITORY: {\n ...achievementData[\"GANG_TERRITORY\"],\n Icon: \"GANG100%\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && AllGangs[Player.gang.facName].territory >= 0.999,\n },\n GANG_MEMBER_POWER: {\n ...achievementData[\"GANG_MEMBER_POWER\"],\n Icon: \"GANG10000\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () =>\n Player.gang !== null &&\n Player.gang.members.some(\n (m) =>\n m.hack >= 10000 || m.str >= 10000 || m.def >= 10000 || m.dex >= 10000 || m.agi >= 10000 || m.cha >= 10000,\n ),\n },\n CORPORATION: {\n ...achievementData[\"CORPORATION\"],\n Icon: \"CORP\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null,\n },\n CORPORATION_BRIBE: {\n ...achievementData[\"CORPORATION_BRIBE\"],\n Icon: \"CORPLOBBY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.unlockUpgrades[6] === 1,\n },\n CORPORATION_PROD_1000: {\n ...achievementData[\"CORPORATION_PROD_1000\"],\n Icon: \"CORP1000\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.divisions.some((d) => d.prodMult >= 1000),\n },\n CORPORATION_EMPLOYEE_3000: {\n ...achievementData[\"CORPORATION_EMPLOYEE_3000\"],\n Icon: \"CORPCITY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: (): boolean => {\n if (Player.corporation === null) return false;\n for (const d of Player.corporation.divisions) {\n for (const o of Object.values(d.offices)) {\n if (o === 0) continue;\n if (o.employees.length >= 3000) return true;\n }\n }\n return false;\n },\n },\n CORPORATION_REAL_ESTATE: {\n ...achievementData[\"CORPORATION_REAL_ESTATE\"],\n Icon: \"CORPRE\",\n Name: \"Own the land\",\n Description: \"Expand to the Real Estate division.\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () =>\n Player.corporation !== null && Player.corporation.divisions.some((d) => d.type === Industries.RealEstate),\n },\n INTELLIGENCE_255: {\n ...achievementData[\"INTELLIGENCE_255\"],\n Icon: \"INT255\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.intelligence >= 255,\n },\n BLADEBURNER_DIVISION: {\n ...achievementData[\"BLADEBURNER_DIVISION\"],\n Icon: \"BLADE\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null,\n },\n BLADEBURNER_OVERCLOCK: {\n ...achievementData[\"BLADEBURNER_OVERCLOCK\"],\n Icon: \"BLADEOVERCLOCK\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () =>\n Player.bladeburner !== null &&\n Player.bladeburner.skills[SkillNames.Overclock] === Skills[SkillNames.Overclock].maxLvl,\n },\n BLADEBURNER_UNSPENT_100000: {\n ...achievementData[\"BLADEBURNER_UNSPENT_100000\"],\n Icon: \"BLADE100K\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null && Player.bladeburner.skillPoints >= 100000,\n },\n \"4S\": {\n ...achievementData[\"4S\"],\n Icon: \"4S\",\n Condition: () => Player.has4SData,\n },\n FIRST_HACKNET_SERVER: {\n ...achievementData[\"FIRST_HACKNET_SERVER\"],\n Icon: \"HASHNET\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n AdditionalUnlock: [achievementData.FIRST_HACKNET_NODE.ID],\n },\n ALL_HACKNET_SERVER: {\n ...achievementData[\"ALL_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length === HacknetServerConstants.MaxServers,\n AdditionalUnlock: [achievementData[\"30_HACKNET_NODE\"].ID],\n },\n MAX_HACKNET_SERVER: {\n ...achievementData[\"MAX_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: (): boolean => {\n if (!hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (typeof h !== \"string\") return false;\n const hs = GetServer(h);\n if (!(hs instanceof HacknetServer)) return false;\n if (\n hs.maxRam === HacknetServerConstants.MaxRam &&\n hs.cores === HacknetServerConstants.MaxCores &&\n hs.level === HacknetServerConstants.MaxLevel &&\n hs.cache === HacknetServerConstants.MaxCache\n )\n return true;\n }\n return false;\n },\n AdditionalUnlock: [achievementData.MAX_HACKNET_NODE.ID],\n },\n HACKNET_SERVER_1B: {\n ...achievementData[\"HACKNET_SERVER_1B\"],\n Icon: \"HASHNETMONEY\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9,\n AdditionalUnlock: [achievementData.HACKNET_NODE_10M.ID],\n },\n MAX_CACHE: {\n ...achievementData[\"MAX_CACHE\"],\n Icon: \"HASHNETCAP\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n hasHacknetServers(Player) &&\n Player.hashManager.hashes === Player.hashManager.capacity &&\n Player.hashManager.capacity > 0,\n },\n SLEEVE_8: {\n ...achievementData[\"SLEEVE_8\"],\n Icon: \"SLEEVE8\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sleeves.length === 8 && Player.sourceFileLvl(10) === 3,\n },\n INDECISIVE: {\n ...achievementData[\"INDECISIVE\"],\n Icon: \"1H\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: (function () {\n let c = 0;\n setInterval(() => {\n if (Router.page() === Page.BitVerse) {\n c++;\n } else {\n c = 0;\n }\n }, 60 * 1000);\n return () => c > 60;\n })(),\n },\n FAST_BN: {\n ...achievementData[\"FAST_BN\"],\n Icon: \"2DAYS\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () => bitNodeFinishedState() && Player.playtimeSinceLastBitnode < 1000 * 60 * 60 * 24 * 2,\n },\n CHALLENGE_BN1: {\n ...achievementData[\"CHALLENGE_BN1\"],\n Icon: \"BN1+\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () =>\n Player.bitNodeN === 1 &&\n bitNodeFinishedState() &&\n Player.getHomeComputer().maxRam <= 128 &&\n Player.getHomeComputer().cpuCores === 1,\n },\n CHALLENGE_BN2: {\n ...achievementData[\"CHALLENGE_BN2\"],\n Icon: \"BN2+\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.bitNodeN === 2 && bitNodeFinishedState() && Player.gang === null,\n },\n CHALLENGE_BN3: {\n ...achievementData[\"CHALLENGE_BN3\"],\n Icon: \"BN3+\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.bitNodeN === 3 && bitNodeFinishedState() && Player.corporation === null,\n },\n CHALLENGE_BN6: {\n ...achievementData[\"CHALLENGE_BN6\"],\n Icon: \"BN6+\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bitNodeN === 6 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN7: {\n ...achievementData[\"CHALLENGE_BN7\"],\n Icon: \"BN7+\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.bitNodeN === 7 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN8: {\n ...achievementData[\"CHALLENGE_BN8\"],\n Icon: \"BN8+\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.bitNodeN === 8 && bitNodeFinishedState() && !Player.has4SData && !Player.has4SDataTixApi,\n },\n CHALLENGE_BN9: {\n ...achievementData[\"CHALLENGE_BN9\"],\n Icon: \"BN9+\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n Player.bitNodeN === 9 &&\n bitNodeFinishedState() &&\n Player.moneySourceB.hacknet === 0 &&\n Player.moneySourceB.hacknet_expenses === 0,\n },\n CHALLENGE_BN10: {\n ...achievementData[\"CHALLENGE_BN10\"],\n Icon: \"BN10+\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () =>\n Player.bitNodeN === 10 &&\n bitNodeFinishedState() &&\n !Player.sleeves.some(\n (s) =>\n s.augmentations.length > 0 ||\n s.hacking_exp > 0 ||\n s.strength_exp > 0 ||\n s.defense_exp > 0 ||\n s.agility_exp > 0 ||\n s.dexterity_exp > 0 ||\n s.charisma_exp > 0,\n ),\n },\n CHALLENGE_BN12: {\n ...achievementData[\"CHALLENGE_BN12\"],\n Icon: \"BN12+\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 50,\n },\n BYPASS: {\n ...achievementData[\"BYPASS\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Bypass),\n },\n PROTOTYPETAMPERING: {\n ...achievementData[\"PROTOTYPETAMPERING\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.PrototypeTampering),\n },\n UNCLICKABLE: {\n ...achievementData[\"UNCLICKABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Unclickable),\n },\n UNDOCUMENTEDFUNCTIONCALL: {\n ...achievementData[\"UNDOCUMENTEDFUNCTIONCALL\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.UndocumentedFunctionCall),\n },\n TIMECOMPRESSION: {\n ...achievementData[\"TIMECOMPRESSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TimeCompression),\n },\n REALITYALTERATION: {\n ...achievementData[\"REALITYALTERATION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.RealityAlteration),\n },\n N00DLES: {\n ...achievementData[\"N00DLES\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.N00dles),\n },\n EDITSAVEFILE: {\n ...achievementData[\"EDITSAVEFILE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.EditSaveFile),\n },\n UNACHIEVABLE: {\n ...achievementData[\"UNACHIEVABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n // Hey Players! Yes, you're supposed to modify this to get the achievement!\n Condition: () => false,\n },\n CHALLENGE_BN13: {\n ...achievementData[\"CHALLENGE_BN13\"],\n Icon: \"BN13+\",\n Visible: () => hasAccessToSF(Player, 13),\n Condition: () =>\n Player.bitNodeN === 13 &&\n bitNodeFinishedState() &&\n !Player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1),\n },\n DEVMENU: {\n ...achievementData[\"DEVMENU\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.YoureNotMeantToAccessThis),\n },\n RAINBOW: {\n ...achievementData[\"RAINBOW\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.INeedARainbow),\n },\n TRUE_RECURSION: {\n ...achievementData[\"TRUE_RECURSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TrueRecursion),\n },\n};\n\n// Steam has a limit of 100 achievement. So these were planned but commented for now.\n// { ID: FactionNames.ECorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.ECorp) },\n// { ID: FactionNames.MegaCorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.MegaCorp) },\n// { ID: \"BACHMAN_&_ASSOCIATES\", Condition: () => Player.factions.includes(FactionNames.BachmanAssociates) },\n// { ID: \"BLADE_INDUSTRIES\", Condition: () => Player.factions.includes(FactionNames.BladeIndustries) },\n// { ID: FactionNames.NWO.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.NWO) },\n// { ID: \"CLARKE_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.ClarkeIncorporated) },\n// { ID: \"OMNITEK_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.OmniTekIncorporated) },\n// { ID: \"FOUR_SIGMA\", Condition: () => Player.factions.includes(FactionNames.FourSigma) },\n// { ID: \"KUAIGONG_INTERNATIONAL\", Condition: () => Player.factions.includes(FactionNames.KuaiGongInternational) },\n// { ID: \"FULCRUM_SECRET_TECHNOLOGIES\", Condition: () => Player.factions.includes(FactionNames.FulcrumSecretTechnologies) },\n// { ID: FactionNames.Aevum.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Aevum) },\n// { ID: FactionNames.Chongqing.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Chongqing) },\n// { ID: FactionNames.Ishima.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Ishima) },\n// { ID: \"NEW_TOKYO\", Condition: () => Player.factions.includes(FactionNames.NewTokyo) },\n// { ID: \"SECTOR-12\", Condition: () => Player.factions.includes(FactionNames.Sector12) },\n// { ID: FactionNames.Volhaven.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Volhaven) },\n// { ID: \"SPEAKERS_FOR_THE_DEAD\", Condition: () => Player.factions.includes(FactionNames.SpeakersForTheDead) },\n// { ID: \"THE_DARK_ARMY\", Condition: () => Player.factions.includes(FactionNames.TheDarkArmy) },\n// { ID: \"THE_SYNDICATE\", Condition: () => Player.factions.includes(FactionNames.TheSyndicate) },\n// { ID: FactionNames.Silhouette.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Silhouette) },\n// { ID: FactionNames.Tetrads.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Tetrads) },\n// { ID: \"SLUM_SNAKES\", Condition: () => Player.factions.includes(FactionNames.SlumSnakes) },\n// { ID: FactionNames.Netburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Netburners) },\n// { ID: \"TIAN_DI_HUI\", Condition: () => Player.factions.includes(FactionNames.TianDiHui) },\n// { ID: FactionNames.Bladeburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Bladeburners) },\n// { ID: \"DEEPSCANV1.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV1.name) },\n// { ID: \"DEEPSCANV2.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV2.name) },\n// { ID: \"INFILTRATORS\", Condition: () => Player.factions.includes(FactionNames.Infiltrators) },\n// {\n// ID: \"SERVERPROFILER.EXE\",\n// Condition: () => Player.getHomeComputer().programs.includes(Programs.ServerProfiler.name),\n// },\n// { ID: \"AUTOLINK.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.AutoLink.name) },\n// { ID: \"FLIGHT.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.Flight.name) },\n\nexport function calculateAchievements(): void {\n const playerAchievements = Player.achievements.map((a) => a.ID);\n\n const missingAchievements = Object.values(achievements)\n .filter((a) => !playerAchievements.includes(a.ID) && a.Condition())\n // callback returns array of achievement id and id of any in the additional list, flatmap means we have only a 1D array\n .flatMap((a) => [a.ID, ...(a.AdditionalUnlock || [])]);\n\n for (const id of missingAchievements) {\n Player.giveAchievement(id);\n }\n\n // Write all player's achievements to document for Steam/Electron\n // This could be replaced by \"availableAchievements\"\n // if we don't want to grant the save game achievements to steam but only currently available\n document.achievements = [...Player.achievements.map((a) => a.ID)];\n}\n","// Root React Component for the Corporation UI\nimport React, { useState, useEffect } from \"react\";\n\nimport { Theme, useTheme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\nimport { KillScriptsModal } from \"./KillScriptsModal\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport ClearAllIcon from \"@mui/icons-material/ClearAll\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../Context\";\nimport { StatsProgressOverviewCell } from \"./StatsProgressBar\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Box, Tooltip } from \"@mui/material\";\n\nimport { isClassWork } from \"../../Work/ClassWork\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { isCreateProgramWork } from \"../../Work/CreateProgramWork\";\nimport { isGraftingWork } from \"../../Work/GraftingWork\";\nimport { isFactionWork } from \"../../Work/FactionWork\";\nimport { ReputationRate } from \"./ReputationRate\";\nimport { isCompanyWork } from \"../../Work/CompanyWork\";\nimport { isCrimeWork } from \"../../Work/CrimeWork\";\n\ninterface IProps {\n save: () => void;\n killScripts: () => void;\n}\n\nfunction Intelligence(): React.ReactElement {\n const theme = useTheme();\n const player = use.Player();\n const classes = useStyles();\n if (player.intelligence === 0) return <>;\n const progress = player.calculateSkillProgress(player.intelligence_exp);\n\n return (\n <>\n \n \n Int \n \n \n {numeralWrapper.formatSkill(player.intelligence)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n );\n}\n\nfunction Bladeburner(): React.ReactElement {\n const player = use.Player();\n const classes = useStyles();\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n const action = bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n if (action.type === \"Idle\") return <>;\n return (\n <>\n \n \n Bladeburner:\n \n \n \n \n \n {action.type}: {action.name}\n \n \n \n \n );\n}\n\ninterface WorkInProgressOverviewProps {\n tooltip: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onClickFocus: () => void;\n}\n\nfunction WorkInProgressOverview({\n tooltip,\n children,\n onClickFocus,\n header,\n}: WorkInProgressOverviewProps): React.ReactElement {\n const classes = useStyles();\n return (\n <>\n \n \n {tooltip}}>\n \n {header}\n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n \n \n );\n}\n\nfunction Work(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const onClickFocus = (): void => {\n player.startFocusing();\n router.toWork();\n };\n if (player.currentWork === null || player.focus) return <>;\n\n let details = <>;\n let header = <>;\n let innerText = <>;\n if (isCrimeWork(player.currentWork)) {\n const crime = player.currentWork.getCrime();\n const perc = (player.currentWork.unitCompleted / crime.time) * 100;\n\n details = <>{player.currentWork.crimeType};\n header = <>You are attempting to {player.currentWork.crimeType};\n innerText = <>{perc.toFixed(2)}%;\n }\n if (isClassWork(player.currentWork)) {\n details = <>{player.currentWork.getClass().youAreCurrently};\n header = <>You are {player.currentWork.getClass().youAreCurrently};\n innerText = <>{convertTimeMsToTimeElapsedString(player.currentWork.cyclesWorked * CONSTANTS._idleSpeed)};\n }\n if (isCreateProgramWork(player.currentWork)) {\n const create = player.currentWork;\n details = <>Coding {create.programName};\n header = <>Creating a program;\n innerText = (\n <>\n {create.programName} {((create.unitCompleted / create.unitNeeded()) * 100).toFixed(2)}%\n \n );\n }\n if (isGraftingWork(player.currentWork)) {\n const graft = player.currentWork;\n details = <>Grafting {graft.augmentation};\n header = <>Grafting an Augmentation;\n innerText = (\n <>\n {((graft.unitCompleted / graft.unitNeeded()) * 100).toFixed(2)}% done\n \n );\n }\n\n if (isFactionWork(player.currentWork)) {\n const factionWork = player.currentWork;\n header = (\n <>\n Working for {factionWork.factionName}\n \n );\n innerText = (\n <>\n rep\n
(\n )\n \n );\n }\n if (isCompanyWork(player.currentWork)) {\n const companyWork = player.currentWork;\n details = (\n <>\n {player.jobs[companyWork.companyName]} at {companyWork.companyName}\n \n );\n header = (\n <>\n Working at {companyWork.companyName}\n \n );\n innerText = (\n <>\n rep\n
(\n )\n \n );\n }\n\n return (\n \n {innerText}\n \n );\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n workCell: {\n textAlign: \"center\",\n maxWidth: \"200px\",\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n\n workHeader: {\n fontSize: \"0.9rem\",\n },\n\n workSubtitles: {\n fontSize: \"0.8rem\",\n },\n\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n cell: {\n padding: 0,\n margin: 0,\n },\n hp: {\n color: theme.colors.hp,\n },\n money: {\n color: theme.colors.money,\n },\n hack: {\n color: theme.colors.hack,\n },\n combat: {\n color: theme.colors.combat,\n },\n cha: {\n color: theme.colors.cha,\n },\n int: {\n color: theme.colors.int,\n },\n }),\n);\n\nexport { useStyles as characterOverviewStyles };\n\nexport function CharacterOverview({ save, killScripts }: IProps): React.ReactElement {\n const [killOpen, setKillOpen] = useState(false);\n const player = use.Player();\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 600);\n return () => clearInterval(id);\n }, []);\n\n const classes = useStyles();\n const theme = useTheme();\n\n const hackingProgress = player.calculateSkillProgress(\n player.hacking_exp,\n player.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier,\n );\n const strengthProgress = player.calculateSkillProgress(\n player.strength_exp,\n player.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier,\n );\n const defenseProgress = player.calculateSkillProgress(\n player.defense_exp,\n player.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier,\n );\n const dexterityProgress = player.calculateSkillProgress(\n player.dexterity_exp,\n player.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n const agilityProgress = player.calculateSkillProgress(\n player.agility_exp,\n player.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier,\n );\n const charismaProgress = player.calculateSkillProgress(\n player.charisma_exp,\n player.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier,\n );\n\n return (\n <>\n \n \n \n \n HP \n \n \n \n {numeralWrapper.formatHp(player.hp)} / {numeralWrapper.formatHp(player.max_hp)}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Money \n \n \n {numeralWrapper.formatMoney(player.money)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Hack \n \n \n {numeralWrapper.formatSkill(player.hacking)}\n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n \n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Str \n \n \n {numeralWrapper.formatSkill(player.strength)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Def \n \n \n {numeralWrapper.formatSkill(player.defense)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Dex \n \n \n {numeralWrapper.formatSkill(player.dexterity)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Agi \n \n \n {numeralWrapper.formatSkill(player.agility)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Cha \n \n \n {numeralWrapper.formatSkill(player.charisma)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n setKillOpen(true)}>\n \n \n \n \n \n \n setKillOpen(false)} killScripts={killScripts} />\n \n );\n}\n","/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nexport function addOffset(midpoint: number, percentage: number): number {\n const maxPercent = 100;\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset: number = midpoint * (percentage / maxPercent);\n\n // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n","export class DarkWebItem {\n program: string;\n price: number;\n description: string;\n\n constructor(program: string, price: number, description: string) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n}\n","export class PlayerOwnedAugmentation {\n level = 1;\n name = \"\";\n\n constructor(name = \"\") {\n this.name = name;\n }\n}\n\nexport interface IPlayerOwnedAugmentation {\n level: number;\n name: string;\n}\n","interface RNG {\n random(): number;\n}\n\n/*\n * very bad RNG, meant to be used as introduction to RNG manipulation. It has a\n * period of 1024.\n */\nclass RNG0 implements RNG {\n x: number;\n m = 1024;\n a = 341;\n c = 1;\n\n constructor() {\n this.x = 0;\n this.reset();\n }\n\n step(): void {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random(): number {\n this.step();\n return this.x / this.m;\n }\n\n reset(): void {\n this.x = new Date().getTime() % this.m;\n }\n}\n\nexport const BadRNG: RNG0 = new RNG0();\n\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\nexport class WHRNG implements RNG {\n s1 = 0;\n s2 = 0;\n s3 = 0;\n\n constructor(totalPlaytime: number) {\n // This one is seeded by the players total play time.\n const v: number = (totalPlaytime / 1000) % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step(): void {\n this.s1 = (171 * this.s1) % 30269;\n this.s2 = (172 * this.s2) % 30307;\n this.s3 = (170 * this.s3) % 30323;\n }\n\n random(): number {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n}\n\nexport function SFC32RNG(seed: string): () => number {\n let h = 1779033703 ^ seed.length;\n for (let i = 0; i < seed.length; i++) {\n h = Math.imul(h ^ seed.charCodeAt(i), 3432918353);\n h = (h << 13) | (h >>> 19);\n }\n const genSeed = (): number => {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n\n let a = genSeed();\n let b = genSeed();\n let c = genSeed();\n let d = genSeed();\n return (): number => {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n let t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n","import React from \"react\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { Work, WorkType } from \"./Work\";\nimport { influenceStockThroughCompanyWork } from \"../StockMarket/PlayerInfluencing\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { calculateCompanyWorkStats } from \"./formulas/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { applyWorkStats, WorkStats } from \"./WorkStats\";\nimport { Company } from \"../Company/Company\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reputation } from \"../ui/React/Reputation\";\n\ninterface CompanyWorkParams {\n companyName: string;\n singularity: boolean;\n}\n\nexport const isCompanyWork = (w: Work | null): w is CompanyWork => w !== null && w.type === WorkType.COMPANY;\n\nexport class CompanyWork extends Work {\n companyName: string;\n constructor(params?: CompanyWorkParams) {\n super(WorkType.COMPANY, params?.singularity ?? false);\n this.companyName = params?.companyName ?? LocationName.NewTokyoNoodleBar;\n }\n\n getCompany(): Company {\n const c = Companies[this.companyName];\n if (!c) throw new Error(`Company not found: '${this.companyName}'`);\n return c;\n }\n\n getGainRates(player: IPlayer): WorkStats {\n return calculateCompanyWorkStats(player, this.getCompany());\n }\n\n process(player: IPlayer, cycles: number): boolean {\n this.cyclesWorked += cycles;\n const company = this.getCompany();\n const gains = this.getGainRates(player);\n applyWorkStats(player, gains, cycles, \"work\");\n company.playerReputation += gains.reputation * cycles;\n influenceStockThroughCompanyWork(company, gains.reputation, cycles);\n return false;\n }\n finish(): void {\n dialogBoxCreate(\n <>\n You finished working for {this.companyName}\n
\n You have reputation with them.\n ,\n );\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"CompanyWork\", this);\n }\n\n /**\n * Initiatizes a CompanyWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): CompanyWork {\n return Generic_fromJSON(CompanyWork, value.data);\n }\n}\n\nReviver.constructors.CompanyWork = CompanyWork;\n","/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nexport function compareArrays(a1: T[], a2: T[]): boolean {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n const v1 = a1[i];\n const v2 = a2[i];\n if (Array.isArray(v1)) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(v2)) {\n return false;\n }\n\n if (!compareArrays(v1, v2)) {\n return false;\n }\n } else if (v1 !== v2 && !(Number.isNaN(v1) && Number.isNaN(v2))) {\n // strict (in)equality considers NaN not equal to itself\n return false;\n }\n }\n\n return true;\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n favor: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Favor({ favor }: { favor: number | string }): React.ReactElement {\n const classes = useStyles();\n return {typeof favor === \"number\" ? numeralWrapper.formatFavor(favor) : favor};\n}\n","import { Locations } from \"../../Locations/Locations\";\nimport { Location } from \"../../Locations/Location\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Class, Classes, ClassWork } from \"../ClassWork\";\nimport { WorkStats } from \"../WorkStats\";\nimport { Server } from \"../../Server/Server\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { serverMetadata } from \"../../Server/data/servers\";\n\nconst gameCPS = 1000 / CONSTANTS._idleSpeed; // 5 cycles per second\n\nexport function calculateCost(classs: Class, location: Location): number {\n const serverMeta = serverMetadata.find((s) => s.specialName === location.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return classs.earnings.money * location.costMult * discount;\n}\n\nexport function calculateClassEarnings(player: IPlayer, work: ClassWork): WorkStats {\n //Find cost and exp gain per game cycle\n const hashManager = player.hashManager;\n const classs = Classes[work.classType];\n const location = Locations[work.location];\n\n const hashMult = work.isGym() ? hashManager.getTrainingMult() : hashManager.getStudyMult();\n\n const cost = calculateCost(classs, location) / gameCPS;\n const hackExp = ((classs.earnings.hackExp * location.expMult) / gameCPS) * hashMult;\n const strExp = ((classs.earnings.strExp * location.expMult) / gameCPS) * hashMult;\n const defExp = ((classs.earnings.defExp * location.expMult) / gameCPS) * hashMult;\n const dexExp = ((classs.earnings.dexExp * location.expMult) / gameCPS) * hashMult;\n const agiExp = ((classs.earnings.agiExp * location.expMult) / gameCPS) * hashMult;\n const chaExp = ((classs.earnings.chaExp * location.expMult) / gameCPS) * hashMult;\n return {\n money: cost,\n reputation: 0,\n hackExp: hackExp * player.mults.hacking_exp * BitNodeMultipliers.ClassGymExpGain,\n strExp: strExp * player.mults.strength_exp * BitNodeMultipliers.ClassGymExpGain,\n defExp: defExp * player.mults.defense_exp * BitNodeMultipliers.ClassGymExpGain,\n dexExp: dexExp * player.mults.dexterity_exp * BitNodeMultipliers.ClassGymExpGain,\n agiExp: agiExp * player.mults.agility_exp * BitNodeMultipliers.ClassGymExpGain,\n chaExp: chaExp * player.mults.charisma_exp * BitNodeMultipliers.ClassGymExpGain,\n intExp: 0,\n };\n}\n","/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\nimport { SleeveTaskType } from \"./SleeveTaskTypesEnum\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { Person } from \"../Person\";\nimport { ITaskTracker, createTaskTracker } from \"../ITaskTracker\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Crime } from \"../../Crime/Crime\";\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"../../Bladeburner/data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { capitalizeFirstLetter, capitalizeEachWord } from \"../../utils/StringHelperFunctions\";\nimport { FactionWorkType } from \"../../Work/data/FactionWorkType\";\n\nexport class Sleeve extends Person {\n /**\n * Stores the name of the class that the player is currently taking\n */\n className = \"\";\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n crimeType = \"\";\n\n /**\n * Enum value for current task\n */\n currentTask: SleeveTaskType = SleeveTaskType.Idle;\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n * Bladeburner: success chance\n */\n currentTaskLocation = \"\";\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n currentTaskMaxTime = 0;\n\n /**\n * Milliseconds spent on current task\n */\n currentTaskTime = 0;\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n earningsForSleeves: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experience + money earned for player\n */\n earningsForPlayer: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n earningsForTask: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n factionWorkType: FactionWorkType = FactionWorkType.HACKING;\n\n /**\n * Records experience gain rate for the current task\n */\n gainRatesForTask: ITaskTracker = createTaskTracker();\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n gymStatType = \"\";\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n bbAction = \"\";\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n bbContract = \"\";\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n logs: string[] = [];\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n memory = 1;\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n shock = 1;\n\n /**\n * Stored number of game \"loop\" cycles\n */\n storedCycles = 0;\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n sync = 1;\n\n constructor(p: IPlayer | null = null) {\n super();\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n\n /**\n * Commit crimes\n */\n commitCrime(p: IPlayer, crimeKey: string): boolean {\n const crime: Crime | null = Crimes[crimeKey] || Object.values(Crimes).find((crime) => crime.name === crimeKey);\n if (!crime) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.mults.hacking_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.mults.strength_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.mults.defense_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.mults.dexterity_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.mults.agility_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.mults.charisma_exp * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.int = crime.intelligence_exp;\n this.gainRatesForTask.money = crime.money * this.mults.crime_money * BitNodeMultipliers.CrimeMoney;\n\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n\n this.crimeType = crime.name;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = SleeveTaskType.Crime;\n return true;\n }\n\n /**\n * Called to stop the current task\n */\n finishTask(p: IPlayer): ITaskTracker {\n let retValue: ITaskTracker = createTaskTracker(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === SleeveTaskType.Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime: Crime | undefined = Object.values(Crimes).find((crime) => crime.name === this.crimeType);\n if (!crime) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus(p);\n return retValue;\n }\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates: ITaskTracker = createTaskTracker();\n\n const keysForIteration: (keyof ITaskTracker)[] = Object.keys(successGainRates) as (keyof ITaskTracker)[];\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n }\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n } else if (this.currentTask === SleeveTaskType.Bladeburner) {\n if (this.currentTaskMaxTime === 0) {\n this.currentTaskTime = 0;\n return retValue;\n }\n // For bladeburner, all experience and money is gained at the end\n const bb = p.bladeburner;\n if (bb === null) {\n const errorLogText = `bladeburner is null`;\n console.error(`Function: sleeves.finishTask; Message: '${errorLogText}'`);\n this.resetTaskStatus(p);\n return retValue;\n }\n\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.bbAction === \"Infiltrate synthoids\") {\n bb.infiltrateSynthoidCommunities(p);\n this.currentTaskTime = 0;\n return retValue;\n }\n let type: string;\n let name: string;\n if (this.bbAction === \"Take on contracts\") {\n type = \"Contracts\";\n name = this.bbContract;\n } else {\n type = \"General\";\n name = this.bbAction;\n }\n\n const actionIdent = bb.getActionIdFromTypeAndName(type, name);\n if (actionIdent === null) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n console.error(`Function: sleeves.finishTask; Message: '${errorLogText}'`);\n this.resetTaskStatus(p);\n return retValue;\n }\n\n const action = bb.getActionObject(actionIdent);\n if ((action?.count ?? 0) > 0) {\n const bbRetValue = bb.completeAction(p, this, actionIdent, false);\n if (bbRetValue) {\n retValue = this.gainExperience(p, bbRetValue);\n this.gainMoney(p, bbRetValue);\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n }\n }\n }\n\n this.resetTaskStatus(p);\n\n return retValue;\n }\n\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n gainExperience(p: IPlayer, exp: ITaskTracker, numCycles = 1, fromOtherSleeve = false): ITaskTracker {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return createTaskTracker();\n }\n\n // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n const multFac = (this.shock / 100) * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac;\n const pIntExp = exp.int * multFac;\n\n // Experience is gained by both this sleeve and player\n if (pHackExp > 0) {\n this.gainHackingExp(pHackExp);\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.gainStrengthExp(pStrExp);\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.gainDefenseExp(pDefExp);\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.gainDexterityExp(pDexExp);\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.gainAgilityExp(pAgiExp);\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.gainCharismaExp(pChaExp);\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n }\n\n if (pIntExp > 0) {\n this.gainIntelligenceExp(pIntExp);\n p.gainIntelligenceExp(pIntExp);\n }\n\n // Record earnings for other sleeves\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100);\n\n // Return the experience to be gained by other sleeves\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n int: pIntExp * (this.sync / 100),\n money: exp.money,\n };\n }\n\n /**\n * Earn money for player\n */\n gainMoney(p: IPlayer, task: ITaskTracker, numCycles = 1): void {\n const gain: number = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain, \"sleeves\");\n }\n\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n getMemoryUpgradeCost(n: number): number {\n const amt = Math.round(n);\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n getRepGain(p: IPlayer): number {\n if (this.currentTask === SleeveTaskType.Faction) {\n let favorMult = 1;\n const fac: Faction | null = Factions[this.currentTaskLocation];\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case FactionWorkType.HACKING:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.FIELD:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.SECURITY:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === SleeveTaskType.Company) {\n const companyName: string = this.currentTaskLocation;\n const company: Company | null = Companies[companyName];\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance: number = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n const favorMult = 1 + company.favor / 100;\n\n return jobPerformance * this.mults.company_rep * favorMult;\n } else {\n return 0;\n }\n }\n\n installAugmentation(aug: Augmentation): void {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({ name: aug.name, level: 1 });\n this.updateStatLevels();\n }\n\n log(entry: string): void {\n const MaxLogSize = 50;\n this.logs.push(entry);\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n\n /**\n * Called on every sleeve for a Source File Prestige\n */\n prestige(p: IPlayer): void {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n // Reset task-related stuff\n this.resetTaskStatus(p);\n this.earningsForSleeves = createTaskTracker();\n this.earningsForPlayer = createTaskTracker();\n this.shockRecovery(p);\n\n // Reset augs and multipliers\n this.augmentations = [];\n this.resetMultipliers();\n\n // Reset Location\n\n this.city = CityName.Sector12;\n\n // Reset sleeve-related stats\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n\n this.logs = [];\n }\n\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n process(p: IPlayer, numCycles = 1): ITaskTracker | null {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / CONSTANTS.MilliPerCycle;\n this.storedCycles += numCycles;\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let cyclesUsed = this.storedCycles;\n cyclesUsed = Math.min(cyclesUsed, 15);\n let time = cyclesUsed * CONSTANTS.MilliPerCycle;\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / CONSTANTS.MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time;\n\n // Shock gradually goes towards 100\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n\n let retValue: ITaskTracker = createTaskTracker();\n switch (this.currentTask) {\n case SleeveTaskType.Idle:\n break;\n case SleeveTaskType.Class:\n case SleeveTaskType.Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n case SleeveTaskType.Faction: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n // Gain faction reputation\n const fac: Faction = Factions[this.currentTaskLocation];\n if (!(fac instanceof Faction)) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n // If the player has a gang with the faction the sleeve is working\n // for, we need to reset the sleeve's task\n if (p.gang) {\n if (fac.name === p.gang.facName) {\n this.resetTaskStatus(p);\n }\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Company: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n const company: Company = Companies[this.currentTaskLocation];\n if (!(company instanceof Company)) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n if (this.shock >= 100) this.resetTaskStatus(p);\n break;\n case SleeveTaskType.Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n if (this.sync >= 100) this.resetTaskStatus(p);\n break;\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === SleeveTaskType.Crime || this.currentTask === SleeveTaskType.Bladeburner) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n\n this.storedCycles -= cyclesUsed;\n\n return retValue;\n }\n\n /**\n * Resets all parameters used to keep information about the current task\n */\n resetTaskStatus(p: IPlayer): void {\n if (this.bbAction == \"Support main sleeve\") {\n p.bladeburner?.sleeveSupport(false);\n }\n if (this.currentTask == SleeveTaskType.Class) {\n const retVal = createTaskTracker();\n retVal.int = CONSTANTS.IntelligenceClassBaseExpGain * Math.round(this.currentTaskTime / 1000);\n const r = this.gainExperience(p, retVal);\n p.sleeves.filter((s) => s != this).forEach((s) => s.gainExperience(p, r, 1, true));\n }\n this.earningsForTask = createTaskTracker();\n this.gainRatesForTask = createTaskTracker();\n this.currentTask = SleeveTaskType.Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = FactionWorkType.HACKING;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n this.bbAction = \"\";\n this.bbContract = \"------\";\n }\n\n shockRecovery(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n this.currentTask = SleeveTaskType.Recovery;\n return true;\n }\n\n synchronize(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n this.currentTask = SleeveTaskType.Synchro;\n return true;\n }\n\n /**\n * Take a course at a university\n */\n takeUniversityCourse(p: IPlayer, universityName: string, className: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (this.city !== CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSummitUniversity;\n costMult = 4;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (this.city !== CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassDataStructuresBaseCost * costMult);\n break;\n case \"networks\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassNetworksBaseCost * costMult);\n break;\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassAlgorithmsBaseCost * costMult);\n break;\n case \"management\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassManagementBaseCost * costMult);\n break;\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassLeadershipBaseCost * costMult);\n break;\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = SleeveTaskType.Class;\n return true;\n }\n\n /**\n * Travel to another City. Costs money from player\n */\n travel(p: IPlayer, newCity: CityName): boolean {\n p.loseMoney(CONSTANTS.TravelCost, \"sleeves\");\n this.city = newCity;\n\n return true;\n }\n\n tryBuyAugmentation(p: IPlayer, aug: Augmentation): boolean {\n if (!p.canAfford(aug.baseCost)) {\n return false;\n }\n\n // Verify that this sleeve does not already have that augmentation.\n if (this.augmentations.some((a) => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.baseCost, \"sleeves\");\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p: IPlayer): void {\n if (this.currentTask === SleeveTaskType.Class) {\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack =\n CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.mults.hacking_exp;\n break;\n case \"data structures\":\n this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.mults.hacking_exp;\n break;\n case \"networks\":\n this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.mults.hacking_exp;\n break;\n case \"algorithms\":\n this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.mults.hacking_exp;\n break;\n case \"management\":\n this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.mults.charisma_exp;\n break;\n case \"leadership\":\n this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.mults.charisma_exp;\n break;\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === SleeveTaskType.Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n // Set stat gain rate\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat: string = this.gymStatType.toLowerCase();\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.mults.strength_exp;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.mults.defense_exp;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.mults.dexterity_exp;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.mults.agility_exp;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n: number): void {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n workForCompany(p: IPlayer, companyName: string): boolean {\n if (!(Companies[companyName] instanceof Company) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n const company: Company | null = Companies[companyName];\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (company == null) {\n return false;\n }\n if (companyPosition == null) {\n return false;\n }\n this.gainRatesForTask.money =\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.mults.work_money *\n BitNodeMultipliers.CompanyWorkMoney;\n this.gainRatesForTask.hack =\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.mults.hacking_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.str =\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.mults.strength_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.def =\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.mults.defense_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.dex =\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.mults.dexterity_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.agi =\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.mults.agility_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.cha =\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.mults.charisma_exp *\n BitNodeMultipliers.CompanyWorkExpGain;\n\n this.currentTaskLocation = companyName;\n this.currentTask = SleeveTaskType.Company;\n\n return true;\n }\n\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n workForFaction(p: IPlayer, factionName: string, workType: string): boolean {\n const faction = Factions[factionName];\n if (factionName === \"\" || !faction || !(faction instanceof Faction) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n const factionInfo = faction.getInfo();\n\n // Set type of work (hacking/field/security), and the experience gains\n const sanitizedWorkType: string = workType.toLowerCase();\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.HACKING;\n this.gainRatesForTask.hack = 0.15 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.FIELD;\n this.gainRatesForTask.hack = 0.1 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.mults.charisma_exp * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.SECURITY;\n this.gainRatesForTask.hack = 0.1 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = SleeveTaskType.Faction;\n\n return true;\n }\n\n /**\n * Begin a gym workout task\n */\n workoutAtGym(p: IPlayer, gymName: string, stat: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12IronGym;\n costMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n const sanitizedStat: string = stat.toLowerCase();\n\n // Set cost\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassGymBaseCost * costMult);\n\n // Validate \"stat\" argument\n if (\n !sanitizedStat.includes(\"str\") &&\n !sanitizedStat.includes(\"def\") &&\n !sanitizedStat.includes(\"dex\") &&\n !sanitizedStat.includes(\"agi\")\n ) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = SleeveTaskType.Gym;\n\n return true;\n }\n\n /**\n * Begin a bladeburner task\n */\n bladeburner(p: IPlayer, action: string, contract: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus(p);\n }\n\n this.gainRatesForTask.hack = 0;\n this.gainRatesForTask.str = 0;\n this.gainRatesForTask.def = 0;\n this.gainRatesForTask.dex = 0;\n this.gainRatesForTask.agi = 0;\n this.gainRatesForTask.cha = 0;\n this.gainRatesForTask.money = 0;\n this.currentTaskLocation = \"\";\n\n let time = 0;\n\n this.bbContract = \"------\";\n switch (action) {\n case \"Field analysis\":\n time = this.getBladeburnerActionTime(p, \"General\", action);\n this.gainRatesForTask.hack = 20 * this.mults.hacking_exp;\n this.gainRatesForTask.cha = 20 * this.mults.charisma_exp;\n break;\n case \"Recruitment\":\n time = this.getBladeburnerActionTime(p, \"General\", action);\n this.gainRatesForTask.cha =\n 2 * BladeburnerConstants.BaseStatGain * (p.bladeburner?.getRecruitmentTime(this) ?? 0) * 1000;\n this.currentTaskLocation = `(Success Rate: ${numeralWrapper.formatPercentage(\n this.recruitmentSuccessChance(p),\n )})`;\n break;\n case \"Diplomacy\":\n time = this.getBladeburnerActionTime(p, \"General\", action);\n break;\n case \"Infiltrate synthoids\":\n time = 60000;\n this.currentTaskLocation = \"This will generate additional contracts and operations\";\n break;\n case \"Support main sleeve\":\n p.bladeburner?.sleeveSupport(true);\n time = 0;\n break;\n case \"Take on contracts\":\n time = this.getBladeburnerActionTime(p, \"Contracts\", contract);\n this.contractGainRates(p, \"Contracts\", contract);\n this.currentTaskLocation = this.contractSuccessChance(p, \"Contracts\", contract);\n this.bbContract = capitalizeEachWord(contract.toLowerCase());\n break;\n }\n\n this.bbAction = capitalizeFirstLetter(action.toLowerCase());\n this.currentTaskMaxTime = time;\n this.currentTask = SleeveTaskType.Bladeburner;\n return true;\n }\n\n recruitmentSuccessChance(p: IPlayer): number {\n return Math.max(0, Math.min(1, p.bladeburner?.getRecruitmentSuccessChance(this) ?? 0));\n }\n\n contractSuccessChance(p: IPlayer, type: string, name: string): string {\n const bb = p.bladeburner;\n if (bb === null) {\n const errorLogText = `bladeburner is null`;\n console.error(`Function: sleeves.contractSuccessChance; Message: '${errorLogText}'`);\n return \"0%\";\n }\n const chances = bb.getActionEstimatedSuccessChanceNetscriptFn(this, type, name);\n if (typeof chances === \"string\") {\n console.error(`Function: sleeves.contractSuccessChance; Message: '${chances}'`);\n return \"0%\";\n }\n if (chances[0] >= 1) {\n return \"100%\";\n } else {\n return `${numeralWrapper.formatPercentage(chances[0])} - ${numeralWrapper.formatPercentage(chances[1])}`;\n }\n }\n\n contractGainRates(p: IPlayer, type: string, name: string): void {\n const bb = p.bladeburner;\n if (bb === null) {\n const errorLogText = `bladeburner is null`;\n console.error(`Function: sleeves.contractGainRates; Message: '${errorLogText}'`);\n return;\n }\n const actionIdent = bb.getActionIdFromTypeAndName(type, name);\n if (actionIdent === null) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n console.error(`Function: sleeves.contractGainRates; Message: '${errorLogText}'`);\n this.resetTaskStatus(p);\n return;\n }\n const action = bb.getActionObject(actionIdent);\n if (action === null) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n console.error(`Function: sleeves.contractGainRates; Message: '${errorLogText}'`);\n this.resetTaskStatus(p);\n return;\n }\n const retValue = bb.getActionStats(action, true);\n this.gainRatesForTask.hack = retValue.hack;\n this.gainRatesForTask.str = retValue.str;\n this.gainRatesForTask.def = retValue.def;\n this.gainRatesForTask.dex = retValue.dex;\n this.gainRatesForTask.agi = retValue.agi;\n this.gainRatesForTask.cha = retValue.cha;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n this.gainRatesForTask.money =\n BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * bb.skillMultipliers.money;\n }\n\n getBladeburnerActionTime(p: IPlayer, type: string, name: string): number {\n //Maybe find workerscript and use original\n const bb = p.bladeburner;\n if (bb === null) {\n const errorLogText = `bladeburner is null`;\n console.error(`Function: sleeves.getBladeburnerActionTime; Message: '${errorLogText}'`);\n return -1;\n }\n\n const time = bb.getActionTimeNetscriptFn(this, type, name);\n if (typeof time === \"string\") {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n console.error(`Function: sleeves.getBladeburnerActionTime; Message: '${errorLogText}'`);\n return -1;\n } else {\n return time;\n }\n }\n\n takeDamage(amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.shock += 0.5;\n this.hp = this.max_hp;\n return true;\n } else {\n return false;\n }\n }\n\n whoAmI(): string {\n return \"Sleeve\";\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Sleeve\", this);\n }\n\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Sleeve {\n return Generic_fromJSON(Sleeve, value.data);\n }\n}\n\nReviver.constructors.Sleeve = Sleeve;\n","export enum RamCalculationErrorCode {\n SyntaxError = -1,\n ImportError = -2,\n URLImportError = -3,\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\n","/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\nimport { buyStock, sellStock, shortStock, sellShort } from \"./BuyingAndSelling\";\nimport { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { Stock } from \"./Stock\";\n\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\n\nimport * as React from \"react\";\n\nexport interface IProcessOrderRefs {\n stockMarket: IStockMarket;\n symbolToStockMap: IMap;\n}\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nexport function processOrders(\n stock: Stock,\n orderType: OrderTypes,\n posType: PositionTypes,\n refs: IProcessOrderRefs,\n): void {\n const orderBook = refs.stockMarket[\"Orders\"];\n if (orderBook == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(refs.stockMarket)) {\n const stock = refs.stockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n let stockOrders = orderBook[stock.symbol];\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case OrderTypes.LimitBuy:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.LimitSell:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopBuy:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction executeOrder(order: Order, refs: IProcessOrderRefs): void {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n if (!(stock instanceof Stock)) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol];\n\n // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n const opts = {\n suppressDialog: true,\n };\n\n let res = true;\n let isBuy = false;\n switch (order.type) {\n case OrderTypes.LimitBuy:\n case OrderTypes.StopBuy:\n isBuy = true;\n if (order.pos === PositionTypes.Long) {\n res = buyStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = shortStock(stock, order.shares, null, opts) && res;\n }\n break;\n case OrderTypes.LimitSell:\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long) {\n res = sellStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = sellShort(stock, order.shares, null, opts) && res;\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n\n // Position type, for logging/message purposes\n const pos = order.pos === PositionTypes.Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n if (!Settings.SuppressTIXPopup) {\n dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\n ,\n );\n }\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else if (isBuy) {\n dialogBoxCreate(\n <>\n Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely\n because you do not have enough money or the order would exceed the stock's maximum number of shares\n ,\n );\n }\n}\n","import { IMap } from \"../types\";\nimport * as predefined from \"./data\";\n\nexport interface ITheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\nexport interface IPredefinedTheme {\n colors: ITheme;\n name: string;\n credit: string;\n screenshot: string;\n description: string;\n reference?: string;\n}\n\nexport const defaultTheme: ITheme = {\n ...predefined.Default.colors,\n};\n\nexport const getPredefinedThemes = (): IMap => ({\n ...predefined,\n});\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { sha256 } from \"js-sha256\";\n\nexport const AlertEvents = new EventEmitter<[string | JSX.Element]>();\n\ninterface Alert {\n id: string;\n text: string | JSX.Element;\n hash: string;\n}\n\nlet i = 0;\nexport function AlertManager(): React.ReactElement {\n const [alerts, setAlerts] = useState([]);\n useEffect(\n () =>\n AlertEvents.subscribe((text: string | JSX.Element) => {\n const id = i + \"\";\n i++;\n setAlerts((old) => {\n const hash = getMessageHash(text);\n if (old.some((a) => a.hash === hash)) {\n return old;\n }\n return [\n ...old,\n {\n id: id,\n text: text,\n hash: hash,\n },\n ];\n });\n }),\n [],\n );\n\n useEffect(() => {\n function handle(this: Document, event: KeyboardEvent): void {\n if (event.code === \"Escape\") {\n setAlerts([]);\n }\n }\n document.addEventListener(\"keydown\", handle);\n return () => document.removeEventListener(\"keydown\", handle);\n }, []);\n\n function getMessageHash(text: string | JSX.Element): string {\n if (typeof text === \"string\") return sha256(text);\n return sha256(JSON.stringify(text.props));\n }\n\n function close(): void {\n setAlerts((old) => {\n return old.slice(1, 1e99);\n });\n }\n\n return (\n <>\n {alerts.length > 0 && (\n \n \n {alerts[0].text}\n \n \n )}\n \n );\n}\n","import { getRandomByte } from \"./helpers/getRandomByte\";\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\nexport const createRandomIp = (): string =>\n `${getRandomByte(99)}.${getRandomByte(9)}.${getRandomByte(9)}.${getRandomByte(9)}`;\n","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","function getDB(): Promise {\n return new Promise((resolve, reject) => {\n if (!window.indexedDB) {\n reject(\"Indexed DB does not exists\");\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n * Version `1` is important\n */\n const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n // This is called when there's no db to begin with. It's important, don't remove it.\n indexedDbRequest.onupgradeneeded = function (this: IDBRequest) {\n const db = this.result;\n db.createObjectStore(\"savestring\");\n };\n\n indexedDbRequest.onerror = function (this: IDBRequest, ev: Event) {\n reject(`Failed to get IDB ${ev}`);\n };\n\n indexedDbRequest.onsuccess = function (this: IDBRequest) {\n const db = this.result;\n if (!db) {\n reject(\"database loading result was undefined\");\n return;\n }\n resolve(db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\"));\n };\n });\n}\n\nexport function load(): Promise {\n return new Promise((resolve, reject) => {\n getDB()\n .then((db) => {\n return new Promise((resolve, reject) => {\n const request: IDBRequest = db.get(\"save\");\n request.onerror = function (this: IDBRequest, ev: Event) {\n reject(\"Error in Database request to get savestring: \" + ev);\n };\n\n request.onsuccess = function (this: IDBRequest) {\n resolve(this.result);\n };\n }).then((saveString) => resolve(saveString));\n })\n .catch((r) => reject(r));\n });\n}\n\nexport function save(saveString: string): Promise {\n return getDB().then((db) => {\n return new Promise((resolve, reject) => {\n // We'll save to both localstorage and indexedDb\n const request = db.put(saveString, \"save\");\n\n request.onerror = function (e) {\n reject(\"Error saving game to IndexedDB: \" + e);\n };\n\n request.onsuccess = () => resolve();\n });\n });\n}\n\nexport function deleteGame(): Promise {\n return getDB().then((db) => {\n db.delete(\"save\");\n });\n}\n","import { Message } from \"./Message\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Player } from \"../Player\";\nimport { Page } from \"../ui/Router\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Server } from \"../Server/Server\";\n\n//Sends message to player, including a pop up\nfunction sendMessage(msg: Message, forced = false): void {\n if (forced || !Settings.SuppressMessages) {\n showMessage(msg.filename);\n }\n addMessageToServer(msg);\n}\n\nfunction showMessage(name: MessageFilenames): void {\n const msg = Messages[name];\n if (!(msg instanceof Message)) throw new Error(\"trying to display unexistent message\");\n const txt =\n \"Message received from unknown sender:

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

\" +\n \"This message was saved as \" +\n msg.filename +\n \" onto your home computer.\";\n dialogBoxCreate(txt);\n}\n\n//Adds a message to a server\nfunction addMessageToServer(msg: Message): void {\n //Short-circuit if the message has already been saved\n if (recvd(msg)) {\n return;\n }\n const server = GetServer(\"home\");\n if (server == null) {\n throw new Error(\"The home server doesn't exist. You done goofed.\");\n }\n server.messages.push(msg.filename);\n}\n\n//Returns whether the given message has already been received\nfunction recvd(msg: Message): boolean {\n const server = GetServer(\"home\");\n if (server == null) {\n throw new Error(\"The home server doesn't exist. You done goofed.\");\n }\n return server.messages.includes(msg.filename);\n}\n\n//Checks if any of the 'timed' messages should be sent\nfunction checkForMessagesToSend(): void {\n if (Router.page() === Page.BitVerse) return;\n const jumper0 = Messages[MessageFilenames.Jumper0];\n const jumper1 = Messages[MessageFilenames.Jumper1];\n const jumper2 = Messages[MessageFilenames.Jumper2];\n const jumper3 = Messages[MessageFilenames.Jumper3];\n const jumper4 = Messages[MessageFilenames.Jumper4];\n const cybersecTest = Messages[MessageFilenames.CyberSecTest];\n const nitesecTest = Messages[MessageFilenames.NiteSecTest];\n const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n const truthGazer = Messages[MessageFilenames.TruthGazer];\n const redpill = Messages[MessageFilenames.RedPill];\n\n if (Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n //Get the world daemon required hacking level\n const worldDaemon = GetServer(SpecialServers.WorldDaemon);\n if (!(worldDaemon instanceof Server)) {\n throw new Error(\"The world daemon is not a server???? Please un-break reality\");\n }\n //If the daemon can be hacked, send the player icarus.msg\n if (Player.hacking >= worldDaemon.requiredHackingSkill) {\n sendMessage(redpill, Player.sourceFiles.length === 0);\n }\n //If the daemon cannot be hacked, send the player truthgazer.msg a single time.\n else if (!recvd(truthGazer)) {\n sendMessage(truthGazer);\n }\n } else if (!recvd(jumper0) && Player.hacking >= 25) {\n sendMessage(jumper0);\n const flightName = Programs.Flight.name;\n const homeComp = Player.getHomeComputer();\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (!recvd(jumper1) && Player.hacking >= 40) {\n sendMessage(jumper1);\n } else if (!recvd(cybersecTest) && Player.hacking >= 50) {\n sendMessage(cybersecTest);\n } else if (!recvd(jumper2) && Player.hacking >= 175) {\n sendMessage(jumper2);\n } else if (!recvd(nitesecTest) && Player.hacking >= 200) {\n sendMessage(nitesecTest);\n } else if (!recvd(jumper3) && Player.hacking >= 350) {\n sendMessage(jumper3);\n } else if (!recvd(jumper4) && Player.hacking >= 490) {\n sendMessage(jumper4);\n } else if (!recvd(bitrunnersTest) && Player.hacking >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nexport enum MessageFilenames {\n Jumper0 = \"j0.msg\",\n Jumper1 = \"j1.msg\",\n Jumper2 = \"j2.msg\",\n Jumper3 = \"j3.msg\",\n Jumper4 = \"j4.msg\",\n CyberSecTest = \"csec-test.msg\",\n NiteSecTest = \"nitesec-test.msg\",\n BitRunnersTest = \"19dfj3l1nd.msg\",\n TruthGazer = \"truthgazer.msg\",\n RedPill = \"icarus.msg\",\n}\n\n//Reset\nconst Messages: Record = {\n //jump3R Messages\n [MessageFilenames.Jumper0]: new Message(\n MessageFilenames.Jumper0,\n \"I know you can sense it. I know you're searching for it. \" +\n \"It's why you spend night after \" +\n \"night at your computer.

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

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

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

\" +\n \"-jump3R\",\n ),\n\n [MessageFilenames.Jumper1]: new Message(\n MessageFilenames.Jumper1,\n `Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` +\n \"They can help you with your search.

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

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

Watch out for a hacking group known as ${FactionNames.NiteSec}.` +\n \"

-jump3R\",\n ),\n\n [MessageFilenames.Jumper3]: new Message(\n MessageFilenames.Jumper3,\n \"You must learn to walk before you can run. And you must \" +\n `run before you can fly. Look for ${FactionNames.TheBlackHand}.

` +\n \"I.I.I.I

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

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

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

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

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

\" +\n \"Find and install the backdoor on our server, avmnite-02h. Then, we will contact you again.\" +\n `

-${FactionNames.NiteSec}`,\n ),\n\n [MessageFilenames.BitRunnersTest]: new Message(\n MessageFilenames.BitRunnersTest,\n \"We know what you are doing. We know what drives you. We know \" +\n \"what you are looking for.

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

\" +\n \"run4theh111z\",\n ),\n\n //Messages to guide players to the daemon\n [MessageFilenames.TruthGazer]: new Message(\n MessageFilenames.TruthGazer,\n //\"THE TRUTH CAN NO LONGER ESCAPE YOUR GAZE\"\n \"@&*($#@&__TH3__#@A&#@*)__TRU1H__(*)&*)($#@&()E&R)W&
\" +\n \"%@*$^$()@&$)$*@__CAN__()(@^#)@&@)#__N0__(#@&#)@&@&(
\" +\n \"*(__LON6ER__^#)@)(()*#@)@__ESCAP3__)#(@(#@*@()@(#*$
\" +\n \"()@)#$*%)$#()$#__Y0UR__(*)$#()%(&(%)*!)($__GAZ3__#(\",\n ),\n\n [MessageFilenames.RedPill]: new Message(\n MessageFilenames.RedPill,\n //\"FIND THE-CAVE\"\n \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" +\n \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" +\n \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" +\n \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\",\n ),\n};\n\nexport { Messages, checkForMessagesToSend, showMessage };\n","// The initial formulas was sum 0 to f of 500*1.02^f.\n// see https://en.wikipedia.org/wiki/Geometric_series#Closed-form_formula\n// for information on how to calculate this\n\nexport function favorToRep(f: number): number {\n const raw = 25000 * (Math.pow(1.02, f) - 1);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n\nexport function repToFavor(r: number): number {\n const raw = Math.log(r / 25000 + 1) / Math.log(1.02);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n","import {\n CodingContract,\n CodingContractRewardType,\n CodingContractTypes,\n ICodingContractReward,\n} from \"./CodingContracts\";\nimport { Factions } from \"./Faction/Factions\";\nimport { Player } from \"./Player\";\nimport { GetServer, GetAllServers } from \"./Server/AllServers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { Server } from \"./Server/Server\";\nimport { BaseServer } from \"./Server/BaseServer\";\n\nimport { getRandomInt } from \"./utils/helpers/getRandomInt\";\n\nexport function generateRandomContract(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const randServer = getRandomServer();\n\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n randServer.addContract(contract);\n}\n\nexport function generateRandomContractOnHome(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const serv = Player.getHomeComputer();\n\n const contractFn = getRandomFilename(serv, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n serv.addContract(contract);\n}\n\ninterface IGenerateContractParams {\n problemType?: string;\n server?: string;\n fn?: string;\n}\n\nexport function generateContract(params: IGenerateContractParams): void {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(CodingContractTypes);\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n }\n\n // Reward Type - This is always random for now\n const reward = getRandomReward();\n\n // Server\n let server;\n if (params.server != null) {\n server = GetServer(params.server);\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n }\n\n // Filename\n let fn;\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new CodingContract(fn, problemType, reward);\n server.addContract(contract);\n}\n\n// Ensures that a contract's reward type is valid\nfunction sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = Player.factions.filter((fac) => {\n try {\n return Factions[fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n if (type === CodingContractRewardType.FactionReputation && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.CompanyReputation && Object.keys(Player.jobs).length === 0) {\n type = CodingContractRewardType.Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType(): string {\n const problemTypes = Object.keys(CodingContractTypes);\n const randIndex = getRandomInt(0, problemTypes.length - 1);\n\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward(): ICodingContractReward {\n const reward: ICodingContractReward = {\n name: \"\",\n type: getRandomInt(0, CodingContractRewardType.Money),\n };\n reward.type = sanitizeRewardType(reward.type);\n\n // Add additional information based on the reward type\n const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);\n\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation: {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[getRandomInt(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n case CodingContractRewardType.CompanyReputation: {\n const allJobs = Object.keys(Player.jobs);\n if (allJobs.length > 0) {\n reward.name = allJobs[getRandomInt(0, allJobs.length - 1)];\n } else {\n reward.type = CodingContractRewardType.Money;\n }\n break;\n }\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer(): BaseServer {\n const servers = GetAllServers().filter((server: BaseServer) => server.serversOnNetwork.length !== 0);\n let randIndex = getRandomInt(0, servers.length - 1);\n let randServer = servers[randIndex];\n\n // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n for (let i = 0; i < 200; ++i) {\n if (\n randServer instanceof Server &&\n !randServer.purchasedByPlayer &&\n randServer.hostname !== SpecialServers.WorldDaemon\n ) {\n break;\n }\n randIndex = getRandomInt(0, servers.length - 1);\n randServer = servers[randIndex];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server: BaseServer, reward: ICodingContractReward): string {\n let contractFn = `contract-${getRandomInt(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (\n server.contracts.filter((c: CodingContract) => {\n return c.fn === contractFn;\n }).length <= 0\n ) {\n break;\n }\n contractFn = `contract-${getRandomInt(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n","import { Factions } from \"./Faction/Factions\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\nexport let LastExportBonus = 0;\n\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\nexport function canGetBonus(): boolean {\n const now = new Date().getTime();\n return now - LastExportBonus > bonusTimer;\n}\n\nexport function onExport(p: IPlayer): void {\n if (!canGetBonus()) return;\n for (const facName of p.factions) {\n Factions[facName].favor++;\n }\n LastExportBonus = new Date().getTime();\n}\n\nexport function setLastExportBonus(unixTime: number): void {\n LastExportBonus = unixTime;\n}\n","/**\n * React component for a selectable option on the Faction UI. These\n * options including working for the faction, hacking missions, purchasing\n * augmentations, etc.\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n buttonText: string;\n infoText: string;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport function Option(props: IProps): React.ReactElement {\n return (\n \n \n \n {props.infoText}\n \n \n );\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IOperationParams extends IActionParams {\n reqdRank?: number;\n teamCount?: number;\n}\n\nexport class Operation extends Action {\n reqdRank = 100;\n teamCount = 0;\n\n constructor(params: IOperationParams | null = null) {\n super(params);\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n }\n\n // For actions that have teams. To be implemented by subtypes.\n getTeamSuccessBonus(inst: IBladeburner): number {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Operation\", this);\n }\n\n static fromJSON(value: IReviverValue): Operation {\n return Generic_fromJSON(Operation, value.data);\n }\n}\n\nReviver.constructors.Operation = Operation;\n","import { Augmentation, IConstructorParams } from \"../Augmentation\";\nimport { AugmentationNames } from \"./AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { WHRNG } from \"../../Casino/RNG\";\nimport React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CONSTANTS } from \"../../Constants\";\n\ninterface CircadianBonus {\n bonuses: {\n [key: string]: number | undefined;\n agility?: number;\n agility_exp?: number;\n charisma?: number;\n charisma_exp?: number;\n company_rep?: number;\n crime_money?: number;\n crime_success?: number;\n defense?: number;\n defense_exp?: number;\n dexterity?: number;\n dexterity_exp?: number;\n faction_rep?: number;\n hacking?: number;\n hacking_chance?: number;\n hacking_exp?: number;\n hacking_grow?: number;\n hacking_money?: number;\n hacking_speed?: number;\n hacknet_node_core_cost?: number;\n hacknet_node_level_cost?: number;\n hacknet_node_money?: number;\n hacknet_node_purchase_cost?: number;\n hacknet_node_ram_cost?: number;\n strength?: number;\n strength_exp?: number;\n work_money?: number;\n };\n description: string;\n}\n\nfunction getRandomBonus(): CircadianBonus {\n const bonuses = [\n {\n bonuses: {\n hacking_chance: 1.25,\n hacking_speed: 1.1,\n hacking_money: 1.25,\n hacking_grow: 1.1,\n },\n description:\n \"Increases the player's hacking chance by 25%.
\" +\n \"Increases the player's hacking speed by 10%.
\" +\n \"Increases the amount of money the player's gains from hacking by 25%.
\" +\n \"Improves grow() by 10%.\",\n },\n {\n bonuses: {\n hacking: 1.15,\n hacking_exp: 2,\n },\n description:\n \"Increases the player's hacking skill by 15%.
\" +\n \"Increases the player's hacking experience gain rate by 100%.\",\n },\n {\n bonuses: {\n strength: 1.25,\n strength_exp: 2,\n defense: 1.25,\n defense_exp: 2,\n dexterity: 1.25,\n dexterity_exp: 2,\n agility: 1.25,\n agility_exp: 2,\n },\n description:\n \"Increases all of the player's combat stats by 25%.
\" +\n \"Increases all of the player's combat stat experience gain rate by 100%.\",\n },\n {\n bonuses: {\n charisma: 1.5,\n charisma_exp: 2,\n },\n description:\n \"This augmentation increases the player's charisma by 50%.
\" +\n \"Increases the player's charisma experience gain rate by 100%.\",\n },\n {\n bonuses: {\n hacknet_node_money: 1.2,\n hacknet_node_purchase_cost: 0.85,\n hacknet_node_ram_cost: 0.85,\n hacknet_node_core_cost: 0.85,\n hacknet_node_level_cost: 0.85,\n },\n description:\n \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" +\n \"Decreases all costs related to Hacknet Node by 15%.\",\n },\n {\n bonuses: {\n company_rep: 1.25,\n faction_rep: 1.15,\n work_money: 1.7,\n },\n description:\n \"Increases the amount of money the player gains from working by 70%.
\" +\n \"Increases the amount of reputation the player gains when working for a company by 25%.
\" +\n \"Increases the amount of reputation the player gains for a faction by 15%.\",\n },\n {\n bonuses: {\n crime_success: 2,\n crime_money: 2,\n },\n description:\n \"Increases the player's crime success rate by 100%.
\" +\n \"Increases the amount of money the player gains from crimes by 100%.\",\n },\n ];\n\n const randomNumber = new WHRNG(Math.floor(Player.lastUpdate / 3600000));\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nexport const initSoAAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.WKSharmonizer,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n `A copy of the WKS harmonizer from the MIA leader of the ${FactionNames.ShadowsOfAnarchy} ` +\n \"injects *Γ-based cells that provides general enhancement to the body.\",\n stats: (\n <>\n This augmentation makes many aspects of infiltration easier and more productive. Such as increased timer,\n rewards, reduced damage taken, etc.\n \n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.MightOfAres,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n \"Extra-occular neurons taken from old martial art master. Injecting them gives the user the ability to \" +\n \"predict the enemy's attack before they even know it themself.\",\n stats: (\n <>This augmentation makes the Slash minigame easier by showing you via an indicator when the slash in coming.\n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.WisdomOfAthena,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"A connective brain implant to SASHA that focuses on pattern recognition and predictive templating.\",\n stats: <>This augmentation makes the Bracket minigame easier by removing all '[' ']'.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.ChaosOfDionysus,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Opto-occipito implant to process visual signals before brain interpretation.\",\n stats: <>This augmentation makes the Backwards minigame easier by flipping the words.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.BeautyOfAphrodite,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n \"Pheromone extruder injected in the thoracodorsal nerve. Emits pleasing scent guaranteed to \" +\n \"make conversational partners more agreeable.\",\n stats: <>This augmentation makes the Bribe minigame easier by indicating the incorrect paths.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.TrickeryOfHermes,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Penta-dynamo-neurovascular-valve inserted in the carpal ligament, enhances dexterity.\",\n stats: <>This augmentation makes the Cheat Code minigame easier by allowing the opposite character.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.FloodOfPoseidon,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Transtinatium VVD reticulator used in optico-sterbing recognition.\",\n stats: <>This augmentation makes the Symbol matching minigame easier by indicating the correct choice.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.HuntOfArtemis,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"magneto-turboencabulator based on technology by Micha Eike Siemon, increases the user's electro-magnetic sensitivity.\",\n stats: (\n <>\n This augmentation makes the Minesweeper minigame easier by showing the location of all mines and keeping their\n position.\n \n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.KnowledgeOfApollo,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Neodynic retention fjengeln spoofer using -φ karmions, net positive effect on implantee's delta wave.\",\n stats: <>This augmentation makes the Wire Cutting minigame easier by indicating the incorrect wires.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n];\n\nexport const initGeneralAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump blood.\",\n strength: 1.08,\n defense: 1.08,\n agility: 1.08,\n dexterity: 1.08,\n factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info:\n \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" +\n \"and enhances balance and hand-eye coordination.\",\n dexterity: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info:\n \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" +\n \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [AugmentationNames.Targeting1],\n dexterity: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.\",\n prereqs: [AugmentationNames.Targeting2, AugmentationNames.Targeting1],\n dexterity: 1.3,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info:\n \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" +\n \"more efficiently than an organic heart.\",\n agility: 1.5,\n strength: 1.5,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info:\n \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" +\n \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" +\n \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength: 1.3,\n defense: 1.3,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info:\n \"The rib cage is augmented to continuously release boosters into the bloodstream \" +\n \"which increase the oxygen-carrying capacity of blood.\",\n strength: 1.1,\n defense: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info:\n \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" +\n \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [AugmentationNames.CombatRib1],\n strength: 1.14,\n defense: 1.14,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info:\n \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" +\n \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [AugmentationNames.CombatRib2, AugmentationNames.CombatRib1],\n strength: 1.18,\n defense: 1.18,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info:\n \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" +\n \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength: 1.2,\n defense: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FulcrumSecretTechnologies,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info:\n \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" +\n \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" +\n \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" +\n \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" +\n \"mitigate damage from any fire or electrical traumas.\",\n defense: 2.2,\n factions: [\n FactionNames.TheSyndicate,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.Illuminati,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info:\n \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" +\n \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility: 1.05,\n dexterity: 1.05,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SlumSnakes,\n FactionNames.Sector12,\n FactionNames.Volhaven,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.\",\n strength: 1.7,\n defense: 1.7,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info:\n \"The spine is reconstructed using plasteel and carbon fibers. \" +\n \"It is now capable of stimulating and regulating neural signals \" +\n \"passing through the spinal cord, improving senses and reaction speed. \" +\n \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength: 1.15,\n defense: 1.15,\n agility: 1.15,\n dexterity: 1.15,\n factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info:\n \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" +\n \"which enhances durability and supercharges all body functions.\",\n prereqs: [AugmentationNames.BionicSpine],\n strength: 1.6,\n defense: 1.6,\n agility: 1.6,\n dexterity: 1.6,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility: 1.6,\n factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info:\n \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" +\n \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [AugmentationNames.BionicLegs],\n agility: 2.5,\n factions: [FactionNames.MegaCorp, FactionNames.ECorp, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info:\n \"A cochlear implant with an embedded computer that analyzes incoming speech. \" +\n \"The embedded computer processes characteristics of incoming speech, such as tone \" +\n \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.Silhouette,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info:\n \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" +\n \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" +\n \"outgoing and sociable.\",\n charisma: 1.15,\n charisma_exp: 1.15,\n factions: [FactionNames.Silhouette],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info:\n \"A cranial implant that greatly assists in the user's ability to analyze social situations \" +\n \"and interactions. The system uses a wide variety of factors such as facial expression, body \" +\n \"language, voice tone, and inflection to determine the best course of action during social \" +\n \"situations. The implant also uses deep learning software to continuously learn new behavior \" +\n \"patterns and how to best respond.\",\n charisma: 1.6,\n charisma_exp: 1.6,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.NWO,\n FactionNames.ClarkeIncorporated,\n FactionNames.OmniTekIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info:\n \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" +\n \"capabilities.\",\n hacking: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info:\n \"A network consisting of millions of nanoprocessors is embedded into the brain. \" +\n \"The network is meant to mimic the way a biological brain solves a problem, with each \" +\n \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" +\n \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" +\n \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed: 1.03,\n hacking_money: 1.15,\n hacking: 1.12,\n factions: [FactionNames.BitRunners, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info:\n \"The body is injected with a chemical that artificially induces synaptic potentiation, \" +\n \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed: 1.02,\n hacking_chance: 1.05,\n hacking_exp: 1.05,\n factions: [FactionNames.TheBlackHand, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info:\n \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" +\n \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" +\n \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" +\n \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed: 1.03,\n hacking_exp: 1.1,\n hacking: 1.08,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.BitRunners, FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info:\n \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" +\n \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed: 1.03,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info:\n \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" +\n \"circuits, strengthening the ability to retain information.\",\n hacking_exp: 1.25,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info:\n \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" +\n \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" +\n \"and delete it.\",\n hacking_money: 1.25,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.Chongqing,\n FactionNames.NewTokyo,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info:\n \"A thin device embedded inside the arm containing a wireless module capable of connecting \" +\n \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" +\n \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" +\n \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" +\n \"control the traffic on a network.\",\n hacking: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCore,\n repCost: 175e3,\n moneyCost: 2.5e9,\n info:\n \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed: 1.03,\n hacking_money: 1.1,\n hacking_chance: 1.03,\n hacking_exp: 1.07,\n hacking: 1.07,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info:\n \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to control information on \" +\n \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" +\n \"packets.\",\n prereqs: [AugmentationNames.ENMCore, AugmentationNames.ENM],\n hacking_speed: 1.05,\n hacking_money: 1.3,\n hacking_chance: 1.05,\n hacking_exp: 1.15,\n hacking: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info:\n \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" +\n \"any device on a network.\",\n prereqs: [AugmentationNames.ENMCoreV2, AugmentationNames.ENMCore, AugmentationNames.ENM],\n hacking_speed: 1.05,\n hacking_money: 1.4,\n hacking_chance: 1.1,\n hacking_exp: 1.25,\n hacking: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info:\n \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" +\n \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info:\n \"This implant installs a Direct Memory Access (DMA) controller into the \" +\n \"Embedded Netburner Module. This allows the Module to send and receive data \" +\n \"directly to and from the main memory of devices on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_money: 1.4,\n hacking_chance: 1.2,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info:\n \"A cranial implant that intelligently stimulates certain areas of the brain \" +\n \"in order to improve cognitive functions.\",\n hacking_speed: 1.02,\n hacking_chance: 1.1,\n hacking_exp: 1.12,\n factions: [\n FactionNames.TheBlackHand,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info:\n \"A microprocessor that accelerates the processing \" +\n \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking: 1.1,\n hacking_exp: 1.15,\n hacking_money: 1.2,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info:\n \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n hacking_speed: 1.01,\n hacking: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info:\n \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed: 1.02,\n hacking_chance: 1.05,\n hacking: 1.07,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info:\n \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG2, AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed: 1.02,\n hacking_money: 1.15,\n hacking: 1.09,\n factions: [FactionNames.NiteSec, FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info:\n \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [\n AugmentationNames.CranialSignalProcessorsG3,\n AugmentationNames.CranialSignalProcessorsG2,\n AugmentationNames.CranialSignalProcessorsG1,\n ],\n hacking_speed: 1.02,\n hacking_money: 1.2,\n hacking_grow: 1.25,\n factions: [FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info:\n \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [\n AugmentationNames.CranialSignalProcessorsG4,\n AugmentationNames.CranialSignalProcessorsG3,\n AugmentationNames.CranialSignalProcessorsG2,\n AugmentationNames.CranialSignalProcessorsG1,\n ],\n hacking: 1.3,\n hacking_money: 1.25,\n hacking_grow: 1.75,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info:\n \"The brain is surgically re-engineered to have increased neuronal density \" +\n \"by decreasing the neuron gap junction. Then, the body is genetically modified \" +\n \"to enhance the production and capabilities of its neural stem cells.\",\n hacking: 1.15,\n hacking_exp: 1.1,\n hacking_speed: 1.03,\n factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info:\n \"This torso implant automatically injects nootropic supplements into \" +\n \"the bloodstream to improve memory, increase focus, and provide other \" +\n \"cognitive enhancements.\",\n company_rep: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Volhaven,\n FactionNames.NewTokyo,\n FactionNames.Chongqing,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info:\n \"An advanced neural implant that improves your speaking abilities, making \" +\n \"you more convincing and likable in conversations and overall improving your \" +\n \"social interactions.\",\n company_rep: 1.1,\n charisma: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n FactionNames.ClarkeIncorporated,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.\",\n hacking_exp: 1.05,\n strength_exp: 1.05,\n defense_exp: 1.05,\n dexterity_exp: 1.05,\n agility_exp: 1.05,\n charisma_exp: 1.05,\n company_rep: 1.1,\n work_money: 1.2,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info:\n \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" +\n \"computers. Connecting to a computer through this jack allows you to interface with \" +\n \"it using the brain's electrochemical signals.\",\n company_rep: 1.3,\n hacking: 1.08,\n factions: [\n FactionNames.FourSigma,\n FactionNames.OmniTekIncorporated,\n FactionNames.ECorp,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info:\n \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" +\n \"improves the performance of the interface and gives the user more control options \" +\n \"to a connected computer.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep: 1.75,\n hacking: 1.1,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp, FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info:\n \"This is an additional installation that upgrades the functionality of the \" +\n \"PC Direct-Neural Interface augmentation. When connected to a computer, \" +\n \"the Neural Network upgrade allows the user to use their own brain's \" +\n \"processing power to aid the computer in computational tasks.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep: 2,\n hacking: 1.1,\n hacking_speed: 1.05,\n factions: [FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" +\n \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" +\n \"triggers feelings of admiration and approval in other people.\",\n company_rep: 1.1,\n faction_rep: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.TheSyndicate,\n FactionNames.NWO,\n FactionNames.MegaCorp,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" +\n \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" +\n \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep: 1.2,\n faction_rep: 1.2,\n factions: [\n FactionNames.Silhouette,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info:\n \"A crude but functional matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation was developed by \" +\n \"criminal organizations and allows the user to project and control holographic \" +\n \"simulacrums within a large radius. These simulacrums are commonly used for \" +\n \"espionage and surveillance work.\",\n company_rep: 1.15,\n faction_rep: 1.15,\n factions: [FactionNames.TheSyndicate, FactionNames.TheDarkArmy, FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's CPU into \" +\n \"the brain. This allows the user to engineer custom hardware and software \" +\n \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money: 1.15,\n hacknet_node_purchase_cost: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" +\n \"into the brain. This allows the user to engineer custom cache hardware for the \" +\n \"Hacknet Node that offers better performance.\",\n hacknet_node_money: 1.1,\n hacknet_node_level_cost: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" +\n \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" +\n \"offers better performance.\",\n hacknet_node_money: 1.1,\n hacknet_node_purchase_cost: 0.9,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" +\n \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" +\n \"electrochemical signals.\",\n hacknet_node_money: 1.25,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" +\n \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" +\n \"electrochemical signals.\",\n hacknet_node_money: 1.45,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. It is \" +\n \"installed by releasing millions of nanobots into the human brain, each of which \" +\n \"attaches to a different neural pathway to enhance the brain's ability to retain \" +\n \"and retrieve information.\",\n hacking_exp: 1.1,\n strength_exp: 1.1,\n defense_exp: 1.1,\n dexterity_exp: 1.1,\n agility_exp: 1.1,\n charisma_exp: 1.1,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" +\n \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp: 1.15,\n strength_exp: 1.15,\n defense_exp: 1.15,\n dexterity_exp: 1.15,\n agility_exp: 1.15,\n charisma_exp: 1.15,\n factions: [FactionNames.BitRunners, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" +\n \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp: 1.2,\n strength_exp: 1.2,\n defense_exp: 1.2,\n dexterity_exp: 1.2,\n agility_exp: 1.2,\n charisma_exp: 1.2,\n factions: [FactionNames.NWO, FactionNames.FourSigma],\n }),\n new Augmentation({\n name: AugmentationNames.Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" +\n \"Embedded circuitry within the implant provides the ability to detect heat and movement \" +\n \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity: 1.4,\n hacking_speed: 1.03,\n hacking_money: 1.1,\n factions: [FactionNames.BladeIndustries, FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info:\n \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, have a negative refractive index. As a result, they bend light \" +\n \"around the skin, making the user much harder to see with the naked eye.\",\n agility: 1.05,\n crime_money: 1.1,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info:\n \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" +\n \"reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, are capable of not only bending light but also of bending heat, \" +\n \"making the user more resilient as well as stealthy.\",\n prereqs: [AugmentationNames.LuminCloaking1],\n agility: 1.1,\n defense: 1.1,\n crime_money: 1.25,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies using sound propagation.\",\n dexterity: 1.1,\n dexterity_exp: 1.15,\n crime_money: 1.25,\n factions: [FactionNames.SlumSnakes],\n }),\n new Augmentation({\n name: AugmentationNames.PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info:\n \"The body's nerves are attached with polypyrrole nanocircuits that \" +\n \"are capable of capturing wasted energy, in the form of heat, \" +\n \"and converting it back into usable power.\",\n hacking: 1.05,\n strength: 1.05,\n defense: 1.05,\n dexterity: 1.05,\n agility: 1.05,\n charisma: 1.05,\n hacking_exp: 1.1,\n strength_exp: 1.1,\n defense_exp: 1.1,\n dexterity_exp: 1.1,\n agility_exp: 1.1,\n charisma_exp: 1.1,\n factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate, FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info:\n `A brain implant that wirelessly connects you to the ${FactionNames.Illuminati}'s ` +\n \"quantum supercomputer, allowing you to access and use its incredible \" +\n \"computing power.\",\n hacking: 1.75,\n hacking_speed: 2,\n hacking_chance: 2.5,\n hacking_money: 4,\n factions: [FactionNames.Illuminati],\n }),\n new Augmentation({\n name: AugmentationNames.SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info:\n \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" +\n \"artificially-synthesized gene that was developed by DARPA to create \" +\n \"super-soldiers through genetic modification. The gene was outlawed in \" +\n \"2056.\",\n strength: 1.75,\n defense: 1.75,\n dexterity: 1.75,\n agility: 1.75,\n hacking: 1.15,\n factions: [FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info:\n `A brain implant developed by ${FactionNames.ECorp}. They do not reveal what ` +\n \"exactly the implant does, but they promise that it will greatly \" +\n \"enhance your abilities.\",\n hacking_grow: 3,\n stats: null,\n factions: [FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: null,\n isSpecial: true,\n factions: [FactionNames.Daedalus],\n }),\n new Augmentation({\n name: AugmentationNames.CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info:\n \"The thoracic cavity is equipped with a small chamber designed \" +\n \"to hold and sustain hydrogen plasma. The plasma is used to generate \" +\n \"fusion power through nuclear fusion, providing limitless amounts of clean \" +\n \"energy for the body.\",\n strength: 1.35,\n defense: 1.35,\n dexterity: 1.35,\n agility: 1.35,\n strength_exp: 1.35,\n defense_exp: 1.35,\n dexterity_exp: 1.35,\n agility_exp: 1.35,\n factions: [FactionNames.MegaCorp],\n }),\n new Augmentation({\n name: AugmentationNames.SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic jaw that contains advanced hardware and software \" +\n \"capable of psychoanalyzing and profiling the personality of \" +\n \"others using optical imaging software.\",\n charisma: 1.5,\n charisma_exp: 1.5,\n company_rep: 1.25,\n faction_rep: 1.25,\n factions: [FactionNames.BachmanAssociates],\n }),\n new Augmentation({\n name: AugmentationNames.Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info:\n \"A highly-advanced techno-organic drug that is injected into the skeletal \" +\n \"and integumentary system. The drug permanently modifies the DNA of the \" +\n \"body's skin and bone cells, granting them the ability to repair \" +\n \"and restructure themselves.\",\n strength: 1.55,\n defense: 1.55,\n factions: [FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info:\n \"A concoction of advanced nanobots that is orally ingested into the \" +\n \"body. These nanobots induce physiological changes and significantly \" +\n \"improve the body's functioning in all aspects.\",\n hacking: 1.2,\n strength: 1.2,\n defense: 1.2,\n dexterity: 1.2,\n agility: 1.2,\n charisma: 1.2,\n hacking_exp: 1.15,\n strength_exp: 1.15,\n defense_exp: 1.15,\n dexterity_exp: 1.15,\n agility_exp: 1.15,\n charisma_exp: 1.15,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info:\n \"The left arm of a legendary BitRunner who ascended beyond this world. \" +\n \"It projects a light blue energy shield that protects the exposed inner parts. \" +\n \"Even though it contains no weapons, the advanced tungsten titanium \" +\n \"alloy increases the user's strength to unbelievable levels. The augmentation \" +\n \"gets more powerful over time for seemingly no reason.\",\n strength: 2.7,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info:\n \"The body is genetically re-engineered to maintain a state \" +\n \"of negligible senescence, preventing the body from \" +\n \"deteriorating with age.\",\n hacking: 1.2,\n strength: 1.2,\n defense: 1.2,\n dexterity: 1.2,\n agility: 1.2,\n charisma: 1.2,\n factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info:\n \"OmniTek's data and information repository is uploaded \" +\n \"into your brain, enhancing your programming and \" +\n \"hacking abilities.\",\n hacking: 1.2,\n hacking_exp: 1.25,\n factions: [FactionNames.OmniTekIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info:\n \"Chloroplasts are added to epidermal stem cells and are applied \" +\n \"to the body using a skin graft. The result is photosynthetic \" +\n \"skin cells, allowing users to generate their own energy \" +\n \"and nutrition using solar power.\",\n strength: 1.4,\n defense: 1.4,\n agility: 1.4,\n factions: [FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info:\n \"A brain implant that provides a high-bandwidth, direct neural link between your \" +\n `mind and the ${FactionNames.BitRunners}' data servers, which reportedly contain ` +\n \"the largest database of hacking tools and information in the world.\",\n hacking: 1.15,\n hacking_exp: 1.2,\n hacking_chance: 1.1,\n hacking_speed: 1.05,\n programs: [Programs.FTPCrackProgram.name, Programs.RelaySMTPProgram.name],\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info:\n \"A highly advanced bionic hand. This prosthetic not only \" +\n \"enhances strength and dexterity but it is also embedded \" +\n \"with hardware and firmware that lets the user connect to, access, and hack \" +\n \"devices and machines by just touching them.\",\n strength: 1.15,\n dexterity: 1.15,\n hacking: 1.1,\n hacking_speed: 1.02,\n hacking_money: 1.1,\n factions: [FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info:\n \"The CRTX42-AA gene is injected into the genome. \" +\n \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" +\n \"cortex and improves cognitive abilities.\",\n hacking: 1.08,\n hacking_exp: 1.15,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info:\n \"A drug that genetically modifies the neurons in the brain \" +\n \"resulting in neurons that never die, continuously \" +\n \"regenerate, and strengthen themselves.\",\n hacking_exp: 1.4,\n factions: [FactionNames.Chongqing],\n }),\n new Augmentation({\n name: AugmentationNames.CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: (\n <>\n A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the\n chip allows you to connect it to a computer and upload the assets.\n \n ),\n startingMoney: 1e6,\n programs: [Programs.BruteSSHProgram.name],\n factions: [FactionNames.Sector12],\n }),\n new Augmentation({\n name: AugmentationNames.NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info:\n \"A thermo-powered artificial nutrition generator. Endogenously \" +\n \"synthesizes glucose, amino acids, and vitamins and redistributes them \" +\n \"across the body. The device is powered by the body's naturally wasted \" +\n \"energy in the form of heat.\",\n strength_exp: 1.2,\n defense_exp: 1.2,\n dexterity_exp: 1.2,\n agility_exp: 1.2,\n factions: [FactionNames.NewTokyo],\n }),\n new Augmentation({\n name: AugmentationNames.PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info:\n \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" +\n \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" +\n \"outcomes of nearly every situation.\",\n charisma: 1.0777,\n charisma_exp: 1.0777,\n work_money: 1.777,\n faction_rep: 1.0777,\n company_rep: 1.0777,\n crime_success: 1.0777,\n crime_money: 1.0777,\n programs: [Programs.DeepscanV1.name, Programs.AutoLink.name],\n factions: [FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.\",\n crime_success: 1.25,\n crime_money: 1.1,\n dexterity: 1.1,\n factions: [FactionNames.Ishima],\n }),\n new Augmentation({\n name: AugmentationNames.DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info:\n \"Synthetic skin that is grafted onto the body. This skin consists of \" +\n \"millions of nanobots capable of projecting high-density muon beams, \" +\n \"creating an energy barrier around the user.\",\n defense: 1.4,\n factions: [FactionNames.Volhaven],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info:\n \"An upgrade to the BrachiBlades augmentation. It infuses \" +\n \"the retractable blades with an advanced graphene material \" +\n \"making them stronger and lighter.\",\n prereqs: [AugmentationNames.BrachiBlades],\n strength: 1.4,\n defense: 1.4,\n crime_success: 1.1,\n crime_money: 1.3,\n factions: [FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info:\n \"An upgrade to the Bionic Arms augmentation. It infuses the \" +\n \"prosthetic arms with an advanced graphene material \" +\n \"to make them stronger and lighter.\",\n prereqs: [AugmentationNames.BionicArms],\n strength: 1.85,\n dexterity: 1.85,\n factions: [FactionNames.TheDarkArmy],\n }),\n new Augmentation({\n name: AugmentationNames.BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength: 1.15,\n defense: 1.15,\n crime_success: 1.1,\n crime_money: 1.15,\n factions: [FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.\",\n strength: 1.3,\n dexterity: 1.3,\n factions: [FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info:\n \"A cranial implant that affects the user's personality, making them better \" +\n \"at negotiation in social situations.\",\n work_money: 1.1,\n company_rep: 1.15,\n faction_rep: 1.15,\n factions: [FactionNames.TianDiHui],\n }),\n new Augmentation({\n name: AugmentationNames.NeuroreceptorManager,\n repCost: 0.75e5,\n moneyCost: 5.5e8,\n info:\n \"A brain implant carefully assembled around the synapses, which \" +\n \"micromanages the activity and levels of various neuroreceptor \" +\n \"chemicals and modulates electrical activity to optimize concentration, \" +\n \"allowing the user to multitask much more effectively.\",\n stats: (\n <>\n This augmentation removes the penalty for not focusing on actions such as working in a job or working for a\n faction.\n \n ),\n factions: [FactionNames.TianDiHui],\n }),\n\n // Grafting-exclusive Augmentation\n new Augmentation({\n name: AugmentationNames.CongruityImplant,\n repCost: Infinity,\n moneyCost: 50e12,\n info: (\n <>\n Developed by a pioneer in Grafting research, this implant generates pulses of stability which seem to have a\n nullifying effect versus the Entropy virus.\n
\n
\n Note: For unknown reasons, the lowercase n appears to be an integral component to its\n functionality.\n \n ),\n stats: <>This Augmentation removes the Entropy virus, and prevents it from affecting you again.,\n factions: [],\n }),\n];\n\nexport const initBladeburnerAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info:\n \"Ballistic-grade protective and retractable eyewear that was designed specifically \" +\n \"for Bladeburner units. This \" +\n \"is implanted by installing a mechanical frame in the skull's orbit. \" +\n \"This frame interfaces with the brain and allows the user to \" +\n \"automatically extrude and extract the eyewear. The eyewear protects \" +\n \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" +\n \"embedded with a data processing chip that can be programmed to display an \" +\n \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance: 1.03,\n dexterity: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info:\n \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" +\n \"technique was originally used on Bladeburners during the Synthoid uprising \" +\n \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" +\n \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance: 1.03,\n bladeburner_analysis: 1.05,\n bladeburner_stamina_gain: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info:\n \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" +\n \"the ORION-MKIV shoulder enhances the strength and dexterity \" +\n \"of the user's right arm. It also provides protection due to its \" +\n \"crystallized graphene plating.\",\n defense: 1.05,\n strength: 1.05,\n dexterity: 1.05,\n bladeburner_success_chance: 1.04,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" +\n \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" +\n \"be used against augmented enemies as the ionized \" +\n \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" +\n \"it can also be effective against non-augmented enemies due to its high temperature \" +\n \"and concussive force.\",\n bladeburner_success_chance: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. This augmentation \" +\n \"is more advanced and powerful than the original V1 model. This V2 model is \" +\n \"more power-efficient, more accurate, and can fire plasma bolts at a much \" +\n \"higher velocity than the V1 model.\",\n prereqs: [AugmentationNames.HyperionV1],\n bladeburner_success_chance: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info:\n \"A serum that permanently enhances many aspects of human capabilities, \" +\n \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" +\n \"serum was originally developed by the Chinese military in an attempt to \" +\n \"create super soldiers.\",\n strength: 1.07,\n defense: 1.07,\n dexterity: 1.07,\n agility: 1.07,\n bladeburner_stamina_gain: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" +\n \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp: 1.1,\n bladeburner_analysis: 1.1,\n bladeburner_success_chance: 1.04,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info:\n \"An improved version of Vangelis, a synthetic symbiotic virus that is \" +\n \"injected into human brain tissue. On top of the benefits of the original \" +\n \"virus, this also grants accelerated healing and enhanced \" +\n \"reflexes.\",\n prereqs: [AugmentationNames.VangelisVirus],\n defense_exp: 1.1,\n dexterity_exp: 1.1,\n bladeburner_analysis: 1.15,\n bladeburner_success_chance: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"The DNA is genetically modified to enhance the human's body \" +\n \"extracellular matrix (ECM). This improves the ECM's ability to \" +\n \"structurally support the body and grants heightened strength and \" +\n \"durability.\",\n strength_exp: 1.05,\n defense_exp: 1.05,\n dexterity_exp: 1.05,\n agility_exp: 1.05,\n bladeburner_max_stamina: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info:\n `A cybernetic foot augmentation that was specifically created for ${FactionNames.Bladeburners} ` +\n \"during the Synthoid Uprising. The organic musculature of the human foot \" +\n \"is enhanced with flexible carbon nanotube matrices that are controlled by \" +\n \"intelligent servo-motors.\",\n agility: 1.05,\n bladeburner_max_stamina: 1.05,\n bladeburner_stamina_gain: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info:\n `A powered exoskeleton suit designed as armor for ${FactionNames.Bladeburners} units. This ` +\n \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" +\n \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" +\n \"physical abilities.\",\n strength: 1.04,\n defense: 1.04,\n dexterity: 1.04,\n agility: 1.04,\n bladeburner_stamina_gain: 1.02,\n bladeburner_success_chance: 1.03,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" +\n \"more efficiently storing and using power.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance: 1.05,\n bladeburner_stamina_gain: 1.02,\n bladeburner_max_stamina: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" +\n \"that is capable of projecting an energy shielding force field.\",\n prereqs: [AugmentationNames.BladeArmor],\n defense: 1.05,\n bladeburner_success_chance: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" +\n \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" +\n \"threats while keeping casualties to a minimum.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" +\n \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" +\n \"modules that combine together to form a single, more powerful beam of up to \" +\n \"2000MW.\",\n prereqs: [AugmentationNames.BladeArmorUnibeam],\n bladeburner_success_chance: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" +\n \"Unit that was specially designed to analyze Synthoid related data and \" +\n \"information.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_analysis: 1.15,\n bladeburner_success_chance: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info:\n \"A highly-advanced matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation allows \" +\n \"the user to project and control a holographic simulacrum within an \" +\n \"extremely large radius. These specially-modified holograms were specifically \" +\n \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: (\n <>\n This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting\n crimes, etc.) at the same time.\n \n ),\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n];\n\nexport const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.StaneksGift1,\n repCost: 0,\n moneyCost: 0,\n info:\n 'Allison \"Mother\" Stanek imparts you with her gift. An ' +\n \"experimental Augmentation implanted at the base of the neck. \" +\n \"It allows you to overclock your entire system by carefully \" +\n \"changing the configuration.\",\n isSpecial: true,\n hacking_chance: 0.9,\n hacking_speed: 0.9,\n hacking_money: 0.9,\n hacking_grow: 0.9,\n hacking: 0.9,\n strength: 0.9,\n defense: 0.9,\n dexterity: 0.9,\n agility: 0.9,\n charisma: 0.9,\n hacking_exp: 0.9,\n strength_exp: 0.9,\n defense_exp: 0.9,\n dexterity_exp: 0.9,\n agility_exp: 0.9,\n charisma_exp: 0.9,\n company_rep: 0.9,\n faction_rep: 0.9,\n crime_money: 0.9,\n crime_success: 0.9,\n hacknet_node_money: 0.9,\n hacknet_node_purchase_cost: 1.1,\n hacknet_node_ram_cost: 1.1,\n hacknet_node_core_cost: 1.1,\n hacknet_node_level_cost: 1.1,\n work_money: 0.9,\n stats: <>Its unstable nature decreases all your stats by 10%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift2,\n repCost: 1e6,\n moneyCost: 0,\n info:\n \"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human \" +\n \"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon \" +\n \"your frame granting a 5% reduced penalty to all stats.\",\n prereqs: [AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance: 0.95 / 0.9,\n hacking_speed: 0.95 / 0.9,\n hacking_money: 0.95 / 0.9,\n hacking_grow: 0.95 / 0.9,\n hacking: 0.95 / 0.9,\n strength: 0.95 / 0.9,\n defense: 0.95 / 0.9,\n dexterity: 0.95 / 0.9,\n agility: 0.95 / 0.9,\n charisma: 0.95 / 0.9,\n hacking_exp: 0.95 / 0.9,\n strength_exp: 0.95 / 0.9,\n defense_exp: 0.95 / 0.9,\n dexterity_exp: 0.95 / 0.9,\n agility_exp: 0.95 / 0.9,\n charisma_exp: 0.95 / 0.9,\n company_rep: 0.95 / 0.9,\n faction_rep: 0.95 / 0.9,\n crime_money: 0.95 / 0.9,\n crime_success: 0.95 / 0.9,\n hacknet_node_money: 0.95 / 0.9,\n hacknet_node_purchase_cost: 1.05 / 1.1,\n hacknet_node_ram_cost: 1.05 / 1.1,\n hacknet_node_core_cost: 1.05 / 1.1,\n hacknet_node_level_cost: 1.05 / 1.1,\n work_money: 0.95 / 0.9,\n stats: <>The penalty for the gift is reduced to 5%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift3,\n repCost: 1e8,\n moneyCost: 0,\n info:\n \"The synthesis of human and machine is nothing to fear. It is our destiny. \" +\n \"You will become greater than the sum of our parts. As One. Embrace your gift \" +\n \"fully and wholly free of it's accursed toll. Serenity brings tranquility in the form \" +\n \"of no longer suffering a stat penalty. \",\n prereqs: [AugmentationNames.StaneksGift2, AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance: 1 / 0.95,\n hacking_speed: 1 / 0.95,\n hacking_money: 1 / 0.95,\n hacking_grow: 1 / 0.95,\n hacking: 1 / 0.95,\n strength: 1 / 0.95,\n defense: 1 / 0.95,\n dexterity: 1 / 0.95,\n agility: 1 / 0.95,\n charisma: 1 / 0.95,\n hacking_exp: 1 / 0.95,\n strength_exp: 1 / 0.95,\n defense_exp: 1 / 0.95,\n dexterity_exp: 1 / 0.95,\n agility_exp: 1 / 0.95,\n charisma_exp: 1 / 0.95,\n company_rep: 1 / 0.95,\n faction_rep: 1 / 0.95,\n crime_money: 1 / 0.95,\n crime_success: 1 / 0.95,\n hacknet_node_money: 1 / 0.95,\n hacknet_node_purchase_cost: 1 / 1.05,\n hacknet_node_ram_cost: 1 / 1.05,\n hacknet_node_core_cost: 1 / 1.05,\n hacknet_node_level_cost: 1 / 1.05,\n work_money: 1 / 0.95,\n stats: <>Stanek's Gift has no penalty.,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n];\n\nexport function initNeuroFluxGovernor(): Augmentation {\n const donationBonus = CONSTANTS.Donations / 1e6 / 100; // 1 millionth of a percent per donation\n return new Augmentation({\n name: AugmentationNames.NeuroFluxGovernor,\n repCost: 500,\n moneyCost: 750e3,\n info:\n \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" +\n \"monitors and regulates nervous impulses coming to and from the spinal column, \" +\n \"essentially 'governing' the body. By doing so, it improves the functionality of the \" +\n \"body's nervous system.\",\n stats: (\n <>\n This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST\n multipliers by 1% (+{(donationBonus * 100).toFixed(6)}% boosted by real life blood donations), stacking\n multiplicatively.\n \n ),\n isSpecial: true,\n hacking_chance: 1.01 + donationBonus,\n hacking_speed: 1.01 + donationBonus,\n hacking_money: 1.01 + donationBonus,\n hacking_grow: 1.01 + donationBonus,\n hacking: 1.01 + donationBonus,\n strength: 1.01 + donationBonus,\n defense: 1.01 + donationBonus,\n dexterity: 1.01 + donationBonus,\n agility: 1.01 + donationBonus,\n charisma: 1.01 + donationBonus,\n hacking_exp: 1.01 + donationBonus,\n strength_exp: 1.01 + donationBonus,\n defense_exp: 1.01 + donationBonus,\n dexterity_exp: 1.01 + donationBonus,\n agility_exp: 1.01 + donationBonus,\n charisma_exp: 1.01 + donationBonus,\n company_rep: 1.01 + donationBonus,\n faction_rep: 1.01 + donationBonus,\n crime_money: 1.01 + donationBonus,\n crime_success: 1.01 + donationBonus,\n hacknet_node_money: 1.01 + donationBonus,\n hacknet_node_purchase_cost: 1 / (1.01 + donationBonus),\n hacknet_node_ram_cost: 1 / (1.01 + donationBonus),\n hacknet_node_core_cost: 1 / (1.01 + donationBonus),\n hacknet_node_level_cost: 1 / (1.01 + donationBonus),\n work_money: 1.01 + donationBonus,\n factions: Object.values(FactionNames).filter(\n (factionName) =>\n ![FactionNames.ShadowsOfAnarchy, FactionNames.Bladeburners, FactionNames.ChurchOfTheMachineGod].includes(\n factionName,\n ),\n ),\n });\n}\n\nexport function initUnstableCircadianModulator(): Augmentation {\n //Time-Based Augment Test\n const randomBonuses = getRandomBonus();\n\n const UnstableCircadianModulatorParams: IConstructorParams = {\n name: AugmentationNames.UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info:\n \"An experimental nanobot injection. Its unstable nature leads to \" +\n \"unpredictable results based on your circadian rhythm.\",\n factions: [FactionNames.SpeakersForTheDead],\n };\n Object.keys(randomBonuses.bonuses).forEach(\n (key) => ((UnstableCircadianModulatorParams as any)[key] = randomBonuses.bonuses[key]),\n );\n\n return new Augmentation(UnstableCircadianModulatorParams);\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n// tslint:disable:max-file-line-count\n\n// This could actually be a JSON file as it should be constant metadata to be imported...\nimport { IMinMaxRange } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { LiteratureNames } from \"../../Literature/data/LiteratureNames\";\nimport { SpecialServers } from \"./SpecialServers\";\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\ninterface IServerMetadata {\n /**\n * When populated, the base security level of the server.\n */\n hackDifficulty?: number | IMinMaxRange;\n\n /**\n * The DNS name of the server.\n */\n hostname: string;\n\n /**\n * When populated, the files will be added to the server when created.\n */\n literature?: string[];\n\n /**\n * When populated, the exponent of 2^x amount of RAM the server has.\n * This should be in the range of 1-20, to match the Player's max RAM.\n */\n maxRamExponent?: number | IMinMaxRange;\n\n /**\n * How much money the server starts out with.\n */\n moneyAvailable: number | IMinMaxRange;\n\n /**\n * The number of network layers away from the `home` server.\n * This value is between 1 and 15.\n * If this is not populated, @specialName should be.\n */\n networkLayer?: number | IMinMaxRange;\n\n /**\n * The number of ports that must be opened before the player can execute NUKE.\n */\n numOpenPortsRequired: number;\n\n /**\n * The organization that the server belongs to.\n */\n organizationName: string;\n\n /**\n * The minimum hacking level before the player can run NUKE.\n */\n requiredHackingSkill: number | IMinMaxRange;\n\n /**\n * The growth factor for the server.\n */\n serverGrowth?: number | IMinMaxRange;\n\n /**\n * A \"unique\" server that has special implications when the player manually hacks it.\n */\n specialName?: string;\n}\n\n/**\n * The metadata for building up the servers on the network.\n */\nexport const serverMetadata: IServerMetadata[] = [\n {\n hackDifficulty: 99,\n hostname: LocationName.AevumECorp.toLowerCase(),\n moneyAvailable: {\n max: 70e9,\n min: 30e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050,\n },\n serverGrowth: 99,\n specialName: LocationName.AevumECorp,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.Sector12MegaCorp.toLowerCase(),\n moneyAvailable: {\n max: 60e9,\n min: 40e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100,\n },\n serverGrowth: 99,\n specialName: LocationName.Sector12MegaCorp,\n },\n {\n hackDifficulty: {\n max: 88,\n min: 72,\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.AevumBachmanAndAssociates,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 88,\n },\n hostname: \"blade\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900,\n },\n serverGrowth: {\n max: 85,\n min: 55,\n },\n specialName: LocationName.Sector12BladeIndustries,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.VolhavenNWO.toLowerCase(),\n literature: [LiteratureNames.TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 95,\n min: 65,\n },\n specialName: LocationName.VolhavenNWO,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"clarkinc\",\n literature: [LiteratureNames.BeyondMan, LiteratureNames.CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumClarkeIncorporated,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 90,\n },\n hostname: \"omnitek\",\n literature: [LiteratureNames.CodedIntelligence, LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7,\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 95,\n },\n specialName: LocationName.VolhavenOmniTekIncorporated,\n },\n {\n hackDifficulty: {\n max: 75,\n min: 55,\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 75,\n },\n specialName: LocationName.Sector12FourSigma,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 95,\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 90,\n },\n specialName: LocationName.ChongqingKuaiGongInternational,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 83,\n },\n hostname: \"fulcrumtech\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7,\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 80,\n },\n specialName: LocationName.AevumFulcrumTechnologies,\n },\n {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100,\n },\n serverGrowth: 1,\n specialName: SpecialServers.FulcrumSecretTechnologies,\n },\n {\n hackDifficulty: {\n max: 92,\n min: 78,\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875,\n },\n serverGrowth: {\n max: 92,\n min: 68,\n },\n specialName: LocationName.IshimaStormTechnologies,\n },\n {\n hackDifficulty: {\n max: 96,\n min: 84,\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850,\n },\n serverGrowth: {\n max: 73,\n min: 47,\n },\n specialName: LocationName.NewTokyoDefComm,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875,\n },\n serverGrowth: {\n max: 75,\n min: 35,\n },\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"helios\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5,\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.VolhavenHeliosLabs,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.NewTokyoVitaLife.toLowerCase(),\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.NewTokyoVitaLife,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 95,\n min: 85,\n },\n specialName: LocationName.Sector12IcarusMicrosystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.Sector12UniversalEnergy,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"titan-labs\",\n literature: [LiteratureNames.CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n },\n {\n hackDifficulty: {\n max: 75,\n min: 65,\n },\n hostname: \"microdyne\",\n literature: [LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"taiyang-digital\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n specialName: LocationName.AevumGalacticCybersystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.AevumAeroCorp.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.AevumAeroCorp,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"omnia\",\n literature: [LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenOmniaCybersystems,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"zb-def\",\n literature: [LiteratureNames.SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 65,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"solaris\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.ChongqingSolarisSpaceSystems,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: LocationName.Sector12DeltaOne.toLowerCase(),\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 70,\n min: 50,\n },\n specialName: LocationName.Sector12DeltaOne,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"global-pharm\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: LocationName.NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.NewTokyoGlobalPharmaceuticals,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: LocationName.IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 85,\n min: 65,\n },\n specialName: LocationName.IshimaNovaMedical,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.VolhavenLexoCorp,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumRhoConstruction,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 50,\n },\n hostname: \"alpha-ent\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12AlphaEnterprises,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 50,\n min: 30,\n },\n specialName: LocationName.AevumPolice,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"rothman-uni\",\n literature: [\n LiteratureNames.SecretSocieties,\n LiteratureNames.TheFailedFrontier,\n LiteratureNames.TensionsInTechRace,\n ],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370,\n },\n serverGrowth: {\n max: 45,\n min: 35,\n },\n specialName: LocationName.Sector12RothmanUniversity,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 65,\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725,\n },\n serverGrowth: {\n max: 85,\n min: 75,\n },\n specialName: LocationName.VolhavenZBInstituteOfTechnology,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"summit-uni\",\n literature: [LiteratureNames.SecretSocieties, LiteratureNames.TheFailedFrontier, LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSummitUniversity,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenSysCoreSecurities,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 60,\n },\n hostname: \"catalyst\",\n literature: [LiteratureNames.TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 55,\n min: 25,\n },\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275,\n },\n serverGrowth: {\n max: 55,\n min: 45,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: LocationName.VolhavenCompuTek.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300,\n },\n serverGrowth: {\n max: 65,\n min: 45,\n },\n specialName: LocationName.VolhavenCompuTek,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"netlink\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumNetLinkTechnologies,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 35,\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250,\n },\n serverGrowth: {\n max: 65,\n min: 35,\n },\n },\n {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: LocationName.NewTokyoNoodleBar,\n },\n {\n hackDifficulty: 10,\n hostname: LocationName.Sector12FoodNStuff.toLowerCase(),\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: LocationName.Sector12FoodNStuff,\n },\n {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10,\n },\n {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: LocationName.Sector12JoesGuns,\n },\n {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [LiteratureNames.TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [LiteratureNames.NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30,\n },\n {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [LiteratureNames.BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20,\n },\n {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35,\n },\n {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30,\n },\n {\n hackDifficulty: {\n max: 35,\n min: 25,\n },\n hostname: \"omega-net\",\n literature: [LiteratureNames.TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000,\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: LocationName.IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180,\n },\n serverGrowth: {\n max: 40,\n min: 30,\n },\n specialName: LocationName.IshimaOmegaSoftware,\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225,\n },\n serverGrowth: {\n max: 33,\n min: 27,\n },\n specialName: LocationName.AevumCrushFitnessGym,\n },\n {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: `${LocationName.Sector12IronGym} Network`,\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: LocationName.Sector12IronGym,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 45,\n min: 25,\n },\n specialName: LocationName.VolhavenMilleniumFitnessGym,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12PowerhouseGym,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSnapFitnessGym,\n },\n {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [LiteratureNames.SimulatedReality, LiteratureNames.TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.BitRunnersServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheBlackHandServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: FactionNames.NiteSec,\n requiredHackingSkill: {\n max: 220,\n min: 202,\n },\n serverGrowth: 0,\n specialName: SpecialServers.NiteSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheDarkArmyServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: FactionNames.CyberSec,\n requiredHackingSkill: {\n max: 60,\n min: 51,\n },\n serverGrowth: 0,\n specialName: SpecialServers.CyberSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [LiteratureNames.AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: SpecialServers.DaedalusServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: SpecialServers.WorldDaemon,\n },\n {\n hostname: SpecialServers.DarkWeb,\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: SpecialServers.DarkWeb,\n requiredHackingSkill: 1,\n specialName: SpecialServers.DarkWeb,\n },\n];\n","import { CONSTANTS } from \"../Constants\";\nimport * as names from \"./data/companypositionnames\";\n\n/* tslint:disable:completed-docs */\n\nexport interface IConstructorParams {\n name: string;\n nextPosition: string | null;\n baseSalary: number;\n repMultiplier: number;\n\n reqdHacking?: number;\n reqdStrength?: number;\n reqdDefense?: number;\n reqdDexterity?: number;\n reqdAgility?: number;\n reqdCharisma?: number;\n reqdReputation?: number;\n\n hackingEffectiveness?: number;\n strengthEffectiveness?: number;\n defenseEffectiveness?: number;\n dexterityEffectiveness?: number;\n agilityEffectiveness?: number;\n charismaEffectiveness?: number;\n\n hackingExpGain?: number;\n strengthExpGain?: number;\n defenseExpGain?: number;\n dexterityExpGain?: number;\n agilityExpGain?: number;\n charismaExpGain?: number;\n}\n\nexport class CompanyPosition {\n /**\n * Position title\n */\n name: string;\n\n /**\n * Title of next position to be promoted to\n */\n nextPosition: string | null;\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n baseSalary: number;\n\n /**\n * Reputation multiplier\n */\n repMultiplier: number;\n\n /**\n * Required stats to earn this position\n */\n requiredAgility: number;\n requiredCharisma: number;\n requiredDefense: number;\n requiredDexterity: number;\n requiredHacking: number;\n requiredStrength: number;\n\n /**\n * Required company reputation to earn this position\n */\n requiredReputation: number;\n\n /**\n * Effectiveness of each stat time for job performance\n */\n hackingEffectiveness: number;\n strengthEffectiveness: number;\n defenseEffectiveness: number;\n dexterityEffectiveness: number;\n agilityEffectiveness: number;\n charismaEffectiveness: number;\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n hackingExpGain: number;\n strengthExpGain: number;\n defenseExpGain: number;\n dexterityExpGain: number;\n agilityExpGain: number;\n charismaExpGain: number;\n\n constructor(p: IConstructorParams) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (\n Math.round(\n this.hackingEffectiveness +\n this.strengthEffectiveness +\n this.defenseEffectiveness +\n this.dexterityEffectiveness +\n this.agilityEffectiveness +\n this.charismaEffectiveness,\n ) !== 100\n ) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack: number, str: number, def: number, dex: number, agi: number, cha: number): number {\n const hackRatio: number = (this.hackingEffectiveness * hack) / CONSTANTS.MaxSkillLevel;\n const strRatio: number = (this.strengthEffectiveness * str) / CONSTANTS.MaxSkillLevel;\n const defRatio: number = (this.defenseEffectiveness * def) / CONSTANTS.MaxSkillLevel;\n const dexRatio: number = (this.dexterityEffectiveness * dex) / CONSTANTS.MaxSkillLevel;\n const agiRatio: number = (this.agilityEffectiveness * agi) / CONSTANTS.MaxSkillLevel;\n const chaRatio: number = (this.charismaEffectiveness * cha) / CONSTANTS.MaxSkillLevel;\n\n let reputationGain: number =\n (this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio)) / 100;\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob(): boolean {\n return names.SoftwareCompanyPositions.includes(this.name);\n }\n\n isITJob(): boolean {\n return names.ITCompanyPositions.includes(this.name);\n }\n\n isSecurityEngineerJob(): boolean {\n return names.SecurityEngineerCompanyPositions.includes(this.name);\n }\n\n isNetworkEngineerJob(): boolean {\n return names.NetworkEngineerCompanyPositions.includes(this.name);\n }\n\n isBusinessJob(): boolean {\n return names.BusinessCompanyPositions.includes(this.name);\n }\n\n isSecurityJob(): boolean {\n return names.SecurityCompanyPositions.includes(this.name);\n }\n\n isAgentJob(): boolean {\n return names.AgentCompanyPositions.includes(this.name);\n }\n\n isSoftwareConsultantJob(): boolean {\n return names.SoftwareConsultantCompanyPositions.includes(this.name);\n }\n\n isBusinessConsultantJob(): boolean {\n return names.BusinessConsultantCompanyPositions.includes(this.name);\n }\n\n isPartTimeJob(): boolean {\n return names.PartTimeCompanyPositions.includes(this.name);\n }\n}\n","export function checkEnum(\n enumVariable: { [key in T]: TEnumValue },\n value: string,\n): value is TEnumValue {\n return Object.values(enumVariable).includes(value);\n}\n","import React from \"react\";\nimport { SourceFile } from \"./SourceFile\";\nimport { IMap } from \"../types\";\n\nexport const SourceFiles: IMap = {};\n\nSourceFiles[\"SourceFile1\"] = new SourceFile(\n 1,\n (\n <>\n This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the\n player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nSourceFiles[\"SourceFile2\"] = new SourceFile(\n 2,\n (\n <>\n This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also\n increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nSourceFiles[\"SourceFile3\"] = new SourceFile(\n 3,\n (\n <>\n This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this\n mechanic). This Source-File also increases your charisma and company salary multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile4\"] = new SourceFile(\n 4,\n (\n <>\n This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this\n Source-File reduces the RAM cost of Singularity functions.\n \n ),\n);\nSourceFiles[\"SourceFile5\"] = new SourceFile(\n 5,\n (\n <>\n This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and\n persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other\n stats. Higher Intelligence levels will boost your production for many actions in the game. In addition, this\n Source-File will unlock:\n
\n
    \n
  • \n The getBitNodeMultipliers() Netscript function\n
  • \n
  • Permanent access to Formulas.exe
  • \n
  • \n Access to BitNode multiplier information on the Stats page\n
  • \n
\n It will also raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile6\"] = new SourceFile(\n 6,\n (\n <>\n This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this\n Source-File will raise both the level and experience gain rate of all your combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile7\"] = new SourceFile(\n 7,\n (\n <>\n This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this\n Source-File will increase all of your Bladeburner multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile8\"] = new SourceFile(\n 8,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nSourceFiles[\"SourceFile9\"] = new SourceFile(\n 9,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile10\"] = new SourceFile(\n 10,\n (\n <>\n This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes. Each level of this Source-File\n also grants you a Duplicate Sleeve\n \n ),\n);\nSourceFiles[\"SourceFile11\"] = new SourceFile(\n 11,\n (\n <>\n This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at\n that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's\n company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nSourceFiles[\"SourceFile12\"] = new SourceFile(\n 12,\n <>This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.,\n);\nSourceFiles[\"SourceFile13\"] = new SourceFile(\n 13,\n <>Each level of this Source-File increases the size of Stanek's Gift.,\n);\n","import React from \"react\";\n\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n type: number;\n name: string;\n rerender: () => void;\n}\nexport function StartButton(props: IProps): React.ReactElement {\n const player = use.Player();\n const action = props.bladeburner.getActionObject({ name: props.name, type: props.type });\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + props.name);\n }\n let disabled = false;\n if (action.count < 1) {\n disabled = true;\n }\n if (props.name === \"Raid\" && props.bladeburner.getCurrentCity().comms === 0) {\n disabled = true;\n }\n\n if (action instanceof BlackOperation && props.bladeburner.rank < action.reqdRank) {\n disabled = true;\n }\n function onStart(): void {\n if (disabled) return;\n props.bladeburner.action.type = props.type;\n props.bladeburner.action.name = props.name;\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) player.finishWork(true);\n props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nfunction replace(str: string, i: number, char: string): string {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\ninterface IProps {\n content: string;\n}\n\nfunction randomize(char: string): string {\n const randFrom = (str: string): string => str[Math.floor(Math.random() * str.length)];\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nexport function CorruptableText(props: IProps): JSX.Element {\n const [content, setContent] = useState(props.content);\n\n useEffect(() => {\n let counter = 5;\n const timers: number[] = [];\n const intervalId = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent((content) => replace(content, index, randomize(letter)));\n timers.push(\n window.setTimeout(() => {\n setContent((content) => replace(content, index, letter));\n }, 500),\n );\n }, 20);\n\n return () => {\n clearInterval(intervalId);\n timers.forEach((timerId) => clearTimeout(timerId));\n };\n }, []);\n\n return {content};\n}\n","import React from \"react\";\nimport { CONSTANTS } from \"../Constants\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { GraftableAugmentations } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Work, WorkType } from \"./Work\";\nimport { graftingIntBonus } from \"../PersonObjects/Grafting/GraftingHelpers\";\nimport { applyAugmentation } from \"../Augmentation/AugmentationHelpers\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { GraftableAugmentation } from \"../PersonObjects/Grafting/GraftableAugmentation\";\nimport { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\n\nexport const isGraftingWork = (w: Work | null): w is GraftingWork => w !== null && w.type === WorkType.GRAFTING;\n\ninterface GraftingWorkParams {\n augmentation: string;\n player: IPlayer;\n singularity: boolean;\n}\n\nexport class GraftingWork extends Work {\n augmentation: string;\n unitCompleted: number;\n\n constructor(params?: GraftingWorkParams) {\n super(WorkType.GRAFTING, params?.singularity ?? true);\n this.unitCompleted = 0;\n this.augmentation = params?.augmentation ?? AugmentationNames.Targeting1;\n\n if (params?.player) params.player.loseMoney(GraftableAugmentations[this.augmentation].cost, \"augmentations\");\n }\n\n unitNeeded(): number {\n return new GraftableAugmentation(StaticAugmentations[this.augmentation]).time;\n }\n\n process(player: IPlayer, cycles: number): boolean {\n let focusBonus = 1;\n if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n\n this.cyclesWorked += cycles;\n this.unitCompleted += CONSTANTS._idleSpeed * cycles * graftingIntBonus(player) * focusBonus;\n\n return this.unitCompleted >= this.unitNeeded();\n }\n\n finish(player: IPlayer, cancelled: boolean): void {\n const augName = this.augmentation;\n if (!cancelled) {\n applyAugmentation({ name: augName, level: 1 });\n\n if (!player.hasAugmentation(AugmentationNames.CongruityImplant)) {\n player.entropy += 1;\n player.applyEntropy(player.entropy);\n }\n\n if (!this.singularity) {\n dialogBoxCreate(\n <>\n You've finished grafting {augName}.
\n The augmentation has been applied to your body{\" \"}\n {player.hasAugmentation(AugmentationNames.CongruityImplant) ? \".\" : \", but you feel a bit off.\"}\n ,\n );\n }\n } else if (cancelled && !this.singularity) {\n dialogBoxCreate(\n <>\n You cancelled the grafting of {augName}.\n
\n Your money was not returned to you.\n ,\n );\n }\n\n // Intelligence gain\n if (!cancelled) {\n player.gainIntelligenceExp(\n (CONSTANTS.IntelligenceGraftBaseExpGain * this.cyclesWorked * CONSTANTS._idleSpeed) / 10000,\n );\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"GraftingWork\", this);\n }\n\n /**\n * Initiatizes a GraftingWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): GraftingWork {\n return Generic_fromJSON(GraftingWork, value.data);\n }\n}\n\nReviver.constructors.GraftingWork = GraftingWork;\n","import { format } from \"date-fns\";\n\nexport function formatTime(fmt: string): string {\n try {\n return format(new Date(), fmt);\n } catch (e: unknown) {\n return \"format error\";\n }\n}\n","import React from \"react\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { use } from \"../ui/Context\";\nimport { Option } from \"./ui/Option\";\nimport { Typography } from \"@mui/material\";\n\ninterface FactionInfoParams {\n infoText?: JSX.Element;\n enemies?: string[];\n offerHackingWork?: boolean;\n offerFieldWork?: boolean;\n offerSecurityWork?: boolean;\n special?: boolean;\n keepOnInstall?: boolean;\n assignment?: () => React.ReactElement;\n}\n\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nexport class FactionInfo {\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n enemies: string[];\n\n /**\n * The descriptive text to show on the faction's page.\n */\n infoText: JSX.Element;\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n offerFieldWork: boolean;\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n offerHackingWork: boolean;\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n offerSecurityWork: boolean;\n\n /**\n * Keep faction on install.\n */\n keep: boolean;\n\n /**\n * Special faction\n */\n special: boolean;\n\n /**\n * The data to display on the faction screen.\n */\n assignment?: () => React.ReactElement;\n\n constructor(params: FactionInfoParams) {\n this.infoText = params.infoText ?? <>;\n this.enemies = params.enemies ?? [];\n this.offerHackingWork = params.offerHackingWork ?? false;\n this.offerFieldWork = params.offerFieldWork ?? false;\n this.offerSecurityWork = params.offerSecurityWork ?? false;\n\n this.keep = params.keepOnInstall ?? false;\n this.special = params.special ?? false;\n this.assignment = params.assignment;\n }\n\n offersWork(): boolean {\n return this.offerFieldWork || this.offerHackingWork || this.offerSecurityWork;\n }\n}\n\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\nexport const FactionInfos: IMap = {\n // Endgame\n [FactionNames.Illuminati]: new FactionInfo({\n infoText: (\n <>\n Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And\n from this chaos, we are the invisible hand that guides them to order.{\" \"}\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.Daedalus]: new FactionInfo({\n infoText: <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.,\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.TheCovenant]: new FactionInfo({\n infoText: (\n <>\n Surrender yourself. Give up your empty individuality to become part of something great, something eternal.\n Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.\n
\n
\n Only then can you discover immortality.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n // Megacorporations, each forms its own faction\n [FactionNames.ECorp]: new FactionInfo({\n infoText: (\n <>\n {FactionNames.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With\n our wide range of Internet-related software and commercial hardware, {FactionNames.ECorp} makes the world's\n information universally accessible.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.MegaCorp]: new FactionInfo({\n infoText: (\n <>\n {FactionNames.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others\n have never even dreamed of. Our work fills the world's needs for food, water, power, and transportation on an\n unprecedented scale, in ways that no other company can.\n
\n
\n In our labs and factories and on the ground with customers, {FactionNames.MegaCorp} is ushering in a new era for\n the world.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.BachmanAssociates]: new FactionInfo({\n infoText: (\n <>\n Where Law and Business meet - that's where we are.\n
\n
\n Legal Insight - Business Instinct - Innovative Experience.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.BladeIndustries]: new FactionInfo({\n infoText: <>Augmentation is Salvation.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.NWO]: new FactionInfo({\n infoText: (\n <>\n Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given\n purpose and direction in life. That is why they created God. And that is why they created civilization - not\n because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.ClarkeIncorporated]: new FactionInfo({\n infoText: <>The Power of the Genome - Unlocked.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.OmniTekIncorporated]: new FactionInfo({\n infoText: <>Simply put, our mission is to design and build robots that make a difference.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.FourSigma]: new FactionInfo({\n infoText: (\n <>\n The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by\n deep learning and innovative ideas. And improved by iteration. That's {FactionNames.FourSigma}.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.KuaiGongInternational]: new FactionInfo({\n infoText: <>Dream big. Work hard. Make history.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n // Other Corporations\n [FactionNames.FulcrumSecretTechnologies]: new FactionInfo({\n infoText: (\n <>\n The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it\n would be necessary to create them. And now we can.\n \n ),\n offerHackingWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n // Hacker groups\n [FactionNames.BitRunners]: new FactionInfo({\n infoText: (\n <>\n Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all\n transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to\n live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave\n behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be\n reconstructed. Transformed. Used.\n
\n
\n Those who run the bits, run the world.\n \n ),\n offerHackingWork: true,\n }),\n\n [FactionNames.TheBlackHand]: new FactionInfo({\n infoText: (\n <>\n The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.\n Technological power. And those at the top rule with an invisible hand. They built a society where the rich get\n richer, and everyone else suffers.\n
\n
\n So much pain. So many lives. Their darkness must end.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n // prettier-ignore\n [FactionNames.NiteSec]: new FactionInfo({\n infoText:(<>\n {\" __..__ \"}
\n {\" _.nITESECNIt. \"}
\n {\" .-'NITESECNITESEc. \"}
\n {\" .' NITESECNITESECn \"}
\n {\" / NITESECNITESEC; \"}
\n {\" : :NITESECNITESEC; \"}
\n {\" ; $ NITESECNITESECN \"}
\n {\" : _, ,N'ITESECNITESEC \"}
\n {\" : .+^^`, : `NITESECNIT \"}
\n {\" ) /), `-,-=,NITESECNI \"}
\n {\" / ^ ,-;|NITESECN; \"}
\n {\" / _.' '-';NITESECN \"}
\n {\" ( , ,-''`^NITE' \"}
\n {\" )` :`. .' \"}
\n {\" )-- ; `- / \"}
\n {\" ' _.-' : \"}
\n {\" ( _.-' . \"}
\n {\" ------. \"}
\n {\" . \"}
\n {\" _.nIt \"}
\n {\" _.nITESECNi \"}
\n {\" nITESECNIT^' \"}
\n {\" NITE^' ___ \"}
\n {\" / .gP''''Tp. \"}
\n {\" : d' . `b \"}
\n {\" ; d' o `b ; \"}
\n {\" / d; `b| \"}
\n {\" /, $; @ `: \"}
\n {\" /' $/ ; \"}
\n {\" .' $/b o | \"}
\n {\" .' d$/$; : \"}
\n {\" / .d/$/$; , ; \"}
\n {\" d .dNITESEC $ | \"}
\n {\" :bp.__.gNITESEC/$ :$ ; \"}
\n {\" NITESECNITESECNIT /$b : \"}
),\n offerHackingWork: true,\n offerFieldWork: false,\n offerSecurityWork: false,\n special: false,\n keepOnInstall: false,\n }),\n\n // City factions, essentially governments\n [FactionNames.Aevum]: new FactionInfo({\n infoText: <>The Silicon City.,\n enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Chongqing]: new FactionInfo({\n infoText: <>Serve the People.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Ishima]: new FactionInfo({\n infoText: <>The East Asian Order of the Future.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.NewTokyo]: new FactionInfo({\n infoText: <>Asia's World City.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Sector12]: new FactionInfo({\n infoText: <>The City of the Future.,\n enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Volhaven]: new FactionInfo({\n infoText: <>Benefit, Honor, and Glory.,\n enemies: [\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n ],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n // Criminal Organizations/Gangs\n [FactionNames.SpeakersForTheDead]: new FactionInfo({\n infoText: <>It is better to reign in Hell than to serve in Heaven.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.TheDarkArmy]: new FactionInfo({\n infoText: <>The World doesn't care about right or wrong. It only cares about power.,\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.TheSyndicate]: new FactionInfo({\n infoText: <>Honor holds you back.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.Silhouette]: new FactionInfo({\n infoText: (\n <>\n Corporations have filled the void of power left behind by the collapse of Western government. The issue is\n they've become so big that you don't know who they're working for. And if you're employed at one of these\n corporations, you don't even know who you're working for.\n
\n
\n That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.Tetrads]: new FactionInfo({\n infoText: <>Following the mandate of Heaven and carrying out the way.,\n\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.SlumSnakes]: new FactionInfo({\n infoText: <>{FactionNames.SlumSnakes} rule!,\n\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n [FactionNames.Netburners]: new FactionInfo({\n infoText: <>{\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\"},\n offerHackingWork: true,\n }),\n\n [FactionNames.TianDiHui]: new FactionInfo({\n infoText: <>Obey Heaven and work righteously.,\n offerHackingWork: true,\n\n offerSecurityWork: true,\n }),\n\n [FactionNames.CyberSec]: new FactionInfo({\n infoText: (\n <>\n The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy\n that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of\n total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.\n \n ),\n offerHackingWork: true,\n }),\n\n // Special Factions\n [FactionNames.Bladeburners]: new FactionInfo({\n infoText: (\n <>\n It's too bad they won't live. But then again, who does?\n
\n
\n Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions.{\" \"}\n Completing {FactionNames.Bladeburners} contracts/operations will increase your reputation.\n \n ),\n\n special: true,\n assignment: (): React.ReactElement => {\n const router = use.Router();\n return (\n router.toBladeburner()}\n />\n );\n },\n }),\n\n [FactionNames.ChurchOfTheMachineGod]: new FactionInfo({\n // prettier-ignore\n infoText:(<>\n {\" `` \"}
\n {\" -odmmNmds: \"}
\n {\" `hNmo:..-omNh. \"}
\n {\" yMd` `hNh \"}
\n {\" mMd oNm \"}
\n {\" oMNo .mM/ \"}
\n {\" `dMN+ -mM+ \"}
\n {\" -mMNo -mN+ \"}
\n {\" .+- :mMNo/mN/ \"}
\n {\":yNMd. :NMNNN/ \"}
\n {\"-mMMMh. /NMMh` \"}
\n {\" .dMMMd. /NMMMy` \"}
\n {\" `yMMMd. /NNyNMMh` \"}
\n {\" `sMMMd. +Nm: +NMMh. \"}
\n {\" oMMMm- oNm: /NMMd. \"}
\n {\" +NMMmsMm- :mMMd. \"}
\n {\" /NMMMm- -mMMd. \"}
\n {\" /MMMm- -mMMd. \"}
\n {\" `sMNMMm- .mMmo \"}
\n {\" `sMd:hMMm. ./. \"}
\n {\" `yMy` `yNMd` \"}
\n {\" `hMs` oMMy \"}
\n {\" `hMh sMN- \"}
\n {\" /MM- .NMo \"}
\n {\" +MM: :MM+ \"}
\n {\" sNNo-.`.-omNy` \"}
\n {\" -smNNNNmdo- \"}
\n {\" `..` \"}

\n Many cultures predict an end to humanity in the near future, a final\n Armageddon that will end the world; but we disagree.),\n offerHackingWork: false,\n offerFieldWork: false,\n offerSecurityWork: false,\n special: true,\n keepOnInstall: true,\n assignment: (): React.ReactElement => {\n const router = use.Router();\n return (\n router.toStaneksGift()}\n />\n );\n },\n }),\n [FactionNames.ShadowsOfAnarchy]: new FactionInfo({\n infoText: (\n <>\n The government is ruled by the corporations that we have allowed to consume it. To release the world from its\n shackles, the gods grant us their strength.\n \n ),\n special: true,\n keepOnInstall: true,\n assignment: (): React.ReactElement => {\n return {FactionNames.ShadowsOfAnarchy} can only gain reputation by infiltrating.;\n },\n }),\n};\n","/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\nimport { HashUpgrades } from \"./HashUpgrades\";\nimport { HashUpgrade } from \"./HashUpgrade\";\n\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport class HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n capacity = 0;\n\n // Number of hashes currently in storage\n hashes = 0;\n\n // Map of Hash Upgrade Name -> levels in that upgrade\n upgrades: IMap = {};\n\n constructor() {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n }\n\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n getMult(upgName: string): number {\n const upg = HashUpgrades[upgName];\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + (upg.value * currLevel) / 100;\n }\n\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n getStudyMult(): number {\n const upgName = \"Improve Studying\";\n\n return this.getMult(upgName);\n }\n\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n getTrainingMult(): number {\n const upgName = \"Improve Gym Training\";\n\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName: string): HashUpgrade | null {\n const upg = HashUpgrades[upgName];\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n return upg;\n }\n\n /**\n * Get the cost (in hashes) of an upgrade\n */\n getUpgradeCost(upgName: string): number {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige(): void {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n this.hashes = 0;\n\n // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n this.updateCapacity(0);\n }\n\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n refundUpgrade(upgName: string): void {\n const upg = HashUpgrades[upgName];\n\n // Reduce the level first, so we get the right cost\n --this.upgrades[upgName];\n\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n /**\n * Stores the given hashes, capping at capacity\n * @param numHashes The number of hashes to increment\n * @returns The number of wasted hashes (over capacity)\n */\n storeHashes(numHashes: number): number {\n this.hashes += numHashes;\n let wastedHashes = this.hashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n wastedHashes -= this.hashes;\n return wastedHashes;\n }\n\n updateCapacity(newCap: number): void {\n if (newCap < 0) {\n this.capacity = 0;\n }\n this.capacity = Math.max(newCap, 0);\n }\n\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n upgrade(upgName: string): boolean {\n const upg = HashUpgrades[upgName];\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n\n return true;\n }\n\n //Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"HashManager\", this);\n }\n\n // Initiatizes a HashManager object from a JSON save state.\n static fromJSON(value: IReviverValue): HashManager {\n return Generic_fromJSON(HashManager, value.data);\n }\n}\n\nReviver.constructors.HashManager = HashManager;\n","import { EventEmitter } from \"../../utils/EventEmitter\";\nexport const ITutorialEvents = new EventEmitter<[]>();\n","import { Crimes } from \"./Crimes\";\nimport { Crime } from \"./Crime\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function determineCrimeSuccess(p: IPlayer, type: string): boolean {\n let chance = 0;\n let found = false;\n for (const i of Object.keys(Crimes)) {\n const crime = Crimes[i];\n if (crime.type === type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);\n return false;\n }\n return Math.random() <= chance;\n}\n\nexport function findCrime(roughName: string): Crime | null {\n roughName = roughName.toLowerCase();\n if (roughName.includes(\"shoplift\")) {\n return Crimes.Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return Crimes.RobStore;\n } else if (roughName.includes(\"mug\")) {\n return Crimes.Mug;\n } else if (roughName.includes(\"larceny\")) {\n return Crimes.Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return Crimes.DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return Crimes.BondForgery;\n } else if ((roughName.includes(\"traffic\") || roughName.includes(\"illegal\")) && roughName.includes(\"arms\")) {\n return Crimes.TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return Crimes.Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return Crimes.GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return Crimes.Kidnap;\n } else if (roughName.includes(\"assassin\")) {\n return Crimes.Assassination;\n } else if (roughName.includes(\"heist\")) {\n return Crimes.Heist;\n }\n\n return null;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { generateRandomString } from \"../utils/StringHelperFunctions\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { Employee } from \"./Employee\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ICorporation } from \"./ICorporation\";\n\ninterface IParams {\n loc?: string;\n size?: number;\n}\n\nexport class OfficeSpace {\n loc: string;\n size: number;\n\n minEne = 0;\n minHap = 0;\n minMor = 0;\n\n maxEne = 100;\n maxHap = 100;\n maxMor = 100;\n\n autoCoffee = false;\n autoParty = false;\n coffeeMult = 0;\n partyMult = 0;\n coffeeEmployees = 0;\n partyEmployees = 0;\n\n employees: Employee[] = [];\n employeeProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n employeeJobs: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n [EmployeePositions.Training]: 0,\n [EmployeePositions.Unassigned]: 0,\n };\n employeeNextJobs: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n [EmployeePositions.Training]: 0,\n [EmployeePositions.Unassigned]: 0,\n };\n\n constructor(params: IParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity(): boolean {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation: ICorporation, industry: IIndustry): number {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = EmployeePositions.Training;\n }\n }\n\n // Update employee jobs and job counts\n for (const employee of this.employees) {\n employee.pos = employee.nextPos;\n }\n this.calculateTotalEmployees();\n this.calculateNextEmployees();\n\n // Process Office properties\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n }\n if (industry.hasResearch(\"AutoBrew\")) {\n this.autoCoffee = true;\n }\n if (industry.hasResearch(\"AutoPartyManager\")) {\n this.autoParty = true;\n }\n\n // Calculate changes in Morale/Happiness/Energy for Employees\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n let totalSalary = 0;\n for (const employee of this.employees) {\n const salary = employee.process(marketCycles);\n totalSalary += salary;\n\n if (this.autoCoffee) {\n employee.ene = this.maxEne;\n } else if (this.coffeeMult > 1) {\n const mult = 1 + ((this.coffeeMult - 1) * this.employees.length) / this.coffeeEmployees;\n employee.ene *= mult;\n } else {\n employee.ene *= perfMult;\n }\n\n if (this.autoParty) {\n employee.mor = this.maxMor;\n employee.hap = this.maxHap;\n } else if (this.partyMult > 1) {\n const mult = 1 + ((this.partyMult - 1) * this.employees.length) / this.partyEmployees;\n employee.mor *= mult;\n employee.hap *= mult;\n } else {\n employee.mor *= perfMult;\n employee.hap *= perfMult;\n }\n\n employee.ene = Math.max(Math.min(employee.ene, this.maxEne), this.minEne);\n employee.mor = Math.max(Math.min(employee.mor, this.maxMor), this.minMor);\n employee.hap = Math.max(Math.min(employee.hap, this.maxHap), this.minHap);\n }\n\n this.coffeeMult = 0;\n this.partyMult = 0;\n this.coffeeEmployees = 0;\n this.partyEmployees = 0;\n\n this.calculateEmployeeProductivity(corporation, industry);\n return totalSalary;\n }\n\n calculateNextEmployees(): void {\n //Reset\n for (const name of Object.keys(this.employeeNextJobs)) {\n this.employeeNextJobs[name] = 0;\n }\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n this.employeeNextJobs[employee.nextPos]++;\n }\n }\n\n calculateTotalEmployees(): void {\n //Reset\n for (const name of Object.keys(this.employeeJobs)) {\n this.employeeJobs[name] = 0;\n }\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n this.employeeJobs[employee.pos]++;\n }\n }\n\n calculateEmployeeProductivity(corporation: ICorporation, industry: IIndustry): void {\n //Reset\n for (const name of Object.keys(this.employeeProd)) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee(): Employee | undefined {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return;\n\n //Generate three random employees (meh, decent, amazing)\n const int = getRandomInt(50, 100),\n cha = getRandomInt(50, 100),\n exp = getRandomInt(50, 100),\n cre = getRandomInt(50, 100),\n eff = getRandomInt(50, 100),\n sal = CorporationConstants.EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n\n const emp = new Employee({\n intelligence: int,\n charisma: cha,\n experience: exp,\n creativity: cre,\n efficiency: eff,\n salary: sal,\n });\n\n const name = generateRandomString(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n emp.name = name;\n this.employees.push(emp);\n\n this.calculateTotalEmployees();\n this.calculateNextEmployees();\n return emp;\n }\n\n assignSingleJob(employee: Employee, job: string): void {\n employee.nextPos = job;\n this.calculateNextEmployees();\n }\n\n autoAssignJob(job: string, target: number): boolean {\n let count = this.employeeNextJobs[job];\n\n for (const employee of this.employees) {\n if (count === target) {\n break;\n } else if (employee.nextPos === EmployeePositions.Unassigned && count <= target) {\n employee.nextPos = job;\n count++;\n } else if (employee.nextPos === job && count >= target) {\n employee.nextPos = EmployeePositions.Unassigned;\n count--;\n }\n }\n\n this.calculateNextEmployees();\n return count === target;\n }\n\n getCoffeeCost(): number {\n return 500e3 * this.employees.length;\n }\n\n setCoffee(mult = 1.05): boolean {\n if (mult > 1 && this.coffeeMult === 0 && !this.autoCoffee && this.employees.length > 0) {\n this.coffeeMult = mult;\n this.coffeeEmployees = this.employees.length;\n return true;\n }\n\n return false;\n }\n\n setParty(mult: number): boolean {\n if (mult > 1 && this.partyMult === 0 && !this.autoParty && this.employees.length > 0) {\n this.partyMult = mult;\n this.partyEmployees = this.employees.length;\n return true;\n }\n\n return false;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"OfficeSpace\", this);\n }\n\n static fromJSON(value: IReviverValue): OfficeSpace {\n return Generic_fromJSON(OfficeSpace, value.data);\n }\n}\n\nReviver.constructors.OfficeSpace = OfficeSpace;\n","export interface CorporationUpgrade {\n index: number;\n basePrice: number;\n priceMult: number;\n benefit: number;\n name: string;\n desc: string;\n}\n\nexport enum CorporationUpgradeIndex {\n SmartFactories = 0,\n SmartStorage = 1,\n DreamSense = 2,\n WilsonAnalytics = 3,\n NuoptimalNootropicInjectorImplants = 4,\n SpeechProcessorImplants = 5,\n NeuralAccelerators = 6,\n FocusWires = 7,\n ABCSalesBots = 8,\n ProjectInsight = 9,\n}\n\n// Corporation Upgrades\n// Upgrades for entire corporation, levelable upgrades\nexport const CorporationUpgrades: Record = {\n //Smart factories, increases production\n [CorporationUpgradeIndex.SmartFactories]: {\n index: CorporationUpgradeIndex.SmartFactories,\n basePrice: 2e9,\n priceMult: 1.06,\n benefit: 0.03,\n name: \"Smart Factories\",\n desc:\n \"Advanced AI automatically optimizes the operation and productivity \" +\n \"of factories. Each level of this upgrade increases your global production by 3% (additive).\",\n },\n\n //Smart warehouses, increases storage size\n [CorporationUpgradeIndex.SmartStorage]: {\n index: CorporationUpgradeIndex.SmartStorage,\n basePrice: 2e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Smart Storage\",\n desc:\n \"Advanced AI automatically optimizes your warehouse storage methods. \" +\n \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\",\n },\n\n //Advertise through dreams, passive popularity/ awareness gain\n [CorporationUpgradeIndex.DreamSense]: {\n index: CorporationUpgradeIndex.DreamSense,\n basePrice: 4e9,\n priceMult: 1.1,\n benefit: 0.001,\n name: \"DreamSense\",\n desc:\n \"Use DreamSense LCC Technologies to advertise your corporation \" +\n \"to consumers through their dreams. Each level of this upgrade provides a passive \" +\n \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" +\n \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" +\n \"15 seconds.\",\n },\n\n //Makes advertising more effective\n [CorporationUpgradeIndex.WilsonAnalytics]: {\n index: CorporationUpgradeIndex.WilsonAnalytics,\n basePrice: 4e9,\n priceMult: 1.5,\n benefit: 0.005,\n name: \"Wilson Analytics\",\n desc:\n \"Purchase data and analysis from Wilson, a marketing research \" +\n \"firm. Each level of this upgrade increases the effectiveness of your \" +\n \"advertising by 0.5% (additive).\",\n },\n\n //Augmentation for employees, increases cre\n [CorporationUpgradeIndex.NuoptimalNootropicInjectorImplants]: {\n index: CorporationUpgradeIndex.NuoptimalNootropicInjectorImplants,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Nuoptimal Nootropic Injector Implants\",\n desc:\n \"Purchase the Nuoptimal Nootropic \" +\n \"Injector augmentation for your employees. Each level of this upgrade \" +\n \"globally increases the creativity of your employees by 10% (additive).\",\n },\n\n //Augmentation for employees, increases cha\n [CorporationUpgradeIndex.SpeechProcessorImplants]: {\n index: CorporationUpgradeIndex.SpeechProcessorImplants,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Speech Processor Implants\",\n desc:\n \"Purchase the Speech Processor augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\",\n },\n\n //Augmentation for employees, increases int\n [CorporationUpgradeIndex.NeuralAccelerators]: {\n index: CorporationUpgradeIndex.NeuralAccelerators,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Neural Accelerators\",\n desc:\n \"Purchase the Neural Accelerator augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the intelligence of your employees \" +\n \"by 10% (additive).\",\n },\n\n //Augmentation for employees, increases eff\n [CorporationUpgradeIndex.FocusWires]: {\n index: CorporationUpgradeIndex.FocusWires,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"FocusWires\",\n desc:\n \"Purchase the FocusWire augmentation for your employees. Each level \" +\n \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\",\n },\n\n //Improves sales of materials/products\n [CorporationUpgradeIndex.ABCSalesBots]: {\n index: CorporationUpgradeIndex.ABCSalesBots,\n basePrice: 1e9,\n priceMult: 1.07,\n benefit: 0.01,\n name: \"ABC SalesBots\",\n desc:\n \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" +\n \"materials and products you sell. Each level of this upgrade globally increases your sales \" +\n \"by 1% (additive).\",\n },\n\n //Improves scientific research rate\n [CorporationUpgradeIndex.ProjectInsight]: {\n index: CorporationUpgradeIndex.ProjectInsight,\n basePrice: 5e9,\n priceMult: 1.07,\n benefit: 0.05,\n name: \"Project Insight\",\n desc:\n \"Purchase 'Project Insight', a R&D service provided by the secretive \" +\n \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" +\n \"Scientific Research you produce by 5% (additive).\",\n },\n};\n","import { sum } from \"lodash\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { CONSTANTS } from \"../../Constants\";\n\nexport interface IConstructorParams {\n augmentation: Augmentation;\n readonly cost: number;\n readonly time: number;\n}\n\nexport class GraftableAugmentation {\n // The augmentation that this craftable corresponds to\n augmentation: Augmentation;\n\n constructor(augmentation: Augmentation) {\n this.augmentation = augmentation;\n }\n\n get cost(): number {\n return this.augmentation.baseCost * CONSTANTS.AugmentationGraftingCostMult;\n }\n\n get time(): number {\n // Time = 1 hour * log_2(sum(aug multipliers) || 1) + 30 minutes\n const antiLog = Math.max(sum(Object.values(this.augmentation.mults)), 1);\n\n const mult = Math.log2(antiLog);\n return (CONSTANTS.AugmentationGraftingTimeBase * mult + CONSTANTS.MillisecondsPerHalfHour) / 2;\n }\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\n\nexport function ReputationRate({ reputation }: { reputation: number }): React.ReactElement {\n return ;\n}\n","export type ObjectValidator = {\n [key in keyof T]?: ParameterValidator;\n};\n\ninterface ParameterValidatorObject {\n default?: unknown;\n min?: number;\n max?: number;\n func?: (obj: Type, validator: ObjectValidator, key: Key) => void;\n}\ntype ParameterValidatorFunction = (obj: Type, key: Key) => void;\ntype ParameterValidator =\n | ParameterValidatorObject\n | ParameterValidatorFunction;\n\nexport function validateObject, Key extends keyof Type>(\n obj: Type,\n validator: ObjectValidator,\n): void {\n for (const key of Object.keys(validator) as Key[]) {\n const paramValidator = validator[key];\n if (paramValidator !== undefined) {\n if (typeof paramValidator === \"function\") {\n paramValidator(obj, key);\n } else if (paramValidator.func !== undefined) {\n paramValidator.func(obj, validator, key);\n } else {\n if (typeof obj[key] !== typeof paramValidator.default) {\n obj[key] = paramValidator.default as Type[Key];\n }\n if (typeof obj[key] === \"number\" && paramValidator.min !== undefined) {\n if (obj[key] < paramValidator.min) obj[key] = paramValidator.min as Type[Key];\n }\n if (typeof obj[key] === \"number\" && paramValidator.max !== undefined) {\n if (obj[key] > paramValidator.max) obj[key] = paramValidator.max as Type[Key];\n }\n }\n }\n }\n}\n\nexport function minMax(\n def: number,\n min: number,\n max: number,\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== \"number\") {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if ((obj[key] as unknown as number) < min) {\n obj[key] = min as unknown as Type[Key];\n }\n if ((obj[key] as unknown as number) > max) {\n obj[key] = max as unknown as Type[Key];\n }\n };\n}\n\nexport function oneOf(\n def: Value,\n options: Value[],\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== typeof def) {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if (!options.includes(obj[key] as unknown as Value)) {\n obj[key] = def as unknown as Type[Key];\n }\n };\n}\n\nexport function subsetOf(\n options: Value[],\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== \"object\" || !Array.isArray(obj[key])) {\n obj[key] = [] as unknown as Type[Key];\n return;\n }\n const validValues: Value[] = [];\n for (const value of obj[key] as unknown as Value[]) {\n if (options.includes(value)) validValues.push(value);\n }\n obj[key] = validValues as unknown as Type[Key];\n };\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { LocationsMetadata } from \"../../Locations/data/LocationsMetadata\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Faction } from \"../../Faction/Faction\";\n\nexport function calculateSellInformationCashReward(\n player: IPlayer,\n reward: number,\n maxLevel: number,\n difficulty: number,\n): number {\n const levelBonus = maxLevel * Math.pow(1.01, maxLevel);\n\n return (\n Math.pow(reward + 1, 2) *\n Math.pow(difficulty, 3) *\n 3e3 *\n levelBonus *\n (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *\n BitNodeMultipliers.InfiltrationMoney\n );\n}\n\nexport function calculateTradeInformationRepReward(\n player: IPlayer,\n reward: number,\n maxLevel: number,\n difficulty: number,\n): number {\n const levelBonus = maxLevel * Math.pow(1.01, maxLevel);\n\n return (\n Math.pow(reward + 1, 1.1) *\n Math.pow(difficulty, 1.2) *\n 30 *\n levelBonus *\n (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *\n BitNodeMultipliers.InfiltrationRep\n );\n}\n\nexport function calculateInfiltratorsRepReward(player: IPlayer, faction: Faction, difficulty: number): number {\n const maxStartingSecurityLevel = LocationsMetadata.reduce((acc, data): number => {\n const startingSecurityLevel = data.infiltrationData?.startingSecurityLevel || 0;\n return acc > startingSecurityLevel ? acc : startingSecurityLevel;\n }, 0);\n const baseRepGain = (difficulty / maxStartingSecurityLevel) * 5000;\n\n return (\n baseRepGain * (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 2 : 1) * (1 + faction.favor / 100)\n );\n}\n","/**\n * This is an object that is used to keep track of where all of the player's\n * money is coming from (or going to)\n */\nimport { Generic_fromJSON, Generic_toJSON, Reviver, IReviverValue } from \"./JSONReviver\";\n\nexport class MoneySourceTracker {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: number | Function;\n\n bladeburner = 0;\n casino = 0;\n class = 0;\n codingcontract = 0;\n corporation = 0;\n crime = 0;\n gang = 0;\n hacking = 0;\n hacknet = 0;\n hacknet_expenses = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 0;\n servers = 0;\n other = 0;\n augmentations = 0;\n\n // Record money earned\n record(amt: number, source: string): void {\n const sanitizedSource = source.toLowerCase();\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n (this[sanitizedSource] as number) += amt;\n this.total += amt;\n }\n\n // Reset the money tracker by setting all stats to 0\n reset(): void {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n (this[prop] as number) = 0;\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"MoneySourceTracker\", this);\n }\n\n // Initiatizes a MoneySourceTracker object from a JSON save state.\n static fromJSON(value: IReviverValue): MoneySourceTracker {\n return Generic_fromJSON(MoneySourceTracker, value.data);\n }\n}\n\nReviver.constructors.MoneySourceTracker = MoneySourceTracker;\n","// choose random character for generating plaintexts to compress\nexport function comprGenChar(): string {\n const r = Math.random();\n if (r < 0.4) {\n return \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(26 * Math.random())];\n } else if (r < 0.8) {\n return \"abcdefghijklmnopqrstuvwxyz\"[Math.floor(26 * Math.random())];\n } else {\n return \"01234567689\"[Math.floor(10 * Math.random())];\n }\n}\n\n// generate plaintext which is amenable to LZ encoding\nexport function comprLZGenerate(): string {\n const length = 50 + Math.floor(25 * (Math.random() + Math.random()));\n let plain = \"\";\n\n while (plain.length < length) {\n if (Math.random() < 0.8) {\n plain += comprGenChar();\n } else {\n const length = 1 + Math.floor(9 * Math.random());\n const offset = 1 + Math.floor(9 * Math.random());\n if (offset > plain.length) {\n continue;\n }\n\n for (let i = 0; i < length; ++i) {\n plain += plain[plain.length - offset];\n }\n }\n }\n\n return plain.substring(0, length);\n}\n\n// compress plaintest string\nexport function comprLZEncode(plain: string): string {\n // for state[i][j]:\n // if i is 0, we're adding a literal of length j\n // else, we're adding a backreference of offset i and length j\n let cur_state: (string | null)[][] = Array.from(Array(10), () => Array(10).fill(null));\n let new_state: (string | null)[][] = Array.from(Array(10), () => Array(10));\n\n function set(state: (string | null)[][], i: number, j: number, str: string): void {\n const current = state[i][j];\n if (current == null || str.length < current.length) {\n state[i][j] = str;\n } else if (str.length === current.length && Math.random() < 0.5) {\n // if two strings are the same length, pick randomly so that\n // we generate more possible inputs to Compression II\n state[i][j] = str;\n }\n }\n\n // initial state is a literal of length 1\n cur_state[0][1] = \"\";\n\n for (let i = 1; i < plain.length; ++i) {\n for (const row of new_state) {\n row.fill(null);\n }\n const c = plain[i];\n\n // handle literals\n for (let length = 1; length <= 9; ++length) {\n const string = cur_state[0][length];\n if (string == null) {\n continue;\n }\n\n if (length < 9) {\n // extend current literal\n set(new_state, 0, length + 1, string);\n } else {\n // start new literal\n set(new_state, 0, 1, string + \"9\" + plain.substring(i - 9, i) + \"0\");\n }\n\n for (let offset = 1; offset <= Math.min(9, i); ++offset) {\n if (plain[i - offset] === c) {\n // start new backreference\n set(new_state, offset, 1, string + String(length) + plain.substring(i - length, i));\n }\n }\n }\n\n // handle backreferences\n for (let offset = 1; offset <= 9; ++offset) {\n for (let length = 1; length <= 9; ++length) {\n const string = cur_state[offset][length];\n if (string == null) {\n continue;\n }\n\n if (plain[i - offset] === c) {\n if (length < 9) {\n // extend current backreference\n set(new_state, offset, length + 1, string);\n } else {\n // start new backreference\n set(new_state, offset, 1, string + \"9\" + String(offset) + \"0\");\n }\n }\n\n // start new literal\n set(new_state, 0, 1, string + String(length) + String(offset));\n\n // end current backreference and start new backreference\n for (let new_offset = 1; new_offset <= Math.min(9, i); ++new_offset) {\n if (plain[i - new_offset] === c) {\n set(new_state, new_offset, 1, string + String(length) + String(offset) + \"0\");\n }\n }\n }\n }\n\n const tmp_state = new_state;\n new_state = cur_state;\n cur_state = tmp_state;\n }\n\n let result = null;\n\n for (let len = 1; len <= 9; ++len) {\n let string = cur_state[0][len];\n if (string == null) {\n continue;\n }\n\n string += String(len) + plain.substring(plain.length - len, plain.length);\n if (result == null || string.length < result.length) {\n result = string;\n } else if (string.length == result.length && Math.random() < 0.5) {\n result = string;\n }\n }\n\n for (let offset = 1; offset <= 9; ++offset) {\n for (let len = 1; len <= 9; ++len) {\n let string = cur_state[offset][len];\n if (string == null) {\n continue;\n }\n\n string += String(len) + \"\" + String(offset);\n if (result == null || string.length < result.length) {\n result = string;\n } else if (string.length == result.length && Math.random() < 0.5) {\n result = string;\n }\n }\n }\n\n return result ?? \"\";\n}\n\n// decompress LZ-compressed string, or return null if input is invalid\nexport function comprLZDecode(compr: string): string | null {\n let plain = \"\";\n\n for (let i = 0; i < compr.length; ) {\n const literal_length = compr.charCodeAt(i) - 0x30;\n\n if (literal_length < 0 || literal_length > 9 || i + 1 + literal_length > compr.length) {\n return null;\n }\n\n plain += compr.substring(i + 1, i + 1 + literal_length);\n i += 1 + literal_length;\n\n if (i >= compr.length) {\n break;\n }\n const backref_length = compr.charCodeAt(i) - 0x30;\n\n if (backref_length < 0 || backref_length > 9) {\n return null;\n } else if (backref_length === 0) {\n ++i;\n } else {\n if (i + 1 >= compr.length) {\n return null;\n }\n\n const backref_offset = compr.charCodeAt(i + 1) - 0x30;\n if ((backref_length > 0 && (backref_offset < 1 || backref_offset > 9)) || backref_offset > plain.length) {\n return null;\n }\n\n for (let j = 0; j < backref_length; ++j) {\n plain += plain[plain.length - backref_offset];\n }\n\n i += 2;\n }\n }\n\n return plain;\n}\n","import * as React from \"react\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { TableCell, Tooltip, Typography } from \"@mui/material\";\nimport { characterOverviewStyles } from \"./CharacterOverview\";\nimport { ISkillProgress } from \"src/PersonObjects/formulas/skill\";\nimport { numeralWrapper } from \"../numeralFormat\";\n\ninterface IProgressProps {\n min: number;\n max: number;\n current: number;\n remaining: number;\n progress: number;\n color?: React.CSSProperties[\"color\"];\n}\n\ninterface IStatsOverviewCellProps {\n progress: ISkillProgress;\n color?: React.CSSProperties[\"color\"];\n}\n\nexport function StatsProgressBar({\n min,\n max,\n current,\n remaining,\n progress,\n color,\n}: IProgressProps): React.ReactElement {\n const tooltip = (\n \n Progress: \n {numeralWrapper.formatExp(current)} / {numeralWrapper.formatExp(max - min)}\n
\n Remaining: \n {numeralWrapper.formatExp(remaining)} ({progress.toFixed(2)}%)\n
\n );\n\n return (\n \n \n \n );\n}\n\nexport function StatsProgressOverviewCell({ progress: skill, color }: IStatsOverviewCellProps): React.ReactElement {\n const classes = characterOverviewStyles();\n return (\n \n \n \n );\n}\n","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { IPlayer } from \"../IPlayer\";\nimport { GangConstants } from \"../../Gang/data/Constants\";\n\nexport function canAccessGang(this: IPlayer): boolean {\n if (this.bitNodeN === 2) {\n return true;\n }\n if (this.sourceFileLvl(2) <= 0) {\n return false;\n }\n\n return this.karma <= GangConstants.GangKarmaRequirement;\n}\n\nexport function isAwareOfGang(this: IPlayer): boolean {\n return this.bitNodeN === 2 || this.sourceFileLvl(2) >= 1;\n}\n\nexport function getGangFaction(this: IPlayer): Faction {\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n const fac = Factions[gang.facName];\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${gang.facName}`);\n }\n\n return fac;\n}\n\nexport function getGangName(this: IPlayer): string {\n if (!this.inGang()) return \"\";\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName;\n}\n\nexport function hasGangWith(this: IPlayer, facName: string): boolean {\n if (!this.inGang()) return false;\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName === facName;\n}\n\nexport function inGang(this: IPlayer): boolean {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof Gang;\n}\n\nexport function startGang(this: IPlayer, factionName: string, hacking: boolean): void {\n this.gang = new Gang(factionName, hacking);\n\n const fac = Factions[factionName];\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n fac.playerReputation = 0;\n}\n","import { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport const defaultStyles: IStyleSettings = {\n lineHeight: 1.5,\n fontFamily:\n \"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman\",\n};\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n if (p.money < 0) {\n return 0;\n }\n\n return Math.min(p.money * 0.1, (p.max_hp - p.hp) * CONSTANTS.HospitalCostPerHp);\n}\n\nexport function calculateHospitalizationCost(p: IPlayer, damage: number): number {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nexport const PromptEvent = new EventEmitter<[Prompt]>();\n\ninterface Prompt {\n txt: string;\n options?: { type?: string; choices?: string[] };\n resolve: (result: boolean | string) => void;\n}\n\nexport function PromptManager(): React.ReactElement {\n const [prompt, setPrompt] = useState(null);\n useEffect(() => {\n return PromptEvent.subscribe((p: Prompt) => {\n setPrompt(p);\n });\n }, []);\n\n if (prompt === null) {\n return <>;\n }\n\n function close(): void {\n if (prompt === null) return;\n if ([\"text\", \"select\"].includes(prompt?.options?.type ?? \"\")) {\n prompt.resolve(\"\");\n } else {\n prompt.resolve(false);\n }\n setPrompt(null);\n }\n\n const types: { [key: string]: (props: IContentProps) => React.ReactElement } = {\n text: PromptMenuText,\n select: PromptMenuSelect,\n };\n\n let PromptContent = PromptMenuBoolean;\n if (prompt?.options?.type && [\"text\", \"select\"].includes(prompt?.options?.type))\n PromptContent = types[prompt?.options?.type];\n const resolve = (value: boolean | string): void => {\n prompt.resolve(value);\n setPrompt(null);\n };\n\n return (\n \n
\n        {prompt.txt}\n      
\n \n
\n );\n}\n\ninterface IContentProps {\n prompt: Prompt;\n resolve: (value: boolean | string) => void;\n}\n\nfunction PromptMenuBoolean({ resolve }: IContentProps): React.ReactElement {\n const yes = (): void => resolve(true);\n const no = (): void => resolve(false);\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n\nfunction PromptMenuText({ resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onInput = (event: React.ChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const onKeyDown = (event: React.KeyboardEvent): void => {\n event.stopPropagation();\n\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n submit();\n }\n };\n\n return (\n <>\n
\n Confirm,\n }}\n />\n
\n \n );\n}\n\nfunction PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onChange = (event: SelectChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const getItems = (choices: string[]): React.ReactElement[] => {\n const content: React.ReactElement[] = [];\n for (const i of choices) {\n content.push(\n \n {i}\n ,\n );\n }\n return content;\n };\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ProductRatingWeights, IProductRatingWeight } from \"./ProductRatingWeights\";\n\nimport { createCityMap } from \"../Locations/createCityMap\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\ninterface IConstructorParams {\n name?: string;\n demand?: number;\n competition?: number;\n markup?: number;\n createCity?: string;\n designCost?: number;\n advCost?: number;\n quality?: number;\n performance?: number;\n durability?: number;\n reliability?: number;\n aesthetics?: number;\n features?: number;\n loc?: string;\n size?: number;\n req?: IMap;\n}\n\nexport class Product {\n // Product name\n name = \"\";\n\n // The demand for this Product in the market. Gradually decreases\n dmd = 0;\n\n // How much competition there is in the market for this Product\n cmp = 0;\n\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n mku = 0;\n\n // Production cost - estimation of how much money it costs to make this Product\n pCost = 0;\n\n // Sell cost\n sCost: string | number = 0;\n\n // Variables for handling the creation process of this Product\n fin = false; // Whether this Product has finished being created\n prog = 0; // Creation progress - A number betwee 0-100 representing percentage\n createCity = \"\"; // City in which the product is/was being created\n designCost = 0; // How much money was invested into designing this Product\n advCost = 0; // How much money was invested into advertising this Product\n\n // The average employee productivity and scientific research across the creation of the Product\n creationProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n rat = 0;\n\n // Stats/properties of this Product\n qlt = 0;\n per = 0;\n dur = 0;\n rel = 0;\n aes = 0;\n fea = 0;\n\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n data: IMap = createCityMap([0, 0, 0]);\n\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n loc = \"\";\n\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n siz = 0;\n\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n reqMats: IMap = {};\n\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n prdman: IMap = createCityMap([false, 0]);\n sllman: IMap = createCityMap([false, 0]);\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price: IMap = createCityMap(0);\n\n // Determines the maximum amount of this product that can be sold in one market cycle\n maxsll = 0;\n constructor(params: IConstructorParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n }\n\n // Make progress on this product based on current employee productivity\n createProduct(marketCycles: number, employeeProd: typeof this[\"creationProd\"]): void {\n if (this.fin) {\n return;\n }\n\n // Designing/Creating a Product is based mostly off Engineers\n const opProd = employeeProd[EmployeePositions.Operations];\n const engrProd = employeeProd[EmployeePositions.Engineer];\n const mgmtProd = employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) {\n return;\n }\n\n // Management is a multiplier for the production from Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const prodMult = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n const progress = Math.min(marketCycles * 0.01 * prodMult, 100 - this.prog);\n if (progress <= 0) {\n return;\n }\n\n this.prog += progress;\n for (const pos of Object.keys(employeeProd)) {\n console.log(`${pos} ${this.creationProd[pos]} += ${(employeeProd[pos] * progress) / 100}`);\n this.creationProd[pos] += (employeeProd[pos] * progress) / 100;\n }\n }\n\n // @param industry - Industry object. Reference to industry that makes this Product\n finishProduct(industry: IIndustry): void {\n this.fin = true;\n\n // Calculate properties\n const totalProd = this.creationProd.total;\n const engrRatio = this.creationProd[EmployeePositions.Engineer] / totalProd;\n const mgmtRatio = this.creationProd[EmployeePositions.Management] / totalProd;\n const rndRatio = this.creationProd[EmployeePositions.RandD] / totalProd;\n const opsRatio = this.creationProd[EmployeePositions.Operations] / totalProd;\n const busRatio = this.creationProd[EmployeePositions.Business] / totalProd;\n\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = balanceMult * designMult * sciMult;\n\n this.qlt =\n totalMult *\n (0.1 * this.creationProd[EmployeePositions.Engineer] +\n 0.05 * this.creationProd[EmployeePositions.Management] +\n 0.05 * this.creationProd[EmployeePositions.RandD] +\n 0.02 * this.creationProd[EmployeePositions.Operations] +\n 0.02 * this.creationProd[EmployeePositions.Business]);\n this.per =\n totalMult *\n (0.15 * this.creationProd[EmployeePositions.Engineer] +\n 0.02 * this.creationProd[EmployeePositions.Management] +\n 0.02 * this.creationProd[EmployeePositions.RandD] +\n 0.02 * this.creationProd[EmployeePositions.Operations] +\n 0.02 * this.creationProd[EmployeePositions.Business]);\n this.dur =\n totalMult *\n (0.05 * this.creationProd[EmployeePositions.Engineer] +\n 0.02 * this.creationProd[EmployeePositions.Management] +\n 0.08 * this.creationProd[EmployeePositions.RandD] +\n 0.05 * this.creationProd[EmployeePositions.Operations] +\n 0.05 * this.creationProd[EmployeePositions.Business]);\n this.rel =\n totalMult *\n (0.02 * this.creationProd[EmployeePositions.Engineer] +\n 0.08 * this.creationProd[EmployeePositions.Management] +\n 0.02 * this.creationProd[EmployeePositions.RandD] +\n 0.05 * this.creationProd[EmployeePositions.Operations] +\n 0.08 * this.creationProd[EmployeePositions.Business]);\n this.aes =\n totalMult *\n (0.0 * this.creationProd[EmployeePositions.Engineer] +\n 0.08 * this.creationProd[EmployeePositions.Management] +\n 0.05 * this.creationProd[EmployeePositions.RandD] +\n 0.02 * this.creationProd[EmployeePositions.Operations] +\n 0.1 * this.creationProd[EmployeePositions.Business]);\n this.fea =\n totalMult *\n (0.08 * this.creationProd[EmployeePositions.Engineer] +\n 0.05 * this.creationProd[EmployeePositions.Management] +\n 0.02 * this.creationProd[EmployeePositions.RandD] +\n 0.05 * this.creationProd[EmployeePositions.Operations] +\n 0.05 * this.creationProd[EmployeePositions.Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n const busmgtgRatio = Math.max(busRatio + mgmtRatio, 1 / totalProd);\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * busmgtgRatio);\n\n // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n if (this.mku === 0 || !isFinite(this.mku)) this.mku = 1;\n\n this.dmd =\n industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = getRandomInt(0, 70);\n\n //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n for (const matName of Object.keys(industry.reqMats)) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n }\n\n //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n this.siz = 0;\n for (const matName of Object.keys(industry.reqMats)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += MaterialSizes[matName] * reqMat;\n }\n }\n\n calculateRating(industry: IIndustry): void {\n const weights: IProductRatingWeight = ProductRatingWeights[industry.type];\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Product\", this);\n }\n\n // Initiatizes a Product object from a JSON save state.\n static fromJSON(value: IReviverValue): Product {\n return Generic_fromJSON(Product, value.data);\n }\n}\n\nReviver.constructors.Product = Product;\n","import { IIndustry } from \"../IIndustry\";\n\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nexport function isRelevantMaterial(matName: string, division: IIndustry): boolean {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\", \"AI Cores\", \"Real Estate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n if (division.prodMats.includes(matName)) {\n return true;\n }\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { find } from \"lodash\";\n\nimport { Box, Typography, Button, Container, Paper } from \"@mui/material\";\nimport { Check, Lock, Create } from \"@mui/icons-material\";\n\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { Programs } from \"../Programs\";\nimport { CreateProgramWork } from \"../../Work/CreateProgramWork\";\n\nexport const ProgramsSeen: string[] = [];\n\nexport function ProgramsRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const programs = [...Object.values(Programs)]\n .filter((prog) => {\n const create = prog.create;\n if (create === null) return false;\n if (prog.name === \"b1t_flum3.exe\") {\n return create.req(player);\n }\n return true;\n })\n .sort((a, b) => {\n if (player.hasProgram(a.name)) return 1;\n if (player.hasProgram(b.name)) return -1;\n return (a.create?.level ?? 0) - (b.create?.level ?? 0);\n });\n\n useEffect(() => {\n programs.forEach((p) => {\n if (ProgramsSeen.includes(p.name)) return;\n ProgramsSeen.push(p.name);\n });\n }, []);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const getHackingLevelRemaining = (lvl: number): number => {\n return Math.ceil(Math.max(lvl - (player.hacking + player.intelligence / 2), 0));\n };\n\n const getProgCompletion = (name: string): number => {\n const programFile = find(player.getHomeComputer().programs, (p) => {\n return p.startsWith(name) && p.endsWith(\"%-INC\");\n });\n if (!programFile) return -1;\n\n const res = programFile.split(\"-\");\n if (res.length != 3) return -1;\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n return -1;\n }\n return percComplete;\n };\n\n return (\n \n Create program\n \n This page displays any programs that you are able to create. Writing the code for a program takes time, which\n can vary based on how complex the program is. If you are working on creating a program you can cancel at any\n time. Your progress will be saved and you can continue later.\n \n\n \n {programs.map((program) => {\n const create = program.create;\n if (create === null) return <>;\n const curCompletion = getProgCompletion(program.name);\n\n return (\n \n \n {(player.hasProgram(program.name) && ) ||\n (create.req(player) && ) || }\n {program.name}\n \n {!player.hasProgram(program.name) && create.req(player) && (\n {\n if (!event.isTrusted) return;\n player.startWork(\n new CreateProgramWork({ player: player, singularity: false, programName: program.name }),\n );\n player.startFocusing();\n router.toWork();\n }}\n >\n Create program\n \n )}\n {player.hasProgram(program.name) || getHackingLevelRemaining(create.level) === 0 || (\n \n Unlocks in: {getHackingLevelRemaining(create.level)} hacking levels\n \n )}\n {curCompletion !== -1 && (\n \n Current completion: {curCompletion}%\n \n )}\n {create.tooltip}\n \n );\n })}\n \n \n );\n}\n","import { Explore, Info, LastPage, LocalPolice, NewReleases, Report, SportsMma } from \"@mui/icons-material\";\nimport { Box, Button, Container, Paper, Tooltip, Typography, useTheme } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IRouter } from \"../../ui/Router\";\nimport { FactionNames } from \"../data/FactionNames\";\nimport { Faction } from \"../Faction\";\nimport { getFactionAugmentationsFiltered, joinFaction } from \"../FactionHelpers\";\nimport { Factions } from \"../Factions\";\n\nexport const InvitationsSeen: string[] = [];\n\nconst getAugsLeft = (faction: Faction, player: IPlayer): number => {\n const augs = getFactionAugmentationsFiltered(player, faction);\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation)).length;\n};\n\ninterface IWorkTypeProps {\n faction: Faction;\n}\n\nconst fontSize = \"small\";\nconst marginRight = 0.5;\n\nconst WorkTypesOffered = (props: IWorkTypeProps): React.ReactElement => {\n const info = props.faction.getInfo();\n\n return (\n <>\n {info.offerFieldWork && (\n \n \n \n )}\n {info.offerHackingWork && (\n \n \n \n )}\n {info.offerSecurityWork && (\n \n \n \n )}\n \n );\n};\n\ninterface IFactionProps {\n player: IPlayer;\n router: IRouter;\n faction: Faction;\n\n joined: boolean;\n\n rerender: () => void;\n}\n\nconst FactionElement = (props: IFactionProps): React.ReactElement => {\n const facInfo = props.faction.getInfo();\n\n function openFaction(faction: Faction): void {\n props.router.toFaction(faction);\n }\n\n function openFactionAugPage(faction: Faction): void {\n props.router.toFaction(faction, true);\n }\n\n function acceptInvitation(event: React.MouseEvent, faction: string): void {\n if (!event.isTrusted) return;\n joinFaction(Factions[faction]);\n props.rerender();\n }\n\n return (\n \n \n {props.joined ? (\n \n \n \n \n ) : (\n \n )}\n\n \n \n \n {props.faction.name}\n \n\n \n {props.player.hasGangWith(props.faction.name) && (\n \n \n \n )}\n\n {facInfo.special && (\n \n \n \n )}\n\n {!props.joined && facInfo.enemies.length > 0 && (\n \n This Faction is enemies with:\n
    \n {facInfo.enemies.map((enemy) => (\n
  • {enemy}
  • \n ))}\n
\n Joining this Faction will prevent you from joining its enemies\n \n }\n >\n \n \n )}\n
\n \n\n \n {!props.player.hasGangWith(props.faction.name) && }\n\n {props.joined && (\n \n {getAugsLeft(props.faction, props.player)} Augmentations left\n \n )}\n \n \n \n\n {props.joined && (\n \n \n {numeralWrapper.formatFavor(props.faction.favor)} favor\n \n \n {numeralWrapper.formatReputation(props.faction.playerReputation)} rep\n \n \n )}\n \n );\n};\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function FactionsRoot(props: IProps): React.ReactElement {\n const theme = useTheme();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n useEffect(() => {\n props.player.factionInvitations.forEach((faction) => {\n if (InvitationsSeen.includes(faction)) return;\n InvitationsSeen.push(faction);\n });\n }, []);\n\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n const allJoinedFactions = [...props.player.factions];\n allJoinedFactions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n const invitations = props.player.factionInvitations;\n\n return (\n \n \n Factions\n \n Throughout the game you may receive invitations from factions. There are many different factions, and each\n faction has different criteria for determining its potential members. Joining a faction and furthering its\n cause is crucial to progressing in the game and unlocking endgame content.\n \n }\n >\n \n \n \n\n 0 ? \"1fr \" : \"\") + \"2fr\",\n [theme.breakpoints.down(\"lg\")]: { gridTemplateColumns: \"1fr\", \"& > span:nth-child(1)\": { order: 1 } },\n gridTemplateRows: \"minmax(0, 1fr)\",\n \"& > span > .MuiBox-root\": {\n display: \"grid\",\n gridAutoRows: \"70px\",\n gap: 1,\n },\n }}\n >\n {invitations.length > 0 && (\n \n \n Faction Invitations\n \n \n {invitations.map((facName) => {\n if (!Factions.hasOwnProperty(facName)) return null;\n return (\n \n );\n })}\n \n \n )}\n\n \n \n Your Factions\n \n \n {allJoinedFactions.length > 0 ? (\n allJoinedFactions.map((facName) => {\n if (!Factions.hasOwnProperty(facName)) return null;\n return (\n \n );\n })\n ) : (\n You have not yet joined any Factions.\n )}\n \n \n \n \n );\n}\n","import LinearProgress from \"@mui/material/LinearProgress\";\nimport { Theme } from \"@mui/material/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nexport const ProgressBar = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n },\n bar: {\n transition: \"none\",\n backgroundColor: theme.palette.primary.main,\n },\n}))(LinearProgress);\n","/**\n * Implementation for what happens when you destroy a BitNode\n */\nimport React from \"react\";\nimport { Player } from \"./Player\";\nimport { prestigeSourceFile } from \"./Prestige\";\nimport { PlayerOwnedSourceFile } from \"./SourceFile/PlayerOwnedSourceFile\";\nimport { SourceFiles } from \"./SourceFile/SourceFiles\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { IRouter } from \"./ui/Router\";\n\nfunction giveSourceFile(bitNodeNumber: number): void {\n const sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n const sourceFile = SourceFiles[sourceFileKey];\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n }\n\n // Check if player already has this source file\n let alreadyOwned = false;\n let ownedSourceFile = null;\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n if (Player.sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = Player.sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n dialogBoxCreate(\n `The Source-File for the BitNode you just destroyed, ${sourceFile.name}, is already at max level!`,\n );\n } else {\n ++ownedSourceFile.lvl;\n dialogBoxCreate(\n sourceFile.name +\n \" was upgraded to level \" +\n ownedSourceFile.lvl +\n \" for \" +\n \"destroying its corresponding BitNode!\",\n );\n }\n } else {\n const playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);\n Player.sourceFiles.push(playerSrcFile);\n if (bitNodeNumber === 5 && Player.intelligence === 0) {\n // Artificial Intelligence\n Player.intelligence = 1;\n }\n dialogBoxCreate(\n <>\n You received a Source-File for destroying a BitNode!\n
\n
\n {sourceFile.name}\n
\n
\n {sourceFile.info}\n ,\n );\n }\n}\n\nexport function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else if (Player.sourceFileLvl(5) === 0 && newBitNode !== 5) {\n Player.intelligence = 0;\n Player.intelligence_exp = 0;\n }\n if (newBitNode === 5 && Player.intelligence === 0) {\n Player.intelligence = 1;\n }\n // Set new Bit Node\n Player.bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n prestigeSourceFile(flume);\n}\n","import React, { useEffect } from \"react\";\n\nimport { Typography, Link, Button, ButtonGroup, Tooltip, Box, Paper, TextField } from \"@mui/material\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { load } from \"../../db\";\nimport { IRouter } from \"../Router\";\nimport { download } from \"../../SaveObject\";\nimport { IErrorData, newIssueUrl } from \"../../utils/ErrorHelper\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\n\nimport DirectionsRunIcon from \"@mui/icons-material/DirectionsRun\";\nimport GitHubIcon from \"@mui/icons-material/GitHub\";\n\nexport let RecoveryMode = false;\n\nexport function ActivateRecoveryMode(): void {\n RecoveryMode = true;\n}\n\ninterface IProps {\n router: IRouter;\n softReset: () => void;\n errorData?: IErrorData;\n resetError?: () => void;\n}\n\nexport function RecoveryRoot({ router, softReset, errorData, resetError }: IProps): React.ReactElement {\n function recover(): void {\n if (resetError) resetError();\n RecoveryMode = false;\n router.toTerminal();\n }\n Settings.AutosaveInterval = 0;\n\n useEffect(() => {\n load()\n .then((content) => {\n const epochTime = Math.round(Date.now() / 1000);\n const filename = `RECOVERY_BITBURNER_${epochTime}.json`;\n download(filename, content);\n })\n .catch((err) => console.error(err));\n }, []);\n\n return (\n \n RECOVERY MODE ACTIVATED\n \n There was an error with your save file and the game went into recovery mode. In this mode saving is disabled and\n the game will automatically export your save file (to prevent corruption).\n \n At this point it is recommended to alert a developer.\n \n \n File an issue on github\n \n \n \n \n Make a reddit post\n \n \n \n \n Post in the #bug-report channel on Discord.\n \n \n Please include your save file.\n
\n
\n You can disable recovery mode now. But chances are the game will not work correctly.\n \n \n \n \n \n \n \n\n {errorData && (\n \n {errorData.title}\n \n \n \n \n }\n color=\"info\"\n sx={{ px: 2 }}\n href={errorData.issueUrl ?? newIssueUrl}\n target={\"_blank\"}\n >\n Submit Issue to GitHub\n \n \n \n )}\n
\n );\n}\n","import { CalculateShareMult as CSM } from \"./formulas/share\";\n\nexport let sharePower = 1;\n\nexport function StartSharing(threads: number): () => void {\n sharePower += threads;\n return () => (sharePower -= threads);\n}\n\nexport function CalculateShareMult(): number {\n return CSM(sharePower);\n}\n","/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\nimport { Environment } from \"./Environment\";\nimport { RamCostConstants } from \"./RamCostGenerator\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { IMap } from \"../types\";\nimport { NS } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { ScriptDeath } from \"./ScriptDeath\";\nimport { ScriptArg } from \"./ScriptArg\";\n\nexport class WorkerScript {\n /**\n * Script's arguments\n */\n args: ScriptArg[];\n\n /**\n * Copy of the script's code\n */\n code = \"\";\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n delay: number | null = null;\n\n /**\n * Holds the Promise reject() function while the script is \"blocked\" by an async op\n */\n delayReject?: (reason?: ScriptDeath) => void;\n\n /**\n * Stores names of all functions that have logging disabled\n */\n disableLogs: IMap = {};\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n dynamicLoadedFns: IMap = {};\n\n /**\n * Tracks dynamic RAM usage\n */\n dynamicRamUsage: number = RamCostConstants.ScriptBaseRamCost;\n\n /**\n * Netscript Environment for this script\n */\n env: Environment;\n\n /**\n * Status message in case of script error.\n */\n errorMessage = \"\";\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n loadedFns: IMap = {};\n\n /**\n * Filename of script\n */\n name: string;\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n output = \"\";\n\n /**\n * Process ID. Must be an integer. Used for efficient script\n * killing and removal.\n */\n pid: number;\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n ramUsage = 0;\n\n /**\n * Whether or not this workerScript is currently running\n */\n running = false;\n\n /**\n * Reference to underlying RunningScript object\n */\n scriptRef: RunningScript;\n\n /**\n * hostname on which this script is running\n */\n hostname: string;\n\n /**\n * Function called when the script ends.\n */\n atExit?: () => void;\n\n constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => NS) {\n this.name = runningScriptObj.filename;\n this.hostname = runningScriptObj.server;\n\n const sanitizedPid = Math.round(pid);\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid;\n\n // Get the underlying script's code\n const server = GetServer(this.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.hostname}`);\n }\n let found = false;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n this.env = new Environment();\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n }\n\n /**\n * Returns the Server on which this script is running\n */\n getServer(): BaseServer {\n const server = GetServer(this.hostname);\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n getScript(): Script | null {\n const server = this.getServer();\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\n \"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\",\n );\n return null;\n }\n\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n getScriptOnServer(fn: string, server: BaseServer): Script | null {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn: string): boolean {\n return this.disableLogs[fn] == null;\n }\n\n log(func: string, txt: () => string): void {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt()}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt());\n }\n }\n }\n\n print(txt: string): void {\n this.scriptRef.log(txt);\n }\n}\n","import { CorporationState } from \"./CorporationState\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"./data/CorporationUpgrades\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { Industry } from \"./Industry\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { showLiterature } from \"../Literature/LiteratureHelpers\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { isString } from \"../utils/helpers/isString\";\n\ninterface IParams {\n name?: string;\n}\n\nexport class Corporation {\n name = \"The Corporation\";\n\n //A division/business sector is represented by the object:\n divisions: Industry[] = [];\n\n //Financial stats\n funds = 150e9;\n revenue = 0;\n expenses = 0;\n fundingRound = 0;\n public = false; //Publicly traded\n totalShares = CorporationConstants.INITIALSHARES; // Total existing shares\n numShares = CorporationConstants.INITIALSHARES; // Total shares owned by player\n shareSalesUntilPriceUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n shareSaleCooldown = 0; // Game cycles until player can sell shares again\n issueNewSharesCooldown = 0; // Game cycles until player can issue shares again\n dividendRate = 0;\n dividendTax = 1 - BitNodeMultipliers.CorporationSoftcap + 0.15;\n issuedShares = 0;\n sharePrice = 0;\n storedCycles = 0;\n\n unlockUpgrades: number[];\n upgrades: number[];\n upgradeMultipliers: number[];\n\n avgProfit = 0;\n\n state = new CorporationState();\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(CorporationUnlockUpgrades).length;\n const numUpgrades = Object.keys(CorporationUpgrades).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt: number): void {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n this.funds = this.funds + amt;\n }\n\n getState(): string {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1): void {\n this.storedCycles += numCycles;\n }\n\n process(player: IPlayer): void {\n if (this.storedCycles >= CorporationConstants.CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * CorporationConstants.CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n\n this.divisions.forEach((ind) => {\n ind.process(marketCycles, state, this);\n });\n\n // Process cooldowns\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n }\n\n //At the start of a new cycle, calculate profits from previous cycle\n if (state === \"START\") {\n this.revenue = 0;\n this.expenses = 0;\n this.divisions.forEach((ind) => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n this.revenue = this.revenue + ind.lastCycleRevenue;\n this.expenses = this.expenses + ind.lastCycleExpenses;\n });\n const profit = this.revenue - this.expenses;\n this.avgProfit =\n (this.avgProfit * (CorporationConstants.AvgProfitLength - 1) + profit) / CorporationConstants.AvgProfitLength;\n const cycleProfit = profit * (marketCycles * CorporationConstants.SecsPerMarketCycle);\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n dialogBoxCreate(\n \"There was an error calculating your Corporations funds and they got reset to 0. \" +\n \"This is a bug. Please report to game developer.

\" +\n \"(Your funds have been set to $150b for the inconvenience)\",\n );\n this.funds = 150e9;\n }\n\n // Process dividends\n this.updateDividendTax();\n if (this.dividendRate > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (\n isNaN(this.dividendRate) ||\n this.dividendRate < 0 ||\n this.dividendRate > CorporationConstants.DividendMaxRate\n ) {\n console.error(`Invalid Corporation dividend rate: ${this.dividendRate}`);\n } else {\n const totalDividends = this.dividendRate * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n player.gainMoney(this.getCycleDividends(), \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n updateDividendTax(): void {\n this.dividendTax = 1 - BitNodeMultipliers.CorporationSoftcap + 0.15;\n if (this.unlockUpgrades[5] === 1) {\n this.dividendTax -= 0.05;\n }\n if (this.unlockUpgrades[6] === 1) {\n this.dividendTax -= 0.1;\n }\n }\n\n getCycleDividends(): number {\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;\n const totalDividends = this.dividendRate * cycleProfit;\n const dividendsPerShare = totalDividends / this.totalShares;\n const dividends = this.numShares * dividendsPerShare;\n return Math.pow(dividends, 1 - this.dividendTax);\n }\n\n determineValuation(): number {\n let val,\n profit = this.avgProfit;\n if (this.public) {\n // Account for dividends\n if (this.dividendRate > 0) {\n profit *= 1 - this.dividendRate;\n }\n\n val = this.funds + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds, 0) / 3; //Base valuation\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n val -= val % 1e6; //Round down to nearest millionth\n }\n return val * BitNodeMultipliers.CorporationValuation;\n }\n\n getTargetSharePrice(): number {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice(): void {\n const targetPrice = this.getTargetSharePrice();\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice(): void {\n this.sharePrice = this.getTargetSharePrice();\n }\n\n // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n calculateShareSale(numShares: number): [number, number, number] {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n\n const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE);\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(\n `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`,\n );\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate;\n\n // Calculate what new share price would be\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd: number): string {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n }\n\n //One time upgrades that unlock new features\n unlock(upgrade: CorporationUnlockUpgrade): void {\n const upgN = upgrade.index,\n price = upgrade.price;\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n if (this.funds < price) {\n dialogBoxCreate(\"You don't have enough funds to unlock this!\");\n return;\n }\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds - price;\n\n // Apply effects for one-time upgrades\n this.updateDividendTax();\n }\n\n //Levelable upgrades\n upgrade(upgrade: CorporationUpgrade): void {\n const upgN = upgrade.index,\n basePrice = upgrade.basePrice,\n priceMult = upgrade.priceMult,\n upgradeAmt = upgrade.benefit; //Amount by which the upgrade multiplier gets increased (additive)\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n if (this.funds < totalCost) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds - totalCost;\n\n //Increase upgrade multiplier\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt;\n\n //If storage size is being updated, update values in Warehouse objects\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n for (const city of Object.keys(industry.warehouses)) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof Warehouse) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier(): number {\n const mult = this.upgradeMultipliers[0];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier(): number {\n const mult = this.upgradeMultipliers[1];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain(): number {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier(): number {\n const mult = this.upgradeMultipliers[3];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier(): number {\n const mult = this.upgradeMultipliers[4];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier(): number {\n const mult = this.upgradeMultipliers[5];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier(): number {\n const mult = this.upgradeMultipliers[6];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier(): number {\n const mult = this.upgradeMultipliers[7];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier(): number {\n const mult = this.upgradeMultipliers[8];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier(): number {\n const mult = this.upgradeMultipliers[9];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n getStarterGuide(player: IPlayer): void {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = LiteratureNames.CorporationManagementHandbook;\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n showLiterature(handbookFn);\n return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Corporation\", this);\n }\n\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Corporation {\n return Generic_fromJSON(Corporation, value.data);\n }\n}\n\nReviver.constructors.Corporation = Corporation;\n","import { BladeburnerConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\n\ninterface IChangePopulationByCountParams {\n estChange: number;\n estOffset: number;\n}\n\ninterface IChangePopulationByPercentageParams {\n nonZero: boolean;\n changeEstEqually: boolean;\n}\n\nexport class City {\n /**\n * Name of the city.\n */\n name = \"\";\n\n /**\n * Population of the city.\n */\n pop = 0;\n\n /**\n * Population estimation of the city.\n */\n popEst = 0;\n\n /**\n * Number of communities in the city.\n */\n comms = 0;\n\n /**\n * Chaos level of the city.\n */\n chaos = 0;\n\n constructor(name: string = BladeburnerConstants.CityNames[2]) {\n this.name = name;\n\n // Synthoid population and estimate\n this.pop = getRandomInt(BladeburnerConstants.PopulationThreshold, 1.5 * BladeburnerConstants.PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5);\n\n // Number of Synthoid communities population and estimate\n this.comms = getRandomInt(5, 150);\n this.chaos = 0;\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n changeChaosByPercentage(p: number): void {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n if (p === 0) {\n return;\n }\n this.chaos += this.chaos * (p / 100);\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n if (this.popEst < this.pop) {\n this.popEst += n;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n improvePopulationEstimateByPercentage(p: number, skillMult = 1): void {\n p = p * skillMult;\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n this.popEst *= 1 + p / 100;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n changePopulationByCount(n: number, params: IChangePopulationByCountParams = { estChange: 0, estOffset: 0 }): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n this.pop += n;\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n if (params.estOffset) {\n this.popEst = addOffset(this.popEst, params.estOffset);\n }\n this.popEst = Math.max(this.popEst, 0);\n }\n\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n changePopulationByPercentage(\n p: number,\n params: IChangePopulationByPercentageParams = {\n nonZero: false,\n changeEstEqually: false,\n },\n ): number {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n if (p === 0) {\n return 0;\n }\n let change = Math.round(this.pop * (p / 100));\n\n // Population always changes by at least 1\n if (params.nonZero && change === 0) {\n p > 0 ? (change = 1) : (change = -1);\n }\n\n this.pop += change;\n if (params.changeEstEqually) {\n this.popEst += change;\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n return change;\n }\n\n changeChaosByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n if (n === 0) {\n return;\n }\n this.chaos += n;\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"City\", this);\n }\n\n /**\n * Initiatizes a City object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): City {\n return Generic_fromJSON(City, value.data);\n }\n}\n\nReviver.constructors.City = City;\n","/**\n * Class representing a City in the game\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\n\nexport class City {\n /**\n * List of all locations in this city\n */\n locations: LocationName[];\n\n /**\n * Name of this city\n */\n name: CityName;\n\n /**\n * Metro map ascii art\n */\n asciiArt: string;\n\n constructor(name: CityName, locations: LocationName[] = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc: LocationName): void {\n this.locations.push(loc);\n }\n}\n","import { Slider, Tooltip, Typography, Box } from \"@mui/material\";\nimport React, { useState } from \"react\";\n\ninterface IProps {\n initialValue: number;\n callback: (event: Event | React.SyntheticEvent, newValue: number | number[]) => void;\n step: number;\n min: number;\n max: number;\n tooltip: React.ReactElement;\n label: string;\n marks?: boolean;\n}\n\nexport const OptionsSlider = (props: IProps): React.ReactElement => {\n const [value, setValue] = useState(props.initialValue);\n\n const onChange = (_evt: Event, newValue: number | Array): void => {\n if (typeof newValue === \"number\") setValue(newValue);\n };\n\n return (\n \n {props.tooltip}}>\n {props.label}\n \n \n \n );\n};\n","/**\n * React component for the tickers configuration section of the Stock Market UI.\n * This config lets you change the way stock tickers are displayed (watchlist,\n * all/portoflio mode, etc)\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\nexport enum TickerDisplayMode {\n AllStocks,\n Portfolio,\n}\n\ntype IProps = {\n changeDisplayMode: () => void;\n changeWatchlistFilter: (e: React.ChangeEvent) => void;\n tickerDisplayMode: TickerDisplayMode;\n};\n\nfunction DisplayModeButton(props: IProps): React.ReactElement {\n let txt = \"\";\n let tooltip = \"\";\n if (props.tickerDisplayMode === TickerDisplayMode.Portfolio) {\n txt = \"Switch to 'All Stocks' Mode\";\n tooltip = \"Displays all stocks on the WSE\";\n } else {\n txt = \"Switch to 'Portfolio' Mode\";\n tooltip = \"Displays only the stocks for which you have shares or orders\";\n }\n\n return (\n {tooltip}}>\n \n \n );\n}\n\nexport function StockTickersConfig(props: IProps): React.ReactElement {\n return (\n <>\n \n
\n \n \n );\n}\n","/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\n\nexport function hasTorRouter(this: IPlayer): boolean {\n return this.getHomeComputer().serversOnNetwork.includes(SpecialServers.DarkWeb);\n}\n\nexport function getCurrentServer(this: IPlayer): BaseServer {\n const server = GetServer(this.currentServer);\n if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);\n return server;\n}\n\nexport function getHomeComputer(this: IPlayer): Server {\n const home = GetServer(\"home\");\n if (home instanceof Server) return home;\n throw new Error(\"home computer was not a normal server\");\n}\n\nexport function getUpgradeHomeRamCost(this: IPlayer): number {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam);\n\n //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;\n return cost;\n}\n\nexport function getUpgradeHomeCoresCost(this: IPlayer): number {\n return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);\n}\n\nexport function createHacknetServer(this: IPlayer): HacknetServer {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new HacknetServer({\n adminRights: true,\n hostname: name,\n ip: createUniqueRandomIp(),\n // player: this,\n });\n this.hacknetNodes.push(server.hostname);\n\n // Configure the HacknetServer to actually act as a Server\n AddToAllServers(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.hostname);\n server.serversOnNetwork.push(SpecialServers.Home);\n\n return server;\n}\n","import { FactionNames } from \"./Faction/data/FactionNames\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { StaticAugmentations } from \"./Augmentation/StaticAugmentations\";\nimport { augmentationExists, initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Companies, initCompanies } from \"./Company/Companies\";\nimport { resetIndustryResearchTrees } from \"./Corporation/IndustryData\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Faction } from \"./Faction/Faction\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { joinFaction } from \"./Faction/FactionHelpers\";\nimport { updateHashManagerCapacity } from \"./Hacknet/HacknetHelpers\";\nimport { prestigeWorkerScripts } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { resetPidCounter } from \"./Netscript/Pid\";\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { GetServer, AddToAllServers, initForeignServers, prestigeAllServers } from \"./Server/AllServers\";\nimport { prestigeHomeComputer } from \"./Server/ServerHelpers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { deleteStockMarket, initStockMarket, initSymbolToStockMap } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { ProgramsSeen } from \"./Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"./Faction/ui/FactionsRoot\";\nimport { CONSTANTS } from \"./Constants\";\nimport { LogBoxClearEvents } from \"./ui/React/LogBoxManager\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nexport function prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.concat(Player.factionInvitations).filter(function (faction) {\n return Factions[faction].getInfo().keep;\n });\n Player.prestigeAugmentation();\n\n // Delete all Worker Scripts objects\n prestigeWorkerScripts();\n\n const homeComp = Player.getHomeComputer();\n // Delete all servers except home computer\n prestigeAllServers();\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n if (augmentationExists(AugmentationNames.Neurolink) && Player.hasAugmentation(AugmentationNames.Neurolink)) {\n homeComp.programs.push(Programs.FTPCrackProgram.name);\n homeComp.programs.push(Programs.RelaySMTPProgram.name);\n }\n if (augmentationExists(AugmentationNames.CashRoot) && Player.hasAugmentation(AugmentationNames.CashRoot)) {\n Player.setMoney(1e6);\n homeComp.programs.push(Programs.BruteSSHProgram.name);\n }\n if (augmentationExists(AugmentationNames.PCMatrix) && Player.hasAugmentation(AugmentationNames.PCMatrix)) {\n homeComp.programs.push(Programs.DeepscanV1.name);\n homeComp.programs.push(Programs.AutoLink.name);\n }\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n // Gain favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].gainFavor();\n }\n }\n\n // Gain favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].gainFavor();\n }\n }\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factionInvitations = Player.factionInvitations.concat(maintainMembership);\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Apply entropy from grafting\n Player.applyEntropy(Player.entropy);\n\n // Gang\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n const faction = Factions[gang.facName];\n if (faction instanceof Faction) {\n joinFaction(faction);\n }\n const penalty = 0.95;\n for (const m of gang.members) {\n m.hack_asc_points *= penalty;\n m.str_asc_points *= penalty;\n m.def_asc_points *= penalty;\n m.dex_asc_points *= penalty;\n m.agi_asc_points *= penalty;\n m.cha_asc_points *= penalty;\n }\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n }\n\n // Cancel Bladeburner action\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.prestige();\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || Player.sourceFileLvl(8) > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Reset Stock market\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n }\n\n // Red Pill\n if (augmentationExists(AugmentationNames.TheRedPill) && Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n const WorldDaemon = GetServer(SpecialServers.WorldDaemon);\n const DaedalusServer = GetServer(SpecialServers.DaedalusServer);\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.hostname);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.hostname);\n }\n }\n\n if (augmentationExists(AugmentationNames.StaneksGift1) && Player.hasAugmentation(AugmentationNames.StaneksGift1)) {\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n }\n\n staneksGift.prestigeAugmentation();\n\n resetPidCounter();\n ProgramsSeen.splice(0, ProgramsSeen.length);\n InvitationsSeen.splice(0, InvitationsSeen.length);\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nexport function prestigeSourceFile(flume: boolean): void {\n initBitNodeMultipliers(Player);\n\n Player.prestigeSourceFile();\n prestigeWorkerScripts(); // Delete all Worker Scripts objects\n\n const homeComp = Player.getHomeComputer();\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Delete all servers except home computer\n prestigeAllServers(); // Must be done before initForeignServers()\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n if (Player.sourceFileLvl(9) >= 2) {\n homeComp.setMaxRam(128);\n } else if (Player.sourceFileLvl(1) > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n homeComp.cpuCores = 1;\n\n // Reset favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].favor = 0;\n }\n }\n\n // Reset favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].favor = 0;\n }\n }\n\n // Stop a Terminal action if there is one\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n\n // Delete all Augmentations\n for (const name of Object.keys(StaticAugmentations)) {\n if (StaticAugmentations.hasOwnProperty(name)) {\n delete StaticAugmentations[name];\n }\n }\n\n // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n if (Player.sourceFileLvl(12) > 0) {\n Player.augmentations.push({\n name: AugmentationNames.NeuroFluxGovernor,\n level: Player.sourceFileLvl(12),\n });\n }\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n dialogBoxCreate(\n \"You received a copy of the Corporation Management Handbook on your home computer. \" +\n \"Read it if you need help getting started with Corporations!\",\n );\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || Player.sourceFileLvl(8) > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Bit Node 10: Digital Carbon\n if (Player.bitNodeN === 10) {\n dialogBoxCreate(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n }\n\n if (Player.bitNodeN === 13) {\n dialogBoxCreate(`Trouble is brewing in ${CityName.Chongqing}`);\n }\n\n // Reset Stock market, gang, and corporation\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n } else {\n deleteStockMarket();\n }\n\n Player.gang = null;\n Player.corporation = null;\n resetIndustryResearchTrees();\n Player.bladeburner = null;\n\n // Source-File 9 (level 3) effect\n if (Player.sourceFileLvl(9) >= 3) {\n const hserver = Player.createHacknetServer();\n\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(Player.mults.hacknet_node_money);\n hserver.updateHashCapacity();\n updateHashManagerCapacity(Player);\n }\n\n if (Player.bitNodeN === 13) {\n Player.money = CONSTANTS.TravelCost;\n }\n staneksGift.prestigeSourceFile();\n\n // Gain int exp\n if (Player.sourceFileLvl(5) !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n","import { Player } from \"../Player\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IAction, ISuccessChanceParams } from \"./IAction\";\nimport { IPerson } from \"../PersonObjects/IPerson\";\n\nclass StatsMultiplier {\n [key: string]: number;\n\n hack = 0;\n str = 0;\n def = 0;\n dex = 0;\n agi = 0;\n cha = 0;\n int = 0;\n}\n\nexport interface IActionParams {\n name?: string;\n level?: number;\n maxLevel?: number;\n autoLevel?: boolean;\n baseDifficulty?: number;\n difficultyFac?: number;\n rewardFac?: number;\n successes?: number;\n failures?: number;\n rankGain?: number;\n rankLoss?: number;\n hpLoss?: number;\n hpLost?: number;\n isStealth?: boolean;\n isKill?: boolean;\n count?: number;\n weights?: StatsMultiplier;\n decays?: StatsMultiplier;\n teamCount?: number;\n}\n\nexport class Action implements IAction {\n name = \"\";\n\n // Difficulty scales with level. See getDifficulty() method\n level = 1;\n maxLevel = 1;\n autoLevel = true;\n baseDifficulty = 100;\n difficultyFac = 1.01;\n\n // Rank increase/decrease is affected by this exponent\n rewardFac = 1.02;\n\n successes = 0;\n failures = 0;\n\n // All of these scale with level/difficulty\n rankGain = 0;\n rankLoss = 0;\n hpLoss = 0;\n hpLost = 0;\n\n // Action Category. Current categories are stealth and kill\n isStealth = false;\n isKill = false;\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n count: number = getRandomInt(1e3, 25e3);\n\n // Weighting of each stat in determining action success rate\n weights: StatsMultiplier = {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7,\n };\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n decays: StatsMultiplier = {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9,\n };\n teamCount = 0;\n\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params: IActionParams | null = null) {\n // | null = null\n if (params && params.name) this.name = params.name;\n\n if (params && params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n\n if (params && params.count) this.count = params.count;\n\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays;\n\n // Check to make sure weights are summed properly\n let sum = 0;\n for (const weight of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\n \"Invalid weights when constructing Action \" +\n this.name +\n \". The weights should sum up to 1. They sum up to :\" +\n 1,\n );\n }\n\n for (const decay of Object.keys(this.decays)) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(`Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`);\n }\n }\n }\n }\n\n getDifficulty(): number {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n return difficulty;\n }\n\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n attempt(inst: IBladeburner, person: IPerson): boolean {\n return Math.random() < this.getSuccessChance(inst, person);\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1;\n }\n\n getActionTime(inst: IBladeburner, person: IPerson): number {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = person.agility * inst.skillMultipliers.effAgi;\n const effDexterity = person.dexterity * inst.skillMultipliers.effDex;\n const statFac =\n 0.5 *\n (Math.pow(effAgility, BladeburnerConstants.EffAgiExponentialFactor) +\n Math.pow(effDexterity, BladeburnerConstants.EffDexExponentialFactor) +\n effAgility / BladeburnerConstants.EffAgiLinearFactor +\n effDexterity / BladeburnerConstants.EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, (baseTime * skillFac) / statFac);\n\n return Math.ceil(baseTime * this.getActionTimePenalty());\n }\n\n // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getTeamSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n getChaosCompetencePenalty(inst: IBladeburner, params: ISuccessChanceParams): number {\n const city = inst.getCurrentCity();\n if (params.est) {\n return Math.pow(city.popEst / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n } else {\n return Math.pow(city.pop / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner, person: IPerson): [number, number] {\n function clamp(x: number): number {\n return Math.max(0, Math.min(x, 1));\n }\n const est = this.getSuccessChance(inst, person, { est: true });\n const real = this.getSuccessChance(inst, person);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;\n else high *= r;\n return [clamp(low), clamp(high)];\n }\n\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n getSuccessChance(inst: IBladeburner, person: IPerson, params: ISuccessChanceParams = { est: false }): number {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n let difficulty = this.getDifficulty();\n let competence = 0;\n for (const stat of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = person.queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n competence *= Player.getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n\n competence *= this.getTeamSuccessBonus(inst);\n\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n }\n\n // Factor skill multipliers into success chance\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n }\n\n // Augmentation multiplier\n competence *= Player.mults.bladeburner_success_chance;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel: number): number {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel: number): void {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Action\", this);\n }\n\n static fromJSON(value: IReviverValue): Action {\n return Generic_fromJSON(Action, value.data);\n }\n}\n\nReviver.constructors.Action = Action;\n","import { RunningScript } from \"src/Script/RunningScript\";\nimport { Settings } from \"../Settings/Settings\";\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const recentScripts: RecentScript[] = [];\n\nexport function AddRecentScript(workerScript: WorkerScript): void {\n if (recentScripts.find((r) => r.runningScript.pid === workerScript.pid)) return;\n\n const killedTime = new Date();\n recentScripts.unshift({\n timeOfDeath: killedTime,\n runningScript: workerScript.scriptRef,\n });\n\n while (recentScripts.length > Settings.MaxRecentScriptsCapacity) {\n recentScripts.pop();\n }\n}\n\nexport interface RecentScript {\n timeOfDeath: Date;\n runningScript: RunningScript;\n}\n","import { ITaskParams, ITerritory } from \"./ITaskParams\";\n\nexport class GangMemberTask {\n name: string;\n desc: string;\n\n isHacking: boolean;\n isCombat: boolean;\n\n baseRespect: number;\n baseWanted: number;\n baseMoney: number;\n\n hackWeight: number;\n strWeight: number;\n defWeight: number;\n dexWeight: number;\n agiWeight: number;\n chaWeight: number;\n\n difficulty: number;\n\n territory: ITerritory;\n\n // Defines tasks that Gang Members can work on\n constructor(name: string, desc: string, isHacking: boolean, isCombat: boolean, params: ITaskParams) {\n this.name = name;\n this.desc = desc;\n\n // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n this.isHacking = isHacking;\n this.isCombat = isCombat;\n\n // Base gain rates for respect/wanted/money\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0;\n\n // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\n this.hackWeight = params.hackWeight ? params.hackWeight : 0;\n this.strWeight = params.strWeight ? params.strWeight : 0;\n this.defWeight = params.defWeight ? params.defWeight : 0;\n this.dexWeight = params.dexWeight ? params.dexWeight : 0;\n this.agiWeight = params.agiWeight ? params.agiWeight : 0;\n this.chaWeight = params.chaWeight ? params.chaWeight : 0;\n\n if (\n Math.round(\n this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,\n ) != 100\n ) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n }\n\n // 1 - 100\n this.difficulty = params.difficulty ? params.difficulty : 1;\n\n // Territory Factors. Exponential factors that dictate how territory affects gains\n // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100\n // So factor should be > 1 if something should scale exponentially with territory\n // and should be < 1 if it should have diminshing returns\n this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 };\n }\n}\n","import React from \"react\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { Crime } from \"../Crime/Crime\";\nimport { CONSTANTS } from \"../Constants\";\nimport { determineCrimeSuccess } from \"../Crime/CrimeHelpers\";\nimport { Crimes } from \"../Crime/Crimes\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { CrimeType } from \"../utils/WorkType\";\nimport { Work, WorkType } from \"./Work\";\n\ninterface CrimeWorkParams {\n crimeType: CrimeType;\n singularity: boolean;\n}\n\nexport const isCrimeWork = (w: Work | null): w is CrimeWork => w !== null && w.type === WorkType.CRIME;\n\nexport class CrimeWork extends Work {\n crimeType: CrimeType;\n unitCompleted: number;\n\n constructor(params?: CrimeWorkParams) {\n super(WorkType.CRIME, params?.singularity ?? true);\n this.crimeType = params?.crimeType ?? CrimeType.Shoplift;\n this.unitCompleted = 0;\n }\n\n getCrime(): Crime {\n const crime = Object.values(Crimes).find((c) => c.type === this.crimeType);\n if (!crime) throw new Error(\"CrimeWork object constructed with invalid crime type\");\n return crime;\n }\n\n process(player: IPlayer, cycles = 1): boolean {\n this.cyclesWorked += cycles;\n const time = Object.values(Crimes).find((c) => c.type === this.crimeType)?.time ?? 0;\n this.unitCompleted += CONSTANTS._idleSpeed * cycles;\n if (this.unitCompleted >= time) {\n this.commit(player);\n this.unitCompleted -= time;\n }\n return false;\n }\n\n commit(player: IPlayer): void {\n let crime = null;\n for (const i of Object.keys(Crimes)) {\n if (Crimes[i].type == this.crimeType) {\n crime = Crimes[i];\n break;\n }\n }\n if (crime == null) {\n dialogBoxCreate(\n `ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,\n );\n return;\n }\n const focusPenalty = player.focusPenalty();\n // exp times 2 because were trying to maintain the same numbers as before the conversion\n // Technically the definition of Crimes should have the success numbers and failure should divide by 4\n let hackExp = crime.hacking_exp * 2;\n let StrExp = crime.strength_exp * 2;\n let DefExp = crime.defense_exp * 2;\n let DexExp = crime.dexterity_exp * 2;\n let AgiExp = crime.agility_exp * 2;\n let ChaExp = crime.charisma_exp * 2;\n let karma = crime.karma;\n const success = determineCrimeSuccess(player, crime.type);\n if (success) {\n player.gainMoney(crime.money * focusPenalty, \"crime\");\n player.numPeopleKilled += crime.kills;\n player.gainIntelligenceExp(crime.intelligence_exp * focusPenalty);\n } else {\n hackExp /= 4;\n StrExp /= 4;\n DefExp /= 4;\n DexExp /= 4;\n AgiExp /= 4;\n ChaExp /= 4;\n karma /= 4;\n }\n player.gainHackingExp(hackExp * focusPenalty);\n player.gainStrengthExp(StrExp * focusPenalty);\n player.gainDefenseExp(DefExp * focusPenalty);\n player.gainDexterityExp(DexExp * focusPenalty);\n player.gainAgilityExp(AgiExp * focusPenalty);\n player.gainCharismaExp(ChaExp * focusPenalty);\n player.karma -= karma * focusPenalty;\n }\n\n finish(player: IPlayer, cancelled: boolean): void {\n if (cancelled) return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"CrimeWork\", this);\n }\n\n /**\n * Initiatizes a CrimeWork object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): CrimeWork {\n return Generic_fromJSON(CrimeWork, value.data);\n }\n}\n\nReviver.constructors.CrimeWork = CrimeWork;\n","import React, { useEffect, useState } from \"react\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\nimport { Modal } from \"./React/Modal\";\n\nconst frames = [\n \"ttftfffttttttttttfffffffttftt1ttttttt111tttt1111111tttt1tt111tttt111111tttt1ttttttttttttttt111111111\\nttfttttttttttttttttfLLLftfffffffffftttt111tt11111ttffffftttt1111111111111111ttttttfttttttttt111111t1\\nttttttttttttttttffffLfftffffffffLLffttttttftt111ttfffffftttttttt111111ttttttffffttfffttttttt111111tt\\nttttttttttttttttfffLfttffffffLLffffttttttttttt1tfffffffffftttttt111111tffffffffftttfffftttt11111ttt1\\nttttttttttttffLfttfffttfffffffffttfftttttt1t1tt11tfffffftttttt111t111111ttffffLLffttfffftt111111tttt\\nttttttttttffLLLLfttttffLLLfttttftfLftttttttffffttttffffttttfftt11t111tt111ttfffLffttfftttttt1111tttt\\nttttttttffLLLLLLLffttfLLffttfffftfLfttttttffttt11111ttttffffffftt1111tft11111ttffffttt11tfftt11ttttt\\ntttttttfffLLLLLLLLfftffttttffLffftfftttttft1i;;::::;iitffffffffftt111tft1tttt1ttffLfttttfffffttttttt\\ntttttttfffLLLLLLLLfttttffftffffftfttttttff1:,,,,,,,,::itfffffffft11111111ttttttttttt1tfffffffffffttt\\ntttffttffLLLLLLLLLfttfftffffffffLLLftttttt;::,:::;;;;::1tfffftfft11111ttt1ttt1tfttt11ttffffffffLfttt\\ntffffffffLLLLLLLffftfLfffttfLLffLLLfttttti;;;iii11111;:i11ttffft111111tfft11t11tt1tttttfffLLLLLLfttf\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttfti:;;;iiiiiiii;it111tt111t1111tffttfftt11ttftttfffLLLLLLffff\\nttttfttttffffftttttttttttttfLLLffLLfttttt1;;;;;;iiiiii;1tft11tt1111111tfftfffftttttttttttfLLfffttfff\\ntfffffffffftttfffffffffttffttLLfffLfttttt11i;;;;iiiiiii1tt11tfftt11111ttt1fffttt1tttttttttfffftttttt\\nttffffffffftttfffffffffttffftffttftttttff1ii;;;;iii1iii111tt1ttttt1111t111ffttffttfffffLffttttffffff\\nttffffffffttttffffffffttttttttttffftttttft1ii;;;ii1iii111tfft11ttt111111t1tt1tfft1ttffffLLftttLLLLLL\\ntttffffffffttfffffffftttttttt11fffftttt1t111iiii;iiiii11ttffft11111111ttttttt1tt11ttffffLfftttfLLLLf\\ntttttttffffttfffttttttttffttt11tffttttttt11ttii;;;iiii11i1ffftt1111111tttt111tttt11ttttffffftffLLLff\\ntfttttttttttttttttttttfffftttt11tfftttttt111t1i;;;iiii1i,,:;i1111t1111ttt111t1tfftt11111ttfftffffftt\\nttttfffftttttttfffftttffffttffttttft111tt11111i;;;iiii1;,,....,:::;i11tt111tt11tffftttttttt1tttttttt\\nt11ttffffftttffffffttttfffttffttttft1111111111;;;;;;;it;,...........,:it111ttt1tffftttttfft11ttfffff\\ntt1ttfffftt1ttfffft111tffttfttttttt1111t1i;:;11i1i;;1t1:,,............,itt11tt1tfftt1tfffffft1tffLLf\\ntfttttfttttt11tttt1ttt11ttttttftt111111i:,..:1111iii11;,...............;tt111t11ttttttttffttt11ffLLf\\ntfftttttttfftttttttffftt111ttffftt11i;,.,...,iiii;;;;:,,...............:1ttt1111ttfffttttft1tt1ttfft\\nttttttttttttttt11ttttttttttfffffft1:,..........::::::,,,...............,1ttttt11ttfffffttttffftttttt\\ntfffttttffffftt11ttttttttttfffffft1:...........:;::;:..................,1tttttt1ttfffffttttttttftttf\\ntfffttttfffffft1ttftttfftttttffft11:...........,:::::..................,1tttft11tfffffffttfffffffttf\\ntfffttttffffff11tttttttttttttttttt1;...........,::::,...................;t1t1111tfffffLfttfffffffttf\\ntfffttttfftttt11tttttttt1tfftttttt1:...........,::::,...... ............,1111tt11fffffLftttffttffttf\\ntttttttttttttt11tttttttt1tffftttft1:...........,:::,,....................it1ttt11tfffffftttffttffttt\\nttttt1tttttttt11ttttttttttffttttttt:...........,::,,.....................:111tt11tttttttt1tttttttttt\\nttttt1tttttttt11tftttttftttttttttt1;,:;:.......,:,,,....................,,1111t11ttttttt11ttttttfttt\\n1tttt1ttfffttt11ttffffffttttfffft11ii1i:.......,:,,,.....................,1tt1111ttttttt111tttttfttt\\n1ttt11tttttttt11tttttttttttttttttti;;;;:.......,:,,,....... .............,itt1111tttt11t111ttttttt1t\\n111111tttttttt11111111ttttttttttt1i;;;;:.......,:,,,......................itt11111111111111111111111\\n1111111111111111111111ttttttttttt1;;;;;:...... ,:,,,,.....................itt11t11111111111111111111\\n1111111111111111111111tttttttttt1;:,::;,...... ,:...,.....................ittttt11111111111111111111\\n111111111111111111111111tttttttt1i,..... .... .:........................,i1tttt11111111111111111111\\n1111111111111111111111111t11t11111;,....,,.... ,:::,,,...................,11ttttt11t1111111t11111111\\n11111111111111111111111111111111111iiiiii. ... .::::::,..................,11t1ttt111t11111tttttt1111\\n1111111111111111111111111111111111111111:.,.....::::::,..................:111tttttt1tttt11tttttt1111\\n1111111111111111111111111111111111111111:::,...,::::;::,..,,.............:11tt1ttttttttttttttttt1111\\n\",\n \"ttftfffttttttttttffffffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftfLLLftfffffffffftt11111tt11111ttffffttttt1111111111111111ttttttfttttttttt111111tt\\nttftttttttttttttffffLftttfffffffLLLfttttttftt111ttfffffftttttttt111111tttttffffftfffftttttt1111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tffffffffffttttttt11111tffffffffftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt1tttt1ttftfffftt1ttt111t111111ttffffLLffttfffft1111111tttt\\nttttttttttffLLLLfttttffLLLfttttttfLftttttttfft11i;;:;;i11ttfftt11t111tt111tttffffftttttttttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLttttttfff1;,,,,,,,,:;tffffft11111tft11111ttffffttt11tffftt1ttttt\\ntttttttfffLLLLLLLLfftffttttffLffftfftttttfft1;:,,,,,::::,;tffftttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffffftfftttttfffti:;;;iiii11i;:tffffft11111111ttftttttttt1ttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLftfftfLLLftttttfft::i;iiiiii11i:1ffftft11111ttt1ttt1ttttt11ttfffffLLfLfttt\\nttfLfffffLLLLLLLLfftfLLfffffLfffLLLfttttt1tt;:;;;;;iiiiiii1tffft11111tffft11t11tt1tttttfffLLLLLLffff\\ntffftfttttfLLLffttttfffffttLLLLfLLLftttft111i;;;;;;iiiiii111tt111t1111tffttfftt11tfft1tfffLLLLLLLffL\\ntttfftttttffLftttttttttttttfLfLffLLfttttttt1iii;;;;;ii11i1t11t11111111tffttfffttttttt11ttfLLLLffftff\\nttfLffffffftttfffffffffttfftfLLfffLftttttfft1ii;;;;iii1i1tt1tfftt11111ttt1tffttt1ttt1tttttffffttffft\\nttffffffffftttffffffffttfffftffffftttttfffft111;;;;iiii1111t1ttttt1111tt11ffttfftttfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttttt11ttii;iiiiii11tft11ttt111111t11t1tfft1tfffffLLftttLLLLLL\\n1ttffffffffttfffffffftttttttt11ffffttttt1111tftiii;;iiii1;,;1111111111tttt11111111ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11tffftttttt11ttf1;;;i;iiii1:,,.,,::;ii11tttt111tttt11ttffffffftffLLLff\\ntfttttttttttttttttttttfffftttt11tfftttttt111tt1;;;i;;ii1t:,,........,:;1t111t1tfftt11111ttfftffffftt\\ntftttffffttttttfftftttffffttffttttftt11tt111i;;;;;;;;;it1,,............,;11tt11tffffttttttt1tttttttt\\ntttttffffftttfffffft1ttffftfffttttft111111;:,.;iii;;;i11,.,.............,1tttt1tffftttttfft111tfffff\\n1tttffffftt1ttfffftt11tffttfttttttt1111i;,....,1iii;ii;,................,111tt1tfft11tffffftt1tLffLf\\ntftttfftt1ttt1tttt1tttt1ttttttttt1111;:,.......i1;;;:::.................,it11t11ttttttttffftt11fffLf\\ntfftttttttfftt1111ttfftt11ttfffftt1ti..........:i;::;:,..................ittt111t1tffttttft1tt1tffft\\nttttttttttttttt11tttttttt1tffffffftti,.........,::::::,..................itttt11ttffffftttttfftttttt\\ntfffttttfffffft11ttttttttttffffffft1i,.........,:,:::,...................,1tttt11tfffffttttttttffttf\\ntfffttttfffffft11tftttfftttttffft1111:.........,:,:::,....................;tt111tfffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt111;.........,:,::,,....................,111111fffffLfttfffffffttf\\ntffftttttttffft11tttttttttffttttfft11i.........,:.:,,......................:1tt11fffffLftttffttffttf\\ntttttttttttttt111ttttttt1tffftttfft111:....... ,:.:,,.......................1tt11tfffffftttffftffttt\\nttttt1tttttttt11ttttttttttfttttttft111i,...... ,:,,,,......................,itt11ttttttt11ttttttfttt\\nttttt1tttttttt11tfttttfftttttffttt1111i,...... ,:.,,,......................:11111ttttttt11ttttttfttt\\n1tttt1ttftfttt11tfffffffttttfffft11111,....... ,,.,,....... ...............it1111ttttttt111tttttfttt\\n1tttt1tttttttt11ttttttttttttttttt1111;,....... ,,.,,......................:tt11111ttt11t111ttttttt1t\\n11t111tttttttt111t1111tttttttttt1iiii:,,...... ,,.........................;t111111111111111111111111\\n111111111tt11111111111ttttttttt1;;iiii:....... ,,............ ...........;tttt1111111111111111111111\\n1111111111111111111111ttttttttt1;;;iii;... ....,::::,....,:::,,.........;1ttttt111111111111111111111\\n111111111111111111111111tttttttt1i;;ii: .,....,:::::... .;;;;;:,.....,;1ttttttttt111111111111111111\\n1111111111111111111111111tt1111111i,,.,:;i: ...,:::::.....:;;;;;:.....,1ttttttttt11t1111111t11111111\\n11111111111111111111111111111111111:.:1tti,....,:::::.... ,;;;;;;,.....ittttttttt111t11111ttttt11111\\n1111111111111111111111111111111111111ttt;,,....,:::::,... .,;;;;:,.,,..:ttttttttttt1tttt11tttttt1111\\n11111111111111111111111111111111111111t1,,,....:;;::::,.....:;;;:......,1ttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt1tt111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttt11111tt11111ttfffft1ttt1111111111111111tttttffttttttttt111111tt\\nttftttttttttttttffffLffttfffffffLLLfttttttfttt11tffffffftttttttt111111tttttffffftfffftttttt1111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt1iiiii1tttttttt11111tffffffffftttfffffttt1111t1tt1\\nttttttttttttffffttffftffffffffffttffttttt11tttt1i::,,,,,,:;111111t111111ttffffLLffttfLfftt11111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfft1i;,,,,,,,,,:;ttt11t111tt111tttffffftttftttttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttffffti;::;;;;;iii::1ftt11111tft11111ttffffttt11tffftt1ttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttffffft;:;iiii11111i:iftttt111ttt1tttt11tffLfttttfffffttttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffft;:;;;;;iiiiii;1fftt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffffti;;;;;;;ii;iiitffft11111ttt1ttt1tfttt11ttfffffLLfLfttt\\nttfLfffffLLLLLLLLffffLLfffffLfffLLLLtttttttff1iii;;i;;iii111tfft111111ffft11t11tt1tttttfffLLLLLLffff\\ntffftftttffLLLffttttfffffttLLLLfLLLffttftt11t1iii;;;;;iiiii1tt111t1111tffttfftt11tfft1tfffLLLLLLLfff\\nttffftttttffLftttttttttttttfLLLffLLftttttttft111i;;;;iiii1111111111111tffttfffttttttt11ttfLLffffftff\\nttfLffffffftttfffffffffttfttfLLfffLftttttfffft11i;;;;iiii1t1ttttt11111ttt1tffttt11ttttttttfffftfttft\\nttffffffffftttffffffffttfffftffffftttttfffft11t1i;;;;;iii1ii1ttttt1111t111ffttfft1tfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttttt11tft1i;;;;iii1i,:;i1ttt11111t11t1tfft1ttffffLLfttfLLLLLL\\ntttffffffffttfffffffftttttttt11ffffttttt1111tfti;ii;;iiii1;,,...,:;ii1tttt1111tt11ttffffffftttffLLLf\\nttttttttfffttfffttttttttffttt11tffftttttt11t1iii;;ii;;;i1t:,.........,:;1t111ttt111ttffffffftffLLLLf\\ntfttttttttttttttttttttfffftttt11tfftt11tt1i:,.:;;;i;;;itti,,............,;1111ttttt11111ttfftffffftt\\ntfttfffftttttttfffftttffffttffttttft1111i:....,;;;ii;i11;.,,.............:1tt1ttffffttttttt1ttttttft\\ntttttffffftttffftffttttffftfffttttft1i:,.......:;;;;;;;:,................:tttt1tffftttttfft11ttfffff\\n1t1tffffftt1ttfffftt11tffttftttttttt1,.........,ii;;;;;,.................:11tt1tfft11tfffffft1fLLfLf\\ntftttfftt1ttt1tftt1ttt11ttttttttt111i,.........,11;:;;:,.................,1t1t11ttttttttfftt111fffLf\\ntfftttttttffttt111ttfftt11ttffffftt11,.........,i;::::,..................,1tt11111ffft1ttt11tt1tffft\\nttttttttttttttt11tttttttt1tffffffft11;..........::::::,...................;tt1111tfffftttttffftttttt\\ntfffttttfffffft11ttttttttttffffffft11:..........:::::,..,;:,...............ittt1tttttffttttttttffttf\\ntfffttttfffffft11tftttffttttfffft1111:..........:::::,..;1i;:,..............1t11tfffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt111;..........::,:,...;ii;;;,.............:1111tffffLfttfffffffttf\\ntffftttttttfft11ttttttttttfftttttft11i,.........::,,,...;;;;;i:..............;111tffffLfttfffttffttf\\ntttttttttttttt111tttttttttffftttfft11i,.........::,,,...;;;;;i:..............:111tfffffftttffttffttt\\ntttttttttttttt11ttttttttttfftttttft111:.........:,,,....::;;;;:.............,1t11ttttttt11tttttffttt\\nttttt1tttttttt11tfttttfftttttfftttt111:.........:,,,......,::::..,.........,i1111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttfffft1111i:,........:,,,..... .......,,...... .it1111ttttttt111tttttft1t\\n1tttt1tttttttt11ttttttttttttttttt1iiii;,........:........... ...........:itt11111ttt1t1111ttttttt1t\\n111111tttttttt111tt111tttttttttti;;;iii:... ....:,,...................:i1tttt11111111111111111111111\\n111111111tt11111111111tttttttttt1;;;;;;;. .,....::::..................:1tttttt1111111111111111111111\\n1111111111111111111111ttttttttttt1i;;::..:;1,...::::...................;ttttttt111111111111111111111\\n1111111111111111111111111tttttttt111i,.,it1;....::::,..................,1ttttttttt111111111111111111\\n1111111111111111111111111tttt11111111ii1t1i:...,::::,........,..........itttttttt11t1111111tt1t11111\\n11111111111111111111111111111111111111tt1;:....::::;:.......,...........:1ttttttt111t11111ttttt11111\\n111111111111111111111111111111111111111ti,,....:;:;::,..................,ittttttttt1tttt11tttttt1111\\n111111111111111111111111111111111111111t:,:.,.:;;;;:::,..................;111t1ttttttttttttttttt1111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt11t111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttttt1111t11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\\nttftttttttttttttffffLffttffffffffLLfttttttfttt11ttt1iiii;i11tttt111111tttttffffftffffttttttt111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tt1::,,,,,,:;1ttt111111tfftfffffftttfffffttt1111t1tt1\\nttttttttttttffffttffftffffffffffttfftttttt1ttt11i;:,,,,,,,,,:1111t1111111tffffLLffttfLfftt11111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;:::;;;;;;;::it11t111tt111tttffffftttfttttt1111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttfffffti:;;ii111111i:itt11111tft11111ttffffttt1ttffftt1ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffft;:;;;;;iiiiii;ittt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffffti;;;;;;;ii;iiitttt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttfffff1iii;;i;;i1i1i1tttt11111ttt1ttt1tfttt111tfffffLLfLfttt\\nttfLffffffLLLLLLLffffLLfffffLfffLLLftttttttfft1i;;;;;;;iiiiitfft111111ffft11t11tt1tttttffffLLLLLffft\\ntffftfttttfLLLffttttffffftfLLLLfLLLftttftt1111111i;;;;iiii111t111t1111tffttfftt11tfft1tffLLLLLLLLfff\\nttffftttttffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111111111111tffttffftttttttt1ttfLLLfffffff\\nttfLffffffftttfffffffffttfttfLLfffLftttttffft1111i;;;;;ii111tfttt11111ttt1tffttt11ttttttttfLfftfttft\\nttffffffffftttfffffffffttffftffffftttttfffft11t11i;;;;iii1i:;1ttft11111111ffttfftttfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttft111tttiii;;iiii1;,,,:;i1111111111t1tfft1ttffffLLftttfLLLLL\\ntttffffffffttffffffffttttttttttfffftttt1111i;:;iiii;;;i;11:,,.....,:;i1tft1111tt111tffffLfftttffLLLf\\nttttttttfffttfffttttttttfftt111tfffttt11i;,,..:i;;;i;ii1t1,,..........,:i1111ttt1111tffffffftffLLLLf\\ntfttttttttttttttttttttffffttttt1tffti;:,,.....,;;;iiii1ti,,,.............;1111ttttt11111ttfftffffftt\\ntttttffffttttttfffftttffffttffttttf1:.........,;:;;;;;;;,.,,,............:1tt1ttffff11ttttt1ttttttft\\ntttttffffftttffftfft1ttffftfffttttf1,..........,;;;;;;;:.:ii;;:,.........:tttt1tfffttttffft111tfffff\\n1tttffffftt1ttfffftt11tffttfttttt1t1,...........ii;;;::,,;i;;ii:.........:tttt1tfft11tfffffft1fLLfLf\\ntftttffttttt11tftt1tttt1ttttttttt11i,..........,1i;;::,.:i;;;;i:.........,1t1t11ttttttttfftt111fffLf\\ntfftttttttffttt11tttffttt1tttffft11i,..........,ii;:::,.,:;;iii:..........it111111tfft1ttt11tt1tffft\\nttttttttttttttt11tttttttt1tfffffftti,...........:::::,....:;;ii:..........:tt111ttfffftttttffftttttt\\ntfffttttfffffft11ttttttttttfffffft1i,...........:::::,.....,:;;:.... ......,1t111ttttffttttttttffttf\\ntfffttttfffffft11tftttffttttfffft111:...........:::::,........,..,..........,1111tffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt11:...........::,:,........ ...:;,.........:111tffffLfttfffttffttf\\ntffftttttttfft11ttttttttttffttttttti,...........:::,,.............,...........,i1tffffLfttfffttffttf\\ntttttttttttttt111tttttttttffftttfft;,:;:........:::,.............. ...........:11tfffffftttffttffttt\\ntttttttttttttt11ttttttttttfftttttftii1i;:.......:::,.......... ..............:t111tttttt11tttttffttt\\nttttt1tttttttt11tfttttfftttttffttt1ii;ii;,......::,,........................:1111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttfffft11i;;ii;,......:,,,..........:........ .;t1111ttttttt111tttttft1t\\n1tttt1tttttttt11tttttttttttttttttt11;:;i:,,.....:,.................. .;i;;1tt1111tttt1t1111ttttttt1t\\n111111tttttttt111t111ttttttttttttt11i:,,:1;....,::....................:1ttttt11111111111111111111111\\n111111111tt1111111111tttttttttttttt11i;;1t:....:::::...................;tttttttt11111111111111111111\\n1111111111111111111111ttttttttttttt111ttt1,,,.,:::::,..................,1ttttttt11111111111111111111\\n111111111111111111111111tttttttttt1111111i,::.,;::;:,...................;ttttttttt111111111111111111\\n1111111111111111111111111ttttttt11111111t;.,,.,;;;;;,...................,1ttttttt11t1111111tttt11111\\n111111111111111111111111111111111111111t1:..,,:;;;;;:,...................;ttttttt111t11111ttttt11111\\n111111111111111111111111111111111111111ti,,,::;;;;;;;:,..................,1tttttttt1tttt11tttttt1111\\n111111111111111111111111111111111111111t;,,::,;;;ii;;::,..................it1tttttttttttttttttt11111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttttt111tt11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\\nttftttttttttttttffffLffttfffffffLLLftttttttttt11ttt1iiii;i11tttt111111ttttttfffftffffttttttt111111t1\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt;:,,,,,,,:itttt11111tfftfffffftttfffffttt1111t1ttt\\nttttttttttttffffttffftffffffffffttfftttttt1tttt11i:,,,,,,,,,:i111t1111111tffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;::;;;;;;;;;,;t111111tt111tttffffftttftt1tt1111ttttt\\nttttttttffLLLLLLLffttfLLffttfffftfLLtttttffffff1,:iiii111111;:tt11111tft11111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffffi:;;;;;iiiii1;;ttt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttfffffff1;;;;;;;ii;;ii1ttt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLffffftfLftffffLLLftttttfffff1iiiiii;;iiii1itttt11111ttt1ttt11tttt11ttfffffLLfLfttt\\ntffLLffffLLLLLLLLffffLLftffLLLffLLLftttttttffftiii;;;;;ii1ii1tft111111ffft11t11tt1tttttffffLLLLLffft\\ntfffffttftfLLLffttttfffffttLLLLfLLLftttft111tt111i;;;;iiiii1tt111t1111tffttfftt11tfft1tffLLLLLLLLfff\\nttttfttfffffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111t11111111tffttffftttttttt1ttfLLLfffffff\\nttffffffffftttfffffffffttfftfLLfffLftttttffft11t1i;;;;;iii11ttttt11111ttt1tffttt11ttttttttfLfftftttt\\nttffffffffftttfffffffffttffftffftftttttffft111t11i;;;;iii1ii11tttt1111tt11ffttfftttfffffLfttttffffff\\nttffffffffttttffffffffttttttttttffftttttttt11111iii;;iiii1;,:;1tttt11111t11t1tfft1ttffffLLftttfLLLLL\\ntttffffffffttffffffffttttttttt1tffftttt11i;:,:i;;i;;;;;i11,,..,,:;i111tttt1111tt11ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11ttff1ii;:,....,;::;i;;i11ti,,.......,:;ittt111ttt1111ttffffffttfLLLLf\\ntfttttttttttttttttttttfffftttt11tff;,,........;;;;iii1tti,,,,:;;::,....,i11111ttttt11111ttfftffffftt\\ntfttfffffttttttfffft1tffffttfft1ttt:..........:;;;;;;;i;...,;i;iii:.....,i1tt1ttffff11ttt1t1ttttttft\\nttttfffffftttfffffft11tffftffftttti,..........,:;;;;;;;,...,;;iiii,......;tttt1tffftttttftt111tfffff\\n1tttffffftt1ttfffftt111ffttft11tt1;,...........;i;;;;;:,.....:;iii,......;tttt1tfft11tffffftt1fLLfLf\\ntttttffttttt11tftt1tttt1tttt1tttti,............;1;::;;,......,;iii,......;t11t11ttttttttfftt111fffLf\\ntfftttttttffttt111ttfftt111ttfffti.............;i;::::,.......,;;;,......;ttt11111tfft1tttt1tt1tffft\\nttttttttttttttt11ttttttt11tffffffi,............,::;:::,..........,.......:ttt1111tfffftt1tttfftttttt\\ntfffttttfffffft11tttttttttttffffti,............,:::::,..............,....,ittt11ttttttft1ttttttffttf\\ntfffttttfffffft11tffttff11t1tfff1;...... ....,.,:::::,.....................;11111tffffffttfffffffttf\\ntfffttttfffffft1tttttttfttttttti:,......:iiii;,,:::,:.......................,;111tffffffttfffttffttf\\ntffftttttttfft11ttftttttttfftti,,::,.,:;1i;;;;.,::::,.........................,i1tffffLfttfffttffttf\\ntttttttttttttt111ttttttt1ttfft1:::,,,:,:;;;;i:.,:::,,..........................;1tfffffftttffttffttt\\nttttt1tttttttt11ttttttttttfttt1;,...,...:;;;:, ,:::,..........................;11ttttttt11ttttttfttt\\nttttt1tttttttt11tfttttfftttttfti,..,....,,,....,:::,.........................:111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttffft1;::::,,.......,:,:,.................. .:1111ttttttt111tttttfttt\\n1tttt1tttttttt11ttttttttttttttttttt11111:......,:,,,..................,::,:1tt1111ttt1t1111ttttttt1t\\n111111tttttttt111t1111tttttttttttt111111:......,,.....................,1tttttt1111111111111111111111\\n1111111111t11111111111ttttttttttttt11111:......,:,,....................:1t1ttttt11111111111111111111\\n1111111111111111111111ttttttttttttt1111t:......,;;::....................:1ttttttt1111111111111111111\\n111111111111111111111111ttttttttt1111111:......,::::,...................,itttttt11111111111111111111\\n111111111111111111111111111tttt111111111:......,;;::,....................:1ttttttt1tt11111ttttt11111\\n1111111111111111111111111111111111111111:......:;;;::,...................,ittttttt11t11111ttttt11111\\n11111111111111111111111111111111111111t1:......:;i;;::,...................:11tttttt1tttt11ttttt11111\\n1111111111111111111111111111111111111111,......:;;;;;::,..................,1tttttttttttttttttttt1111\\n\",\n \"ttftfffttttttttttfffffLftfftttttttttt111tttt1111111tttt111111ttttt11111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftffffffffftttttt111111111ttfffftt1tt1111111111111111ttttttftttttttt1111111tt\\nttftttttttttttttffffLftttfffffffLLLft1tttttft111tfftttfttttttttt111111ttttttfffftffffttttttt11111tt1\\nttttttttttttttttfffLfttffffffLLffffttttttttttt1ttti;;;;::;i1tttt111111tffffffffftttfffffttt11111ttt1\\ntttttttttttfffffttffftffffffffffttfftttttt1ttt111i,,,,,,,,,;11111t1111111tffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1i::,,,,,,,,,:1t11t111tt1111ttffffftttftt1tt1111ttttt\\nttttttttffLLLLLLLffttfLLLfttfLfftfLLtttttfffffti:;;iiiiiiii::1tt11111tftt1111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftfftttttffffft::;;iii1i111i:1ttt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffffft;;;;;;;iiiiii;tttt11111111ttftttttttt11tffffffffffttt\\ntttfftfffLLLLLLLLLfttfftfLfffffffLLftttttfffft1ii;;;;;iiiiiitfttt11111ttt1ttt11tttt11ttfffffLLfLfttt\\nttfLLfffffLLLLLLLfftfLLftfffLLffLLLftttttttfftiii;;i;;ii111itfft111111tfft11t11tt1tttttfffLLLLLLLfff\\ntfffffttftfLLLffttttffffftfLLLLfLLLftttft111tt1iii;;;;iiiii1tt111tt111tffttfftt11tfftttffLLLLLLLLfff\\nttttfttffttffftttttttttttttfLLLffLLftttt1tttt11t1i;;;iiii1111t11111111tffttffftttttttt1ttfLLLfffffff\\nttfLffffffftttfffffffffttftttfLfffLftttttfffft11i;;;;iiii111tfttt11111ttt1fffttt1ttt1tttttfLLffftttt\\nttffffffffftttfffffffffttfftttfttttttttffft11111i;;;;;iii1tt11tttt1111t111ffttffttfffffLLfttttfLffff\\nttffffffffttttffffffffttttttttttffftt11ttt1111t1i;;;iii1i1itt11ttt111111t11t1ttft1ttffffLLftttfLLLLL\\ntttffffffffttfffffffftttttt1111tffftttt11i;::i1iii;;;iii1i,:;i11t11111tttt1111tt11ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11ttft1ii;:,....;i;;;ii;;i1t:,...,:;i1111tttt111ttt1111tttffffftfLLLLLf\\ntfttttttttttttttttttttfffftttt11t1:,,........ii:;;iii1tt1,,,......,,;i1tt11111ttttt11111ttfftffffftt\\ntfttfffffttttttfffft1tffffttfft11;,..........:;::;ii11t1:,,,...,,:,...,it11tt11tffffttttttt1ttttffft\\nttttfffffftttfffffft11tfffttfttt1,....,,......,:;;;;;;i,.......:iii;;,.,1t1ttt1tffftttttfftt11tfffff\\n1tttffffftt1ttfffft1111tfttft11ti,.............;i;;;;;:........:iiiii:..it11tt1tfftt1tfffffft1fLffLf\\ntttttffttttt11tttt1tttt1tttt1tt;,..............i1;;;;;,........,;iii;,..it111t11ttttttttfftt111fffLf\\ntfftttttttfftt1111ttfft11111tft:...............;i;;;;:,.........:;ii:..,ittt111111tfftttttt1tt1tffft\\nttttttttttttttt11ttttttt11ttff1,...............,::::::......... ,;ii:...itttt111ttffffft1tttfttttttt\\ntfffttttffftttt11ttttttt111tft;,........... ..,:;:::,...........,:;:...;ttttt11ttfffffttttttttffttf\\ntfffttttfffffft11ttttttf11111;:,..... .....,:::::::::...............,...:1ttt1111fffffffttfffffffttf\\ntfffttttfffffft11ttttttt11ti,,...........,:;i;;;:::::..................,.:tt11111tffffffttfffffffttf\\ntffftttttttfff111ttttttt111,.,,,,...,,..,;;;;;i;:,::,....................,;i1t111tffffLfttfffftffttt\\ntttttttttttttt111ttttttt11t:.......,....,:;;;;;:::,:,.......................:1t11tfffffftttffttffttt\\nttttt11ttttttt11tttttttt11t1,............,,,...,::::.........................:111ttttttt11ttttttfttt\\nttttt1tttttttt11ttttttfft1t1:,............ .. ,:::,........................,i111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfftttfftttttt1;::,,::.........,:,,,........................i1111ttttttt111tttttfttt\\n1ttt11tttttttt11tttttttttttttttttt111i.........,::,,................. . .;t11111ttt1tt111ttttttt1t\\n11t111tttt1tt111111111tttttttttttt111i,........,:,,...................,..,itttt111111111111111111111\\n1111111111111111111111tttttttttttt111i,....... ,:....................i111ttttttt11111111111111111111\\n1111111111111111111111ttttttttttt1111i,....... ,:,::,................,i1t11tttttt1t11111111111111111\\n111111111111111111111111tttttttt11111i,........,::;:,..................;1ttttttt11111111111111111111\\n1111111111111111111111111tttt11111111i........ ,,:::,..................,1ttttttttttt1111111tt1t11111\\n1111111111111111111111111111111111111i,........,,:::,...................it111ttttt11t11111ttttt11111\\n111111111111111111111111111111111111t1,........,,,:::,..................,1t1ttttttt1tttt11ttttt11111\\n11111111111111111111111111111111111111,........,,,;;::,..................i111ttttttttttttttttttt1111\\n\",\n \"ttftffftttttttffffffffLfttftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\\nttfttttttttttttttftfLLLftffftffffftttttt111111111ttfffftt1tt1111111111111111ttftttftttttttt1111111tt\\nttftttttttttttttffffLftttfffffffLLLft11tttfft111tfffffffttt1ttttt11111ttttttfffftffffttttttt11111tt1\\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tt111ii11tft1ttttt11111tfftfffffftttfffffttt11111ttt1\\nttttttttttttffffttfffttfffffffffttffftttt111ttt1:,,,,,,,:i1111111t111111ttffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttftt1;:,,,,,,,,,;1tt111t1111t111tttffffftttftt1ttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttffft1i;;;;;;;;;;::1tttt11111ttt11111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLLfftfftttttffffi:;iii111111i:ittttt1111ttt1tttt11tfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffff;:;;;;iiiiiii:ittttt11111111ttttttttttt11tffffffffffttt\\ntttffftffLLLLLLLLLfttfftfLftfffffLLftttttffff1i;;;;;ii;iiiittttft11111ttt1ttt1ttttt11ttfffffLLfLfttt\\nttfLLfffffLLLLLLLfftfLLftfffLfffLLLftttttttf1i1i;i;;iiii1i1tffft111111tfft11t11tt1tttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1111iii;;;;ii1i1i11tt111t1111tffttfftt11tfftttfffLLLLLLLfff\\ntttffttfftffLftttttttttttttfLLLffLLfttttttttt11i;;;;iiii11t11111111111tffttfffttttttt11ttfLLLfffffff\\nttfLffffffftttfffffffffttftttfLfffLftttttffft11i;;;iiiii1t11ttttt11111ttt1fffttt1tttttttttfLLftftttt\\nttffffffffftttfffffffffttffttfffttttttttfft1111i;;;;iii1111111tttt1111tt11ffttffttfffffLffttftffffff\\nttffffffffttttffffffffttttttttttffftt11tttt11t1ii;;;iii11tfft11ttt111111t11tttfft1ttffffLLfttffLLLLL\\ntttffffffffttfffffffftt1ttt1111fffft1tt11iiii1iiii;iiii1i:1tft11111111tttt111ttt11ttffffLfftttffLLLf\\nttttttttfffttfffttttt1ttfft11111tft11i;:,..,;ti;;;i;iii1;,,,:;i1111111tttt111ttt1111tffffffftfLLLLLf\\ntfttttttttttttttttttttfffftttt11i;::,,......iti::;i;iitt:,,....,:;i111ttt111t1ttttt11111ttfftffffftt\\ntfttfffffttttttfffftttffffttft11:...........;ii::;i11tti,,,,.......,:itt111tt1ttffff11ttt111ttttttft\\nttttfffffftttffftfft11tfffttftt;,............,:;;;;;11;,..............;1111ttt1tffftttttfftt1ttfffLf\\n1t1tffffft11ttfffft1111tfttft11:.............,:ii;;;;;,...............:11t11tt1tfft11tfffffft1ffffLf\\ntttttfftt1tt11tttt1ttt11t1111t;,..............:i1;;;;:,...............,111111t11ftttttttfftt11tfffLf\\ntfftttttttfftt1111tttft11111t1,...............:ii;;;;,............,,,.,1tttt11111ttfftttttt1tt1tffft\\nttttttttttttttt11ttttttt11ttfi................:;::;::,...........,;i;;:1tttttt11ttffffftttttfftttttf\\ntfffttttftttttt11ttttttt11ttfi................,;;:::,............,;iiii1tttttft1ttffftfttttttttftttf\\ntfffttttfffffft11ttttttt11111;........ .......:;:::,............:iiiii11ttftt11tfffffffttfffffffttf\\ntfffttttftffff111ttttttt11ti:,....... ,:::;;:,.,;:::,............:;;ii:i11tt1111tfffffffttfffffffttf\\ntffftttttfffft111ttttttt11i,.........,iii;;;,..,:::,.............::;;,.it1111tt11tffffffttfffftffttf\\ntttttttttttttt111ttttttt11,.,,,,..,,,:;;;;;;,..,:::,.............,::;..:i111ttt11tfffffftttffttffttt\\nttttt1tttttttt111ttttttt11;,,,...... .:;;;;:...,:,,,.....................:111tt11ttttttt11tttttffttt\\nttttt1tttttttt11tttttttt111,..........,,,,.....,:,,.......................:111111ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft11i:,.....,.... .....,::,......................,1t11111ttttttt111tttttft1t\\n1tttt1tttttttt11ttttttttttttt1ii;;;:...........,:,,.....................,it111111ttttttt111ttttttt1t\\n11t1111tttttt111111111tt1tttttttt11:...........,:,,.............. .;t11111111111111111111111111\\n1111111111111111111111ttttttttttt11,.......... ,,................,:,,,:i1tttt1t111111111111111111111\\n1111111111111111111111tttttttttt11i,...........,,,,..............:1t11ttttttttttt1111111111111111111\\n111111111111111111111111tttttt1111;........... ,,:;,..............:11ttttttttttttt111111111111111111\\n11111111111111111111111111tttt1111;........... ,,:;:...............:111tttttttttt11t1111111tttt11111\\n1111111111111111111111111111111111;....,,......,,,::................i1ttttttttttttt1t11111ttttt11111\\n1111111111111111111111111111111111;............:,,;:,...............;1tttttttttttttttttt11ttttt11111\\n1111111111111111111111111111111111:............,,:;;:...............,1t1tttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttfffffttfLfttftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffft1ttt1111111111111111ttttttftttttttt111111ttt\\nttftttttttttttttffffLftttfffffffLLLftt1tttttt111ttfffffftttttttt111111tttttffffftffffttttttt111tttt1\\nttttttttttttttttfffLfttffffffLLffffttt1tttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111tttt\\nttttttttttttffffttfffttfffffffffttffftttt11111111i;i11ttt11tt1111t111111ttffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttfti:::,,,,:;i1ttfttt11t111tt111tttffffftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLftttttft1;,,,,,,,,,,;tffffft11111tft11111ttffLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLfLftffttttfffti;:;;;;iii;::1fffffttt111ttt1tttt1ttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLfftfftttttfffi;;iiiii1111i:iffffftt11111111ttttttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffi:;;;;iiiiiii:1ftttfftt1111ttt1ttt1ttttt111tffffffLfLfttt\\ntffLLfffffLLLLLLLfftfLLftftfLfffLLLLttttt1t1i;;;;;ii;iiii1ttffft111111tfft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft11i1i;;;;i111iii111tt111t1111fffttfftt11tfftttfffLLLLLLLffL\\ntttffttfftffLftttttttttttttfLLLffLLftttt1tti1i;;;;ii1iii1tt11111111111tffttffftttttttttttfLLLLfffffL\\nttfLfffffffttffffffffffttftttfLfffLftttttfftt1;;;;iiii11ttt1ttftt11111tfttffftt111ttttttttfLLftftttt\\nttffffffffftttfffffffffttffttfftttttttttfft111i;;;iiii1t111t1ttttt1111tt11ffttffttfffffLLfttffffffff\\nttffffffffttttffffffffttttttttttfffttt1tft1111i;;;iiii111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt1111tffft11t111111iiii;;iii111fffft11111111ttft111ttt11tfffffLfftttfLLLLf\\ntttttttttffttfffttttt1ttfft1t11ttfftttt1iiii1i;;;iii1i1i,;i1ttt1111111tttt111tttt111tffffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tff11i;:,,,:11i;;iii;it;....,:;i111111ttt111t1ttftt11111ttfftffffftt\\ntfttfffffttttttfffftttffffttfft1ii;:,,.....:11;:;;;;1tt;,,,.....,,;i11tt111tt1ttfffftttttt11ttttttft\\nttttfffffftttffftfft11tfffttft1;,..........:1ii;;ii1tti,,,..........,it1111ttt1tfffttttffftt1ttfffLf\\n1tttffffftt1ttfffft1111tfttft1i,............,:;ii;;i1i,..............:111111tt1tfft11tfffffft1ffffLf\\ntftttffttttt11tttt1ttt11t1111t;..............,;1i;;;;,...............,1111111t11ftttttttfftt11tfffLf\\ntfftttttttfftt1111ttttt11111tt:............. ,;ii;;;:,...............,i111tt11111tffftttttt1tttttfft\\nttttttttttttttt11ttttttt11ttft,...............;;;;;:,.................ittttttt11ttffffftttttfffttttt\\ntfffftttftttttt11ttttttt11ttf1,...............:;;;::,.......,,,.......;tttttfftttfffftfttttttttffttf\\ntfffttttfffffft11ttttttt1111t1,...............:;;;::........,;i;:,....;t1ttfttt1tfffffffttfffffffttf\\ntfffttttftffft111ttttttt11t111,...............,::::,........:iiiii:...;t11tt1111tffffLffttfffffffttf\\ntffft1tttfffft111ttttttt11ttt1,..... ..........::::,.......,;iiii;,...it11111tt1tfffLfLfttfffftffttf\\ntttttttttttttt111ttttttt11tt1:... .,..........,:::.........:;;i;,...,1t1t11tft11tfffffftttffttffttt\\nttttt1tttttttt111ttttttt1tt1:,...:;ii:.........,::,.........,:;;:.....,it1111tt11ttttttt11tttttffttt\\nttttt1tttttttt11ttttttttt1t;::,;iiii;,.........,:,,...........,,,......,;11111111ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft1ti:,,;;;:;;,.........,:,,.......... ..........:tttt1111ttttttt111tttttfttt\\n11ttt1tttttttt11ttttttttttt1,.,::::;;:.........,:,,...............,....;ttttt1111ttttttt111ttttttt1t\\n11tt11tttt1tt111111111111ttti:,,,::;:..........,:,,............ ......;ttttt11111111111111111111t111\\n1111111111111111111111tttttttt1:,,,............,:,.............,. .,;11tttttt1111111111111111111111\\n1111111111111111111111tttttttttt1:.............,,............ .11ii1ttttttt1111111111111111111111111\\n111111111111111111111111tttttt111,.............,::,,...........ittttttttttttt11111111111111111111111\\n11111111111111111111111111111111;..............,;;;:,..........:11tttttttttttttt11111111111111t11111\\n11111111111111111111111111111111;..............,;;;:,...........:11tttttttttttttttt1111111ttttt11111\\n11111111111111111111111111111111:..............,;;;;:...........:1ttttttttttttttttttttttt1ttttt11111\\n11111111111111111111111111111111:..............,;i;::,..........,1tttttttttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttfffffttfffttftttttttttt111tttt1111111ttttt11111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffffttttt111111111111111ttffttftttttttt11111tttt\\ntfttttttttttttttffffLffttfffffffLLLft11tttttt111tfffffffttttttttt11111ttttfffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffLfttffffffLLffffttt1ttttttt1ttfffffffffttttttt1111ttfftffffLftttfffffttt11111tttt\\nttttttttttttffffttfffttffffffffftttfttttt111ttt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttfLLLfftttttffLftttttttt11ii11fffft1ttfftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttt1i:;:,,::;i1tttffffftt11111tft11111ttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttfti:,,,,,,,,,:;tfffffttttt111tftttttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftffttttttti:::::;;;;;,,1ffttffttt11111111ttttttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLfftfftffftffffLLLfttttti;iiiii11111;:1ttfffffftt1111ttt1ttt1tftttt11tfffffLLfLfttt\\nttfLLffffLLLLLLLLfftfLLftttfffffLLLLttttt;;i;;iiiiii1;:i11tfffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1ii;;;ii;;iii;tt11ttt111t1111tffttfftt11tfftttffLLLLLLLLffL\\ntttffttfftffLftttttttttttttfLLLffLLftttt11ti;;;iiii1iii1ttt1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttftttfLfffLfttttt11i;;;iii1iii1tttt1tfftt11111tfttffftt11tttttttttfLLffftttt\\nttffffffffftttfffffffffttfftttfftffttttfft11;;;iiiii11tt111ttttttt1111tt1tffttffttfffffLLfttftfLffff\\nttffffffffttttffffffffttttttttttfffttt1tft11i;iii11i11111tfft11ttt11111tt11tttfft1tffffLLLfttfLLLLLL\\nttfffffffffttfffffffftt1ttt111tfffftttt11111i;i;iiii111ttfffft11111111tttt11tttt11tffffLLfftttfLLLLf\\nttttttttfffttfffttttt1ttfftt111tfffttt111111;;i;;iii11i1ttffft11111111tttt111tttt11ttfffffLftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tffttt1t1ii1;;i;;iiii1;,::i11tt1tt1111ttt11tt1tfftt11111ttfftfLffftt\\ntfttfffffttttttfffft1tffffttfft11tft11i::,,1ii;:;ii;it:,,...,,:;i11111tt111tt1ttfffftttttt11tttttfft\\nttttfffffftttffftfft11tfffttfttttt1i:,....,it1i;;;;i1t;,,,,.......,;111t111ttt1tfffttttffftt11tffLLf\\n1tttffffftt1ttfffft111ttfttft11i;:,........i1tt1ii1tt1:,,...........:1111111tt1tfftt1tfffffft1ffffLf\\ntftttffttttt11tttt1ttt11t1111t;,...........,;;;11;;;;:..............,1t111111t1tftttttttfftt11tfffLf\\ntfftttttttfftt1111ttttt11111tt:..............:;ii;;:,................it111tt11111tffftttttt1tttttfft\\nttttttttttttttt11ttttttt11ttf1,..............,;;;;::,................it1tttttt1ttfffffftttttfffttttt\\ntfffttttffttttt11ttttttt11ttfi................;;;:::,,:;:,...........;tttttttftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt1111ti................:;:::,.:;iii;,.........:111ttfftt1tfffffffttfffffffttf\\ntfffttttftffff111ttttttt11t11;................,;:::,.;iiiii:.........:tt11ttt111tfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt1tttt;................,::::,.:;;ii;,.........;ttt1111tt1tfffLLLfttfffftffttf\\ntttttttttttttt111tttt1tt11ttti.................:::,...,;;i;,.........itttt11ttt11ffffffftttfftfffttt\\ntttttttttttttt111ttttttt11tt1;.................:::,....,:;:,.........,1tt1111tt11ttttttt11tttttffttt\\nttttt1tttttttt11ttttttttt1t11:.................:::,.... ..............:1111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft11ti;,................,::,.........,......... :ttttt1111ttttttt111tttttfttt\\n11tt11tttttttt11tttttttt1tt1iiii:..............::,,...................:1tttt111111tttttt111ttttttt1t\\n11t1111tttttt1111111111t111iiiiii:.............,:,,,.................:1ttttt11111111111111111111t111\\n11111111111111111111111t11i;;iiii;.............,:,,,........... .,;ttttttttt1111111111111111111111\\n1111111111111111111111tt1t1i;;ii;,.............,,........... :i;;i1tttttttt1111111111111111111111111\\n1111111111111111111111111ttti:,,...............,,,.......... :ttttttttttttttt1t111111111111111111111\\n11111111111111111111111111111;::...............:;;::,........,i11ttttttttttttttt1111111111111tt11111\\n111111111111111111111111111111t;...............:ii;;:,........;t1tttttttttttttttt1t1111111ttttt11111\\n1111111111111111111111111111111:...............:;i;:::........:tttttttttttttttttttt1ttttt1ttttt11111\\n1111111111111111111111111111111:............. ,;ii;;;:,..,,...:ttttttttttttttttttttttttttttttttt1111\\n\",\n \"ttfttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttttffLLttffffffftttttt1t111111111tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttffttttt1111tt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffttttffffftttffftt11t111tt111ttfffLLftttftt1tt111tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttt11i;;;;i1tftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLLfftffttttti:::,,,,::;i1tffffffffttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttt11;,,,,,,,:,,,;tffffffffttt1111t11ttttttttttt1ttffffffLfffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttt1i;;;;iiiii:,:1tttfffffftt1111ttt1ttt1tfttt111tfffffLLfLfttt\\nttfLfffffLLLLLLLLfftfLLftttfLfffLLLLttt1i1iiiii1111i::1111ttffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt11;;;iiiiiii:;ttt111tt111tt111tffttfftt11tfftttffLLLLLLLLffL\\ntttffttffttfLftttttttttttttfLLLffLLftttt1i;;;iii;iii;ittfft11tt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttfttfLLfffLfttt111;;;i111111iitfttt1tfftt11111tfttfffttt1tttttttttfLLftfttft\\nttffffffffftttfffffffffttffttffftfftttttt1i;;iiiii1i1tft11tttttttt1111tt1tffttffttfffffLLfttftffffff\\nttffffffffftttffffffffttttttttttfffttt1ttti;;;i111iitt111tfft11ttt111111t1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111tfffftttt111ii;iii;ii11111tfffft11111111tfft11tttt11tffffLLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111tffftttt1111;;;i;;;i111ttttffftt1111111tttt111tttt11ttfffffLftfLLLLLf\\ntfttttttttttttttttt1ttfffftttt11tfft111tt1i;;;i;;i1i1;i11tffftt11t1111ttt11tt1tfftt11111ttfftfLffftt\\ntfttffffftt11ttfffftttffffttfft11tft11ii;ii;;;;:;iii1,.,,,:;iii1ttt111tt111tt1ttfffftttttt11ttttfftt\\nttttfffffftttffftfft11tfffttftttttt1;:,..:11;;i;;;;11:,,,.....,,:i1111tt111ttt1tffftttttfftt1ttffLLf\\ntt1tffffftt1ttfffft1111tfttft1111i:,.....,i11iiiii1tt:.,..........:111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11tttt1ttt11t11111;:,.........;i11i1111t;..............;t11111111t1tfttttttfffftt1tfffLf\\ntfftttttttfftt1111ttfft111111:.............,::;ii;;:...............:111111ttt111ttffftttfft1tttttfft\\nttttttttttttttt11ttttttt11tt1,..............::;;;;;,...............,1111tttttt11tffLffftttttfftttttt\\ntfffftttffttttt11ttttttt11tfi,..............,::;;::,,...............i111ttttfftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt111ti................::::::,:;;::,..........it111ttffttttfffLfLfttfffffffttf\\ntfffttttftffff111ttttttt1tt1;................,;::::.:iiiii,.........;11111ttt11ttfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt11tti,................::::,.:ii;ii:.........;tttt1111ttttfffLLLfttfffftffttf\\ntttttttttttttt111ttttttt1ttf1.................,:::,.,:;iii:.. ......:ttttt11tft11tfffffftttfftfffttt\\ntttttttttttttt111ttttttt1ttt;::...............,:::,. .:;ii:..........;ttt1111tt11tttttft11tttttffttt\\nttttt1tttttttt11ttttttttt1t111i;,..............:::,....,::,...........;1111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfftt1iiiiii:.............:::,.... ............. :ttttt1111ttttttt111ttttffttt\\nt1ttt1tttttttt111ttttttttt1i;iiii;,............,:,,,................. ,1tttt111111tttttt111ttttttt1t\\n11t1111tt1ttt11111111111111i;iii1i,............,::,,.................:1tttt11111111111111111111tt111\\n11111111111111111111111111t1;;;;;,.............,:,,,.......... .:1tttttt111111111111111111111111\\n1111111111111111111111111t11;,.................,:,,..........,;:::;1ttttttt1111111111111111111111111\\n11111111111111111111111111111:..,..............,,............:ttttttttttttttttt111111111111111111111\\n111111111111111111111111111111ii;..............,::,...........i111ttttttttttt11111t11111111111111111\\n111111111111111111111111111111t;...............,;ii;::,.......:1ttttttttttttt11t1tt1111111ttttt11111\\n111111111111111111111111111111i,...............:;ii;;;:,......,1ttttttttttttttttttt111111tttttt11111\\n11111111111111111111111111111ti,...............:;ii;;;;:,..:..,1ttttttttttttttttttttttttttttttt11111\\n\",\n \"ttfttfffttttttffffttfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLttffffffffftttttt111111111tfffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttffftttt1111tt1ttffffffttttt1111t111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffftttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttfttttttttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttt1ii::::;111tttffffffffttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLfftffttttt1:,,,,,,,,:;ittffffffffttt1111t11ttttttttttt1ttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLftffffLLLftttti::,::::::,,,;ttttfffffftt1111tft1ttt1tffttt11tfffffLLfLfttt\\nttfLffffffLLLLLLLfftfLLftttfLfffLLLfftt11iiiii111i;,,;t111tfffft111111ffft1tt11ttttt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiii1111i:,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLftttti;;;ii;iiii::1ttttt11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLfffffffttffffffffffttfttfLLfffLfttt1i;;i1i;iiii:;tftttt1tfftt11111tfttfffttt1tttttttttfLLftftttt\\nttffffffffftttffffffffftfffttffftffttttti;;iii111i1iitft11tttttttt1111tt11ffttffttfffffLLfttftfffffL\\nttffffffffftttffffffffttttttttttfffttttti;;;ii1111ii1t111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111tfffftttt1i;;;iiiiii11111ttfffft11111111tfftt1tttt11tfffffLfftttfLLLLf\\nttttttttfffttfffttttt1ttfft1111ttffttt111i;;ii;;;itt11ttttfffft1111111tttt111tttt11tttfffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfft1t1t1i;;;ii;;it111ttttffftt11t1111ttt111t1tfftt11111ttfftfLffftt\\ntfttffffftt11ttfffftttffffttfft1ttft11ii1;;;;i;:;i1;;i11tttft111tt1111tt111tt1tffffftttttt11ttttfftt\\nttttfffffftttffftfft11tfffttftttt1i;:,,:1i;;;;i;;;1;.,,,;;i11111111111tt111ttt1tffftttttfftt1ttffLLf\\n1tttffffftt1ttfffft111tffttft1ii:,.....,11iiiiiii1t:,,,.....,:;i111111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11tttt1ttt11t11i;:,........,i1tt1ii11tt:,,,,........:t11111111111t1tfftttttfffftt1tfffLf\\ntfftttttttfftt1111ttfftt11i,............::;;iiiii1;,,............it1111111ttt111ttffftttfft1tttttfft\\nttttttttttttttt11ttttttt11;...............:;;;;:;;...............:111111tttttttttffLffftttttfftttttt\\ntfffftttffttttt11ttttttt11:...............,;;;;;;:,..............,111111ttttfftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt11,...............,:;;;;:,...............,1111111ttffttttfffLfLfttfffffffttf\\ntfffttttftffff111ttttttt11:...... ........:;;;;:,...............,11111111ttt1tttfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt11:.......:;;;:....,;;::::.......,::,....,1tt11tt1111tt1tfffLLLfttfffftffttf\\ntttttttttttttt111ttttttt11:.....:;;;;;:.....:;:::,.......,:iii;,.,1t1t11tt11tft1tffffffftttfftfffttt\\ntttttttttttttt111ttttttt1i,.....:;:;;;:.....,::::,........;;iii;..;t1111t1111tt11tttttftt1tttttffttt\\nttttt1tttttttt11tttttttt1i,.....:::;;;,......::::,.......,;;ii;:..,;1t11111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttttti....,,,,:;;,.......,:::,,.......,;;;;,....,it11tttt1111ttttttt111ttttffttt\\n11tt11tttttttt111ttttttt1:,,.,,,..,,,.........::::,........,:;,..... ,1tttttt11111ttttt1111ttttttt1t\\n1111111tttttt11111111111i,,..,,,.... .........::::,..................itttt111111111111111111111tt111\\n1111111111111111111111111,...,,...............,::,,,...........,,...;tttttt1111111111111111111111111\\n11111111111111111111111111,..... .............,::,,,......... . .:1tttttt1111111111111111111111111\\n1111111111111111111111111ti,,,.,,..............::,,..........,,,::i1tttttttttt1111111111111111111111\\n11111111111111111111111111111i11;..............:,............,1tttttttttttttt11111111111111111111111\\n1111111111111111111111111111111i...............:;:::::,.......;tttttttttttttt11t1ttt111111ttttt11111\\n1111111111111111111111111111111:...............:iiii;;::,......ittttttttttttttttttttt1111tttttt11111\\n1111111111111111111111111111111,...............:iiiii;;:,......,1tttttttttttttttttttttttttttttt11111\\n\",\n \"tttttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffffttt1tt111111111tfffffftttt1111111111111111ttftttftttttttt11111tttt\\nttttttttttttttttfffffftttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1tffffftttffftt11t111tt111ttfffLLffttfft1tt111tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttfLLffftfftttttftttttttffttttffffffffftt111tftttttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftffttttttiii;::::i1ttttffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLfttfffLLLfttt11:,,,,,,,:::itttttfffffft11111tft1ttt1tffttt11tfffffLLfLfttt\\ntffLffffffLLLLLLLfftfLLftttfLfffLLLLfttt1i::::,,::,,,itt11tfffft111111ffft1tt11tt1tt1ttffLLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttttiiiiii1i;:,,:ttt111ttt11tt111tffttfftt1ttfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLftttti;iiii111i;:,iftftt11ttt11111tffftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttfttfLLfffLfttt1;;;ii;iiii;::1ffttt1tffft11111ffttfffttt11ttttttttfLfftftttt\\nttffffffffftttffffffffftfffttffftfftttt1;;i1i;;iii;:itft11tttttfttt111tt1tffttffttfffffLLftfftfffffL\\nttffffffffftttffffffffttttttttttffftttt1;;iiii111iii1t111tfft1tttt111111t1ttttfftttfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttffftttti;;iiiiiiiii1111ttfffft11111111tffttttttt11tfffffLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111ttfftttt1;;;iiii;;itt11tffffffft1111111tttt111tftt11tttfffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfftttt1i;;;;ii;;it1111tftfffft11t1111ttt111t1tfftt11111ttfftfLffftt\\ntfttfffffttt1ttfffftttffftttfft11tft111i;;;;;ii;;i111111tttft111tt1111ttt11tt1tffffftttttt11ttttffft\\nttttfffffftttffftfft11tfffttfttt11i;;:ii;;;;iiiii1;11tt111t11111tt1111tt111tft1tffffttfffftt11tffLLf\\n1tttffffft11ttfffft1111tfttftii;:,....;1i;;;;ii111,,:;i1tt11tt11111111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11ttt11ttt1111i;:,.......,i1tiiii;;11i,,,..,:;i1t1t111t1111111111t1tfftttttfffftt1tfffLf\\ntfftttttttffttt111ttttt1i:...........,ii111iii11i:.,,......,:;1t111111111tttt111ttfLftttfftttttttfft\\nttttttttttttttt11tttt11t;..............,::;;i1ti:,............,1t1111111tttffttttffLfffttttffffttttt\\ntfffttttfftfttt11tttttt1,...............:;:;;;;;:..............;tt111111tttffftttffffffftttttttffttf\\ntfffttttfffffft11tttttt1................,;;;;;;;:..............:t11111111ttffttttffLLfLfttfffffffttf\\ntfffttttfttftt111tttttti............... .:;;;;;:,..............:1111111111tttttttffLLfLfttfffffffttf\\ntffft1ttttttft111tttttt;............. .:;;;;;;:::..............:111tt11tt111ttt1tfffLLLfttfffftffttf\\ntttttttttttttt111ttttt1,..............:;i;;i;::::..............:1ttt1111tt11tff1tffffffftttfftfffttt\\nttttttttttt1tt111ttttt;..............:;;;;;i:::::..............;1111111111111tt11tttttftt1tttttffttt\\nttttt1tttttttt11tttttt:..............:;;;::;:::::..............;t1111111111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttt1,........... .,,:,...,:::::..............,11i;;i111tttt1111ttttttt111ttttffttt\\n11tt11ttttttt1111tttt;............,..... ...,::::...............:i;:;;i1ttttt11111tttttt111ttttttt1t\\n11111111t1tt111111111,............,.........,::::,..............,:::;ii1tt111111111111111111111tt111\\n111111111111111111111,............ .........,,,::,..............::::;i11tt11111111111111111111111111\\n1111111111111111111111:....... .............,,:,,..............,::::i111t11111111111111111111111111\\n11111111111111111111111:....,,,,.............,:::,,..................,1t1111111111111111111111111111\\n111111111111111111111111iiii11t; .............,:,..,........ ..:1tttttt11111111111111111111111\\n111111111111111111111111111111t:...............:,,,:,,......,,,,,:;;1tttttttt1t111tt1111111tttt11111\\n111111111111111111111111111111t: .............::;ii;::,.....,i111ttttttttttttttt11ttt111111tttt11111\\n111111111111111111111111111111t:..............:;;iiii;:,.....,i1ttttttttttttttttttttttttttttttt11111\\n\",\n \"tttttfttttttttffffffffffffftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffffttt1tt111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\\nttttttttttttttttffffLftttfffffffLLLfttttttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffffttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftfftttttfftffffffftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftttttt1iii::;i1ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\\nttttfttfLLLLLLLLLLfftfftfLfttfffLLLfttt11:,::,,,,,:;1tttttfffffftt1111tft1ttt1tffttt11tfffffLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLffttt1;:,,,,,,,,,;ttt11tfffft111111ffft1tt11ttttt1ttffLLLLLLLLfff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiiiiii;:,,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLfttt1i;iii1111i:,:1ftfft11ttt111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLfffLfttt1;;;i;iii1i:,;tffttt1tffft11111tfttfffttt11ttttttttfLLftfttft\\nttffffffffftttffffffffftffftttfffffttt11;;;ii;;iii::1fft11tttttfttt111tt1tffttffttfffffLLffffffffffL\\nttffffffffftttffffffffttttttttttfffttt1i;;iiiii11i;itt111tfft1tttt111111t1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttfffttt1i;;iiiiiiiii1111ttfffft11t11111tffttttttt11ttffffLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;;1t11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfftt111;;iiiii;;;1111ttftfffft11t1111tttt1tt1tffttt1111ttfftfLffftt\\ntfttfffffttt1ttftfftttffftttfft11tft1i1i;;;;iii;;;111111tttft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfftttfttt11i;;;1;;;;;iiii;i1t11t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\\n1t1tffffft11ttffttt1111tftttti;:,,...:1i;;;;iiii1i:;i1ttt111tt11111111111t11tt1tffft1tffffffttfLffLf\\ntftttfftt11t11ttt11ttt111i;:,,.......:11ii;;ii;11i,.,,:;11tt11tt11t1111111111t1tffttttffffftt1tfffLf\\ntffttttttttftt1111ttttt1:............:1111iiii1ti;,,....,,;i1tttt11111111tttt111ttfLffttfftttttttfft\\nttttttttttttttt111ttt1t;...............,:;;i1tt1;,..........,itttt111111tttttttttffLfffttttffffttttf\\ntfffttttfftfttt11ttttt1,................:::::;i;:,...........,1ttt111111ttttfftttffffffftttttttffttf\\ntffft1ttffffff111ttttti.................,;;;;;;;:,...........,1t111111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttttti................,,;;;;;;::,............it1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt;.............:;iii;;:;;:::,............it1111111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttti,............,;;iiii::;::::,...........,1ttttt111ttt11tft1tfffffLftttfftfffttt\\nttttt1tttt11tt111ttt1:.............:;;;iii;::::::............,1tttt1111111111tt1tttfttftt1tttttffttt\\nttttt1tttttttt11tttti..............,;;;;:,,:::,,:............:tt11t11111111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11tttt:............. ,::,. .::,,,:........... :t1111111t111ttt1111ttttttt111ttttffttt\\n11tt11tttttt111111ti.......................,:::::.............it111t11111tttt1111tttttt1111ttttttt1t\\n1111111111111111111,.............,.........,:::::.............:1t11ii;:;11111111111111111111111tt111\\n1111111111111111111:........................,,:::..............;ii;:;:;ii111111111111111111111111111\\n11111111111111111111:....... ..............,,,:,...............,:::::;i1111111111111111111111111111\\n111111111111111111111:......,,..............,,,:,...............:::;::;i11t1111111111111111111111111\\n1111111111111111111111iiiiii1;...............,,,,.,..............,::::;11111111111111111111111111111\\n11111111111111111111111111111;................,,:,,,...... .it1111111111111111111111111111\\n1111111111111111111111111111t;...............;i;;;::,.....,,.....,,,;i1ttttttttt11tt111111ttttt11111\\n1111111111111111111111111111t;...............:i;;i;::,....:i111111tttttttttttttttttttttttttttttt1111\\n\",\n \"tttttfttttttttffffftfffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffftttt1t1111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\\nttttttttttttttttffffLftttfffffffLLfftt1tttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\\nttttttttttttffffttfffttffffffffftttftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfffttttt1tfffft1ttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLftttttttfffffftttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftffttttt111i;iitfftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftttt1;:,::,,,:;ittttffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttfffLLLftt1i:,,,,,,,,,,:1tttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLftt1i;;;;;;;i;:,:tftt11tfffft11111tffft1tt11ttttt1ttfffLLLLLLLfff\\ntfffffttttfLLLffttttfffffttLLLLfLLLft1;iiiii11111i::tffft11tttt11t111tfffttfftt1ttfftttffLLLLLLLLffL\\ntttfftttttffLftttttttttttttfLLLffLLftt11;;;iiiiiii:;tffffft11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttLLfffLft11i;;;;i;;iii;tffffttt1tffft11111tfttfffttt1tttttttttfLLftffttt\\nttffffffffftttffffffffftffffttfftfttt11i;;;i1iii1iitffft11tttttfft1111tt1tffttffttfffffLLfffftfLffLL\\nttffffffffftttffffffffttttttttttffftt11i;;;iii111ii1tt111tfft1ttft111111t1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttffftttti;;;;iiiiii11111ttfffft11t11111tfftttttttt1tfffffLLftttfLLLLf\\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;itt11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\\ntftttttttttttt1tttt11tfffft1tt11tfft111;;;;;iii;;it111ttfffffft11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttffffftt11ttftfftttffftttfft11tti;;1;;;:;iii::i111111ttfft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfftttft1i;:,..,1i;;;;iii;i;:;;1t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\\n1tttffffft11ttffftt1111tt1ii:,,......,i1i;;;ii;11;...,:;i111tt11111111111t11tf1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt11ttt11;,,..........,11t1iiii1t1:,,.....,:i111111t1111111111t1tffttttffffttt1tfffLf\\ntffttttttttfttt111ttttti,.............:;;iii11t1i,,.........,ittt11111111tttt11tttfLffttffttttttffft\\nttttttttttttttt111tttt1:................:;;;;;i;:,...........:ttt1111111tttffttttffLLffttttffftttttf\\ntfffttttftttttt11ttttti.................,;;;ii;;:............,1ttt11111ttttffftttffffffttttttttffttf\\ntffft1ttfffftf111ttttti..................:;;;i;;:,...........,1tt11111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttttt;..................,;;;;;::,...........,1t1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt;...........,,.....,;;:;:::............,111111111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttti,........,;ii:......:;:::::............,ittttt111ttt11tft1tfffffLftttfftfffttt\\nttttt1tttt111t111tttt;........:;;;;:,.....,;:::::.............ittttt1111t1111tt1ttfttttttttttttffttt\\nttttt1tttttttt11tttt1,.......,:::;;;,......::::::.............;tt1t1111111ttt1tttfttttttt1tttttffttt\\n1tttt1tttttttt11tttti.........,:::;:.......,:::::..........,,:;1t11111111ttff1111ttttttt111ttttffttt\\n111111tttttt111111t1,..........,:::........,:::::..........,:;;i1111t111ttttt11111ttttt1111ttttttt1t\\n1111111111111111111;............,,.........,::::,.........,:;;;i1111111111111111111111111111111tt111\\n11111111111111111111:.......................,:::,.. ......,:;;ii111111111111111111111111111111111111\\n111111111111111111111:.......,..............,:::,..........,::i11t1111111111111111111111111111111111\\n1111111111111111111111:,,..,, ..............,,,::,............,1111111111111111111111111111111111111\\n1111111111111111111111111i11:...............,..,:,,..... ..:1t11111111111111111111111111111111111\\n111111111111111111111111111;................,::::,,.....::::;i11tttt111111t1111111111111111111111111\\n111111111111111111111111111,.................ii;;::,....:1tttt1ttttttttttttttttt11tt111111ttttt11111\\n1111111111111111111111111ti..................;i;;;:,.....;t1ttttttttttttttttttttt1ttttttttttttt11111\\n\",\n \"ttffftfffttttttttftttfffttftttttttttt111tttt111111tttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLLftfffffffftttt1t111t111t11tfffffftttt111111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttffffLftttfffffffLLffttttttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111tttt1\\nttttttttttttttftfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttffffttfffttffffffffftttfttttt1111tt1ttffffffttttt1111tt11111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttffftttt11tttffttttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLftt11ii;i;;ii1tttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftfftt1:,,,,,,,,:iftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftff1i;;:,,,,,,,,:;ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttfffLLLt;,,:;;;;;iiii:ittttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLfi,:iiii111111;1ffftt11tfffft11111tffftt1t1tttttt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfffffi:;;;;;iiiiiiitffffft11tttt11t111tfffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttfffftttttttttttttfLLLffLLti;;;;;i;;iiii1ftffffftt11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLfffLtii;;;ii;;i1111tfffffttt1tffft11111tfttffftttttttttttttfLLfffffft\\nttffffffffftttffffffffftffffttfftftt1ii;;;;;;iii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffftttffffffffttttttttttffftt11i;;;;;i111111tt111tfft1ttft11111tt1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt1111tfffttti;;;;;;iiiii11111ttfffft11t11111tfftttttttt1ttfffLLLftttfLLLLf\\nttttttttfffttfffttttt1ttfft11111tfft11i;;;:;;ii;;itt11ttfffffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntftttttttttttt1tttt11ttffft1tt11ttti::i;;;:;iii;;;i;i1ttftfffft1tt1111tttt1tt1tffftt1111tffftfLffftt\\ntfttffffftt11ttftfft1tffftttff1i;:,...;1;;;;;i;:;i,..,:;i1tft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfft11i;:,......,11;iii;;iii,,,....,:;i1111t1111tt111tft1fffffttfffftt11tffLLf\\n1tttffffft11ttffftt1111t1;;,..........,i1t11ii11i:.,........,111111111111t11tt1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt11ttt11:..............;iiiiiii11,,,......,,,itt11t1111111111t1tffttttffffftt1tfffLf\\ntffttttttttfttt111ttttt;................,;;;i;;ii,...........;ttt11111111ttt111tttfLffttfft1ttttffft\\nttttttttttttttt111ttt11:.................:;;;i;::............;ttt1111111tttftttttffLLffttttffffttttf\\ntfffttttftttttt11ttttt1,.................,;;;;;;:............:ttttt11111tttffftttffffffftttttttffttf\\ntffft1ttfffftf111ttttt1,..................:;;;:::............:1tt11111111ttffttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttti...................,;;::::............,111111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt:...................,::::::,:::,.......,1t1t11111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttt1,....................,::::::;;;ii:......ittt11111ttt1ttff1tfffffLftttfftfffttt\\nttttt1ttttt11t111tttti.....................,:::::,;;;ii;,.....itttt1111tt111tttttttttttttttttttffttt\\nttttt1tttttttt11ttttt;........ .............:::::,;;;ii;,.....:1t1t1111111tttttttfttttttt1tttttffttt\\n1tttt1tttttttt11ttttt:.... :i;:.............:::::..,;;i:.......it11111111ttff1111tfttttt11tttttffttt\\n11tt11tttttt1111111t1,...,;iiii;, ..........::::,. .,:,......;111111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111i..,.,;;;iii;...........:::::.......,....itt1111111111111111111111111111111tt111\\n11t111111111111111111;....::;;ii;...........::::,..........,;111111111111111111111111111111111111111\\n1111111111111111111111, ...,:;;;,............,,:,.....,,:;11tt11111111111111111111111111111111111111\\n1111111111111111111111i:,....... ............,,:,.....:1tttttt11111111111111111111111111111111111111\\n1111111111111111111111111;.,. ..............;;;:,,....,it11ttt11111111111t11111111111111111111111111\\n111111111111111111111111i,..................;ii;:,.....,1t1ttttt1111111111t1111111111111111111111111\\n111111111111111111111111:...................;ii;;:......;ttttttttttt11tttt1t111111tt11111111ttt11111\\n111111111111111111111111:...................:i;:;;,.....:t1tttttttttttttttttttttt1tttttttttttttt1111\\n\",\n \"ttffftfffttttttttttttfffttftt111ttttt111tttt111111ttttttttt11tttt111111ttttttttttttttttttttt111111tt\\nttfftttttttttttttttffLLftfffffffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttffffLftttfffffffLLfft111ttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\\nttttttttttttfffftttffttffffffffftttftt1t1iii11111tfffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttffft11i:,,,::::;1tfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfft1;:,,,,,,,,,:tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfftt1::,,,,,:::::;itfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\\ntttttttfLLLLLLLLLLfttttffftffffttf1,,,,:;iii1111itftttfffffffffftt1111t11ttffttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttffffft:,,,:;iii111ii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLfffLft:,,:;;;;iiiiii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttfLLfffft;:::;;;iii;iii1tffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttfffftttttttttttttfLLLffffti;;;i;;iii;iitfffffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLftfft1i;;;;;iiiii11ffffftttt1tffft11111tfttffftttttttttttttfLLffffftt\\nttffffffffftttfffffffftttfftttftttttt1;;;;;iiiii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffftttffffffffttttttttttfftt11i;;;;;;ii1111ttt111tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\\ntttffffffffttfffffffft11ttt1111ttff1;i;;;;;;;ii;iiii111ttfffft11t11111tfftttttttt1tffffLLLftttfLLLLf\\nttttttttfffttffftt1tt1tttft1111tt1;,.:i;;;;;iii::;;,,:;i1tfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntfttttttttttttttttt11ttffft1tti;:,...,ii;;;;ii;::;;.....,:itftt1tt1111tttt1tt1tffftt1111tffftfLffftt\\ntfttffffftt11ttftfft1tttft1i;:,.......:11iiii;;;:;:,,,,,,..;t111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffttttt11tti;:,..........,1tt1ii11i;;,,.,.,,,,,1111t11111tt111tft1tffffttfffftt11tffLLf\\n1tttffffft11ttttttt1111;...............:11iiii;;1;.,.,,.,..,1t11111111111t11tf1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt111tt1,................,;;;ii;i1:.........,111t1111111111111t1tffttttffffftt1tfffLf\\ntffttttttttftt11111ttt;..................:;;;;:;i:..........itttt11111111ttt111tttfLffttfft1tttttfft\\ntttttttttttttt1111ttt1:..................,;;;;:::,..,.......;tttt1111111tttffttttffLLffttttffftttttf\\ntfffttttftttttt11tttt;....................:;;::::,,.........:ttttt111111ttttfftttffffffftttttttffttf\\ntffft1ttfftttt111tttt:....................,;:::,:;;;;:,.....:1ttt11111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttt1,.....................:::,,::;iii;,.....itt1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttt;......................,::,,::;;;i;,.....:111111111tt111tttttfffLLLfttfffftffttf\\nttttt11ttttttt111tt1:......................,:,..:,:;;i;.......:tttt1111ttt1ttffttffffffftttfftfffttt\\nttttt1ttttt111111tt1:......................,:,..:. .:;:......,itttt1111tt111ttttttfttffft1tftttffttt\\nttttt1tttttttt111tt1:........... .........,,,.,:...........,1tt11tt111111ttt1ttttffftttt1tftttffttt\\nttttt1tttttttt11ttti,......... .,..........,,,.,:..........,it11111111111ttft1111ttttttt11tttttffttt\\n11tt11ttttt111111tt:..........,::;,........,,,.,:......,:i11t11111111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111:........:;;ii;.........,,.,,.....i1ttt11t11t111111111111111111111111111111tt111\\n1111111111111111111ti........,:;;i;,...........,,.....;t11111111111111111111111111111111111111111111\\n11111111111111111111ti;,......,:;;;. ......,:,.,:.....,1t1t11111111111111111111111111111111111111111\\n11111111111111111111111;........,,,........:;::,,......;t1tttt11111111111111111111111111111111111111\\n1111111111111111111111i......... ........:;;::,......,1ttttt11111111111t11111111111111111111111111\\n1111111111111111111111:........ ...........:;;;::.......it1ttttt1111111111t1111111111111111111111111\\n111111111111111111111i,........,......... ,ii;;::,......:ttttttttttt11ttt1tt11t111tt111111t1tttt1111\\n11111111111111111111t;.........,..........:iiii;::,.....,1ttttttttttttttt1ttt1ttt1tttttttttttttt1111\\n\",\n \"ttttftfffttttttttttttfffttttt111ttttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttfffffftttfffffffLLLft111tttttt11tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttfffffffffffft11111;:::;;i1tffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\\nttttttttttttfffftttffttffffffffftttft1;::,,,,,,,,ifffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttff1;:,,,,,,,,,,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffttt1:,,,,:::;;i;;1tttftttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfftt;,,,,,:;ii11t11tfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\\ntttttttfLLLLLLLLLLfttttffffffffttt;,,,,:;;;iii1111ttttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttttfft:,,,,:;;;iiiiii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfffftttfLftfLfi;;;;;;;iii1iii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttfLLftfffi;;;i;;;;iiiii1fffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttffffttttttttttttttffftffft;;;;;;;;iiii1tttfffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttftttffftfft1;;;;;;;;iii1ttfffffttt1tffft11111tfttfLftttttttttttttfLLftffftt\\nttffffffffftttfffffffftttfftttftttt1i;;;;;;;;ii111tffftt11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tt1111ttt1::i;;;;;;;i1i;i111ttt11tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\\ntttffffffffttffffffftt111tt111i;:,..;i;;i;iii11;;;;,::;1tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\nttttttttfffttffttttt111ttt1;:,......,ii;;iii;11;:;;,...,:1fffft1111111ttftt1ttfft11ttffffffftfLLLLLf\\ntftttttttttttt11tt111tt1;:,..........;11iii;1t1;:;;,,,,,.:tfttt1tt1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttffffftt11tttttt111:..............:1tt1ii11i::;:,,,,,,,if1111tt1111ttt11tf1tfffffttttttttttttffft\\n111tfffffft1tfftttt11;................:ii;;i;:,,;;,.,,.,..it1111111111tt111tft1tffffttfffftt1ttffLLf\\n1tttffffft111tttttt1i,............,....:;;;;;;:,1i,..,,,..;ttt11111111111t11tt1tfffttfffffffttfLfLLL\\ntfttttftt1t111ttt111;..................,;;;;;:,:1i,.......it111t11t1111111111t1tffttttffffftt1tffLLf\\ntffttttttttft1111111,...................:;;;::,,;;,.......it1tttt11111111ttt111tttfLffttfft1tttttfft\\ntttttttttttttt1111t;....................,;;:::,.:,..,.....:tttttt1111111tttffttttffLLffttttffffttttf\\ntfffttttfttttt111t1,.....................;;:::..:,........,1tttttt111111ttttfftttffffffftttttttffttf\\ntffft1ttfftttt111ti......................::::,..:,.....,:::i1ttt111111111ttffttttffLLfLfttfffffffttf\\nttfft1tttttttt111t:......................,:::,..:,....,:;iiiitt11111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt1111;.......................,:,...:,....:;;iiii1111111111tt111tftttfffLLLfttfffftffttf\\nttttt11ttttttt111t;...................,,,,,,,...,......,;;ii1111ttt1111ttt1tfffttffffffftttfftfffttt\\nttttt11tt11111111i,.................,::::::,....:........,,:i1111tt1111tt111ttttttfffffft1tftttffttt\\nttttt11ttttttt11t;.................,:;;;;;;,....:.... .. .,1t11ttt1111111ttt1ttttffffttt1tftttffttt\\nttttt11ttttttt1111:................,::::;i:.....:.,..,,,:;i11tttt111111111tft1111ttttttt11tttttffttt\\n111tt11ttt1111111t1:. ............::::;:.....,:....it11111tt1tt1111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111i:,..............,,,,......,:....:1tt111111t1111111111111111111111111111111tt111\\n11111111111111111111t11:........,.... . ..,....:.....it1t111t11111111111111111111111111111111111111\\n11111111111111111111111:,..................:....:.....:1ttt11t11t11111111111111111111111111111111111\\n1111111111111111111111i,...................:....:......it1ttttt1tt11111111111t1111111111111111111111\\n1111111111111111111111;....................,,..,:,.....:tttttttt111111111111111111111111111111111111\\n1111111111111111111111:.................. .::..,:......,1t1ttttt11t1t11111t1111111111111111111111111\\n11111111111111111111ti,.................. ,;::,,:.......itttttttttttt111t1tt11t111tt111tttt1tttt1111\\n11111111111111111111t;....................,;;;:,:.......:tttttttttttttttt1ttt1ttt1tttttttttttttt1111\\n\",\n \"tttttttttttttttttttttffftttt1111111tt1111tt1111111ttttttttt11tttt1111111ttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLfttffttfffttttt1111111111111tffffftttt111111111111111tttffttftttttttt11111tttt\\nttttttttttttttttffffLftttfffffffffftt11111iii1i11ffffffffttttttt111111tttttffffftfLLfttttttt111ttttt\\nttttttttttttttttffffftttffffffffffttt11;::,,,,,:;1ffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffttttt1;:,,,,,,,,,,:tffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLfttttttft;,,,,,,,,:::,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffttt;,,,,,,:;ii1111tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffffft1:,,,,,:;iii11111fttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLLLLLLLLLffttttffftfffftt1:,,,,,:;;;iiiii1ftttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\\ntttffttfLLLLLLLLLLfttfttffftttttft::;;::;;iiiiiii1ttttttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\\nttffffffffLLLLLLffftfffttttffftfLfi:;i;;;;;iiiiii1tffftt11tfffft111111ffftt1tt1tt1tttttfffLLLLLLffff\\ntffftfttttfLLLfftttttffffttfLLftfff;:;;;;;;;iiiii1tffffftt1tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttttttttttfffttttttttttttttffffffft;;;;;;;;iiii1ttffffffft1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttft1tfffttt1i;;;;;;;;iii1ttfffftttt1tffft11111tfttffftttttttttttttfLLfffffft\\nttffffffffftttfffffffftttffttttti::i;;;i;;;;ii1111tttttt11tttttfftt111tt1tffttffttfffffLLffffffLLfLL\\nttffffffffttttfffffffft1ttt11i;:,.,ii;;iiiii11:i1111tt111tfft1ttft11111tt1ttttffttttfffLLLfttfLLLLLL\\ntttffffffffttffffffftt111i;:,......:11;;iiiii1::;;;::;i1ttffft11t11111tfftttttttt1ttffffLfftttLLLLLf\\nttttttttfffttfttt1111ii;:,.........,it1iii;;1ti::;;,..,:1tfffft1111111ttttt11tfft11ttffffffftfLLLLLf\\ntfttttttttt1tt111111;,..............;1111ii1ti:;:;;,,,,.:tffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttfffftt1111ttttti,................:;;;i;;;,,:;;:,,,,,,itt1111tt1111ttt11tf1tffffftttttt1tttttffft\\n111tfffffft1ttttttt:..........,,......:;;;;;;,.,i;,,,,,,.;t111111111111t111tft1tffffttfffftt1ttffLLf\\n111ttfffft111ttttt1,............,.....,;;;;;:,.:1i,......;11t111111111111t11tt1tfffttfffffffttfLfLLL\\ntttt1tftt11111tt11;....................:;;;;:,.:1i,......:tt11111111111111111t1tffttttffffftt1tffLLf\\nttft11ttttttt1111i,....................,:;:;:.,,;:,......:111tttt11111111tttt11tttfLffttfft1tttttfft\\ntttttt1ttttttt111;......................,;:;:..,:,.......:11tttttt111111tttffttttffLLffttttffffttttf\\ntffft11ttttttt11i,.......................:::,..,:,.......,1tttttttt11111ttttfftttffffffftttftttffttf\\ntffft11ttttttt11;........................,:::,..:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt11;......................,:;;;;;;,:,........,111tt1111111111tttttttffLLfLfttfffffffttf\\ntfttt11ttttttt11i.....................:::;;;;;:.:,....... ,1t11111111111t111tftttfffLLLfttfffftffttf\\ntttt111ttttttt11:....................,:::;;;;;.,:,..........,:;iii11111ttt11tffttffffffftttfftfffttt\\nttttt11tt1111111,....................,:::;;;;,.,:.......... .::;;;;ii11111ttftttftfffft1tftttffttt\\nttttt11ttttttt11i................. ....,,,,.....:.... ........,:::;;;;ii111tt1tttfffffttt1tftttffttt\\nttttt11ttttttt11ti,. .........,... .. ....,..:,.. ....,:::;;;iii1ttt1111ttttttt11tttttffttt\\n11111111ttt111111t1ii;;;,.......................:..,.:1;:,,.. ..,;i1i1t1ttt1111ttttttt111ttttttt1t\\n1111111111111111111ttttt:,......................:.. ,tttt111i;;;;i1tt1111111111111111111111111tt111\\n111111111111111111111111:,..................,...:.....it1t1ttttttttt11111111111111111111111111111111\\n111111111111111111111111;,..................,...:.... ;tttt11t11t11111111111111111111111111111111111\\n111111111111111111111111:...................,..,:.....:ttttttttttt1111111111111111111111111111111111\\n11111111111111111111111i,...................:,.,:.....,1ttttttttt11111111111111111111111111111111111\\n11111111111111111111111;...................,::..:.....,1ttttttttt1t11t1111t1111111111111111111111111\\n11111111111111111111111:.................. :;:,,:......itttttttttttttt111ttt11t1111t111t1ttttttt1111\\n111111111111111111111t1:.................. :;;:::......;ttttttttttttttttt1ttt1ttt11ttttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft111tt111111ttffffffttttttttt11111tttttffffftfLLftttttt11111ttt1\\nttttttttttttttttffffftttffffffLffftt111i;;:::::;1tffffffffttttttt11111tfffffffLfftfffffftttt111ttttt\\nttttttttttttfffftttffttffffffffttttt1i;,,,,,,,,,,;fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttti:,,,,,,,,,,,,;tfffftttfffft11t111tt111tttffLLfttfftt1tt111tttttt\\nttttttttffLLLLLLLffttfLLffttfffttti,,,,,,:;;;ii;itttttttffffffftt1111tftt1tttttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffffft1:,,,,::;i111tt1tfttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLfLLLLLLLLfttttffftfffftti,,,,,,:;;iiii1i1ftttfffffffffft11111t11ttftttttttttttfffffLLfLfttt\\ntttffttfLLLLLLLLLLfttfttffftttttf1,,::,:;iiiiiiii1ttttttttfffffftt1111tft1ttt1ttfttt11tffffLLLLLfttt\\nttfffftfffLLLLLfffftfffttttffftfLf;:ii;;;;iii11ii1tfffft11tfffft111111ffft11t1ttt1tt1tffffLLLLLLLfff\\ntffftfttttfLLLfttttttffffttfLLftff1:;ii;;;;iiiiii1ffffftt11tttt1ttt111fffttfffttttfft1tffLLLLLLLLffL\\ntttttttttttfffttttttttttttttfffffff1;;;;;;;iiiii1tffffffftt1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttffffffffftttt1tffftft1i;;;;;;;iiii1ttfffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\\nttffffffffttttfffffffft1tftt1tft1;ii;;;;;;;;ii1111ttftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tttt1ii;,.:i;;;i;iii111t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffftfttt111ii;:,....,i1;;iiiii1i:;;;i11111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\ntttttttttffttfttt1111ii;:,.........;11iiii;;11;::;;,:;1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntft1ttttttt1t1111111:,.............:1tt1iii1t1;;:;:,,.,:1tffftt11t1111ttt11tt1tffftt1111ttfftfLLfftt\\ntttttffttt1111ttttt;................:iiiiii11,:;:;:,,,,.:tttt111tt1111ttt11tf1tffffftttttt1ttttttfft\\n1tttfffffft1tftttt1,.................,;;;;:;:.,:i:,,,,,,,it11111111111tt111tft1tffffttfffftt11tffLLf\\n111ttfffft111ttttti...................:;;;;;:,,:1;.......;t1tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt11111ttt1:...................,;:;;;:..;1;.......:tt111t11t1111111111t1tffttttffffftt11ffLLf\\nttft1111ttttt1111;.....................:;:;;,..,;:.......,111tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt111,.....................,::;;,..,:,.......,1ttttttt111111tttffttttffLLffttttffffttttf\\ntfftt11ttttttt11;.......................:::;,..,:,........itttttttt1111tttttfftttffffffftttftttffttf\\nttfft11ttttttt11,.......................,;;;;:,,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt1i,.....................,::;i;;;,,:.........:111tt1111111111tttttttffLLfLfttfffffffttf\\nttttt11ttttttt1i.....................,:::;i;i:.,:,........,1t1111t111111t111ttfttffLLLLfttfffttffttf\\ntttt111ttt11t11;.....................,:::;;;;,.,:..........1tt111tt11111ttt1tffttffffffftttffftffttt\\nttttt11t1111111:......................:::::,...,:..........:i1tttt1tt111t1111tttttfttffft1tttttffttt\\nttttt11tttt11t1i.......................... ....,,.......... .,,:i11iii11111tt1t1ttffffttt1ttttttfttt\\nttttt11tttttt111;... ......................,:............ .,:::;iiii1111111tfttttt11ttttttfttt\\n11111111t1111111t1i;;::::......................,:..,:.. .......,::;;;;;;iii11111tttttt111ttttttt1t\\n11111111111111111ttttttt1,.....................,:......:,.. ..,:;;;:;;;iiii11111111111111111tt111\\n111111111111111111111111i,.................,::..,.... ,tt1ii;,,.. ..,:i;;iii111111111111111111111111\\n111111111111111111111111i,.................,;:,,,......1tttttt11i;;::itt11t1111111111111111111111111\\n111111111111111111111111i,................ ,;:::,......it1t1tttttttttt11tt11t111111111111111111t1111\\n111111111111111111111111;................. ,;;::,......it1tttttttt1111111t11111111111111111111111111\\n111111111111111111111111:................. .;;:::......;t1ttttttt1ttttt111t1111111111111111111111111\\n111111111111111111111111,...................;i;::,.....;tt1ttttttttttt11tttttttt111t111111tttttt1111\\n111111111111111111111111:...................:i;:::.....ittttttttttttttttttttt1ttt111tttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft1111tttt111ttffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLffftt11111i;iiii1tfffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffttttt11;::,,,,,,::1fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttf1;:,,,,,,,,,,,itfffftttfffft11t111tt111tttffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttt1,,,,,,,::::::itttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfft1:,,,,,:;ii11111ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLfLLLLLLLLfttttffftfffftt1:,,,,:;;iii1111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfttffftttttf1,,,,,:;iiii;iii1ttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\\nttfffftfffLLLLLfffftfffttttffftfLt:;;;:;;iiiiiii11tfffft11tfffft111111ffft1tt1ttt1tt1tfffLLLLLLLffff\\ntffftfttttfLLLfttttttffftttfLLftff1;;;i;;;iii1iiitfffffft11tttt1ttt111fffttfffttttfftttffLLLLLLLLffL\\ntttttttttttfffttttttttttttttffftfffi;;;;;;iiiiii1tffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttffffffffftttt1tffftffti;;;;;;iiiii1tttffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\\nttffffffffftttfffffffftttftt1tftt111i;;;;;;;;ii111tfftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\\ntttfffffffttttfffffffft1tt111111i::i;;;i;;;;i11t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffftfftt111111i;:,..,ii;;iiiii11:;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\ntttttttttffttfttt1111111i;:,.......:11;iiii;11;::;;,:i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1t1111111i;:,...........:1t1iii;itt;;;;:.,,,:itffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\ntttttffftt1111ttttt1:..............,i111ii1tti:;;;:,,,,.,1tft111tt1111ttt11tf1tffffftttttt1ttttttftt\\n111tfffffft1tfttttt;.................:;;;;;;;,.:i:.,,,,,.;t11111111111tt111tft1tffffttfffftt11tfffLf\\n111ttfffft111ttttt1,..................:;;;;;:,.:1;.....,.:11tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt111111tt11,..................,;;;;;:,.;1;.......,1t111t11t1111111111tttffttttffffftt11fffLf\\ntttt111tttttt11111;....................::;;;,..,;:.......,i11tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt111i.....................,::;;,..,:.........ittttttt111111tttffttttffLLffttttffffttttf\\ntfftt11ttttttt111,......................::::,..,:,........itttttttt11111ttttfftttffffffftttttttffttf\\nttfft11ttttttt11;.......................,:::,..,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt11:........................,:,,..,:,........,111tt1111111111tftttttffLLfLfttfffffffttf\\nttttt11ttttttt11,.......................,,::,..,:..........it11111t11111t111tttttffLLLLfttffftfffttf\\ntttt111tttt1t11i......................::;;;;;:.,:..........;t11tttt11111tt11tffttffffffftttffftffttt\\nttttt11tt111111:....................,:::;i;;i,.,:..........;ttttttt1111111111tttttfttffft1tttttffttt\\nttttt11ttttttt1;....................,:::;i;;:..,,...........:;iii1111111111tt1t1ttfffttt11ttttttfttt\\nttttt11tttttt111:...................,:::;;;;...,,........... .,:;;;:;i1111ttt1111ttttttt11ttttttfttt\\n11111111t11t11111;,.. ...............,,,....,:.... .......,:::::;;11tt11111111tt1tt1111ttttttt1t\\n11111111111111111t11i;;;:.......,..... ......,,....,,. ...,::;::;i1111111111111111111111111tt111\\n11111111111111111111tttti,...................,.,,... :1i:,. .,,;;i1111111111111111111111111111111\\n111111111111111111111111i,...................:,,,.....ittt1i:,.. ,1tttt111111111111111111111111t1111\\n111111111111111111111111;,...................,,::.... .111tttt1ii1ttt11111111t11111111111111111t1111\\n111111111111111111111111;....................,:::......it1t11ttttt1111111111111111111111111111111111\\n111111111111111111111111;....................,::,......;t1tttttt11tt1tt111t1111111111111111111111111\\n11111111111111111111111t:....................::::......:1111ttttttttttt1tt11ttt11111111111tttttt1111\\n11111111111111111111111t:....................:;::,.....,1tttttttttttttttttttttttt111tttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttttt11ttttt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfffttffttttt111111111t11ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft1111tttt111tfffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLfffttt1111ttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttftttffffffffttttft1i;:;;;;;i11tfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLfttttttfft1;:,,,,,,,,:1ttfffftttfffft11t111tt111tttffLLfttffft1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttti::,,,,,,,,,,;ttttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfffffti,,,,::;;;iiiii1ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLLLLLLLLLLftttttfftfffftt1:,,,;iii1111111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfttffftttttff:,,:;;;iiii1ii1tttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\\nttfffftfffLLLLLfffttfffttttffftfLt;:,:;;;;iiiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffftfttttfLLffttttttffftttfLLftff1;;;;;iiiii;i11ttfffftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLtfffii;;;;;ii;;iittffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttft1tffftffti;;;;;iiiii1ttttffffttt1tffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfttttfttttti;;;;;iiii1111tfftft11ttttffff1111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tt11111tft11i;;;;;;;iit11111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffftttfffftfftt1111111111i:,;i;;;;;;ii1i;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\nttttt1tttffttfttt11t111tttt1i;:,...:1i;ii;ii;1i:;;i;;i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1tt1111111ttt1;:,,.......;ti;iii;it1;;;;,..,:i1fffft11t1111ttt11tt1tffftt1111ttfftfLffftt\\nttttfffftt1111ttttt111;:,...........;tt11iii1t1::;;,,,,,.,1ft111tt1111ttt11tf1tffffftttttt1ttttttftt\\n111tfffffft1ttttttt11,..............:i11iii111:,;;,,,,,,,.;t1111t11111tt111tft1tffffttfffftt11tfffLf\\n111ttfffft111ttttttt;.................:;;;;;;:.,ii,....,,.:1tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt11111ttt111:.................,;;i;;;,.,1i,.......:t111111t1111111111tttffttttffffftt11fffLf\\ntttt11ttttttt1111111,..................:;;;;;,,,;;,.......:11tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt11111i...................,;;;;:,..:,........:1tttttt111111tttffttttfLLLLfttttffffttttf\\ntfftt11ttttttt11111:....................:i;;:,.,:,........,1ttttttt1111ttttffftttffffffftttttttffttf\\nttfft11ttftttt111ti,.....................;;::,..:,........,i1tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt111t;......................,::,...:,.........;11t11111111111ttt1tttffLLLLfttfffffffttf\\nttttt11ttttttt111t:......................,::,...:,...,,....it11111111111t111tttttfffLLLfttfffftffttf\\ntttt11tttt11tt1111,.......................,,,...:,...,:;;;;itt11ttt1111ttt1ttftttffffffftttffftffttt\\nttttt11t111111111i.........................,,...:,...,:;iiii11111t111111t111tttttttttffft1tftttffttt\\nttttt11ttttttt111,.........................,,...:....,:;;iii11111111111111ttttt1ttfffttt11ttttttfttt\\nttttt11ttttttt111;...................,,,,..,....,......,:;ii1ttt1111111111ttt1111tfttttt11ttttttfttt\\n11111111t11t11111t;...............,:::::::..,...:.........,,it11tt1111111tttt1111ttt1tt1111ttttttt1t\\n1111111111111111111,.............:::::;;i:......:..... :1ttttt111111111111111111111111111111t111\\n11111111111111111111;,.. ........,::::;;:.......,... ,i;;;i1tttt111111111111111111111111111111111111\\n11111111111111111111t11i,.........,:::;;. ..,:,.:.....itttttttt1111111t111111111111111111111111t1111\\n11111111111111111111111t;...........,,,.... ,:,,:......it1111ttt1111111111111111111111111111111t1111\\n111111111111111111111111;.......... .... .:,,:,. ...:tttt11tt111111111111111111111111111111111111\\n111111111111111111111111;....................::::..,,..,1tttttttt1tttt1111t1111111111111111111111111\\n11111111111111111111111t;....................::::..,,...;t1tttttttttttt1t11ttttt111t111111tttttt1111\\n11111111111111111111111ti....................:;::,......:11tttttttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftftttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfttfffttffttttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttfffffftttffffffffffftt11ttttt111tffffffftttttttt11111ttttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLfffttttt11tttt11tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffftttft1tttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttfft11iiiiiittt1ttfffffttfffft11t111tt111tttffLLfttffft1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttfft;::,,,,,,:itttttffttffffffftt1111tftt11t11tfLLftttt1tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffffft11i:,,,,,,,,:,;fffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttfffttffftt1;:::::;;;iii;:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfttfLfttttfft;:;iii111111i;1ttttttttffffffftt1111ttt1ttt1ttftt11ttfffffLLLLfttt\\nttfffftfffLLLLLLffftfffttttfffffLf;:;;;;ii1iiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLffftttttffffttfLLffffi:i;;;;;ii;ii11ttffffft11tttt1ttt11tfffttffft1ttfftttffLLLLLLLLffL\\ntttttttttttffftttttttttttttfLfftffi;ii;ii;i11111tfffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttftttfLftf1;;;;;;;;i1111tttffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfftttftttt1i;;;;;iiii1111ttftft11ttttffff1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffft1ttt1111tfftt1i;;;;iii1tt111ttt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttffffttftt111t11111ttfft1;;;;;;ii1ti;;i11111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\nttttt1tttffttfttt111111tttt11111tti:i;;;;;;iii1;:;i1i1ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1tt11t1111ttfftt1tt1i;:..;i;;;;;iii1i:;;:,,:;i1ffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\ntfttfffftt1111tttttt1tttttt1i;,.....:11;ii;;;iti:;;,,,...,:1t111tt1111ttt11tf1tffffftttttt1tttttfftt\\n1t1tfffffft1tttttttt111tti:,....,...,i11iii;i1ti;i,,,,,,,,.,i111t11111tt111tft1tffffttfffftt11tffLLf\\n1t1ttfffft111tttttt1111:,...........,i1t1iii11i,;1,....,,...;t11111111111t11tf1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11ttt111tt;..............,:;i;;;;;,.i1,.........:11111t1111111111tttffttttffffftt1tffLLf\\ntfftttttttttt111111ttt:................,;;i;;:,,:;,.........:tttt11111111tttt11tttfLffttfft1tt1tffft\\ntttttt1ttttttt1111ttti,................,:;;;;:,.,:..........,ttttt111111tttffttttfLLLLfttttffffttttf\\ntffft11ttttttt1111ttt;..................,;;;::,.,,..........,1tttt111111tttffftttffffffftttttttffttf\\ntffft11ttftttt111tttt:...................:;;::..::,,.........ittt11111111ttffttttffLLfLfttfffffffttf\\ntffft11ttttttt111ttt1:...................,;::,,::;;;i;,......;t11111111111ttt1tttffLLLLfttfffffffttf\\ntttft11ttttttt111ttt1,....................,::,,::;;iii;. ...,it11tt11111t111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111t1ti.....................,:,,,,::;iii;.....,it11tt1111ttt1ttftttffffffftttffftffttt\\nttttt11tt11111111t1ti......................,:,. ,,,:;i:.......;11tt11111t111tttttttttffft1tttttffttt\\nttttt11tttt11t11tttt;......................,,,..,, .,,.......,;11111111111ttttt1ttfffttt11ttttttfttt\\nttttt1tttttttt111ttt:.......................,,..,,.....,....:1ttt111111111ttt1111tfttttt11ttttttfttt\\n1111111ttt1t11111tt1,.......................,,..:,.........:1t11111111111tttt1111ttt1ttt111ttttttt1t\\n11111111111111111111;....... ............,,..:,.....,;ii1t1t111111111111111111111111111111111t111\\n111111111111111111111,.... .,::,................:....,11ttt11tt11t1111111111111111111111111111111111\\n111111111111111111111;.....;i;;;,...............:,....it1111ttt1tt1111t111111111111111111111111t1111\\n1111111111111111111111i:.,iii;;i:.......... ,::,:......itttttttt1111111111111111111111111111111t1111\\n111111111111111111111111i,:;;;ii;,......... ,;;::,.....:1ttttttt11111111111t111111111111111111111111\\n111111111111111111111111i,.,::;;:.......... ,;;;::......itttttttt1tttt11t1tt111111111111111111111111\\n111111111111111111111111i..,.................;;;::,.,,..:1tt1tttttttttttt11ttttt11111111tttttttt1111\\n111111111111111111111111i..... .............;i;:::,.....itttttttttttttt1tttttttt11t11t1111ttttt1111\\n\",\n \"tttfttfttttttttttttttfffttttt1111tttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLfftfftttffftttt111111111111tfffffftttt111111111111111tttffttfttttttttt11111ttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tffffffffttttttt111111ttttffffLfffLLfttttttt1111t1t1\\nttttttttttttttttffffftttffffffLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffftttftttttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLfft111111tttt\\nttttttttttffLLLLftttttfLLLftttttttfftttttttfffft1tffffftttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftffft11i;ii1ttffttttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffLfLftti;:;:,,,:;;itffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffffftt1;,,,,,,,,::,:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfftfLftttffff1;::::;;iii;,:1ttttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfffftfffLLLLLfffftfffftttfLfffLfi;iiii11111i;:i1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLfffttttfffffttfLLffLf;;;;iiiiiiii;:1tfffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttffLLffLt;;:;;ii;;iii;ttffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttftttfLftf11i;;;i1ii11ii1tfffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfftttfttt11i;;;;i1111i111ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tfft11;;;;iiiii1t1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffffffft111tt1111ttfft1i;;;iiiii1;;;111111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\nttttt1tttffttfftttttt11ttttt111tttft1i;;;;iiiii;;;1t11ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tffftt1tt11tff1ii;;;;;iiii:;;i;;i1tttffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\nttttffffttt11tttttft1tttttt1ttt11i;,:i;;;;;iii;;;;:...,,,:;i1111tt1111ttt11tt1tffffftttttt1ttttttftt\\n111tfffffft1ttfftttt11tttt1tfti;,...,i1i;;ii;;i1i;,.........,i11111111tt111tft1tffffttfffftt11tffLLf\\n1t1ttfffft111tftttt1111ttt11;:,......;11iii;;1t11;......,.,,.,i1111111111t11tt1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11ttt11ttt11i;:,.........:1tt1i;i1111;............;t11t1111111111tttffttttffffftt1tffLLf\\ntfftttttttttt111111tttt1,.............:;;;;;;;;:;:............:tt11111111tttt11tttffftttfft1tt1tffft\\n1ttttt1ttttttt1111tt11ti................:;;;;;:,:,............,1tt111111tttffttttfLLLLfttttffffttttf\\ntffftttttttttt111tttt1ti................,;;;;::,:,.............ittt11111tttffftttffffffftttttttffttf\\ntfffttttfftttt111tttttt;.................:;;:::,:,.............:tt1111111ttffttttffLLfLfttfffffffttf\\ntffftttttttttt111tttttt;.................,:;:::,:.,:,,.........,it11111111ttt1tttffLLLLfttfffffffttf\\ntttft11ttttttt111tttttt:..................,::::,:,,;;;;;:,......itt11111t111tttttffLLLLfttfffftffttf\\nttttt1tttttttt1111t1ttt;...................,::,,:,:;;;iii;.....,1tt1111ttt11tftttffffffftttffftffttt\\nttttt11tt1111t111tt1ttt:...................,::,,:::;;iiii;,.....:i1t1111t111tttttttttffft1tftttffttt\\nttttt11ttttttt11ttttttt:....................::,,:..,,:;ii:...... .1t111111ttttt1ttffffft11ttttttfttt\\nttttt1tttttttt111tttttt:....................,::,:. ..::,......,1t1111111ttt1111tfttttt11ttttttfttt\\n1111111tttttt1111ttt1tt:.... ...............,:,,:..............,1t1111111tttt1111ttt1ttt111ttttttt1t\\n11111111111111111111111;;;;:,...............,:,,:....... ...,,:1ttt11111111111111111111111111111t111\\n11111111111111111111111iiiiii:...............,,,:........,:i11tt1tt111111111111111111111111111111111\\n11111111111111111111111iiiiiii...............,,,:.......,1tttt11tt1111t111111111111111111111111t1111\\n1111111111111111111111i;iiiiii,..............,.,:........ittt11t111111111111111111111111111111111111\\n111111111111111111111111iiii;,...............::::,,......:1ttttt11t111111111111111111111111111111111\\n1111111111111111111111111i:,. ...............:i;:::,......itttttt1ttt111t1tt111111111111111111111111\\n11111111111111111111111111:................. :i;;;::,.....;ttttttttttttttt1ttttt111111111ttttttt1111\\n11111111111111111111111111:................. :i;;;;::,....:tttttttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttfffffffLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLffffttttttttttt1tffffffffffttttttt1111ttffffffLLfttffffffttt1111tttt1\\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1tffffftttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLffttfffftfffttttttfffffftfttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffffffttft111i;ii1ttfffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftft1i:::,,,,::;;1fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfftfLffftfffLf1;,,,,,,,::,,:1tttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfLfftfffLLLLLfffftfLfftttfffffLLf1;;;;;iiiii:,:1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLfffttttfffffttfLLLffLfiiiii111111i::1tffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttftttttttffftttttttttttttfffLffLfii;;;iiiiiii;:1ftffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttfttffLfffLti;:;;ii;ii1;;ttffffftttttffft11111tfttffftttttttttttttfLLfffftft\\nttffffffffftttfffffffftttfftttftttt1i;;;ii11111ii1ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tfff1ii;;;iiiiiii1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\n1tfffffffffttfffffffftt1ttt1111tffft1i;;;iiiiii;;i111111tfffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\ntttttttttffttfftttttt1ttfft1111tttftt1;;;iiiiii;:;tt11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffft1tt11ttft11;;;;;iiii;;;1t11ttttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\\nttttffffttt11tttttft1ttfffttfft11tftiii;;;;iiii;;;;:;ii1tttft111tt1111ttt11tt1tffffftttttttttttttftt\\n111tfffffft1ttfttttt11tfftttfttt11i:,ii;;;;;iii;i:.....,,::;i111t11111tt111tft1fffffttfffftt11tffLLf\\n1t1ttfffft111tffttt1111tft1ft1i;:,...;1i;;;;;;i11:...........,;1111111111t11tt1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11tft11ttt111111;:,......,111ii;;i1t1:........,,...;11t1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttttt11;:,.........,i111i;i1t1;,.............,1t1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111ttt11ti,............,::::;;;i;:,..............it111111tttffttttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttti...............,;;;;;;;:...............:t111111tttffftttffffffftttttttffttf\\ntfffttttfffttft11ttttttt;...............,:;;;;:::...............,1t111111ttffttttffLLfLfttfffffffttf\\ntffft1ttttttttt11ttttttt:................,;;;;:::................it1111111ttt1tttffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt:................,:;;::::................:t1111tt111tttttffLLLLfttfffftffttf\\nttttt1tttttttt111111tt1t;.................,::::::................,1t111ttt11tftttfffffffttfffftffttt\\nttttt1tttt11tt111ttttttt:.,:;:............,::::::................,itt111t111ttt1tttttfft11tftttffttt\\nttttt1tttttttt11tttttttt;:;iii:............,:::::...........,:,....:1t11111tttt11tfffttt11ttttttfttt\\nttttt1tttttttt111ttttttt;;iiiii:. ..........:::::...........,;;;;:..it1111tft1111ttttttt11ttttttfttt\\n1111111tttttt1111ttttttt:;iiiii;............,::::,........,::;;iii;it111ttttt11111tt1ttt111ttttttt1t\\n111111111111111111111111:;;iiii;,...........,:,::,.........,;;iiii;it111111111111111111111111111tt11\\n111111111111111111111111;:;:;;;,............,::::,...........:;;ii;it1111111111111111111111111111111\\n111111111111111111111111;::.... .............,:::,,......... .,,:i1t1111111111111111111111111111111\\n111111111111111111111111i;,..................,,,:,,....... .;,..,;11111111111111111111111111111t1111\\n1111111111111111111111111i;:;i;,..............,,:,,,........1tii11t111111111111111111111111111111111\\n111111111111111111111111111111:..............,:::;;:,.......;ttttttttt11t1tt111111111111111111111111\\n11111111111111111111111111111;,..............:i;;ii;;:,.....,1ttt1tttttttt1ttttt1111111111tttttt1111\\n1111111111111111111111111111i,...............,i;;iiii;:......ittttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt1111ttfffffffLftttfffffttt1111tttt1\\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1ttfffffttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftffftttttfffffffffttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffLffftfftttttfftffffffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftt11iii;:;;i1tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfftfLffttfffLLft1;:::,,,,::;;1ttttttffffffftt1111ttt1ttt1ttfttt1ttffffLLLLLfttt\\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLfti;,,,,:::::,,;fffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntfffffttttfLLfffttttfffffttLLLLffLLf1ii;;iiii11i:,;tfffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLffLLf1iiiiiii1111;:;tffffftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttfttffLfffLf111;;;ii;;i1i:itfffftttttffft11111tfttffftttttttttttttfLLfffftft\\nttffffffffftttffffffffttffftttftttttt1i;;;iii;iii;ifftft11tttttffft111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tffft11i;;;ii11111111tt111tffftttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\n1tfffffffffttfffffffftt1ttt1111fffft111i;;;iiiiiii11111ttfffft11111111tfft1tttttt1tfffffLfftttfLLLLL\\ntttttttttffttfftttttt1ttftt1111ttffttt1i;;;iiii;;;1t11ttttfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt1ttfffftttt11ttft1t1i;;iiiii;:;1t111tttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\\nttttfffftttt1ttttfft1tffffttfft11tft111i;;;;;ii;:;i11111ttttt1111t1111ttt11tt1tfffffttttttttttttffft\\n111tfffffftttffftttt11tfftttfttt1ttt1i1i;;;;iiiiii::;i111tt11111t11111tt111tft1fffffttfffftt1ttfLLLf\\n1t1ttfffft111tffttt1111tfttft11tti;::,i1;;;;;iii11:...,,::;i1tt1111111111t11tt1tfffttfffffffttfLLLLf\\ntttt1tftt1tt11ttt11ttt1111tt11i;,,....;1i;;;;;;i11:.,.......,,:i11t1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttttt111i;:,........;1t1ii;;i1ii,.............;t1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111tttttt11:...........:iiiiii1tti,..............,1t11111tttttttttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttt1i,.............,:::;;ii;,...............;t11111ttttfftttffffffftttttttffttf\\ntfffttttfffffft11ttttttt1;..............,:;;;;;;:,...............,1111111ttffttttffLLfLfttfffffffttf\\ntffftttttttttt111ttttttt1:.......... ....:;;;;;;:,................it111111tttttttffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt1,........,,:;:,.,;;;;;:;,................;t1111t111tttttffffLLfttfffffffttf\\nttttt1tttttttt1111t1tttt1,.......;;;;;:,..:;;::::,................,1t11ttt11tftttfffffffttfffftffttt\\nttttt1tttt11tt111ttttttt1:......;;;;;;;:,.:;;::::,................,it111t1111tt11ttttfft11tftttffttt\\nttttt1tttttttt11tttttttti,......:;:;;;:...,:;::::,.................:1t11111tt1t11tfffttt11ttttttfttt\\nttttt1tttttttt11tttttttti,......:;:;;:.....,:::::,..................:11111ttt1111ttttttt11ttttttfttt\\n1t1t111tttttt111111ttttt;...,,,.,:::. ......:::::,...................,111tttt11111ttttt1111ttttttt1t\\n111111111111111111111111,,,,,,,.............,:::::,..................,1t111111111111111111111111tt11\\n11111111111111111111111i,,..:,..............,,::::,,.................,11tt11111111111111111111111111\\n111111111111111111111111;...................,:,,::,,.................,;ii11t111111111111111111111111\\n111111111111111111111111i,..................,:::::,,................:::;;;i111t111111111111111111111\\n1111111111111111111111111i;;;;i1:............::,:,,,,........... ..::;;;;i1111111111111111111111111\\n111111111111111111111111111111t1,............,.,:,,,:,,........:,,..,:;;;i11t11111111111111111111111\\n1111111111111111111111111111111i.............,,::;;;i;:,...... :111i;::;;;1ttttt11t1111111tttttt1111\\n111111111111111111111111111111ti.............:1;;1iiii;:,.......i1tttt11111tt1tt111111t1111ttttt1111\\n\",\n \"tttttttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111ttt1\\nttttttttttttfffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLfttttttffffttttttfffft1tffffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfffttttttfffffftfttfftffffffffttt111tftt11t11tfLLLftt11tffft1tttttt\\ntttttttfLfLLLLLLLLffttfttttffLLfftffttttffffffffffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLLftffttttttt11i;ii1tftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfftfffffffffLLfttt1i;::,,,,:;;1tttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLLttt1;,,,,,,,::,:iftt11tfffft11111tffft1tt11tt1ttttfffLLLLLLLLfff\\ntfffffttttfLLfffttttfffffttLLLLfLLLftt1i;;;;;;iiii:,;fftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttffLLffLLftt1;iiiii11111i::tfffft1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttfLffffffftttfffffffffttfttffLfffLftt1;i;;;iiiiiii;;tfftttttffft11111tfttffftttttttttttttfLLftfffft\\nttffffffffftttffffffffftffftttfttftttttii;;;;ii;;ii;iftt11tttttfft1111tt1tffttffttfffffLLfffffffffLL\\nttffffffffttttfffffffftttttt11ttfffttt11ii;;ii1111ii11111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\n1ttffffffffttfffffffftt1ttt111tffffttt1i1i;;;iiiiii1111ttfffft11t11111tfft1tttttt1ttffffLfftttfLLLLf\\ntttttttttffttfftttttt1ttfff1111ttffttttt1i;;;;i;:;it11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffftttt11tfftt11tt1;;;ii;;;1t111tttffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttfffftttt1ttttfft1tffffttfftt1tft1111t1;;;;i;:;i11111tttft111tt1111ttt11tt1tfffffttttttttttttffft\\n1tttfffffftttffftfft11tfffttfttttttt11111i;;:;iiii1i;i1t1tt11111t11111tt111tft1fffffttfffftt1ttffLLf\\n1t1tffffft111tffttt1111tfttft11tt1t1i;;;1i;;;;ii1ii1,.,:;ii1tt11111111111t11tt1tfffttfffffffttfLfLLf\\ntfttttftt1tt11ttt11ttt11t1t11tt11i:,...,11;;;;;it111,,.....,:;i11tt1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttftt111111i;:,......:1t1i;;;;i1t1,..........,:i1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111ttttt111tt;..........:1111iii1;11:.............,it1111tttttt1ttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttt11t1,...........,,:::;;i;;:...............:t1111ttttfft1tffffffftttttttffttf\\ntfffttttfffffft11ttttttt111i..............:;:::;;::...............,1t1111ttffttttffLLfLfttfffffffttf\\ntfffttttttttttt11ttttttt111:..............,;;;;;;:,................;t11111ttt1t1tffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt11i,..........,::::;;;;;;:,................,1t11t111tttttffffLLfttfffffffttf\\nttttt1tttttttt111tt1tttt11i.........:;;;;:,;;::::::.................;t1ttt11tftttffffffftttffftffttt\\nttttt1tttt11tt111ttttttt111,.......;;;;;;:,:;::::::,................:tttt1111tt11ttfttft11tftttffttt\\nttttt1tttttttt11tttttttt11;,......,;;;;;;:::;::::::,................,itt111t11t11ttftttt11ttttttfttt\\nttttt1tttttttt11tttttttt11;,......:;;;;i;...,:::::,,.................:tt1tttt1111ttttttt11ttttttfttt\\n1t1t111tttttt111tttttttt1;,.,.....,:;:......,:::::,,..................it1tttt11111tttt11111ttttttt1t\\n1111111111111111111111111:,,,......,,. .....,,::::,,..................,1t11111111111111111111111tt11\\n1111111111111111111111111,,....,,...........,,,:::::,..................itt11111111111111111111111111\\n1111111111111111111111111;,.................,:::::::,,................:1tt11111111111111111111111111\\n11111111111111111111111111:.... ............,:::,:,,.................,1tt11111111111111111111111111\\n11111111111111111111111111ii;;;;;i, .........,,::,,,,,................,:;;1tt11111111111111111111111\\n11111111111111111111111111111111t1,..........,,,:,,:,:,,. ...........,:::;;i11tt11111111111111111111\\n11111111111111111111111111111111t;.............,:::;;;;:,........ .,:::;;:;i1t111111111ttttttt11111\\n111111111111111111111111111111111:...........,;;;i1iiii;:,.......::,,::::;;i1ttt111t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt11111111t\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttftttttttttttttffffLffttfffffffLfffttttttttt111tfffffffftttttttt11111ttttttfffftfLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tfffffffffttffffffttt11111ttt1\\ntttttttttttffffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLfft11111ttttt\\nttttttttttffLLLLftttttfLLLfttttttffLftttttttffft1ttfffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffffftftttfffffffttt111tftt11t11tfLLfftt11tffft11ttttt\\ntttttttfffLLLLLLLLffttfttttfLLLfftffttttffftt1iii11tttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLffffftttttfti;;::,,,:;i1tffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttfffffLLLLLLLLLLfttfftfLfffffffLLfttttt1;,,,,,,,::,:ittffffffftt1111ttt1ttt1tftttt1ttffffLLLLLfttt\\nttfLLffffLLLLLLLLfftfLfftttfLfffLLLLfttt1i;:::;;iiii;,;t11tfffft11111tffft1tt1ttt1ttttfffLLLLLLLLfff\\ntffffftttffLLLffttttfffffttLLLLfLLLffttf1;;iiii11111i::1t11tttt1ttt11tfffttfftttttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLffLLftttti:;;;;iiiiiii;;tftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttfLffffffftttfffffffffttfttffLfffLfttttti;;;;;iii;i1iiftttttffft11111tfttffftttttttttttttfLLftfffft\\nttffffffffftttffffffffftfffftffffftttttft11i;;;iiii1iiit11tttttfft1111tt11ffttffttfffffLLfffffffffLL\\nttffffffffttttfffffffftttttt1tttffftttttti1i;;;ii11iii111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\n1ttffffffffttfffffffftt1ttt1111tfffftttt111i;;iiiiii111ttfffft11t11111tfftttttttt1ttffffLfftttfLLLLf\\ntttttttttffttfftttttt1ttfftttt1ttfftttttt111i;i;:;ii11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffftttt11tfftt1ttt111;;i;;;iii1ttttffftt11t1111ttt11tt1tffttt1111ttfftfLffftt\\ntfttffffttt11tttttft1tffffttffttttft111ttt11;;;;:;i1i1;;11tft111tt1111tt111tt1tfffffttttt11tttttffft\\n1tttfffffftttffftfft11tfftttffttttft1111iii1;;;i;iiii1i,,,:;;i11tt1111tt111tft1fffffttfffftt11tffLLf\\n111ttfffftt1ttffttt1111tfttft11tt1t1i;:,,,;1i;;i1ii;iti,,.....,:;i1t11111t11tt1tfffttffffffft1fffLLf\\ntfttttftt1tt11tft11ttt11tttt1tt11i;:,.....;11i;i1i;1tt;,,.........,:i11111111t1tffttttffffftt1tfffLf\\ntffttttttttftt1111ttttt11111tft;,.........;11111i1ttti,.............,1111tttt1111tffftttfft1tt1tffft\\n1ttttttttttttt1111tttttt11tfff1,...........,:;;;;;11i:...............itttttttt1ttfffLffttttffffttttf\\ntfffttttffttttt11ttttttt11tfffi............ ,:;;;;;;;,...............;t1ttttfft1tffffffftttttttffttf\\ntfffttttfffffft11tttttttttt1tf;..............:;;;;;;;,...............:111ttttttttfffLfLfttfffffffttf\\ntfffttttftftft111ttttttt11t111:..............:;;;;;::,...............,1t11ttt1t1tffLLLLfttfffffffttf\\ntfffttttfttttt111ttttttt11ttt1:..............,;;;::;::................itt111tttttffffLLfttfffffffttf\\ntttttttttttttt111ttttttt1ttfft:..............,;;;;::::................:1tt11tft1tffffffftttffttffttt\\nttttt1tttt11tt11tttttttt1tttt1;.,::,..........:;:::;::,...............,1t1111tt11tttttft11tfttttfttt\\nttttt1tttttttt11ttttttttt1ttt1;,:;;:..........,::::::,,................it11111111ttftttt11ttttttfttt\\nttttt1tttttttt11tttttttttttttiiiiii;,.........,:::::::,................:ttttt1111ttttttt11ttttttfttt\\n1t1111tttttttt11tttttttt1ttt1;;;;ii;,.........,:::::::,.................ittttt1111tttt11111ttttttt1t\\n11111111111111111111111111tt1;;;;ii;...........::::::::................ :1t111111111111111111111t111\\n11111111111111111111111111tt1;::;;i:...........,:::::::,...............,itttt11111111111111111111111\\n11111111111111111111111tttttt;,,,::............,::::::,,...............ittttt11111111111111111111111\\n1111111111111111111111111tttt1:,,..............,:::::,,,,.......,:;::,:1t1111111111111111111111t1111\\n11111111111111111111111111111111i;;i:..........,:,,,.,,.,.......::;;i;it1ttt111111111111111111111111\\n1111111111111111111111111111111111ti...........,,.,:,:;::,......,:;;ii1ttttt11111111111111111t111111\\n1111111111111111111111111111111111t;...........,;iiiiiii;:,......:;;;i1ttttt111t1111111111tttttt1111\\n11111111111111111111111111111111111:...........,;i11iiii;:,.......,:i1tttttt1ttttt1t11t1111ttttt1111\\n\",\n];\n\nfunction isApr1(): boolean {\n const d = new Date();\n // Months are 0 indexed\n return d.getMonth() === 3 && d.getDate() === 1;\n}\n\nexport const Apr1Events = new EventEmitter();\n\nexport function Apr1(): React.ReactElement {\n const [open, setOpen] = useState(isApr1());\n const [n, setN] = useState(0);\n\n useEffect(() => {\n const id = setInterval(() => setN((n) => (n + 1) % frames.length), 100);\n return () => clearInterval(id);\n }, []);\n\n useEffect(\n () =>\n Apr1Events.subscribe(() => {\n setOpen(true);\n }),\n [],\n );\n\n if (!open) return <>;\n\n return (\n setOpen(false)}>\n
{frames[n]}
\n
\n \n
\n
\n );\n}\n","import React from \"react\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ICityProps {\n currentCity: CityName;\n city: CityName;\n onTravel: (city: CityName) => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n travel: {\n color: theme.colors.white,\n lineHeight: \"1em\",\n whiteSpace: \"pre\",\n cursor: \"pointer\",\n },\n }),\n);\n\nfunction City(props: ICityProps): React.ReactElement {\n const classes = useStyles();\n if (props.city !== props.currentCity) {\n return (\n {props.city}}>\n props.onTravel(props.city)} className={classes.travel}>\n {props.city[0]}\n \n \n );\n }\n return {props.city[0]};\n}\n\ninterface IProps {\n currentCity: CityName;\n onTravel: (city: CityName) => void;\n}\n\nexport function WorldMap(props: IProps): React.ReactElement {\n // prettier-ignore\n return (\n <>\n ,_ . ._. _. .\n , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-\n /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_\n / ,/'-/~ '\\ ,' _ , ','|~ ._/-, /~\n ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~\n .-~ '| '',\\~|\\ _\\~ ,_ , /,\n '\\ /'~ |_/~\\\\,-,~ \\ \" ,_,/ |\n | / ._-~'\\_ _~| \\ ) \n \\ __-\\ '/ ~ |\\ \\_ / ~\n ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,\n ~-_' _; '\\ '-, \\,' /\\/ |\n '\\_,~'\\_ \\_ _, /' ' |, /|'\n / \\_ ~ | / \\ ~'; -,_.\n | ~\\ | | , '-_, ,; ~ ~\\\n \\, / \\ / /| ,-, , -,\n | ,/ | |' |/ ,- ~ \\ '.\n ,| ,/ \\ ,/ \\ |\n / | ~ -~~-, / _\n | ,-' ~ /\n / ,' ~\n ',| ~\n ~'\n \n );\n}\n","import React from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { StealthIcon } from \"./StealthIcon\";\nimport { KillIcon } from \"./KillIcon\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Player } from \"../../Player\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: IAction;\n}\n\nexport function SuccessChance(props: IProps): React.ReactElement {\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner, Player);\n\n let chance = <>;\n if (estimatedSuccessChance[0] === estimatedSuccessChance[1]) {\n chance = <>{formatNumber(estimatedSuccessChance[0] * 100, 1)}%;\n } else {\n chance = (\n <>\n {formatNumber(estimatedSuccessChance[0] * 100, 1)}% ~ {formatNumber(estimatedSuccessChance[1] * 100, 1)}%\n \n );\n }\n\n return (\n <>\n Estimated success chance: {chance} {props.action.isStealth ? : <>}\n {props.action.isKill ? : <>}\n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function StaticModal(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n","/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\nimport { Script } from \"./Script\";\nimport { ScriptUrl } from \"./ScriptUrl\";\nimport { Settings } from \"../Settings/Settings\";\nimport { IMap } from \"../types\";\nimport { Terminal } from \"../Terminal\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\nimport { ScriptArg } from \"../Netscript/ScriptArg\";\n\nexport class RunningScript {\n // Script arguments\n args: ScriptArg[] = [];\n\n // Map of [key: hostname] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n dataMap: IMap = {};\n\n // Script filename\n filename = \"\";\n\n // This script's logs. An array of log entries\n logs: string[] = [];\n\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n logUpd = false;\n\n // Total amount of hacking experience earned from this script when offline\n offlineExpGained = 0;\n\n // Total amount of money made by this script when offline\n offlineMoneyMade = 0;\n\n // Number of seconds that the script has been running offline\n offlineRunningTime = 0.01;\n\n // Total amount of hacking experience earned from this script when online\n onlineExpGained = 0;\n\n // Total amount of money made by this script when online\n onlineMoneyMade = 0;\n\n // Number of seconds that this script has been running online\n onlineRunningTime = 0.01;\n\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n pid = -1;\n\n // How much RAM this script uses for ONE thread\n ramUsage = 0;\n\n // hostname of the server on which this script is running\n server = \"\";\n\n // Number of threads that this script is running with\n threads = 1;\n\n // Script urls for the current running script for translating urls back to file names in errors\n dependencies: ScriptUrl[] = [];\n\n constructor(script: Script | null = null, args: ScriptArg[] = []) {\n if (script == null) {\n return;\n }\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n this.dependencies = script.dependencies;\n }\n\n log(txt: string): void {\n if (this.logs.length > Settings.MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n if (Settings.TimestampsFormat) {\n logEntry = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog(): void {\n for (let i = 0; i < this.logs.length; ++i) {\n Terminal.print(this.logs[i]);\n }\n }\n\n clearLog(): void {\n this.logs.length = 0;\n }\n\n // Update the moneyStolen and numTimesHack maps when hacking\n recordHack(hostname: string, moneyGained: number, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][0] += moneyGained;\n this.dataMap[hostname][1] += n;\n }\n\n // Update the grow map when calling grow()\n recordGrow(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][2] += n;\n }\n\n // Update the weaken map when calling weaken() {\n recordWeaken(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][3] += n;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): IReviverValue {\n return Generic_toJSON(\"RunningScript\", this);\n }\n\n // Initializes a RunningScript Object from a JSON save state\n static fromJSON(value: IReviverValue): RunningScript {\n return Generic_fromJSON(RunningScript, value.data);\n }\n}\n\nReviver.constructors.RunningScript = RunningScript;\n","import { Literatures } from \"./Literatures\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function showLiterature(fn: string): void {\n const litObj = Literatures[fn];\n if (litObj == null) {\n return;\n }\n const txt = `${litObj.title}

${litObj.txt}`;\n dialogBoxCreate(txt);\n}\n","import React from \"react\";\nimport { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\nimport { DarkWebItem } from \"./DarkWebItem\";\nimport { isCreateProgramWork } from \"../Work/CreateProgramWork\";\n\n//Posts a \"help\" message if connected to DarkWeb\nexport function checkIfConnectedToDarkweb(): void {\n const server = Player.getCurrentServer();\n if (server !== null && SpecialServers.DarkWeb == server.hostname) {\n Terminal.print(\n \"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name]' \" +\n \"to purchase an item. Use 'buy -a' to purchase all unowned items.\",\n );\n }\n}\n\nexport function listAllDarkwebItems(): void {\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n\n const cost = Player.getHomeComputer().programs.includes(item.program) ? (\n [OWNED]\n ) : (\n \n );\n\n Terminal.printRaw(\n <>\n {item.program} - {cost} - {item.description}\n ,\n );\n }\n}\n\nexport function buyDarkwebItem(itemName: string): void {\n itemName = itemName.toLowerCase();\n\n // find the program that matches, if any\n let item: DarkWebItem | null = null;\n\n for (const key of Object.keys(DarkWebItems)) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n }\n\n // return if invalid\n if (item === null) {\n Terminal.error(\"Unrecognized item: \" + itemName);\n return;\n }\n\n // return if the player already has it.\n if (Player.hasProgram(item.program)) {\n Terminal.print(\"You already have the \" + item.program + \" program\");\n return;\n }\n\n // return if the player doesn't have enough money\n if (Player.money < item.price) {\n Terminal.error(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price, \"other\");\n\n Player.getHomeComputer().pushProgram(item.program);\n // Cancel if the program is in progress of writing\n if (isCreateProgramWork(Player.currentWork) && Player.currentWork.programName === item.program) {\n Player.finishWork(true);\n }\n\n Terminal.print(\n \"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\",\n );\n}\n\nexport function buyAllDarkwebItems(): void {\n const itemsToBuy: DarkWebItem[] = [];\n let cost = 0;\n\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n if (!Player.hasProgram(item.program)) {\n itemsToBuy.push(item);\n cost += item.price;\n }\n }\n\n if (itemsToBuy.length === 0) {\n Terminal.print(\"All available programs have been purchased already.\");\n return;\n }\n\n if (cost > Player.money) {\n Terminal.error(\n \"Not enough money to purchase remaining programs, \" + numeralWrapper.formatMoney(cost) + \" required\",\n );\n return;\n }\n\n for (const item of itemsToBuy) {\n buyDarkwebItem(item.program);\n }\n}\n","/**\n * Functions used to determine whether the target can be hacked (or grown/weakened).\n * Meant to be used for Netscript implementation\n *\n * The returned status object's message should be used for logging in Netscript\n */\nimport { IReturnStatus } from \"../types\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Server } from \"../Server/Server\";\n\nfunction baseCheck(server: Server, fnName: string): IReturnStatus {\n const hostname = server.hostname;\n\n if (!(\"requiredHackingSkill\" in server)) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because it is a Hacknet Node`,\n };\n }\n\n if (server.hasAdminRights === false) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because you do not have root access`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanHack(server: Server, p: IPlayer): IReturnStatus {\n const initialCheck = baseCheck(server, \"hack\");\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n if (s.requiredHackingSkill > p.hacking) {\n return {\n res: false,\n msg: `Cannot hack ${server.hostname} server because your hacking skill is not high enough`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanGrow(server: Server): IReturnStatus {\n return baseCheck(server, \"grow\");\n}\n\nexport function netscriptCanWeaken(server: Server): IReturnStatus {\n return baseCheck(server, \"weaken\");\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { calculateSkill } from \"../../PersonObjects/formulas/skill\";\n\nfunction calculateRawDiff(player: IPlayer, stats: number, startingDifficulty: number): number {\n const difficulty = startingDifficulty - Math.pow(stats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nexport function calculateDifficulty(player: IPlayer, startingSecurityLevel: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n return calculateRawDiff(player, totalStats, startingSecurityLevel);\n}\n\nexport function calculateReward(player: IPlayer, startingSecurityLevel: number): number {\n const xpMult = 10 * 60 * 15;\n const total =\n calculateSkill(player.mults.strength_exp * xpMult, player.mults.strength) +\n calculateSkill(player.mults.defense_exp * xpMult, player.mults.defense) +\n calculateSkill(player.mults.agility_exp * xpMult, player.mults.agility) +\n calculateSkill(player.mults.dexterity_exp * xpMult, player.mults.dexterity) +\n calculateSkill(player.mults.charisma_exp * xpMult, player.mults.charisma);\n return calculateRawDiff(player, total, startingSecurityLevel);\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\nimport { substituteAliases } from \"../Alias\";\n// Helper function that checks if an argument (which is a string) is a valid number\nfunction isNumber(str: string): boolean {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n return !isNaN(str as unknown as number) && !isNaN(parseFloat(str));\n}\nexport function ParseCommands(commands: string): string[] {\n // Sanitize input\n commands = commands.trim();\n // Replace all extra whitespace in command with a single space\n commands = commands.replace(/\\s\\s+/g, \" \");\n\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return [];\n // Split commands and execute sequentially\n const allCommands = match\n .map(substituteAliases)\n .map((c) => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g))\n .flat();\n\n const out: string[] = [];\n for (const c of allCommands) {\n if (c === null) continue;\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n out.push(c.trim());\n }\n return out;\n}\n\nexport function ParseCommand(command: string): (string | number | boolean)[] {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``;\n\n // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n if (c === KEY.DOUBLE_QUOTE) {\n // Double quotes\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.DOUBLE_QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.DOUBLE_QUOTE;\n } else if (inQuote === KEY.DOUBLE_QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.QUOTE) {\n // Single quotes, same thing as above\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.QUOTE;\n } else if (inQuote === KEY.QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.SPACE && inQuote === ``) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from a string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n ++i;\n }\n\n // Add the last argument\n if (start !== i) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n","import React, { useState } from \"react\";\n\nimport { CinematicLine } from \"./CinematicLine\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n lines: string[];\n auto?: boolean;\n onDone?: () => void;\n}\n\nexport function CinematicText(props: IProps): React.ReactElement {\n const [i, setI] = useState(0);\n const [done, setDone] = useState(false);\n\n function advance(): void {\n const newI = i + 1;\n setI(newI);\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return (\n <>\n {props.lines.slice(0, i).map((line, i) => (\n {line}\n ))}\n {props.lines.length > i && }\n {!props.auto && props.onDone && done && }\n \n );\n}\n","/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\nexport const MaxSleevesFromCovenant = 5;\nexport const BaseCostPerSleeve = 10e12;\n","/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\nimport * as walk from \"acorn-walk\";\nimport acorn, { parse } from \"acorn\";\n\nimport { RamCalculationErrorCode } from \"./RamCalculationErrorCodes\";\n\nimport { RamCosts, RamCostConstants } from \"../Netscript/RamCostGenerator\";\nimport { Script } from \"./Script\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { areImportsEquals } from \"../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Node } from \"../NetscriptJSEvaluator\";\n\nexport interface RamUsageEntry {\n type: \"ns\" | \"dom\" | \"fn\" | \"misc\";\n name: string;\n cost: number;\n}\n\nexport interface RamCalculation {\n cost: number;\n entries?: RamUsageEntry[];\n}\n\n// These special strings are used to reference the presence of a given logical\n// construct within a user script.\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\";\n\n// The global scope of a script is registered under this key during parsing.\nconst memCheckGlobalKey = \".__GLOBAL__\";\n\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\nasync function parseOnlyRamCalculate(player: IPlayer, otherScripts: Script[], code: string): Promise {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap: { [key: string]: string[] } = {};\n\n // Scripts we've parsed.\n const completedParses = new Set();\n\n // Scripts we've discovered that need to be parsed.\n const parseQueue: string[] = [];\n\n // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n function parseCode(code: string, moduleName: string): void {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName);\n\n // Add any additional modules to the parse queue;\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n }\n\n // Splice all the references in\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n }\n\n // Parse the initial module, which is the \"main\" script that is being run\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule);\n\n // Process additional modules, which occurs if the \"main\" script has any imports\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift();\n if (nextModule === undefined) throw new Error(\"nextModule should not be undefined\");\n\n // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n let code;\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return { cost: RamCalculationErrorCode.URLImportError };\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return { cost: RamCalculationErrorCode.ImportError };\n }\n\n let script = null;\n const fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n for (const s of otherScripts) {\n if (areImportsEquals(s.filename, fn)) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return { cost: RamCalculationErrorCode.ImportError }; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n }\n\n // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n let ram = RamCostConstants.ScriptBaseRamCost;\n const detailedCosts: RamUsageEntry[] = [\n { type: \"misc\", name: \"baseCost\", cost: RamCostConstants.ScriptBaseRamCost },\n ];\n const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n const loadedFns: Record = {};\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift();\n if (ref === undefined) throw new Error(\"ref should not be undefined\");\n\n // Check if this is one of the special keys, and add the appropriate ram cost if so.\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += RamCostConstants.ScriptHacknetNodesRamCost;\n detailedCosts.push({ type: \"ns\", name: \"hacknet\", cost: RamCostConstants.ScriptHacknetNodesRamCost });\n }\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: \"dom\", name: \"document\", cost: RamCostConstants.ScriptDomRamCost });\n }\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: \"dom\", name: \"window\", cost: RamCostConstants.ScriptDomRamCost });\n }\n if (ref === \"corporation\" && !resolvedRefs.has(\"corporation\")) {\n ram += RamCostConstants.ScriptCorporationRamCost;\n detailedCosts.push({ type: \"ns\", name: \"corporation\", cost: RamCostConstants.ScriptCorporationRamCost });\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n for (const ident of Object.keys(dependencyMap).filter((k) => k.startsWith(prefix))) {\n for (const dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (const dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n\n // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n try {\n function applyFuncRam(cost: number | ((p: IPlayer) => number)): number {\n if (typeof cost === \"number\") {\n return cost;\n } else if (typeof cost === \"function\") {\n return cost(player);\n } else {\n return 0;\n }\n }\n\n // Only count each function once\n if (loadedFns[ref]) {\n continue;\n }\n loadedFns[ref] = true;\n\n // This accounts for namespaces (Bladeburner, CodingContract, etc.)\n const findFunc = (\n prefix: string,\n obj: object,\n ref: string,\n ): { func: (p: IPlayer) => number | number; refDetail: string } | undefined => {\n if (!obj) return;\n const elem = Object.entries(obj).find(([key]) => key === ref);\n if (elem !== undefined && (typeof elem[1] === \"function\" || typeof elem[1] === \"number\")) {\n return { func: elem[1], refDetail: `${prefix}${ref}` };\n }\n for (const [key, value] of Object.entries(obj)) {\n const found = findFunc(`${key}.`, value, ref);\n if (found) return found;\n }\n return undefined;\n };\n\n const details = findFunc(\"\", RamCosts, ref);\n const fnRam = applyFuncRam(details?.func ?? 0);\n ram += fnRam;\n detailedCosts.push({ type: \"fn\", name: details?.refDetail ?? \"\", cost: fnRam });\n } catch (error) {\n console.log(error);\n continue;\n }\n }\n return { cost: ram, entries: detailedCosts.filter((e) => e.cost > 0) };\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n\nexport function checkInfiniteLoop(code: string): number {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n\n function nodeHasTrueTest(node: acorn.Node): boolean {\n return node.type === \"Literal\" && (node as any).raw === \"true\";\n }\n\n function hasAwait(ast: acorn.Node): boolean {\n let hasAwait = false;\n walk.recursive(\n ast,\n {},\n {\n AwaitExpression: () => {\n hasAwait = true;\n },\n },\n );\n return hasAwait;\n }\n\n let missingAwaitLine = -1;\n walk.recursive(\n ast,\n {},\n {\n WhileStatement: (node: Node, st: unknown, walkDeeper: walk.WalkerCallback) => {\n if (nodeHasTrueTest(node.test) && !hasAwait(node)) {\n missingAwaitLine = (code.slice(0, node.start).match(/\\n/g) || []).length + 1;\n } else {\n node.body && walkDeeper(node.body, st);\n }\n },\n },\n );\n\n return missingAwaitLine;\n}\n\ninterface ParseDepsResult {\n dependencyMap: {\n [key: string]: Set | undefined;\n };\n additionalModules: string[];\n}\n\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\nfunction parseOnlyCalculateDeps(code: string, currentModule: string): ParseDepsResult {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap: { [key: string]: Set | undefined } = {};\n dependencyMap[globalKey] = new Set();\n\n // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n const internalToExternal: { [key: string]: string | undefined } = {};\n\n const additionalModules: string[] = [];\n\n // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n function addRef(key: string, name: string): void {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n const external = internalToExternal[name];\n if (external !== undefined) {\n s.add(external);\n }\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n }\n\n //A list of identifiers that resolve to \"native Javascript code\"\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype);\n\n interface State {\n key: string;\n }\n\n // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n function commonVisitors(): walk.RecursiveVisitors {\n return {\n Identifier: (node: Node, st: State) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n addRef(st.key, node.name);\n },\n WhileStatement: (node: Node, st: State, walkDeeper: walk.WalkerCallback) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node: Node, st: State, walkDeeper: walk.WalkerCallback) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node: Node, st: State, walkDeeper: walk.WalkerCallback) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node: Node, st: State, walkDeeper: walk.WalkerCallback) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node: Node, st: State, walkDeeper: walk.WalkerCallback) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n },\n };\n }\n\n walk.recursive(\n ast,\n { key: globalKey },\n Object.assign(\n {\n ImportDeclaration: (node: Node, st: State) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName);\n\n // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: (node: Node) => {\n // node.id will be null when using 'export default'. Add a module name indicating the default export.\n const key = currentModule + \".\" + (node.id === null ? \"__SPECIAL_DEFAULT_EXPORT__\" : node.id.name);\n walk.recursive(node, { key: key }, commonVisitors());\n },\n },\n commonVisitors(),\n ),\n );\n\n return { dependencyMap: dependencyMap, additionalModules: additionalModules };\n}\n\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\nexport async function calculateRamUsage(\n player: IPlayer,\n codeCopy: string,\n otherScripts: Script[],\n): Promise {\n try {\n return await parseOnlyRamCalculate(player, otherScripts, codeCopy);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n","/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nexport function roundToTwo(decimal: number): number {\n const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));\n\n return +`${leftShift}e-2`;\n}\n","import { workerScripts } from \"./WorkerScripts\";\n\nlet pidCounter = 1;\n\n/**\n * Find and return the next availble PID for a script\n */\nexport function generateNextPid(): number {\n let tempCounter = pidCounter;\n\n // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n let found = false;\n for (let i = 0; i < 1e6; ) {\n if (!workerScripts.has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\n\nexport function resetPidCounter(): void {\n pidCounter = 1;\n}\n","import $ from \"jquery\";\nimport { vsprintf, sprintf } from \"sprintf-js\";\n\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\n\nimport { CONSTANTS } from \"./Constants\";\n\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\n\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\nimport { HacknetServer } from \"./Hacknet/HacknetServer\";\n\nimport { Terminal } from \"./Terminal\";\n\nimport { Player } from \"./Player\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Script } from \"./Script/Script\";\nimport { findRunningScript, findRunningScriptByPid } from \"./Script/ScriptHelpers\";\nimport { isScriptFilename } from \"./Script/isScriptFilename\";\nimport { PromptEvent } from \"./ui/React/PromptManager\";\n\nimport { GetServer, GetAllServers, DeleteServer, AddToAllServers, createUniqueRandomIp } from \"./Server/AllServers\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport {\n getServerOnNetwork,\n numCycleForGrowth,\n numCycleForGrowthCorrected,\n processSingleServerGrowth,\n safetlyCreateUniqueServer,\n} from \"./Server/ServerHelpers\";\nimport { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from \"./Server/ServerPurchases\";\nimport { Server } from \"./Server/Server\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\n\nimport { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\n\nimport { LogBoxEvents, LogBoxCloserEvents } from \"./ui/React/LogBoxManager\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { FormulaGang as FormulaGang } from \"./Gang/formulas/formulas\";\n\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\nimport { NetscriptStanek } from \"./NetscriptFunctions/Stanek\";\nimport { NetscriptInfiltration } from \"./NetscriptFunctions/Infiltration\";\nimport { NetscriptUserInterface } from \"./NetscriptFunctions/UserInterface\";\nimport { NetscriptBladeburner } from \"./NetscriptFunctions/Bladeburner\";\nimport { NetscriptCodingContract } from \"./NetscriptFunctions/CodingContract\";\nimport { NetscriptCorporation } from \"./NetscriptFunctions/Corporation\";\nimport { NetscriptFormulas } from \"./NetscriptFunctions/Formulas\";\nimport { NetscriptStockMarket } from \"./NetscriptFunctions/StockMarket\";\nimport { NetscriptGrafting } from \"./NetscriptFunctions/Grafting\";\nimport { IPort } from \"./NetscriptPort\";\n\nimport {\n NS as INS,\n Player as INetscriptPlayer,\n Gang as IGang,\n Bladeburner as IBladeburner,\n Stanek as IStanek,\n Infiltration as IInfiltration,\n RunningScript as IRunningScript,\n RecentScript as IRecentScript,\n SourceFileLvl,\n BasicHGWOptions,\n ProcessInfo,\n HackingMultipliers,\n HacknetMultipliers,\n BitNodeMultipliers as IBNMults,\n Server as IServerDef,\n RunningScript as IRunningScriptDef,\n // ToastVariant,\n} from \"./ScriptEditor/NetscriptDefinitions\";\nimport { NetscriptSingularity } from \"./NetscriptFunctions/Singularity\";\n\nimport { toNative } from \"./NetscriptFunctions/toNative\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\nimport { checkEnum } from \"./utils/helpers/checkEnum\";\n\nimport { Flags } from \"./NetscriptFunctions/Flags\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { CalculateShareMult, StartSharing } from \"./NetworkShare/Share\";\nimport { recentScripts } from \"./Netscript/RecentScripts\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { InternalAPI, NetscriptContext, wrapAPI } from \"./Netscript/APIWrapper\";\nimport { INetscriptHelper, ScriptIdentifier } from \"./NetscriptFunctions/INetscriptHelper\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { GangMember } from \"./Gang/GangMember\";\nimport { GangMemberTask } from \"./Gang/GangMemberTask\";\nimport { ScriptArg } from \"./Netscript/ScriptArg\";\n\ninterface NS extends INS {\n [key: string]: any;\n gang: IGang;\n bladeburner: IBladeburner;\n stanek: IStanek;\n infiltration: IInfiltration;\n}\n\nexport function NetscriptFunctions(workerScript: WorkerScript): NS {\n const updateDynamicRam = function (fnName: string, ramCost: number): void {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n workerScript.dynamicLoadedFns[fnName] = true;\n\n let threads = workerScript.scriptRef.threads;\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.hostname}`);\n threads = 1;\n }\n workerScript.dynamicRamUsage += ramCost;\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Threads: ${threads}\n Dynamic RAM Usage: ${numeralWrapper.formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${numeralWrapper.formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`,\n );\n }\n };\n\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} hostname - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {BaseServer} The specified server as a BaseServer\n */\n const safeGetServer = function (hostname: string, ctx: NetscriptContext): BaseServer {\n const server = GetServer(hostname);\n if (server == null) {\n throw ctx.makeRuntimeErrorMsg(`Invalid hostname: ${hostname}`);\n }\n return server;\n };\n\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n const getRunningScriptByArgs = function (\n ctx: NetscriptContext,\n fn: string,\n hostname: string,\n scriptArgs: ScriptArg[],\n ): RunningScript | null {\n if (!Array.isArray(scriptArgs)) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid scriptArgs argument passed into getRunningScript() from ${ctx.function}(). ` +\n `This is probably a bug. Please report to game developer`,\n );\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (hostname == null) {\n hostname = workerScript.hostname;\n }\n const server = safeGetServer(hostname, ctx);\n\n return findRunningScript(fn, scriptArgs, server);\n }\n\n // If no arguments are specified, return the current RunningScript\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid: number): RunningScript | null {\n for (const server of GetAllServers()) {\n const runningScript = findRunningScriptByPid(pid, server);\n if (runningScript) return runningScript;\n }\n return null;\n };\n\n const getRunningScript = (ctx: NetscriptContext, ident: ScriptIdentifier): RunningScript | null => {\n if (typeof ident === \"number\") {\n return getRunningScriptByPid(ident);\n } else {\n return getRunningScriptByArgs(ctx, ident.fn, ident.hostname, ident.args);\n }\n };\n\n /**\n * Sanitizes a `RunningScript` to remove sensitive information, making it suitable for\n * return through an NS function.\n * @see NS.getRecentScripts\n * @see NS.getRunningScript\n * @param runningScript Existing, internal RunningScript\n * @returns A sanitized, NS-facing copy of the RunningScript\n */\n const createPublicRunningScript = function (runningScript: RunningScript): IRunningScript {\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads,\n };\n };\n\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n const getCannotFindRunningScriptErrorMessage = function (ident: ScriptIdentifier): string {\n if (typeof ident === \"number\") return `Cannot find running script with pid: ${ident}`;\n\n return `Cannot find running script ${ident.fn} on server ${ident.hostname} with args: ${arrayToString(ident.args)}`;\n };\n\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n const failOnHacknetServer = function (server: BaseServer, callingFn = \"\"): boolean {\n if (server instanceof HacknetServer) {\n workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n };\n\n const makeRuntimeErrorMsg = function (caller: string, msg: string): string {\n const errstack = new Error().stack;\n if (errstack === undefined) throw new Error(\"how did we not throw an error?\");\n const stack = errstack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n for (const stackline of stack) {\n let filename;\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n if (!filename) continue;\n\n interface ILine {\n line: string;\n func: string;\n }\n\n function parseChromeStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n if (lineMatch && funcMatch) {\n return { line: lineMatch[1], func: funcMatch[1] };\n }\n return null;\n }\n let call = { line: \"-1\", func: \"unknown\" };\n const chromeCall = parseChromeStackline(stackline);\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return { line: lineMatch[1], func: line.slice(0, lio) };\n }\n return null;\n }\n\n const firefoxCall = parseFirefoxStackline(stackline);\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, () => msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return makeRuntimeRejectMsg(workerScript, rejectMsg);\n };\n\n const checkSingularityAccess = function (func: string): void {\n if (Player.bitNodeN !== 4) {\n if (Player.sourceFileLvl(4) === 0) {\n throw makeRuntimeErrorMsg(\n func,\n `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.`,\n );\n }\n }\n };\n\n const hack = async function (\n ctx: NetscriptContext,\n hostname: string,\n manual: boolean,\n { threads: requestedThreads, stock }: BasicHGWOptions = {},\n ): Promise {\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(ctx, requestedThreads);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n throw ctx.makeRuntimeErrorMsg(\"Cannot be executed on this server.\");\n }\n\n // Calculate the hacking time\n const hackingTime = calculateHackingTime(server, Player); // This is in seconds\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, Player);\n if (!canHack.res) {\n throw ctx.makeRuntimeErrorMsg(canHack.msg || \"\");\n }\n\n ctx.log(\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n hackingTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n\n return netscriptDelay(hackingTime * 1000, workerScript).then(function () {\n const hackChance = calculateHackingChance(server, Player);\n const rand = Math.random();\n let expGainedOnSuccess = calculateHackingExpGain(server, Player) * threads;\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n let maxThreadNeeded = Math.ceil(1 / percentHacked);\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads;\n\n // Over-the-top safety checks\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n server.moneyAvailable -= moneyDrained;\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n let moneyGained = moneyDrained * BitNodeMultipliers.ScriptHackMoneyGain;\n if (manual) {\n moneyGained = moneyDrained * BitNodeMultipliers.ManualHackMoney;\n }\n\n Player.gainMoney(moneyGained, \"hacking\");\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n if (manual) Player.gainIntelligenceExp(0.005);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n ctx.log(\n () =>\n `Successfully hacked '${server.hostname}' for ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n if (stock) {\n influenceStockThroughServerHack(server, moneyDrained);\n }\n if (manual) {\n server.backdoorInstalled = true;\n }\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n Player.gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n ctx.log(\n () =>\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(\n expGainedOnFailure,\n )} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args: unknown[]): string {\n let out = \"\";\n for (let arg of args) {\n arg = toNative(arg);\n out += typeof arg === \"object\" ? JSON.stringify(arg) : `${arg}`;\n }\n\n return out;\n };\n\n const roughlyIs = (expect: object, actual: unknown): boolean => {\n console.log(expect);\n console.log(actual);\n\n if (typeof actual !== \"object\" || actual == null) return false;\n const expects = Object.keys(expect);\n const actuals = Object.keys(actual);\n for (const expect of expects)\n if (!actuals.includes(expect)) {\n console.log(expect);\n return false;\n }\n return true;\n };\n\n const helperString = (funcName: string, argName: string, v: unknown): string => {\n if (typeof v === \"string\") return v;\n if (typeof v === \"number\") return v + \"\"; // cast to string;\n throw makeRuntimeErrorMsg(funcName, `'${argName}' should be a string.`);\n };\n const helperNumber = (funcName: string, argName: string, v: unknown): number => {\n if (typeof v === \"string\") {\n const x = parseFloat(v);\n if (!isNaN(x)) return x; // otherwise it wasn't even a string representing a number.\n } else if (typeof v === \"number\") {\n if (isNaN(v)) throw makeRuntimeErrorMsg(funcName, `'${argName}' is NaN.`);\n return v;\n }\n throw makeRuntimeErrorMsg(funcName, `'${argName}' should be a number.`);\n };\n\n const isScriptArgs = (_args: unknown): _args is ScriptArg[] =>\n Array.isArray(_args) &&\n _args.every((a) => typeof a === \"string\" || typeof a === \"number\" || typeof a === \"boolean\");\n\n const helperScriptArgs = (funcName: string, args: unknown): ScriptArg[] => {\n if (!isScriptArgs(args)) throw makeRuntimeErrorMsg(funcName, \"'args' is not an array of script args\");\n return args as ScriptArg[];\n };\n\n const helper: INetscriptHelper = {\n updateDynamicRam: updateDynamicRam,\n makeRuntimeErrorMsg: makeRuntimeErrorMsg,\n string: helperString,\n number: helperNumber,\n ustring: (funcName: string, argName: string, v: unknown): string | undefined => {\n if (v === undefined) return undefined;\n return helperString(funcName, argName, v);\n },\n unumber: (funcName: string, argName: string, v: unknown): number | undefined => {\n if (v === undefined) return undefined;\n return helperNumber(funcName, argName, v);\n },\n scriptArgs: helperScriptArgs,\n scriptIdentifier: (funcName: string, _fn: unknown, _hostname: unknown, _args: unknown): ScriptIdentifier => {\n if (_fn === undefined) return workerScript.pid;\n if (typeof _fn === \"number\") return _fn;\n if (typeof _fn === \"string\") {\n const hostname = _hostname != undefined ? helperString(funcName, \"hostname\", _hostname) : workerScript.hostname;\n if (!isScriptArgs(_args)) throw makeRuntimeErrorMsg(funcName, \"'args' is not an array of script args\");\n return {\n fn: _fn,\n hostname: hostname,\n args: _args,\n };\n }\n throw new Error(\"not implemented\");\n },\n boolean: (v: unknown): boolean => {\n return !!v; // Just convert it to boolean.\n },\n city: (funcName: string, argName: string, v: unknown): CityName => {\n if (typeof v !== \"string\") throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n const s = v as CityName;\n if (!Object.values(CityName).includes(s))\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n return s;\n },\n getServer: safeGetServer,\n checkSingularityAccess: checkSingularityAccess,\n hack: hack,\n getValidPort: (funcName: string, port: number): IPort => {\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Trying to use an invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(funcName, `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport;\n },\n player(funcName: string, p: unknown): IPlayer {\n const fakePlayer = {\n hacking: undefined,\n hp: undefined,\n max_hp: undefined,\n strength: undefined,\n defense: undefined,\n dexterity: undefined,\n agility: undefined,\n charisma: undefined,\n intelligence: undefined,\n hacking_exp: undefined,\n strength_exp: undefined,\n defense_exp: undefined,\n dexterity_exp: undefined,\n agility_exp: undefined,\n charisma_exp: undefined,\n hacking_chance_mult: undefined,\n mults: undefined,\n numPeopleKilled: undefined,\n money: undefined,\n city: undefined,\n location: undefined,\n hasWseAccount: undefined,\n hasTixApiAccess: undefined,\n has4SData: undefined,\n has4SDataTixApi: undefined,\n bitNodeN: undefined,\n totalPlaytime: undefined,\n playtimeSinceLastAug: undefined,\n playtimeSinceLastBitnode: undefined,\n jobs: undefined,\n factions: undefined,\n tor: undefined,\n inBladeburner: undefined,\n hasCorporation: undefined,\n entropy: undefined,\n };\n if (!roughlyIs(fakePlayer, p)) throw makeRuntimeErrorMsg(funcName, `player should be a Player.`);\n return p as IPlayer;\n },\n server(funcName: string, s: unknown): Server {\n if (!roughlyIs(new Server(), s)) throw makeRuntimeErrorMsg(funcName, `server should be a Server.`);\n return s as Server;\n },\n gang(funcName: string, g: unknown): FormulaGang {\n if (!roughlyIs({ respect: 0, territory: 0, wantedLevel: 0 }, g))\n throw makeRuntimeErrorMsg(funcName, `gang should be a Gang.`);\n return g as FormulaGang;\n },\n gangMember(funcName: string, m: unknown): GangMember {\n if (!roughlyIs(new GangMember(), m)) throw makeRuntimeErrorMsg(funcName, `member should be a GangMember.`);\n return m as GangMember;\n },\n gangTask(funcName: string, t: unknown): GangMemberTask {\n if (!roughlyIs(new GangMemberTask(\"\", \"\", false, false, {}), t))\n throw makeRuntimeErrorMsg(funcName, `task should be a GangMemberTask.`);\n return t as GangMemberTask;\n },\n };\n\n const singularity = NetscriptSingularity(Player, workerScript);\n\n const base: InternalAPI = {\n args: workerScript.args as unknown as any,\n enums: {\n toast: ToastVariant,\n } as unknown as any,\n\n singularity: singularity,\n gang: NetscriptGang(Player, workerScript),\n bladeburner: NetscriptBladeburner(Player, workerScript),\n codingcontract: NetscriptCodingContract(Player, workerScript),\n sleeve: NetscriptSleeve(Player),\n corporation: NetscriptCorporation(Player),\n stanek: NetscriptStanek(Player, workerScript, helper),\n infiltration: NetscriptInfiltration(Player),\n ui: NetscriptUserInterface(),\n formulas: NetscriptFormulas(Player, helper),\n stock: NetscriptStockMarket(Player, workerScript),\n grafting: NetscriptGrafting(Player),\n hacknet: NetscriptHacknet(Player, workerScript),\n sprintf: () => sprintf,\n vsprintf: () => vsprintf,\n scan:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): string[] => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n const entry = s.hostname;\n if (entry === null) continue;\n out.push(entry);\n }\n ctx.log(() => `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack:\n (ctx: NetscriptContext) =>\n (_hostname: unknown, { threads: requestedThreads, stock }: BasicHGWOptions = {}): Promise => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n return hack(ctx, hostname, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads:\n (ctx: NetscriptContext) =>\n (_hostname: unknown, _hackAmount: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const hackAmount = ctx.helper.number(\"hackAmount\", _hackAmount);\n\n // Check argument validity\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return -1;\n }\n if (isNaN(hackAmount)) {\n throw ctx.makeRuntimeErrorMsg(\n `Invalid hackAmount argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`,\n );\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n } else if (hackAmount === 0) {\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked === 0 || server.moneyAvailable === 0) {\n return 0; // To prevent returning infinity below\n }\n\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyze:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculatePercentMoneyHacked(server, Player);\n },\n hackAnalyzeSecurity:\n (ctx: NetscriptContext) =>\n (_threads: unknown, _hostname?: unknown): number => {\n let threads = ctx.helper.number(\"threads\", _threads);\n if (_hostname) {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked > 0) {\n // thread count is limited to the maximum number of threads needed\n threads = Math.min(threads, Math.ceil(1 / percentHacked));\n }\n }\n\n return CONSTANTS.ServerFortifyAmount * threads;\n },\n hackAnalyzeChance:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculateHackingChance(server, Player);\n },\n sleep:\n (ctx: NetscriptContext) =>\n async (_time: unknown = 0): Promise => {\n const time = ctx.helper.number(\"time\", _time);\n if (time === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n ctx.log(() => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n asleep: (ctx: NetscriptContext) =>\n function (_time: unknown = 0): Promise {\n const time = ctx.helper.number(\"time\", _time);\n ctx.log(() => `Sleeping for ${time} milliseconds`);\n return new Promise((resolve) => setTimeout(() => resolve(true), time));\n },\n grow:\n (ctx: NetscriptContext) =>\n async (_hostname: unknown, { threads: requestedThreads, stock }: BasicHGWOptions = {}): Promise => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const threads = resolveNetscriptRequestedThreads(ctx, requestedThreads ?? workerScript.scriptRef.threads);\n\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n throw new Error(\"Workerscript host is null\");\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanGrow(server);\n if (!canHack.res) {\n throw ctx.makeRuntimeErrorMsg(canHack.msg || \"\");\n }\n\n const growTime = calculateGrowTime(server, Player);\n ctx.log(\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n growTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n return netscriptDelay(growTime * 1000, workerScript).then(function () {\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n processSingleServerGrowth(server, threads, Player, host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n ctx.log(\n () =>\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n logGrowPercent,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(\n threads,\n )}).`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n if (stock) {\n influenceStockThroughServerGrow(server, moneyAfter - moneyBefore);\n }\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze:\n (ctx: NetscriptContext) =>\n (_hostname: unknown, _growth: unknown, _cores: unknown = 1): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const growth = ctx.helper.number(\"growth\", _growth);\n const cores = ctx.helper.number(\"cores\", _cores);\n\n // Check argument validity\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return numCycleForGrowth(server, Number(growth), Player, cores);\n },\n growthAnalyzeSecurity:\n (ctx: NetscriptContext) =>\n (_threads: unknown, _hostname?: unknown, _cores?: unknown): number => {\n let threads = ctx.helper.number(\"threads\", _threads);\n if (_hostname) {\n const cores = ctx.helper.number(\"cores\", _cores) || 1;\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n\n const maxThreadsNeeded = Math.ceil(\n numCycleForGrowthCorrected(server, server.moneyMax, server.moneyAvailable, Player, cores),\n );\n\n threads = Math.min(threads, maxThreadsNeeded);\n }\n\n return 2 * CONSTANTS.ServerFortifyAmount * threads;\n },\n weaken:\n (ctx: NetscriptContext) =>\n async (_hostname: unknown, { threads: requestedThreads }: BasicHGWOptions = {}): Promise => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const threads = resolveNetscriptRequestedThreads(ctx, requestedThreads ?? workerScript.scriptRef.threads);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanWeaken(server);\n if (!canHack.res) {\n throw ctx.makeRuntimeErrorMsg(canHack.msg || \"\");\n }\n\n const weakenTime = calculateWeakenTime(server, Player);\n ctx.log(\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n weakenTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return netscriptDelay(weakenTime * 1000, workerScript).then(function () {\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n ctx.log(() => \"Server is null, did it die?\");\n return Promise.resolve(0);\n }\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n ctx.log(\n () =>\n `'${server.hostname}' security level weakened to ${\n server.hackDifficulty\n }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n });\n },\n weakenAnalyze:\n (ctx: NetscriptContext) =>\n (_threads: unknown, _cores: unknown = 1): number => {\n const threads = ctx.helper.number(\"threads\", _threads);\n const cores = ctx.helper.number(\"cores\", _cores);\n const coreBonus = 1 + (cores - 1) / 16;\n return CONSTANTS.ServerWeakenAmount * threads * coreBonus * BitNodeMultipliers.ServerWeakenRate;\n },\n share: (ctx: NetscriptContext) => async (): Promise => {\n ctx.log(() => \"Sharing this computer.\");\n const end = StartSharing(workerScript.scriptRef.threads * calculateIntelligenceBonus(Player.intelligence, 2));\n return netscriptDelay(10000, workerScript).finally(function () {\n ctx.log(() => \"Finished sharing this computer.\");\n end();\n });\n },\n getSharePower: () => (): number => {\n return CalculateShareMult();\n },\n print:\n (ctx: NetscriptContext) =>\n (...args: unknown[]): void => {\n if (args.length === 0) {\n throw ctx.makeRuntimeErrorMsg(\"Takes at least 1 argument.\");\n }\n workerScript.print(argsToString(args));\n },\n printf:\n (ctx: NetscriptContext) =>\n (_format: unknown, ...args: unknown[]): void => {\n const format = ctx.helper.string(\"format\", _format);\n if (typeof format !== \"string\") {\n throw ctx.makeRuntimeErrorMsg(\"First argument must be string for the format.\");\n }\n workerScript.print(vsprintf(format, args));\n },\n tprint:\n (ctx: NetscriptContext) =>\n (...args: unknown[]): void => {\n if (args.length === 0) {\n throw ctx.makeRuntimeErrorMsg(\"Takes at least 1 argument.\");\n }\n const str = argsToString(args);\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);\n },\n tprintf:\n (ctx: NetscriptContext) =>\n (_format: unknown, ...args: unknown[]): void => {\n const format = ctx.helper.string(\"format\", _format);\n const str = vsprintf(format, args);\n\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${str}`);\n return;\n }\n Terminal.print(`${str}`);\n },\n clearLog: () => (): void => {\n workerScript.scriptRef.clearLog();\n },\n disableLog:\n (ctx: NetscriptContext) =>\n (_fn: unknown): void => {\n const fn = ctx.helper.string(\"fn\", _fn);\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n workerScript.disableLogs[fn] = true;\n }\n ctx.log(() => `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n ctx.log(() => `Disabled logging for ${fn}`);\n }\n },\n enableLog:\n (ctx: NetscriptContext) =>\n (_fn: unknown): void => {\n const fn = ctx.helper.string(\"fn\", _fn);\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n delete workerScript.disableLogs[fn];\n }\n ctx.log(() => `Enabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${fn}.`);\n }\n delete workerScript.disableLogs[fn];\n ctx.log(() => `Enabled logging for ${fn}`);\n },\n isLogEnabled:\n (ctx: NetscriptContext) =>\n (_fn: unknown): boolean => {\n const fn = ctx.helper.string(\"fn\", _fn);\n if (possibleLogs[fn] === undefined) {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${fn}.`);\n }\n return !workerScript.disableLogs[fn];\n },\n getScriptLogs:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...scriptArgs: unknown[]): string[] => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, scriptArgs);\n const runningScriptObj = getRunningScript(ctx, ident);\n if (runningScriptObj == null) {\n ctx.log(() => getCannotFindRunningScriptErrorMessage(ident));\n return [];\n }\n\n return runningScriptObj.logs.slice();\n },\n tail:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...scriptArgs: unknown[]): void => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, scriptArgs);\n const runningScriptObj = getRunningScript(ctx, ident);\n if (runningScriptObj == null) {\n ctx.log(() => getCannotFindRunningScriptErrorMessage(ident));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n\n closeTail:\n (ctx: NetscriptContext) =>\n (_pid: unknown = workerScript.scriptRef.pid): void => {\n const pid = ctx.helper.number(\"pid\", _pid);\n //Emit an event to tell the game to close the tail window if it exists\n LogBoxCloserEvents.emit(pid);\n },\n nuke:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (server.hasAdminRights) {\n ctx.log(() => `Already have root access to '${server.hostname}'.`);\n return true;\n }\n if (!Player.hasProgram(Programs.NukeProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the NUKE.exe virus!\");\n }\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw ctx.makeRuntimeErrorMsg(\"Not enough ports opened to use NUKE.exe virus.\");\n }\n server.hasAdminRights = true;\n ctx.log(() => `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n return true;\n },\n brutessh:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.BruteSSHProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the BruteSSH.exe program!\");\n }\n if (!server.sshPortOpen) {\n ctx.log(() => `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n ctx.log(() => `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n ftpcrack:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.FTPCrackProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the FTPCrack.exe program!\");\n }\n if (!server.ftpPortOpen) {\n ctx.log(() => `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n ctx.log(() => `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n relaysmtp:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.RelaySMTPProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the relaySMTP.exe program!\");\n }\n if (!server.smtpPortOpen) {\n ctx.log(() => `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n ctx.log(() => `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n httpworm:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.HTTPWormProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the HTTPWorm.exe program!\");\n }\n if (!server.httpPortOpen) {\n ctx.log(() => `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n ctx.log(() => `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n sqlinject:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.SQLInjectProgram.name)) {\n throw ctx.makeRuntimeErrorMsg(\"You do not have the SQLInject.exe program!\");\n }\n if (!server.sqlPortOpen) {\n ctx.log(() => `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n ctx.log(() => `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n run:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _threads: unknown = 1, ..._args: unknown[]): number => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const threads = ctx.helper.number(\"threads\", _threads);\n const args = ctx.helper.scriptArgs(_args);\n if (scriptname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw ctx.makeRuntimeErrorMsg(`Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw ctx.makeRuntimeErrorMsg(\"Could not find server. This is a bug. Report to dev.\");\n }\n\n return runScriptFromScript(Player, \"run\", scriptServer, scriptname, args, workerScript, threads);\n },\n exec:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _hostname: unknown, _threads: unknown = 1, ..._args: unknown[]): number => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const threads = ctx.helper.number(\"threads\", _threads);\n const args = ctx.helper.scriptArgs(_args);\n if (scriptname === undefined || hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw ctx.makeRuntimeErrorMsg(`Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const server = safeGetServer(hostname, ctx);\n return runScriptFromScript(Player, \"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _threads: unknown = 1, ..._args: unknown[]): void => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const threads = ctx.helper.number(\"threads\", _threads);\n const args = ctx.helper.scriptArgs(_args);\n if (!scriptname || !threads) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n setTimeout(() => {\n if (isNaN(threads) || threads <= 0) {\n throw ctx.makeRuntimeErrorMsg(`Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw ctx.makeRuntimeErrorMsg(\"Could not find server. This is a bug. Report to dev\");\n }\n\n return runScriptFromScript(Player, \"spawn\", scriptServer, scriptname, args, workerScript, threads);\n }, spawnDelay * 1e3);\n\n ctx.log(() => `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n ctx.log(() => \"Exiting...\");\n }\n },\n kill:\n (ctx: NetscriptContext) =>\n (filename: unknown, hostname: unknown, ...scriptArgs: unknown[]): boolean => {\n const ident = ctx.helper.scriptIdentifier(filename, hostname, scriptArgs);\n let res;\n const killByPid = typeof ident === \"number\";\n if (killByPid) {\n // Kill by pid\n res = killWorkerScript(ident);\n } else {\n // Kill by filename/hostname\n if (filename === undefined || hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ident.hostname, ctx);\n const runningScriptObj = getRunningScriptByArgs(ctx, ident.fn, ident.hostname, ident.args);\n if (runningScriptObj == null) {\n ctx.log(() => getCannotFindRunningScriptErrorMessage(ident));\n return false;\n }\n\n res = killWorkerScript({ runningScript: runningScriptObj, hostname: server.hostname });\n }\n\n if (res) {\n if (killByPid) {\n ctx.log(() => `Killing script with PID ${ident}`);\n } else {\n ctx.log(() => `Killing '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}.`);\n }\n return true;\n } else {\n if (killByPid) {\n ctx.log(() => `No script with PID ${ident}`);\n } else {\n ctx.log(() => `No such script '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}`);\n }\n return false;\n }\n },\n killall:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname, _safetyguard: unknown = true): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const safetyguard = helper.boolean(_safetyguard);\n if (hostname === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: killall(hostname, [safetyguard boolean])\");\n }\n const server = safeGetServer(hostname, ctx);\n\n let scriptsKilled = 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n if (safetyguard === true && server.runningScripts[i].pid == workerScript.pid) continue;\n killWorkerScript({ runningScript: server.runningScripts[i], hostname: server.hostname });\n ++scriptsKilled;\n }\n WorkerScriptStartStopEventEmitter.emit();\n ctx.log(() => `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n\n return scriptsKilled > 0;\n },\n exit: (ctx: NetscriptContext) => (): void => {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n ctx.log(() => \"Exiting...\");\n } else {\n ctx.log(() => \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp:\n (ctx: NetscriptContext) =>\n async (\n _scriptname: unknown,\n _destination: unknown,\n _source: unknown = workerScript.hostname,\n ): Promise => {\n const destination = ctx.helper.string(\"destination\", _destination);\n const source = ctx.helper.string(\"source\", _source);\n if (Array.isArray(_scriptname)) {\n // Recursively call scp on all elements of array\n const scripts: string[] = _scriptname;\n if (scripts.length === 0) {\n throw ctx.makeRuntimeErrorMsg(\"No scripts to copy\");\n }\n let res = true;\n await Promise.all(\n scripts.map(async function (script) {\n if (!(await NetscriptFunctions(workerScript).scp(script, destination, source))) {\n res = false;\n }\n }),\n );\n return Promise.resolve(res);\n }\n\n const scriptName = ctx.helper.string(\"scriptName\", _scriptname);\n\n // Invalid file type\n if (!isValidFilePath(scriptName)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid filename: '${scriptName}'`);\n }\n\n // Invalid file name\n if (!scriptName.endsWith(\".lit\") && !isScriptFilename(scriptName) && !scriptName.endsWith(\"txt\")) {\n throw ctx.makeRuntimeErrorMsg(\"Only works for scripts, .lit and .txt files\");\n }\n\n const destServer = safeGetServer(destination, ctx);\n const currServ = safeGetServer(source, ctx);\n\n // Scp for lit files\n if (scriptName.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < currServ.messages.length; ++i) {\n if (currServ.messages[i] == scriptName) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n ctx.log(() => `File '${scriptName}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptName) {\n ctx.log(() => `File '${scriptName}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true); // Already exists\n }\n }\n destServer.messages.push(scriptName);\n ctx.log(() => `File '${scriptName}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for text files\n if (scriptName.endsWith(\".txt\")) {\n let txtFile;\n for (let i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptName) {\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n if (txtFile === undefined) {\n ctx.log(() => `File '${scriptName}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptName) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n ctx.log(() => `File '${scriptName}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n }\n const newFile = new TextFile(txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n ctx.log(() => `File '${scriptName}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for script files\n let sourceScript = null;\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptName == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n ctx.log(() => `File '${scriptName}' does not exist.`);\n return Promise.resolve(false);\n }\n\n // Overwrite script if it already exists\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptName == destServer.scripts[i].filename) {\n ctx.log(() => `WARNING: File '${scriptName}' overwritten on '${destServer?.hostname}'`);\n const oldScript = destServer.scripts[i];\n // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n if (oldScript.code === sourceScript.code) return Promise.resolve(true);\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return Promise.resolve(true);\n }\n }\n\n // Create new script if it does not already exist\n const newScript = new Script(Player, scriptName);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.hostname;\n destServer.scripts.push(newScript);\n ctx.log(() => `File '${scriptName}' copied over to '${destServer?.hostname}'.`);\n return new Promise((resolve) => {\n if (destServer === null) {\n resolve(false);\n return;\n }\n newScript.updateRamUsage(Player, destServer.scripts).then(() => resolve(true));\n });\n },\n ls:\n (ctx: NetscriptContext) =>\n (_hostname: unknown, _grep: unknown = \"\"): string[] => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const grep = ctx.helper.string(\"grep\", _grep);\n\n const server = safeGetServer(hostname, ctx);\n\n // Get the grep filter, if one exists\n let filter = \"\";\n if (_grep !== undefined) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n const msg = server.messages[i];\n if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n\n for (let i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (let i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n }\n\n // Sort the files alphabetically then print each\n allFiles.sort();\n return allFiles;\n },\n getRecentScripts: () => (): IRecentScript[] => {\n return recentScripts.map((rs) => ({\n timeOfDeath: rs.timeOfDeath,\n ...createPublicRunningScript(rs.runningScript),\n }));\n },\n ps:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): ProcessInfo[] => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n const processes = [];\n for (const script of server.runningScripts) {\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid,\n });\n }\n return processes;\n },\n hasRootAccess:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n\n const server = safeGetServer(hostname, ctx);\n return server.hasAdminRights;\n },\n getHostname: (ctx: NetscriptContext) => (): string => {\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw ctx.makeRuntimeErrorMsg(\"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\n },\n getHackingLevel: (ctx: NetscriptContext) => (): number => {\n Player.updateSkillLevels();\n ctx.log(() => `returned ${Player.hacking}`);\n return Player.hacking;\n },\n getHackingMultipliers: () => (): HackingMultipliers => {\n return {\n chance: Player.mults.hacking_chance,\n speed: Player.mults.hacking_speed,\n money: Player.mults.hacking_money,\n growth: Player.mults.hacking_grow,\n };\n },\n getHacknetMultipliers: () => (): HacknetMultipliers => {\n return {\n production: Player.mults.hacknet_node_money,\n purchaseCost: Player.mults.hacknet_node_purchase_cost,\n ramCost: Player.mults.hacknet_node_ram_cost,\n coreCost: Player.mults.hacknet_node_core_cost,\n levelCost: Player.mults.hacknet_node_level_cost,\n };\n },\n getBitNodeMultipliers: (ctx: NetscriptContext) => (): IBNMults => {\n if (Player.sourceFileLvl(5) <= 0 && Player.bitNodeN !== 5) {\n throw ctx.makeRuntimeErrorMsg(\"Requires Source-File 5 to run.\");\n }\n const copy = Object.assign({}, BitNodeMultipliers);\n return copy;\n },\n getServer:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): IServerDef => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n const copy = Object.assign({}, server) as Server;\n // These fields should be hidden.\n copy.contracts = [];\n copy.messages = [];\n copy.runningScripts = [];\n copy.scripts = [];\n copy.textFiles = [];\n copy.programs = [];\n copy.serversOnNetwork = [];\n if (!copy.baseDifficulty) copy.baseDifficulty = 0;\n if (!copy.hackDifficulty) copy.hackDifficulty = 0;\n if (!copy.minDifficulty) copy.minDifficulty = 0;\n if (!copy.moneyAvailable) copy.moneyAvailable = 0;\n if (!copy.moneyMax) copy.moneyMax = 0;\n if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0;\n if (!copy.openPortCount) copy.openPortCount = 0;\n if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0;\n if (!copy.serverGrowth) copy.serverGrowth = 0;\n return copy;\n },\n getServerMoneyAvailable:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n if (server.hostname == \"home\") {\n // Return player's money\n ctx.log(() => `returned player's money: ${numeralWrapper.formatMoney(Player.money)}`);\n return Player.money;\n }\n ctx.log(() => `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n ctx.log(\n () => `returned ${numeralWrapper.formatServerSecurity(server.hackDifficulty)} for '${server.hostname}'`,\n );\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n ctx.log(() => `getServerBaseSecurityLevel is deprecated because it's not useful.`);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n ctx.log(\n () => `returned ${numeralWrapper.formatServerSecurity(server.baseDifficulty)} for '${server.hostname}'`,\n );\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n ctx.log(() => `returned ${numeralWrapper.formatServerSecurity(server.minDifficulty)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n ctx.log(() => `returned ${numeralWrapper.formatSkill(server.requiredHackingSkill)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n ctx.log(() => `returned ${numeralWrapper.formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n ctx.log(() => `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"Cannot be executed on this server.\");\n return 5;\n }\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n ctx.log(() => `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): [number, number] => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n ctx.log(() => `getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam`);\n const server = safeGetServer(hostname, ctx);\n ctx.log(\n () => `returned [${numeralWrapper.formatRAM(server.maxRam)}, ${numeralWrapper.formatRAM(server.ramUsed)}]`,\n );\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n ctx.log(() => `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n ctx.log(() => `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists:\n (ctx: NetscriptContext) =>\n (_hostname: unknown): boolean => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n return GetServer(hostname) !== null;\n },\n fileExists:\n (ctx: NetscriptContext) =>\n (_filename: unknown, _hostname: unknown = workerScript.hostname): boolean => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (filename === undefined) {\n throw ctx.makeRuntimeErrorMsg(\"Usage: fileExists(scriptname, [server])\");\n }\n const server = safeGetServer(hostname, ctx);\n for (let i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n for (let i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.toLowerCase() === server.messages[i].toLowerCase()) {\n return true;\n }\n }\n const txtFile = getTextFile(filename, server);\n return txtFile != null;\n },\n isRunning:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...scriptArgs: unknown[]): boolean => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, scriptArgs);\n return getRunningScript(ctx, ident) !== null;\n },\n getPurchasedServerLimit: () => (): number => {\n return getPurchaseServerLimit();\n },\n getPurchasedServerMaxRam: () => (): number => {\n return getPurchaseServerMaxRam();\n },\n getPurchasedServerCost:\n (ctx: NetscriptContext) =>\n (_ram: unknown): number => {\n const ram = ctx.helper.number(\"ram\", _ram);\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n ctx.log(() => `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer:\n (ctx: NetscriptContext) =>\n (_name: unknown, _ram: unknown): string => {\n const name = ctx.helper.string(\"name\", _name);\n const ram = ctx.helper.number(\"ram\", _ram);\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n if (hostnameStr == \"\") {\n ctx.log(() => `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (Player.purchasedServers.length >= getPurchaseServerLimit()) {\n ctx.log(\n () =>\n `You have reached the maximum limit of ${getPurchaseServerLimit()} servers. You cannot purchase any more.`,\n );\n return \"\";\n }\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n if (ram > getPurchaseServerMaxRam()) {\n ctx.log(() => `Invalid argument: ram='${ram}' must not be greater than getPurchaseServerMaxRam`);\n } else {\n ctx.log(() => `Invalid argument: ram='${ram}' must be a positive power of 2`);\n }\n\n return \"\";\n }\n\n if (Player.money < cost) {\n ctx.log(() => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`);\n return \"\";\n }\n const newServ = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram,\n });\n AddToAllServers(newServ);\n\n Player.purchasedServers.push(newServ.hostname);\n const homeComputer = Player.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n Player.loseMoney(cost, \"servers\");\n ctx.log(\n () => `Purchased new server with hostname '${newServ.hostname}' for ${numeralWrapper.formatMoney(cost)}`,\n );\n return newServ.hostname;\n },\n deleteServer:\n (ctx: NetscriptContext) =>\n (_name: unknown): boolean => {\n const name = ctx.helper.string(\"name\", _name);\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n const server = GetServer(hostnameStr);\n if (!(server instanceof Server)) {\n ctx.log(() => `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n ctx.log(() => \"Cannot delete non-purchased server.\");\n return false;\n }\n\n const hostname = server.hostname;\n\n // Can't delete server you're currently connected to\n if (server.isConnectedTo) {\n ctx.log(() => \"You are currently connected to the server you are trying to delete.\");\n return false;\n }\n\n // A server cannot delete itself\n if (hostname === workerScript.hostname) {\n ctx.log(() => \"Cannot delete the server this script is running on.\");\n return false;\n }\n\n // Delete all scripts running on server\n if (server.runningScripts.length > 0) {\n ctx.log(() => `Cannot delete server '${hostname}' because it still has scripts running.`);\n return false;\n }\n\n // Delete from player's purchasedServers array\n let found = false;\n for (let i = 0; i < Player.purchasedServers.length; ++i) {\n if (hostname == Player.purchasedServers[i]) {\n found = true;\n Player.purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n ctx.log(() => `Could not identify server ${hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n }\n\n // Delete from all servers\n DeleteServer(hostname);\n\n // Delete from home computer\n found = false;\n const homeComputer = Player.getHomeComputer();\n for (let i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (hostname == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n ctx.log(() => `Deleted server '${hostnameStr}`);\n return true;\n }\n }\n // Wasn't found on home computer\n ctx.log(() => `Could not find server ${hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: () => (): string[] => {\n const res: string[] = [];\n Player.purchasedServers.forEach(function (hostname) {\n res.push(hostname);\n });\n return res;\n },\n writePort:\n (ctx: NetscriptContext) =>\n (_port: unknown, data: unknown = \"\"): Promise => {\n const port = ctx.helper.number(\"port\", _port);\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw ctx.makeRuntimeErrorMsg(`Trying to write invalid data to a port: only strings and numbers are valid.`);\n }\n const iport = helper.getValidPort(\"writePort\", port);\n return Promise.resolve(iport.write(data));\n },\n write:\n (ctx: NetscriptContext) =>\n (_port: unknown, data: unknown = \"\", _mode: unknown = \"a\"): Promise => {\n const port = ctx.helper.string(\"port\", _port);\n const mode = ctx.helper.string(\"mode\", _mode);\n if (isString(port)) {\n // Write to script or text file\n let fn = port;\n if (!isValidFilePath(fn)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = removeLeadingSlash(fn);\n }\n\n // Coerce 'data' to be a string\n try {\n data = String(data);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(\n `Invalid data (${String(e)}). Data being written must be convertible to a string`,\n );\n }\n\n const server = workerScript.getServer();\n if (server == null) {\n throw ctx.makeRuntimeErrorMsg(\"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n // Create a new script\n script = new Script(Player, fn, String(data), server.hostname, server.scripts);\n server.scripts.push(script);\n return script.updateRamUsage(Player, server.scripts);\n }\n mode === \"w\" ? (script.code = String(data)) : (script.code += data);\n return script.updateRamUsage(Player, server.scripts);\n } else {\n // Write to text file\n const txtFile = getTextFile(fn, server);\n if (txtFile == null) {\n createTextFile(fn, String(data), server);\n return Promise.resolve();\n }\n if (mode === \"w\") {\n txtFile.write(String(data));\n } else {\n txtFile.append(String(data));\n }\n }\n return Promise.resolve();\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${port}`);\n }\n },\n tryWritePort:\n (ctx: NetscriptContext) =>\n (_port: unknown, data: unknown = \"\"): Promise => {\n let port = ctx.helper.number(\"port\", _port);\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw ctx.makeRuntimeErrorMsg(`Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.tryWrite(data));\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${port}`);\n }\n },\n readPort:\n (ctx: NetscriptContext) =>\n (_port: unknown): unknown => {\n const port = ctx.helper.number(\"port\", _port);\n // Read from port\n const iport = helper.getValidPort(\"readPort\", port);\n const x = iport.read();\n return x;\n },\n read:\n (ctx: NetscriptContext) =>\n (_port: unknown): string => {\n const port = ctx.helper.string(\"port\", _port);\n if (isString(port)) {\n // Read from script or text file\n const fn = port;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw ctx.makeRuntimeErrorMsg(\"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Read from script\n const script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n return \"\";\n }\n return script.code;\n } else {\n // Read from text file\n const txtFile = getTextFile(fn, server);\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${port}`);\n }\n },\n peek:\n (ctx: NetscriptContext) =>\n (_port: unknown): unknown => {\n const port = ctx.helper.number(\"port\", _port);\n const iport = helper.getValidPort(\"peek\", port);\n const x = iport.peek();\n return x;\n },\n clear:\n (ctx: NetscriptContext) =>\n (_file: unknown): void => {\n const file = ctx.helper.string(\"file\", _file);\n if (isString(file)) {\n // Clear text file\n const fn = file;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw ctx.makeRuntimeErrorMsg(\"Error getting Server. This is a bug. Report to dev.\");\n }\n const txtFile = getTextFile(fn, server);\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid argument: ${file}`);\n }\n },\n clearPort:\n (ctx: NetscriptContext) =>\n (_port: unknown): void => {\n const port = ctx.helper.number(\"port\", _port);\n // Clear port\n const iport = helper.getValidPort(\"clearPort\", port);\n iport.clear();\n },\n getPortHandle:\n (ctx: NetscriptContext) =>\n (_port: unknown): IPort => {\n const port = ctx.helper.number(\"port\", _port);\n const iport = helper.getValidPort(\"getPortHandle\", port);\n return iport;\n },\n rm:\n (ctx: NetscriptContext) =>\n (_fn: unknown, _hostname: unknown = workerScript.hostname): boolean => {\n const fn = ctx.helper.string(\"fn\", _fn);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const s = safeGetServer(hostname, ctx);\n\n const status = s.removeFile(fn);\n if (!status.res) {\n ctx.log(() => status.msg + \"\");\n }\n\n return status.res;\n },\n scriptRunning:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _hostname: unknown): boolean => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n return false;\n },\n scriptKill:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _hostname: unknown): boolean => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n let suc = false;\n for (let i = 0; i < server.runningScripts.length; i++) {\n if (server.runningScripts[i].filename == scriptname) {\n killWorkerScript({ runningScript: server.runningScripts[i], hostname: server.hostname });\n suc = true;\n i--;\n }\n }\n return suc;\n },\n getScriptName: () => (): string => {\n return workerScript.name;\n },\n getScriptRam:\n (ctx: NetscriptContext) =>\n (_scriptname: unknown, _hostname: unknown = workerScript.hostname): number => {\n const scriptname = ctx.helper.string(\"scriptname\", _scriptname);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n return 0;\n },\n getRunningScript:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...args: unknown[]): IRunningScriptDef | null => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, args);\n const runningScript = getRunningScript(ctx, ident);\n if (runningScript === null) return null;\n return createPublicRunningScript(runningScript);\n },\n getHackTime:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return calculateHackingTime(server, Player) * 1000;\n },\n getGrowTime:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return calculateGrowTime(server, Player) * 1000;\n },\n getWeakenTime:\n (ctx: NetscriptContext) =>\n (_hostname: unknown = workerScript.hostname): number => {\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const server = safeGetServer(hostname, ctx);\n if (!(server instanceof Server)) {\n ctx.log(() => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return calculateWeakenTime(server, Player) * 1000;\n },\n getTotalScriptIncome: () => (): [number, number] => {\n // First element is total income of all currently running scripts\n let total = 0;\n for (const script of workerScripts.values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n return [total, Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000)];\n },\n getScriptIncome:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...args: unknown[]): number => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, args);\n const runningScript = getRunningScript(ctx, ident);\n if (runningScript == null) {\n ctx.log(() => getCannotFindRunningScriptErrorMessage(ident));\n return -1;\n }\n return runningScript.onlineMoneyMade / runningScript.onlineRunningTime;\n },\n getTotalScriptExpGain: () => (): number => {\n let total = 0;\n for (const ws of workerScripts.values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n return total;\n },\n getScriptExpGain:\n (ctx: NetscriptContext) =>\n (fn: unknown, hostname: unknown, ...args: unknown[]): number => {\n const ident = ctx.helper.scriptIdentifier(fn, hostname, args);\n const runningScript = getRunningScript(ctx, ident);\n if (runningScript == null) {\n ctx.log(() => getCannotFindRunningScriptErrorMessage(ident));\n return -1;\n }\n return runningScript.onlineExpGained / runningScript.onlineRunningTime;\n },\n nFormat:\n (ctx: NetscriptContext) =>\n (_n: unknown, _format: unknown): string => {\n const n = ctx.helper.number(\"n\", _n);\n const format = ctx.helper.string(\"format\", _format);\n if (isNaN(n)) {\n return \"\";\n }\n\n return numeralWrapper.format(n, format);\n },\n tFormat:\n (ctx: NetscriptContext) =>\n (_milliseconds: unknown, _milliPrecision: unknown = false): string => {\n const milliseconds = ctx.helper.number(\"milliseconds\", _milliseconds);\n const milliPrecision = helper.boolean(_milliPrecision);\n return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: () => (): number => {\n return Player.playtimeSinceLastAug;\n },\n alert:\n (ctx: NetscriptContext) =>\n (_message: unknown): void => {\n const message = ctx.helper.string(\"message\", _message);\n dialogBoxCreate(message);\n },\n toast:\n (ctx: NetscriptContext) =>\n (_message: unknown, _variant: unknown = ToastVariant.SUCCESS, _duration: unknown = 2000): void => {\n const message = ctx.helper.string(\"message\", _message);\n const variant = ctx.helper.string(\"variant\", _variant);\n const duration = ctx.helper.number(\"duration\", _duration);\n if (!checkEnum(ToastVariant, variant))\n throw new Error(`variant must be one of ${Object.values(ToastVariant).join(\", \")}`);\n SnackbarEvents.emit(message, variant, duration);\n },\n prompt:\n (ctx: NetscriptContext) =>\n (_txt: unknown, options?: { type?: string; options?: string[] }): Promise => {\n const txt = ctx.helper.string(\"txt\", _txt);\n\n return new Promise(function (resolve) {\n PromptEvent.emit({\n txt: txt,\n options,\n resolve: resolve,\n });\n });\n },\n wget:\n (ctx: NetscriptContext) =>\n async (_url: unknown, _target: unknown, _hostname: unknown = workerScript.hostname): Promise => {\n const url = ctx.helper.string(\"url\", _url);\n const target = ctx.helper.string(\"target\", _target);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n if (!isScriptFilename(target) && !target.endsWith(\".txt\")) {\n ctx.log(() => `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n const s = safeGetServer(hostname, ctx);\n return new Promise(function (resolve) {\n $.get(\n url,\n function (data) {\n let res;\n if (isScriptFilename(target)) {\n res = s.writeToScriptFile(Player, target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n if (!res.success) {\n ctx.log(() => \"Failed.\");\n return resolve(false);\n }\n if (res.overwritten) {\n ctx.log(() => `Successfully retrieved content and overwrote '${target}' on '${hostname}'`);\n return resolve(true);\n }\n ctx.log(() => `Successfully retrieved content to new file '${target}' on '${hostname}'`);\n return resolve(true);\n },\n \"text\",\n ).fail(function (e) {\n ctx.log(() => JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: () => (): number => {\n return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n },\n getOwnedSourceFiles: () => (): SourceFileLvl[] => {\n const res: SourceFileLvl[] = [];\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n res.push({\n n: Player.sourceFiles[i].n,\n lvl: Player.sourceFiles[i].lvl,\n });\n }\n return res;\n },\n getPlayer: () => (): INetscriptPlayer => {\n const data = {\n hacking: Player.hacking,\n hp: Player.hp,\n max_hp: Player.max_hp,\n strength: Player.strength,\n defense: Player.defense,\n dexterity: Player.dexterity,\n agility: Player.agility,\n charisma: Player.charisma,\n intelligence: Player.intelligence,\n hacking_exp: Player.hacking_exp,\n strength_exp: Player.strength_exp,\n defense_exp: Player.defense_exp,\n dexterity_exp: Player.dexterity_exp,\n agility_exp: Player.agility_exp,\n charisma_exp: Player.charisma_exp,\n hacking_chance_mult: Player.mults.hacking_chance,\n mults: JSON.parse(JSON.stringify(Player.mults)),\n numPeopleKilled: Player.numPeopleKilled,\n money: Player.money,\n city: Player.city,\n location: Player.location,\n hasWseAccount: Player.hasWseAccount,\n hasTixApiAccess: Player.hasTixApiAccess,\n has4SData: Player.has4SData,\n has4SDataTixApi: Player.has4SDataTixApi,\n bitNodeN: Player.bitNodeN,\n totalPlaytime: Player.totalPlaytime,\n playtimeSinceLastAug: Player.playtimeSinceLastAug,\n playtimeSinceLastBitnode: Player.playtimeSinceLastBitnode,\n jobs: {},\n factions: Player.factions.slice(),\n tor: Player.hasTorRouter(),\n inBladeburner: Player.inBladeburner(),\n hasCorporation: Player.hasCorporation(),\n entropy: Player.entropy,\n };\n Object.assign(data.jobs, Player.jobs);\n return data;\n },\n atExit:\n (ctx: NetscriptContext) =>\n (f: unknown): void => {\n if (typeof f !== \"function\") {\n throw ctx.makeRuntimeErrorMsg(\"argument should be function\");\n }\n workerScript.atExit = () => {\n f();\n }; // Wrap the user function to prevent WorkerScript leaking as 'this'\n },\n mv:\n (ctx: NetscriptContext) =>\n (_host: unknown, _source: unknown, _destination: unknown): void => {\n const host = ctx.helper.string(\"host\", _host);\n const source = ctx.helper.string(\"source\", _source);\n const destination = ctx.helper.string(\"destination\", _destination);\n\n if (!isValidFilePath(source)) throw ctx.makeRuntimeErrorMsg(`Invalid filename: '${source}'`);\n if (!isValidFilePath(destination)) throw ctx.makeRuntimeErrorMsg(`Invalid filename: '${destination}'`);\n\n const source_is_txt = source.endsWith(\".txt\");\n const dest_is_txt = destination.endsWith(\".txt\");\n\n if (!isScriptFilename(source) && !source_is_txt)\n throw ctx.makeRuntimeErrorMsg(`'mv' can only be used on scripts and text files (.txt)`);\n if (source_is_txt != dest_is_txt)\n throw ctx.makeRuntimeErrorMsg(`Source and destination files must have the same type`);\n\n if (source === destination) {\n return;\n }\n\n // This will throw if the server is not found, we do not need to validate result.\n const destServer: BaseServer | null = safeGetServer(host, ctx);\n\n if (!source_is_txt && destServer.isRunning(source))\n throw ctx.makeRuntimeErrorMsg(`Cannot use 'mv' on a script that is running`);\n\n interface File {\n filename: string;\n }\n\n const files = source_is_txt ? destServer.textFiles : destServer.scripts;\n let source_file: File | null = null;\n let dest_file: File | null = null;\n\n for (let i = 0; i < files.length; ++i) {\n const file = files[i];\n if (file.filename === source) {\n source_file = file;\n } else if (file.filename === destination) {\n dest_file = file;\n }\n }\n\n if (source_file == null) throw ctx.makeRuntimeErrorMsg(`Source file ${source} does not exist`);\n\n if (dest_file != null) {\n if (dest_file instanceof TextFile && source_file instanceof TextFile) {\n dest_file.text = source_file.text;\n } else if (dest_file instanceof Script && source_file instanceof Script) {\n dest_file.code = source_file.code;\n dest_file.markUpdated();\n }\n\n destServer.removeFile(source);\n } else {\n source_file.filename = destination;\n if (source_file instanceof Script) {\n source_file.markUpdated();\n }\n }\n },\n flags: Flags(workerScript.args.map((a) => String(a))),\n };\n\n // add undocumented functions\n const ns = {\n ...base,\n ...NetscriptExtra(Player),\n };\n function getFunctionNames(obj: object, prefix: string): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (key === \"args\") {\n continue;\n } else if (typeof value == \"function\") {\n functionNames.push(prefix + key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value, key + \".\"));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(ns, \"\")].map((a) => [a, true]));\n\n const wrappedNS = wrapAPI(helper, {}, workerScript, ns) as unknown as INS;\n (wrappedNS as any).args = ns.args;\n (wrappedNS as any).enums = ns.enums;\n return wrappedNS;\n}\n","/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\nimport { Stock } from \"./Stock\";\nimport { StockMarket } from \"./StockMarket\";\n\nimport { Company } from \"../Company/Company\";\nimport { Server } from \"../Server/Server\";\n\n// Change in second-order forecast due to hacks/grows\nexport const forecastForecastChangeFromHack = 0.1;\n\n// Change in second-order forecast due to company work\nexport const forecastForecastChangeFromCompanyWork = 0.001;\n\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\nexport function influenceStockThroughServerHack(server: Server, moneyHacked: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\nexport function influenceStockThroughServerGrow(server: Server, moneyGrown: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\nexport function influenceStockThroughCompanyWork(\n company: Company,\n performanceMult: number,\n cyclesOfWork: number,\n): void {\n const compName = company.name;\n let stock: Stock | null = null;\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = StockMarket[compName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n","/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\n\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangConstants } from \"./data/Constants\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { IAscensionResult } from \"./IAscensionResult\";\n\nimport { AllGangs } from \"./AllGangs\";\nimport { GangMember } from \"./GangMember\";\n\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { PowerMultiplier } from \"./data/power\";\nimport { IGang } from \"./IGang\";\n\nexport class Gang implements IGang {\n facName: string;\n members: GangMember[];\n wanted: number;\n respect: number;\n\n isHackingGang: boolean;\n\n respectGainRate: number;\n wantedGainRate: number;\n moneyGainRate: number;\n\n storedCycles: number;\n\n storedTerritoryAndPowerCycles: number;\n\n territoryClashChance: number;\n territoryWarfareEngaged: boolean;\n\n notifyMemberDeath: boolean;\n\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n\n this.isHackingGang = hacking;\n\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0;\n\n // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n this.storedCycles = 0;\n\n // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n this.storedTerritoryAndPowerCycles = 0;\n\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n\n this.notifyMemberDeath = true;\n }\n\n getPower(): number {\n return AllGangs[this.facName].power;\n }\n\n getTerritory(): number {\n return AllGangs[this.facName].territory;\n }\n\n process(numCycles = 1, player: IPlayer): void {\n const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n this.storedCycles += numCycles;\n\n // Only process if there are at least 2 seconds, and at most 5 seconds\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e: unknown) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player: IPlayer): void {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain;\n // Faction reputation gains is respect gain divided by some constant\n const fac = Factions[this.facName];\n if (!(fac instanceof Faction)) {\n dialogBoxCreate(\n \"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\",\n );\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n const favorMult = 1 + fac.favor / 100;\n\n fac.playerReputation += (player.mults.faction_rep * gain * favorMult) / GangConstants.GangRespectToReputationRatio;\n\n // Keep track of respect gained per member\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n player.gainMoney(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1): void {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < GangConstants.CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= GangConstants.CyclesPerTerritoryAndPowerUpdate;\n\n // Process power first\n const gangName = this.facName;\n for (const name of Object.keys(AllGangs)) {\n if (AllGangs.hasOwnProperty(name)) {\n if (name == gangName) {\n AllGangs[name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = AllGangs[name].power * 0.005;\n AllGangs[name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const powerMult = PowerMultiplier[name];\n if (powerMult === undefined) throw new Error(\"Should not be undefined\");\n const additiveGain = 0.75 * gainRoll * AllGangs[name].territory * powerMult;\n AllGangs[name].power += additiveGain;\n }\n }\n }\n }\n\n // Determine if territory should be processed\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n }\n\n // Then process territory\n const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0 || g === gangName);\n if (gangs.length > 1) {\n for (let i = 0; i < gangs.length; ++i) {\n const others = gangs.filter((e) => {\n return e !== gangs[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = gangs[i];\n const otherGang = others[other];\n\n // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = AllGangs[thisGang].power;\n const otherPwr = AllGangs[otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang: string, loseGang: string): number {\n const powerBonus = Math.max(\n 1,\n 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50),\n );\n const gains = Math.min(AllGangs[loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (AllGangs[otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n AllGangs[thisGang].territory += territoryGain;\n AllGangs[otherGang].territory -= territoryGain;\n if (thisGang === gangName) {\n this.clash(true); // Player won\n AllGangs[otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n AllGangs[otherGang].power *= 1 / 1.01;\n }\n } else {\n if (AllGangs[thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n AllGangs[thisGang].territory -= territoryGain;\n AllGangs[otherGang].territory += territoryGain;\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n AllGangs[thisGang].power *= 1 / 1.01;\n } else {\n AllGangs[thisGang].power *= 1 / 1.01;\n }\n }\n\n const total = Object.values(AllGangs)\n .map((g) => g.territory)\n .reduce((p, c) => p + c, 0);\n Object.values(AllGangs).forEach((g) => (g.territory /= total));\n }\n }\n }\n\n processExperienceGains(numCycles = 1): void {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false): void {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2;\n // If the clash was lost, the player loses a small percentage of power\n else AllGangs[this.facName].power *= 1 / 1.008;\n\n // Deaths can only occur during X% of clashes\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i];\n\n // Only members assigned to Territory Warfare can die\n if (member.task !== \"Territory Warfare\") continue;\n\n // Chance to die is decreased based on defense\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember(): boolean {\n if (this.members.length >= GangConstants.MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember(): number {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name: string): boolean {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false;\n\n // Check for already-existing names\n const sameNames = this.members.filter((m) => m.name === name);\n if (sameNames.length >= 1) return false;\n\n const member = new GangMember(name);\n this.members.push(member);\n return true;\n }\n\n // Money and Respect gains multiplied by this number (< 1)\n getWantedPenalty(): number {\n return this.respect / (this.respect + this.wanted);\n }\n\n //Calculates power GAIN, which is added onto the Gang's existing power\n calculatePower(): number {\n let memberTotal = 0;\n for (let i = 0; i < this.members.length; ++i) {\n if (!GangMemberTasks.hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\")\n continue;\n memberTotal += this.members[i].calculatePower();\n }\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member: GangMember): void {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n }\n\n // Notify of death\n if (this.notifyMemberDeath) {\n dialogBoxCreate(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member: GangMember, workerScript?: WorkerScript): IAscensionResult {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n if (workerScript) {\n workerScript.log(\"gang.ascendMember\", () => `Ascended Gang member ${member.name}`);\n }\n return res;\n } catch (e: unknown) {\n if (workerScript == null) {\n exceptionAlert(e);\n }\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n }\n\n // Cost of upgrade gets cheaper as gang increases in respect + power\n getDiscount(): number {\n const power = this.getPower();\n const respect = this.respect;\n\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount =\n Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n }\n\n // Returns only valid tasks for this gang. Excludes 'Unassigned'\n getAllTaskNames(): string[] {\n return Object.keys(GangMemberTasks).filter((taskName: string) => {\n const task = GangMemberTasks[taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false;\n // yes you need both checks\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg: GangMemberUpgrade | null): number {\n if (upg == null) {\n return Infinity;\n }\n return upg.cost / this.getDiscount();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Gang\", this);\n }\n\n /**\n * Initiatizes a Gang object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Gang {\n return Generic_fromJSON(Gang, value.data);\n }\n}\n\nReviver.constructors.Gang = Gang;\n","import { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function repFromDonation(amt: number, player: IPlayer): number {\n return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.mults.faction_rep;\n}\n","import { Company } from \"./Company\";\nimport { CompanyPosition } from \"./CompanyPosition\";\n\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\n\nexport function getJobRequirementText(company: Company, pos: CompanyPosition, tooltiptext = false): string {\n let reqText = \"\";\n const offset: number = company.jobStatReqOffset;\n const reqHacking: number = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength: number = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense: number = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma: number = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep: number = pos.requiredReputation;\n if (tooltiptext) {\n reqText = \"Requires:
\";\n reqText += reqHacking.toString() + \" hacking
\";\n reqText += reqStrength.toString() + \" strength
\";\n reqText += reqDefense.toString() + \" defense
\";\n reqText += reqDexterity.toString() + \" dexterity
\";\n reqText += reqAgility.toString() + \" agility
\";\n reqText += reqCharisma.toString() + \" charisma
\";\n reqText += reqRep.toString() + \" reputation\";\n } else {\n reqText = \"(Requires \";\n if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n return reqText;\n}\n","/* tslint:disable:max-line-length completed-docs variable-name*/\nimport { IMap } from \"../types\";\n\nexport const TerminalHelpText: string[] = [\n \"Type 'help name' to learn more about the command \",\n \" \",\n ' alias [-g] [name=\"value\"] Create or display Terminal aliases',\n \" analyze Get information about the current machine \",\n \" backdoor Install a backdoor on the current machine \",\n \" buy [-l/-a/program] Purchase a program through the Dark Web\",\n \" cat [file] Display a .msg, .lit, or .txt file\",\n \" cd [dir] Change to a new directory\",\n \" check [script] [args...] Print a script's logs to Terminal\",\n \" clear Clear all text on the terminal \",\n \" cls See 'clear' command \",\n \" connect [hostname] Connects to a remote server\",\n \" cp [src] [dst] Copy a file\",\n \" download [script/text file] Downloads scripts or text files to your computer\",\n \" expr [math expression] Evaluate a mathematical expression\",\n \" free Check the machine's memory (RAM) usage\",\n \" grow Spoof money in a servers bank account, increasing the amount available.\",\n \" hack Hack the current machine\",\n \" help [command] Display this help text, or the help text for a command\",\n \" history [-c] Display the terminal history\",\n \" home Connect to home computer\",\n \" hostname Displays the hostname of the machine\",\n \" kill [script/pid] [args...] Stops the specified script on the current server \",\n \" killall Stops all running scripts on the current machine\",\n \" ls [dir] [--grep pattern] Displays all files on the machine\",\n \" lscpu Displays the number of CPU cores on the machine\",\n \" mem [script] [-t n] Displays the amount of RAM required to run the script\",\n \" mv [src] [dest] Move/rename a text or script file\",\n \" nano [file ...] Text editor - Open up and edit one or more scripts or text files\",\n \" ps Display all scripts that are currently running\",\n \" rm [file] Delete a file from the server\",\n \" run [name] [-t n] [--tail] [args...] Execute a program or script\",\n \" scan Prints all immediately-available network connections\",\n \" scan-analyze [d] [-a] Prints info for all servers up to d nodes away\",\n \" scp [file ...] [server] Copies a file to a destination server\",\n \" sudov Shows whether you have root access on this computer\",\n \" tail [script] [args...] Displays dynamic logs for the specified script\",\n \" top Displays all running scripts and their RAM usage\",\n \" unalias [alias name] Deletes the specified alias\",\n \" vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode\",\n \" weaken Reduce the security of the current machine\",\n \" wget [url] [target file] Retrieves code/text from a web server\",\n \" \",\n];\n\nconst TemplatedHelpTexts: IMap<(command: string) => string[]> = {\n scriptEditor: (command) => {\n return [\n `Usage: ${command} [file ...] | [glob]`,\n ` `,\n `Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) `,\n `can be edited using the Script Editor. If a file does not exist a new one will be created`,\n ` `,\n `If provided a glob as the only argument, ${command} can spider directories and open all matching `,\n `files at once. ${command} cannot create files using globs, so your scripts must already exist.`,\n ` `,\n `Examples:`,\n ` `,\n ` ${command} test.js`,\n ` ${command} test.js test2.js`,\n ` `,\n ` ${command} test.*`,\n ` ${command} /my-dir/*.js`,\n ` `,\n ];\n },\n};\n\nexport const HelpTexts: IMap = {\n alias: [\n 'Usage: alias [-g] [name=\"value\"] ',\n \" \",\n \"Create or display aliases. An alias enables a replacement of a word with another string. \",\n \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \",\n \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \",\n \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \",\n \" \",\n ' alias nuke=\"run NUKE.exe\"',\n \" \",\n \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \",\n \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \",\n \"example, if the following alias was set: \",\n \" \",\n ' alias worm=\"HTTPWorm.exe\"',\n \" \",\n \"and then you tried to run the following terminal command: \",\n \" \",\n \" run worm\",\n \" \",\n \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \",\n \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \",\n \" \",\n ' alias -g worm=\"HTTPWorm.exe\"',\n \" \",\n \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \",\n \" \",\n \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \",\n \"'alias NAME=VALUE' on the Terminal. \",\n \" \",\n \"The 'unalias' command can be used to remove aliases.\",\n \" \",\n ],\n analyze: [\n \"Usage: analyze\",\n \" \",\n \"Prints details and statistics about the current server. The information that is printed includes basic \",\n \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \",\n \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \",\n \"available on the server, etc.\",\n \" \",\n ],\n backdoor: [\n \"Usage: backdoor\",\n \" \",\n \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\",\n \" \",\n \"Requires root access to run.\",\n \" \",\n ],\n buy: [\n \"Usage: buy [-l / -a / program]\",\n \" \",\n \"Purchase a program through the Dark Web. Requires a TOR router to use.\",\n \" \",\n \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \",\n \"dark web to the Terminal, as well as their costs.\",\n \" \",\n \"If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.\",\n \" \",\n \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\",\n \" \",\n ],\n cat: [\n \"Usage: cat [file]\",\n \" \",\n \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\",\n \" \",\n \" cat j1.msg\",\n \" \",\n \" cat foo.lit\",\n \" \",\n \" cat servers.txt\",\n \" \",\n ],\n cd: [\n \"Usage: cd [dir]\",\n \" \",\n \"Change to the specified directory. Note that this works even for directories that don't exist. If you \",\n \"change to a directory that does not exist, it will not be 'created'. Examples:\",\n \" \",\n \" cd scripts/hacking\",\n \" \",\n \" cd /logs\",\n \" \",\n \" cd ../\",\n \" \",\n ],\n check: [\n \"Usage: check [script name] [args...]\",\n \" \",\n \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \",\n \"a space. Remember that a running script is uniquely \",\n \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 1 2 foodnstuff\",\n \" \",\n \"Then to run the 'check' command on this script you would have to pass the same arguments in: \",\n \" \",\n \" check foo.script 1 2 foodnstuff\",\n \" \",\n ],\n clear: [\n \"Usage: clear\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command\",\n \" \",\n ],\n cls: [\n \"Usage: cls\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command\",\n \" \",\n ],\n connect: [\n \"Usage: connect [hostname]\",\n \" \",\n \"Connect to a remote server. The hostname of the remote server must be given as the argument \",\n \"to this command. Note that only servers that are immediately adjacent to the current server in the network and the ones that have\",\n \"a backdoor installed can be connected to. To see which servers can be connected to, use the 'scan' command.\",\n \" \",\n ],\n cp: [\"Usage: cp [src] [dst]\", \" \", \"Copy a file on this server. To copy a file to another server use scp.\", \" \"],\n download: [\n \"Usage: download [script/text file]\",\n \" \",\n \"Downloads a script or text file to your computer (like your real life computer).\",\n \" \",\n \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\",\n \" \",\n \"Download all scripts and text files: download *\",\n \" \",\n \"Download all scripts: download *.script\",\n \" \",\n \"Download all text files: download *.txt\",\n \" \",\n ],\n expr: [\n \"Usage: expr [mathematical expression]\",\n \" \",\n \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\",\n \" \",\n \"+, -, /, *, **, %\",\n \" \",\n \"Example:\",\n \" \",\n \" expr 25 * 2 ** 10\",\n \" \",\n \"Note that letters (non-digits) are not allowed and will be removed from the input.\",\n \" \",\n ],\n free: [\n \"Usage: free\",\n \" \",\n \"Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \",\n \"how much of it is being used.\",\n \" \",\n ],\n grow: [\n \"Usage: grow\",\n \" \",\n \"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.\",\n \"See the wiki page for hacking mechanics.\",\n \" \",\n ],\n hack: [\n \"Usage: hack\",\n \" \",\n \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\",\n \" \",\n ],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \",\n \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \",\n \"more detailed information about the Terminal command. Examples: \",\n \" \",\n \" help alias\",\n \" \",\n \" help scan-analyze\",\n \" \",\n ],\n history: [\n \"Usage: history [-c]\",\n \" \",\n \"Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument.\",\n \" \",\n ],\n home: [\n \"Usage: home\",\n \" \",\n \"Connect to your home computer. This will work no matter what server you are currently connected to.\",\n \" \",\n ],\n hostname: [\"Usage: hostname\", \" \", \"Prints the hostname of the current server\", \" \"],\n kill: [\n \"Usage: kill [script name] [args...] or kill [pid\",\n \" \",\n \"Kill the script specified by the script name and arguments OR by its PID.\",\n \" \",\n \"If you are killing the script using its filename and arguments, then each \",\n \"argument must be separated by a space. Remember that a running script is \",\n \"uniquely identified by both its name and the arguments that are used to start \",\n \"it. So, if a script was ran with the following arguments:\",\n \" \",\n \" run foo.script 1 sigma-cosmetics\",\n \" \",\n \"Then to kill this script the same arguments would have to be used:\",\n \" \",\n \" kill foo.script 1 sigma-cosmetics\",\n \" \",\n \"If you are killing the script using its PID, then the PID argument must be numeric\",\n \" \",\n ],\n killall: [\n \"Usage: killall\",\n \" \",\n \"Kills all scripts on the current server. \",\n \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \",\n \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \",\n \"The script will not be stopped/killed until after that time has elapsed.\",\n \" \",\n ],\n ls: [\n \"Usage: ls [dir] [-l] [--grep pattern]\",\n \" \",\n \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \",\n \"The files will be displayed in alphabetical order. \",\n \" \",\n \"The 'dir' optional parameter can be used to display files/directories in another directory.\",\n \" \",\n \"The '-l' optional parameter allows you to force each item onto a single line.\",\n \" \",\n \"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\",\n \" \",\n \"Examples:\",\n \" \",\n \"List all files with the '.script' extension in the current directory:\",\n \" \",\n \" ls -l --grep .script\",\n \" \",\n \"List all files with the '.js' extension in the root directory:\",\n \" \",\n \" ls / -l --grep .js\",\n \" \",\n \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\",\n \" \",\n \" ls scripts -l --grep purchase\",\n \" \",\n ],\n lscpu: [\"Usage: lscpu\", \" \", \"Prints the number of CPU Cores the current server has\", \" \"],\n\n mem: [\n \"Usage: mem [script name] [-t num_threads]\",\n \" \",\n \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \",\n \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \",\n \"an argument for the number of threads must be passed in afterwards. Examples:\",\n \" \",\n \" mem foo.script\",\n \" \",\n \" mem foo.script -t 50\",\n \" \",\n \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \",\n \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\",\n \" \",\n ],\n mv: [\n \"Usage: mv [src] [dest]\",\n \" \",\n \"Move the source file to the specified destination. This can also be used to rename files. \",\n \"This command only works for scripts and text files (.txt). This command CANNOT be used to \",\n \"convert to different file types\",\n \" \",\n \"Note that, unlike the Linux 'mv' command, the destination argument must be the \",\n \"full filepath. \",\n \"Examples: \",\n \" \",\n \" mv hacking-controller.script scripts/hacking-controller.script\",\n \" \",\n \" mv myScript.js myOldScript.js\",\n \" \",\n ],\n nano: TemplatedHelpTexts.scriptEditor(\"nano\"),\n ps: [\"Usage: ps\", \" \", \"Prints all scripts that are running on the current server\", \" \"],\n rm: [\n \"Usage: rm [file]\",\n \" \",\n \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \",\n \" \",\n \"WARNING: This is permanent and cannot be undone\",\n \" \",\n ],\n run: [\n \"Usage: run [file name] [-t] [num threads] [args...]\",\n \" \",\n \"Execute a program, script or coding contract.\",\n \" \",\n \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \",\n \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \",\n \"then the script will be run with a single thread by default. \",\n \"If the '-t' flag is used, then it MUST come immediately \",\n \"after the script name, and the [num threads] argument MUST come immediately afterwards. \",\n \" \",\n \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \",\n \"about script arguments. Each specified argument must be separated by a space. \",\n \" \",\n ],\n scan: [\n \"Usage: scan\",\n \" \",\n \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \",\n \"to using the 'connect' Terminal command.\",\n \" \",\n ],\n \"scan-analyze\": [\n \"Usage: scan-analyze [depth] [-a]\",\n \" \",\n \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \",\n \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \",\n \"command. This command also shows the relative paths to reach each server.\",\n \" \",\n \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \",\n \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \",\n \"5 and 10, respectively.\",\n \" \",\n \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \",\n \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \",\n \"it has.\",\n \" \",\n \"By default, this command will not display servers that you have purchased. However, you can pass in the \",\n \"-a flag at the end of the command if you would like to enable that.\",\n \" \",\n ],\n scp: [\n \"Usage: scp [filename ...] [target server]\",\n \" \",\n \"Copies the specified file(s) from the current server to the target server. \",\n \"This command only works for script files (.script or .js extension), literature files (.lit extension), \",\n \"and text files (.txt extension). \",\n \"The second argument passed in must be the hostname or IP of the target server. Examples:\",\n \" \",\n \" scp foo.script n00dles\",\n \" \",\n \" scp foo.script bar.script n00dles\",\n \" \",\n ],\n sudov: [\"Usage: sudov\", \" \", \"Prints whether or not you have root access to the current machine\", \" \"],\n\n tail: [\n \"Usage: tail [script name] [args...]\",\n \" \",\n \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \",\n \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \",\n \"to run it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 10 50000\",\n \" \",\n \"Then in order to check its logs with 'tail' the same arguments must be used: \",\n \" \",\n \" tail foo.script 10 50000\",\n \" \",\n ],\n top: [\n \"Usage: top\",\n \" \",\n \"Prints a list of all scripts running on the current server as well as their thread count and how much \",\n \"RAM they are using in total.\",\n \" \",\n ],\n unalias: [\n \"Usage: unalias [alias name]\",\n \" \",\n \"Deletes the specified alias. Note that the double quotation marks are required. \",\n \" \",\n \"As an example, if an alias was declared using:\",\n \" \",\n ' alias r=\"run\"',\n \" \",\n \"Then it could be removed using:\",\n \" \",\n \" unalias r\",\n \" \",\n \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\",\n \" \",\n ],\n vim: TemplatedHelpTexts.scriptEditor(\"vim\"),\n weaken: [\n \"Usage: weaken\",\n \" \",\n \"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.\",\n \"Requires root access. See the wiki page for hacking mechanics.\",\n \" \",\n ],\n wget: [\n \"Usage: wget [url] [target file]\",\n \" \",\n \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \",\n \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \",\n \"it will be overwritten by this command.\",\n \" \",\n \"Note that it will not be possible to download data from many websites because they do not allow \",\n \"cross-origin resource sharing (CORS). Example:\",\n \" \",\n \" wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\",\n \" \",\n ],\n};\n","import React from \"react\";\n\nimport { Page } from \"../ui/Router\";\nimport { hash } from \"../hash/hash\";\nimport { CONSTANTS } from \"../Constants\";\n\nenum GameEnv {\n Production,\n Development,\n}\n\nenum Platform {\n Browser,\n Steam,\n}\n\ninterface GameVersion {\n version: string;\n hash: string;\n\n toDisplay: () => string;\n}\n\ninterface BrowserFeatures {\n userAgent: string;\n language: string;\n cookiesEnabled: boolean;\n doNotTrack: string | null;\n indexedDb: boolean;\n}\n\ninterface IErrorMetadata {\n error: Error;\n errorInfo?: React.ErrorInfo;\n page?: Page;\n\n environment: GameEnv;\n platform: Platform;\n version: GameVersion;\n features: BrowserFeatures;\n}\n\nexport interface IErrorData {\n metadata: IErrorMetadata;\n\n title: string;\n body: string;\n\n features: string;\n fileName?: string;\n\n issueUrl: string;\n}\n\nexport const newIssueUrl = `https://github.com/danielyxie/bitburner/issues/new`;\n\nfunction getErrorMetadata(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorMetadata {\n const isElectron = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1;\n const env = process.env.NODE_ENV === \"development\" ? GameEnv.Development : GameEnv.Production;\n const version: GameVersion = {\n version: CONSTANTS.VersionString,\n hash: hash(),\n toDisplay: () => `v${CONSTANTS.VersionString} (${hash()})`,\n };\n const features: BrowserFeatures = {\n userAgent: navigator.userAgent,\n\n language: navigator.language,\n cookiesEnabled: navigator.cookieEnabled,\n doNotTrack: navigator.doNotTrack,\n indexedDb: !!window.indexedDB,\n };\n const metadata: IErrorMetadata = {\n platform: isElectron ? Platform.Steam : Platform.Browser,\n environment: env,\n version,\n features,\n error,\n errorInfo,\n page,\n };\n return metadata;\n}\n\nexport function getErrorForDisplay(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorData {\n const metadata = getErrorMetadata(error, errorInfo, page);\n const fileName = (metadata.error as any).fileName;\n const features =\n `lang=${metadata.features.language} cookiesEnabled=${metadata.features.cookiesEnabled.toString()}` +\n ` doNotTrack=${metadata.features.doNotTrack ?? \"null\"} indexedDb=${metadata.features.indexedDb.toString()}`;\n\n const title = `${metadata.error.name}: ${metadata.error.message}${metadata.page && ` (at \"${Page[metadata.page]}\")`}`;\n const body = `\n## ${title}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${metadata.error?.toString() ?? \"n/a\"}\n* Page: ${metadata.page ? Page[metadata.page] : \"n/a\"}\n* Version: ${metadata.version.toDisplay()}\n* Environment: ${GameEnv[metadata.environment]}\n* Platform: ${Platform[metadata.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${features}\n* Source: ${fileName ?? \"n/a\"}\n\n${\n metadata.environment === GameEnv.Development\n ? `\n### Stack Trace\n\\`\\`\\`\n${metadata.errorInfo?.componentStack.toString().trim()}\n\\`\\`\\`\n`\n : \"\"\n}\n### Save\n\\`\\`\\`\nCopy your save here if possible\n\\`\\`\\`\n`.trim();\n\n const issueUrl = `${newIssueUrl}?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`;\n\n const data: IErrorData = {\n metadata,\n fileName,\n features,\n title,\n body,\n issueUrl,\n };\n return data;\n}\n","import { getRandomInt } from \"./getRandomInt\";\n\n/**\n * Gets a random value in the range of a byte (0 - 255), or up to the maximum.\n * @param max The maximum value (up to 255).\n */\nexport function getRandomByte(max: number): number {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper: number = Math.max(Math.min(max, byteMaximum), 0);\n\n return getRandomInt(0, upper);\n}\n","import { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport const Growths: {\n [key: string]: (() => number) | undefined;\n [\"Tracking\"]: () => number;\n [\"Bounty Hunter\"]: () => number;\n [\"Retirement\"]: () => number;\n [\"Investigation\"]: () => number;\n [\"Undercover Operation\"]: () => number;\n [\"Sting Operation\"]: () => number;\n [\"Raid\"]: () => number;\n [\"Stealth Retirement Operation\"]: () => number;\n [\"Assassination\"]: () => number;\n} = {\n Tracking: () => getRandomInt(5, 75) / 10,\n \"Bounty Hunter\": () => getRandomInt(5, 75) / 10,\n Retirement: () => getRandomInt(5, 75) / 10,\n Investigation: () => getRandomInt(10, 40) / 10,\n \"Undercover Operation\": () => getRandomInt(10, 40) / 10,\n \"Sting Operation\": () => getRandomInt(3, 40) / 10,\n Raid: () => getRandomInt(2, 40) / 10,\n \"Stealth Retirement Operation\": () => getRandomInt(1, 20) / 10,\n Assassination: () => getRandomInt(1, 20) / 10,\n};\n","/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\nimport { Cities } from \"./Cities\";\nimport { IMap } from \"../types\";\n\nexport function createCityMap(initValue: T): IMap {\n const map: IMap = {};\n const cities = Object.keys(Cities);\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n // round try JSON so to make sure none of the initial values have the same references.\n return JSON.parse(JSON.stringify(map));\n}\n","import { List, ListItem, Paper, Typography } from \"@mui/material\";\nimport { uniqueId } from \"lodash\";\nimport React from \"react\";\n\ninterface IProps {\n children: React.ReactElement | (React.ReactElement | null)[];\n title: string;\n}\n\nexport const GameOptionsPage = (props: IProps): React.ReactElement => {\n return (\n \n {props.title}\n {(props.children as any)?.length > 1 ? (\n \n {(props.children as React.ReactElement[])\n .filter((c) => c)\n .map((c, i) => (\n \n {c}\n \n ))}\n \n ) : (\n props.children\n )}\n \n );\n};\n","/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\n\nimport { Card } from \"./Card\";\n\nexport class Hand {\n constructor(readonly cards: readonly Card[]) {}\n\n addCards(...cards: Card[]): Hand {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i: number): Hand {\n if (i >= this.cards.length) {\n throw new Error(`Tried to remove invalid card from Hand by index: ${i}`);\n }\n\n return new Hand([...this.cards.slice().splice(i, 1)]);\n }\n}\n","/**\n * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\ntype IProps = {\n onClick: () => void;\n text: string;\n tooltip?: JSX.Element | null;\n};\n\nexport function StockTickerTxButton(props: IProps): React.ReactElement {\n return (\n {props.tooltip} : \"\"}>\n \n \n );\n}\n","import { Box, Table } from \"@mui/material\";\nimport * as React from \"react\";\nimport { ActiveFragment } from \"../ActiveFragment\";\nimport { DummyGift } from \"../DummyGift\";\nimport { Grid } from \"./Grid\";\nimport { zeros } from \"../Helper\";\n\ninterface IProps {\n width: number;\n height: number;\n fragments: ActiveFragment[];\n}\n\nexport function DummyGrid(props: IProps): React.ReactElement {\n const gift = new DummyGift(props.width, props.height, props.fragments);\n const ghostGrid = zeros(props.width, props.height);\n return (\n \n \n undefined}\n click={() => undefined}\n />\n
\n
\n );\n}\n","/**\n * Abstract Base Class for any Server object\n */\nimport { CodingContract } from \"../CodingContracts\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { isValidFilePath } from \"../Terminal/DirectoryHelpers\";\nimport { TextFile } from \"../TextFile\";\nimport { IReturnStatus } from \"../types\";\n\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { ScriptArg } from \"../Netscript/ScriptArg\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\ninterface writeResult {\n success: boolean;\n overwritten: boolean;\n}\n\nexport class BaseServer {\n // Coding Contract files on this server\n contracts: CodingContract[] = [];\n\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n cpuCores = 1;\n\n // Flag indicating whether the FTP port is open\n ftpPortOpen = false;\n\n // Flag indicating whether player has admin/root access to this server\n hasAdminRights = false;\n\n // Hostname. Must be unique\n hostname = \"\";\n\n // Flag indicating whether HTTP Port is open\n httpPortOpen = false;\n\n // IP Address. Must be unique\n ip = \"\";\n\n // Flag indicating whether player is curently connected to this server\n isConnectedTo = false;\n\n // RAM (GB) available on this server\n maxRam = 0;\n\n // Message files AND Literature files on this Server\n messages: string[] = [];\n\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n organizationName = \"\";\n\n // Programs on this servers. Contains only the names of the programs\n programs: string[] = [];\n\n // RAM (GB) used. i.e. unavailable RAM\n ramUsed = 0;\n\n // RunningScript files on this server\n runningScripts: RunningScript[] = [];\n\n // Script files on this Server\n scripts: Script[] = [];\n\n // Contains the hostnames of all servers that are immediately\n // reachable from this one\n serversOnNetwork: string[] = [];\n\n // Flag indicating whether SMTP Port is open\n smtpPortOpen = false;\n\n // Flag indicating whether SQL Port is open\n sqlPortOpen = false;\n\n // Flag indicating whether the SSH Port is open\n sshPortOpen = false;\n\n // Text files on this server\n textFiles: TextFile[] = [];\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n this.ip = params.ip ? params.ip : createRandomIp();\n\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false;\n\n //Access information\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract: CodingContract): void {\n this.contracts.push(contract);\n }\n\n getContract(contractName: string): CodingContract | null {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n return null;\n }\n\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n getRunningScript(scriptName: string, scriptArgs: ScriptArg[]): RunningScript | null {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && compareArrays(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n getScript(scriptName: string): Script | null {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n isRunning(fn: string): boolean {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract: CodingContract | string): void {\n if (contract instanceof CodingContract) {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract;\n });\n }\n }\n\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n removeFile(fn: string): IReturnStatus {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return { res: true };\n }\n }\n } else if (isScriptFilename(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\",\n };\n }\n\n this.scripts.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return { res: true };\n }\n }\n }\n\n return { res: false, msg: \"No such file exists\" };\n }\n\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n runScript(script: RunningScript): void {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram: number): void {\n this.maxRam = ram;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateRamUsed(ram: number, player: IPlayer): void {\n this.ramUsed = ram;\n }\n\n pushProgram(program: string): void {\n if (this.programs.includes(program)) return;\n\n // Remove partially created program if there is one\n const existingPartialExeIndex = this.programs.findIndex((p) => p.startsWith(program));\n // findIndex returns -1 if there is no match, we only want to splice on a match\n if (existingPartialExeIndex > -1) {\n this.programs.splice(existingPartialExeIndex, 1);\n }\n\n this.programs.push(program);\n }\n\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n writeToScriptFile(player: IPlayer, fn: string, code: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !isScriptFilename(fn)) {\n return ret;\n }\n\n // Check if the script already exists, and overwrite it if it does\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(player, this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise, create a new script\n const newScript = new Script(player, fn, code, this.hostname, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n }\n\n // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n writeToTextFile(fn: string, txt: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n }\n\n // Check if the text file already exists, and overwrite if it does\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise create a new text file\n const newFile = new TextFile(fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { CodingContract, CodingContractTypes } from \"../../CodingContracts\";\nimport { CopyableText } from \"./CopyableText\";\nimport { Modal } from \"./Modal\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n c: CodingContract;\n onClose: () => void;\n onAttempt: (answer: string) => void;\n}\n\nexport const CodingContractEvent = new EventEmitter<[IProps]>();\n\nexport function CodingContractModal(): React.ReactElement {\n const [props, setProps] = useState(null);\n const [answer, setAnswer] = useState(\"\");\n\n useEffect(() => {\n CodingContractEvent.subscribe((props) => setProps(props));\n });\n if (props === null) return <>;\n\n function onChange(event: React.ChangeEvent): void {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (props === null) return;\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent\" seems like the right type but\n // whatever ...\n const value = (event.target as any).value;\n\n if (event.key === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType = CodingContractTypes[props.c.type];\n const description = [];\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries())\n description.push(\" }}>);\n return (\n \n \n \n You are attempting to solve a Coding Contract. You have {props.c.getMaxNumTries() - props.c.tries} tries\n remaining, after which the contract will self-destruct.\n \n
\n {description}\n
\n {\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }}\n >\n Solve\n \n ),\n }}\n />\n
\n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const BitFlumeEvent = new EventEmitter<[]>();\n\nexport function BitFlumeModal(): React.ReactElement {\n const router = use.Router();\n const [open, setOpen] = useState(false);\n function flume(): void {\n router.toBitVerse(true, false);\n setOpen(false);\n }\n\n useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);\n\n return (\n setOpen(false)}>\n \n WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\n
\n
\n Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\n
\n
\n
\n \n
\n );\n}\n","import * as augmentationMethods from \"./PlayerObjectAugmentationMethods\";\nimport * as bladeburnerMethods from \"./PlayerObjectBladeburnerMethods\";\nimport * as corporationMethods from \"./PlayerObjectCorporationMethods\";\nimport * as gangMethods from \"./PlayerObjectGangMethods\";\nimport * as generalMethods from \"./PlayerObjectGeneralMethods\";\nimport * as serverMethods from \"./PlayerObjectServerMethods\";\nimport * as workMethods from \"./PlayerObjectWorkMethods\";\n\nimport { IMap } from \"../../types\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport { IPlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Company } from \"../../Company/Company\";\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { ICodingContractReward } from \"../../CodingContracts\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { IPlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { ICorporation } from \"../../Corporation/ICorporation\";\nimport { IGang } from \"../../Gang/IGang\";\nimport { IBladeburner } from \"../../Bladeburner/IBladeburner\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\n\nimport { HashManager } from \"../../Hacknet/HashManager\";\nimport { CityName } from \"../../Locations/data/CityNames\";\n\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../../utils/JSONReviver\";\nimport { ISkillProgress } from \"../formulas/skill\";\nimport { PlayerAchievement } from \"../../Achievements/Achievements\";\nimport { cyrb53 } from \"../../utils/StringHelperFunctions\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\nimport { ITaskTracker } from \"../ITaskTracker\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Work } from \"src/Work/Work\";\nimport { defaultMultipliers, Multipliers } from \"../Multipliers\";\n\nexport class PlayerObject implements IPlayer {\n // Class members\n augmentations: IPlayerOwnedAugmentation[];\n bitNodeN: number;\n city: CityName;\n corporation: ICorporation | null;\n gang: IGang | null;\n bladeburner: IBladeburner | null;\n currentServer: string;\n factions: string[];\n factionInvitations: string[];\n hacknetNodes: (HacknetNode | string)[]; // HacknetNode object or IP of Hacknet Server\n has4SData: boolean;\n has4SDataTixApi: boolean;\n hashManager: HashManager;\n hasTixApiAccess: boolean;\n hasWseAccount: boolean;\n hp: number;\n jobs: IMap;\n init: () => void;\n karma: number;\n numPeopleKilled: number;\n location: LocationName;\n max_hp: number;\n money: number;\n moneySourceA: MoneySourceTracker;\n moneySourceB: MoneySourceTracker;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n purchasedServers: string[];\n queuedAugmentations: IPlayerOwnedAugmentation[];\n scriptProdSinceLastAug: number;\n sleeves: Sleeve[];\n sleevesFromCovenant: number;\n sourceFiles: IPlayerOwnedSourceFile[];\n exploits: Exploit[];\n achievements: PlayerAchievement[];\n terminalCommandHistory: string[];\n identifier: string;\n lastUpdate: number;\n lastSave: number;\n totalPlaytime: number;\n\n // Stats\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n\n // Experience\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n intelligence_exp: number;\n\n mults: Multipliers;\n\n currentWork: Work | null;\n focus: boolean;\n\n entropy: number;\n\n // Methods\n startWork: (w: Work) => void;\n processWork: (cycles: number) => void;\n finishWork: (cancelled: boolean) => void;\n applyForAgentJob: (sing?: boolean) => boolean;\n applyForBusinessConsultantJob: (sing?: boolean) => boolean;\n applyForBusinessJob: (sing?: boolean) => boolean;\n applyForEmployeeJob: (sing?: boolean) => boolean;\n applyForItJob: (sing?: boolean) => boolean;\n applyForJob: (entryPosType: CompanyPosition, sing?: boolean) => boolean;\n applyForNetworkEngineerJob: (sing?: boolean) => boolean;\n applyForPartTimeEmployeeJob: (sing?: boolean) => boolean;\n applyForPartTimeWaiterJob: (sing?: boolean) => boolean;\n applyForSecurityEngineerJob: (sing?: boolean) => boolean;\n applyForSecurityJob: (sing?: boolean) => boolean;\n applyForSoftwareConsultantJob: (sing?: boolean) => boolean;\n applyForSoftwareJob: (sing?: boolean) => boolean;\n applyForWaiterJob: (sing?: boolean) => boolean;\n canAccessBladeburner: () => boolean;\n canAccessCorporation: () => boolean;\n canAccessGang: () => boolean;\n canAccessGrafting: () => boolean;\n canAfford: (cost: number) => boolean;\n gainHackingExp: (exp: number) => void;\n gainStrengthExp: (exp: number) => void;\n gainDefenseExp: (exp: number) => void;\n gainDexterityExp: (exp: number) => void;\n gainAgilityExp: (exp: number) => void;\n gainCharismaExp: (exp: number) => void;\n gainIntelligenceExp: (exp: number) => void;\n gainStats: (retValue: ITaskTracker) => void;\n gainMoney: (money: number, source: string) => void;\n getCurrentServer: () => BaseServer;\n getGangFaction: () => Faction;\n getGangName: () => string;\n getHomeComputer: () => Server;\n getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;\n getUpgradeHomeRamCost: () => number;\n getUpgradeHomeCoresCost: () => number;\n gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;\n hasCorporation: () => boolean;\n hasGangWith: (facName: string) => boolean;\n hasTorRouter: () => boolean;\n hasProgram: (program: string) => boolean;\n inBladeburner: () => boolean;\n inGang: () => boolean;\n isAwareOfGang: () => boolean;\n isQualified: (company: Company, position: CompanyPosition) => boolean;\n loseMoney: (money: number, source: string) => void;\n reapplyAllAugmentations: (resetMultipliers?: boolean) => void;\n reapplyAllSourceFiles: () => void;\n regenerateHp: (amt: number) => void;\n recordMoneySource: (amt: number, source: string) => void;\n setMoney: (amt: number) => void;\n startBladeburner: () => void;\n startCorporation: (corpName: string, additionalShares?: number) => void;\n startFocusing: () => void;\n startGang: (facName: string, isHacking: boolean) => void;\n takeDamage: (amt: number) => boolean;\n travel: (to: CityName) => boolean;\n giveExploit: (exploit: Exploit) => void;\n giveAchievement: (achievementId: string) => void;\n queryStatFromString: (str: string) => number;\n getIntelligenceBonus: (weight: number) => number;\n getCasinoWinnings: () => number;\n quitJob: (company: string, sing?: boolean) => void;\n hasJob: () => boolean;\n createHacknetServer: () => HacknetServer;\n queueAugmentation: (augmentationName: string) => void;\n receiveInvite: (factionName: string) => void;\n updateSkillLevels: () => void;\n gainCodingContractReward: (reward: ICodingContractReward, difficulty?: number) => string;\n stopFocusing: () => void;\n resetMultipliers: () => void;\n prestigeAugmentation: () => void;\n prestigeSourceFile: () => void;\n calculateSkill: (exp: number, mult?: number) => number;\n calculateSkillProgress: (exp: number, mult?: number) => ISkillProgress;\n hospitalize: () => void;\n checkForFactionInvitations: () => Faction[];\n setBitNodeNumber: (n: number) => void;\n canAccessCotMG: () => boolean;\n sourceFileLvl: (n: number) => number;\n applyEntropy: (stacks?: number) => void;\n focusPenalty: () => number;\n\n constructor() {\n //Skills and stats\n this.hacking = 1;\n\n //Combat stats\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n //Labor stats\n this.charisma = 1;\n\n //Special stats\n this.intelligence = 0;\n\n //Experience and multipliers\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n\n this.mults = defaultMultipliers();\n\n //Money\n this.money = 1000 + CONSTANTS.Donations;\n\n //Location information\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n this.jobs = {};\n\n // Servers\n this.currentServer = \"\"; //hostname of Server currently being accessed through termina;\n this.purchasedServers = []; //hostnames of purchased server;\n\n // Hacknet Nodes/Servers\n this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the hostnames of the server;\n this.hashManager = new HashManager();\n\n //Factions\n this.factions = []; //Names of all factions player has joine;\n this.factionInvitations = []; //Outstanding faction invitation;\n\n //Augmentations\n this.queuedAugmentations = [];\n this.augmentations = [];\n\n this.sourceFiles = [];\n\n //Crime statistics\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n //Stock Market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n //Gang\n this.gang = null;\n\n //Corporation\n this.corporation = null;\n\n //Bladeburner\n this.bladeburner = null;\n\n // Sleeves & Re-sleeving\n this.sleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant\n //bitnode\n this.bitNodeN = 1;\n\n this.entropy = 0;\n\n //Used to store the last update time.\n this.lastUpdate = 0;\n this.lastSave = 0;\n this.totalPlaytime = 0;\n\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0;\n\n // Keep track of where money comes from\n this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentation\n this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode run\n // Production since last Augmentation installation\n this.scriptProdSinceLastAug = 0;\n\n this.exploits = [];\n this.achievements = [];\n this.terminalCommandHistory = [];\n\n this.focus = false;\n this.currentWork = null;\n\n // Let's get a hash of some semi-random stuff so we have something unique.\n this.identifier = cyrb53(\n \"I-\" +\n new Date().getTime() +\n navigator.userAgent +\n window.innerWidth +\n window.innerHeight +\n getRandomInt(100, 999),\n );\n\n this.init = generalMethods.init;\n this.prestigeAugmentation = generalMethods.prestigeAugmentation;\n this.prestigeSourceFile = generalMethods.prestigeSourceFile;\n this.receiveInvite = generalMethods.receiveInvite;\n this.calculateSkill = generalMethods.calculateSkill;\n this.calculateSkillProgress = generalMethods.calculateSkillProgress;\n this.updateSkillLevels = generalMethods.updateSkillLevels;\n this.resetMultipliers = generalMethods.resetMultipliers;\n this.hasProgram = generalMethods.hasProgram;\n this.setMoney = generalMethods.setMoney;\n this.gainMoney = generalMethods.gainMoney;\n this.loseMoney = generalMethods.loseMoney;\n this.canAfford = generalMethods.canAfford;\n this.recordMoneySource = generalMethods.recordMoneySource;\n this.gainHackingExp = generalMethods.gainHackingExp;\n this.gainStrengthExp = generalMethods.gainStrengthExp;\n this.gainDefenseExp = generalMethods.gainDefenseExp;\n this.gainDexterityExp = generalMethods.gainDexterityExp;\n this.gainAgilityExp = generalMethods.gainAgilityExp;\n this.gainCharismaExp = generalMethods.gainCharismaExp;\n this.gainIntelligenceExp = generalMethods.gainIntelligenceExp;\n this.gainStats = generalMethods.gainStats;\n this.queryStatFromString = generalMethods.queryStatFromString;\n this.startWork = workMethods.start;\n this.processWork = workMethods.process;\n this.finishWork = workMethods.finish;\n this.startFocusing = generalMethods.startFocusing;\n this.stopFocusing = generalMethods.stopFocusing;\n this.takeDamage = generalMethods.takeDamage;\n this.regenerateHp = generalMethods.regenerateHp;\n this.hospitalize = generalMethods.hospitalize;\n this.applyForJob = generalMethods.applyForJob;\n this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;\n this.quitJob = generalMethods.quitJob;\n this.hasJob = generalMethods.hasJob;\n this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;\n this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;\n this.applyForItJob = generalMethods.applyForItJob;\n this.applyForSecurityEngineerJob = generalMethods.applyForSecurityEngineerJob;\n this.applyForNetworkEngineerJob = generalMethods.applyForNetworkEngineerJob;\n this.applyForBusinessJob = generalMethods.applyForBusinessJob;\n this.applyForBusinessConsultantJob = generalMethods.applyForBusinessConsultantJob;\n this.applyForSecurityJob = generalMethods.applyForSecurityJob;\n this.applyForAgentJob = generalMethods.applyForAgentJob;\n this.applyForEmployeeJob = generalMethods.applyForEmployeeJob;\n this.applyForPartTimeEmployeeJob = generalMethods.applyForPartTimeEmployeeJob;\n this.applyForWaiterJob = generalMethods.applyForWaiterJob;\n this.applyForPartTimeWaiterJob = generalMethods.applyForPartTimeWaiterJob;\n this.isQualified = generalMethods.isQualified;\n this.reapplyAllAugmentations = generalMethods.reapplyAllAugmentations;\n this.reapplyAllSourceFiles = generalMethods.reapplyAllSourceFiles;\n this.checkForFactionInvitations = generalMethods.checkForFactionInvitations;\n this.setBitNodeNumber = generalMethods.setBitNodeNumber;\n this.queueAugmentation = generalMethods.queueAugmentation;\n this.gainCodingContractReward = generalMethods.gainCodingContractReward;\n this.travel = generalMethods.travel;\n this.gotoLocation = generalMethods.gotoLocation;\n this.canAccessGrafting = generalMethods.canAccessGrafting;\n this.giveExploit = generalMethods.giveExploit;\n this.giveAchievement = generalMethods.giveAchievement;\n this.getIntelligenceBonus = generalMethods.getIntelligenceBonus;\n this.getCasinoWinnings = generalMethods.getCasinoWinnings;\n this.hasAugmentation = augmentationMethods.hasAugmentation;\n this.canAccessBladeburner = bladeburnerMethods.canAccessBladeburner;\n this.inBladeburner = bladeburnerMethods.inBladeburner;\n this.startBladeburner = bladeburnerMethods.startBladeburner;\n this.canAccessCorporation = corporationMethods.canAccessCorporation;\n this.hasCorporation = corporationMethods.hasCorporation;\n this.startCorporation = corporationMethods.startCorporation;\n this.canAccessGang = gangMethods.canAccessGang;\n this.isAwareOfGang = gangMethods.isAwareOfGang;\n this.getGangFaction = gangMethods.getGangFaction;\n this.getGangName = gangMethods.getGangName;\n this.hasGangWith = gangMethods.hasGangWith;\n this.inGang = gangMethods.inGang;\n this.startGang = gangMethods.startGang;\n\n this.hasTorRouter = serverMethods.hasTorRouter;\n this.getCurrentServer = serverMethods.getCurrentServer;\n this.getHomeComputer = serverMethods.getHomeComputer;\n this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;\n this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;\n this.createHacknetServer = serverMethods.createHacknetServer;\n\n this.canAccessCotMG = generalMethods.canAccessCotMG;\n this.sourceFileLvl = generalMethods.sourceFileLvl;\n\n this.applyEntropy = augmentationMethods.applyEntropy;\n this.focusPenalty = generalMethods.focusPenalty;\n }\n\n whoAmI(): string {\n return \"Player\";\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"PlayerObject\", this);\n }\n\n /**\n * Initiatizes a PlayerObject object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): PlayerObject {\n return Generic_fromJSON(PlayerObject, value.data);\n }\n}\n\nReviver.constructors.PlayerObject = PlayerObject;\n","import React, { useState, useEffect } from \"react\";\nimport { joinFaction } from \"../FactionHelpers\";\nimport { Faction } from \"../Faction\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const InvitationEvent = new EventEmitter<[Faction]>();\n\nexport function InvitationModal(): React.ReactElement {\n const [faction, setFaction] = useState(null);\n const player = use.Player();\n function join(): void {\n if (faction === null) return;\n //Remove from invited factions\n const i = player.factionInvitations.findIndex((facName) => facName === faction.name);\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n joinFaction(faction);\n setFaction(null);\n }\n\n useEffect(() => InvitationEvent.subscribe((faction) => setFaction(faction)), []);\n\n return (\n setFaction(null)}>\n You have received a faction invitation.\n \n Would you like to join {(faction || { name: \"\" }).name}?
\n
\n Warning: Joining this faction may prevent you from joining other factions during this run!\n
\n \n \n
\n );\n}\n","import * as acorn from \"acorn\";\n/**\n * @license\n * JavaScript Interpreter\n *\n * Copyright 2013 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Interpreting JavaScript in JavaScript.\n * @author fraser@google.com (Neil Fraser)\n */\n(\"use strict\");\n\n/**\n * Create a new interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n * @param {Function=} opt_initFunc Optional initialization function. Used to\n * define APIs. When called it is passed the interpreter object and the\n * global scope object.\n * @param {Number} Bitburner-specific number used for determining exception line numbers\n * @constructor\n */\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = [];\n // Unique identifier for native functions. Used in serialization.\n this.functionCounter_ = 0;\n // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\n for (var methodName in this) {\n if (typeof this[methodName] === \"function\" && (m = methodName.match(stepMatch))) {\n this.stepFunctions_[m[1]] = this[methodName].bind(this);\n }\n }\n // Create and initialize the global scope.\n this.global = this.createScope(this.ast, null);\n // Run the polyfills.\n this.ast = acorn.parse(this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\n this.stripLocations_(this.ast, undefined, undefined);\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack = [state];\n this.run();\n this.value = undefined;\n // Point at the main program.\n this.ast = code;\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack.length = 0;\n this.stateStack[0] = state;\n // Get a handle on Acorn's node_t object. It's tricky to access.\n this.nodeConstructor = state.node.constructor;\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"stateStack\"] = this.stateStack;\n};\n\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true,\n};\n\n/**\n * Property descriptor of readonly properties.\n */\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false,\n};\n\n/**\n * Property descriptor of non-enumerable properties.\n */\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true,\n};\n\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false,\n};\n\n/**\n * Property descriptor of variables.\n */\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true,\n};\n\n/**\n * Unique symbol for indicating that a step has encountered an error, has\n * added it to the stack, and will be thrown within the user's program.\n * When STEP_ERROR is thrown in the JS-Interpreter, the error can be ignored.\n */\nInterpreter.STEP_ERROR = {};\n\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\nInterpreter.SCOPE_REFERENCE = {};\n\n/**\n * Unique symbol for indicating, when used as the value of the value\n * parameter in calls to setProperty and friends, that the value\n * should be taken from the property descriptor instead.\n */\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n\n/**\n * For cycle detection in array to string and error conversion;\n * see spec bug github.com/tc39/ecma262/issues/289\n * Since this is for atomic actions only, it can be a class property.\n */\nInterpreter.toStringCycles_ = [];\n\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n if (node == null || node.start == null) {\n return NaN;\n }\n try {\n code = code.substring(0, node.start);\n return (code.match(/\\n/g) || []).length + 1 - this.sourceCodeLineOffset;\n } catch (e) {\n return NaN;\n }\n};\n\n/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\n */\nInterpreter.prototype.getErrorLineNumberMessage = function (lineNumber) {\n if (isNaN(lineNumber)) {\n return \" (Unknown line number)\";\n } else if (lineNumber <= 0) {\n return \" (Error occurred in an imported function)\";\n } else {\n return (\n \" (Line Number \" +\n lineNumber +\n \". This line number is probably incorrect \" +\n \"if your script is importing any functions. This is being worked on)\"\n );\n }\n};\n\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n this.populateScope_(code, state.scope);\n // Append the new program to the old one.\n for (var i = 0, node; (node = code[\"body\"][i]); i++) {\n state.node[\"body\"].push(node);\n }\n state.done = false;\n};\n\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n if (!state) {\n return false;\n }\n var node = state.node,\n type = node[\"type\"];\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\n }\n try {\n var nextState = this.stepFunctions_[type](stack, state, node);\n } catch (e) {\n // Eat any step errors. They have been thrown on the stack.\n if (e !== Interpreter.STEP_ERROR) {\n // Uh oh. This is a real error in the JS-Interpreter. Rethrow.\n throw e;\n }\n }\n if (nextState) {\n stack.push(nextState);\n }\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n return true;\n};\n\n/**\n * Execute the interpreter to program completion. Vulnerable to infinite loops.\n * @return {boolean} True if a execution is asynchronously blocked,\n * false if no more instructions.\n */\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n return this.paused_;\n};\n\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initGlobalScope = function (scope) {\n // Initialize uneditable global properties.\n this.setProperty(scope, \"NaN\", NaN, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"Infinity\", Infinity, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"undefined\", undefined, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"window\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"this\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"self\", scope); // Editable.\n\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO);\n // Initialize global objects.\n this.initFunction(scope);\n this.initObject(scope);\n // Unable to set scope's parent prior (OBJECT did not exist).\n // Note that in a browser this would be 'Window', whereas in Node.js it would\n // be 'Object'. This interpreter is closer to Node in that it has no DOM.\n scope.proto = this.OBJECT_PROTO;\n this.setProperty(scope, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.initArray(scope);\n this.initString(scope);\n this.initBoolean(scope);\n this.initNumber(scope);\n this.initDate(scope);\n this.initRegExp(scope);\n this.initError(scope);\n this.initMath(scope);\n this.initJSON(scope);\n\n // Initialize global functions.\n var thisInterpreter = this;\n var func = this.createNativeFunction(function (x) {\n throw EvalError(\"Can't happen\");\n }, false);\n func.eval = true;\n this.setProperty(scope, \"eval\", func);\n\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n\n var strFunctions = [\n [escape, \"escape\"],\n [unescape, \"unescape\"],\n [decodeURI, \"decodeURI\"],\n [decodeURIComponent, \"decodeURIComponent\"],\n [encodeURI, \"encodeURI\"],\n [encodeURIComponent, \"encodeURIComponent\"],\n ];\n for (var i = 0; i < strFunctions.length; i++) {\n var wrapper = (function (nativeFunc) {\n return function (str) {\n try {\n return nativeFunc(str);\n } catch (e) {\n // decodeURI('%xy') will throw an error. Catch and rethrow.\n thisInterpreter.throwException(thisInterpreter.URI_ERROR, e.message);\n }\n };\n })(strFunctions[i][0]);\n this.setProperty(\n scope,\n strFunctions[i][1],\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"OBJECT\"] = this.OBJECT;\n this[\"OBJECT_PROTO\"] = this.OBJECT_PROTO;\n this[\"FUNCTION\"] = this.FUNCTION;\n this[\"FUNCTION_PROTO\"] = this.FUNCTION_PROTO;\n this[\"ARRAY\"] = this.ARRAY;\n this[\"ARRAY_PROTO\"] = this.ARRAY_PROTO;\n this[\"REGEXP\"] = this.REGEXP;\n this[\"REGEXP_PROTO\"] = this.REGEXP_PROTO;\n this[\"DATE\"] = this.DATE;\n this[\"DATE_PROTO\"] = this.DATE_PROTO;\n // The following properties are obsolete. Do not use.\n this[\"UNDEFINED\"] = undefined;\n this[\"NULL\"] = null;\n this[\"NAN\"] = NaN;\n this[\"TRUE\"] = true;\n this[\"FALSE\"] = false;\n this[\"STRING_EMPTY\"] = \"\";\n this[\"NUMBER_ZERO\"] = 0;\n this[\"NUMBER_ONE\"] = 1;\n\n // Run any user-provided initialization.\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/;\n // Function constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Function().\n var newFunc = this;\n } else {\n // Called as Function().\n var newFunc = thisInterpreter.createObjectProto(thisInterpreter.FUNCTION_PROTO);\n }\n if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n argsStr = args.join(\", \");\n }\n // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n newFunc.parentScope = thisInterpreter.global;\n // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n try {\n var ast = acorn.parse(\"(function(\" + argsStr + \") {\" + code + \"})\", Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code: \" + e.message);\n }\n if (ast[\"body\"].length !== 1) {\n // Function('a', 'return a + 6;}; {alert(1);');\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code in function body.\");\n }\n newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n\n this.setProperty(scope, \"Function\", this.FUNCTION);\n // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper;\n\n // Configure Function.prototype.\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.FUNCTION_PROTO.nativeFunc = function () {};\n this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++;\n this.setProperty(this.FUNCTION_PROTO, \"length\", 0, Interpreter.READONLY_DESCRIPTOR);\n\n var boxThis = function (value) {\n // In non-strict mode 'this' must be an object.\n if ((!value || !value.isObject) && !thisInterpreter.getScope().strict) {\n if (value === undefined || value === null) {\n // 'Undefined' and 'null' are changed to global object.\n value = thisInterpreter.global;\n } else {\n // Primitives must be boxed in non-strict mode.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n value = box;\n }\n }\n return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to apply a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n if (args !== null && args !== undefined) {\n if (args.isObject) {\n state.arguments_ = thisInterpreter.arrayPseudoToNative(args);\n } else {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"CreateListFromArrayLike called on non-object\");\n }\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg /*, var_args */) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to call a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\",\n \"{configurable: true, writable: true, value:\",\n \"function(oThis) {\",\n \"if (typeof this !== 'function') {\",\n \"throw TypeError('What is trying to be bound is not callable');\",\n \"}\",\n \"var aArgs = Array.prototype.slice.call(arguments, 1),\",\n \"fToBind = this,\",\n \"fNOP = function() {},\",\n \"fBound = function() {\",\n \"return fToBind.apply(this instanceof fNOP\",\n \"? this\",\n \": oThis,\",\n \"aArgs.concat(Array.prototype.slice.call(arguments)));\",\n \"};\",\n \"if (this.prototype) {\",\n \"fNOP.prototype = this.prototype;\",\n \"}\",\n \"fBound.prototype = new fNOP();\",\n \"return fBound;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n wrapper = function () {\n return this.toString();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"toString\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n wrapper = function () {\n return this.valueOf();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"valueOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Object constructor.\n wrapper = function (value) {\n if (value === undefined || value === null) {\n // Create a new object.\n if (thisInterpreter.calledWithNew()) {\n // Called as new Object().\n return this;\n } else {\n // Called as Object().\n return thisInterpreter.createObjectProto(thisInterpreter.OBJECT_PROTO);\n }\n }\n if (!value.isObject) {\n // Wrap the value as an object.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n return box;\n }\n // Return the provided object.\n return value;\n };\n this.OBJECT = this.createNativeFunction(wrapper, true);\n // Throw away the created prototype and use the root prototype.\n this.setProperty(this.OBJECT, \"prototype\", this.OBJECT_PROTO);\n this.setProperty(this.OBJECT_PROTO, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(scope, \"Object\", this.OBJECT);\n\n /**\n * Checks if the provided value is null or undefined.\n * If so, then throw an error in the call stack.\n * @param {Interpreter.Value} value Value to check.\n */\n var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n };\n\n // Static methods on Object.\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyNames\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n if (obj.isObject) {\n obj = obj.properties;\n }\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n this.setProperty(\n this.OBJECT,\n \"keys\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (proto) {\n // Support for the second argument is the responsibility of a polyfill.\n if (proto === null) {\n return thisInterpreter.createObjectProto(null);\n }\n if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n return thisInterpreter.createObjectProto(proto);\n };\n this.setProperty(\n this.OBJECT,\n \"create\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Add a polyfill to handle create's second argument.\n this.polyfills_.push(\n \"(function() {\",\n \"var create_ = Object.create;\",\n \"Object.create = function(proto, props) {\",\n \"var obj = create_(proto);\",\n \"props && Object.defineProperties(obj, props);\",\n \"return obj;\",\n \"};\",\n \"})();\",\n \"\",\n );\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Can't define property '\" + prop + \"', object is not extensible\",\n );\n }\n // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"defineProperty\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.polyfills_.push(\n // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\",\n \"var defineProperty_ = Object.defineProperty;\",\n \"Object.defineProperty = function(obj, prop, d1) {\",\n \"var d2 = {};\",\n \"if ('configurable' in d1) d2.configurable = d1.configurable;\",\n \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\",\n \"if ('writable' in d1) d2.writable = d1.writable;\",\n \"if ('value' in d1) d2.value = d1.value;\",\n \"if ('get' in d1) d2.get = d1.get;\",\n \"if ('set' in d1) d2.set = d1.set;\",\n \"return defineProperty_(obj, prop, d2);\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Object, 'defineProperties',\",\n \"{configurable: true, writable: true, value:\",\n \"function(obj, props) {\",\n \"var keys = Object.keys(props);\",\n \"for (var i = 0; i < keys.length; i++) {\",\n \"Object.defineProperty(obj, keys[i], props[keys[i]]);\",\n \"}\",\n \"return obj;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Object.getOwnPropertyDescriptor called on non-object\",\n );\n }\n prop = String(prop);\n if (!(prop in obj.properties)) {\n return undefined;\n }\n var descriptor = Object.getOwnPropertyDescriptor(obj.properties, prop);\n var getter = obj.getter[prop];\n var setter = obj.setter[prop];\n\n if (getter || setter) {\n descriptor.get = getter;\n descriptor.set = setter;\n delete descriptor.value;\n delete descriptor.writable;\n }\n // Preserve value, but remove it for the nativeToPseudo call.\n var value = descriptor.value;\n var hasValue = \"value\" in descriptor;\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n return pseudoDescriptor;\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyDescriptor\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n this.setProperty(\n this.OBJECT,\n \"getPrototypeOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n this.setProperty(\n this.OBJECT,\n \"isExtensible\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"preventExtensions\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Object.\n this.setNativeFunctionPrototype(this.OBJECT, \"toString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"toLocaleString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"valueOf\", Interpreter.Object.prototype.valueOf);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n return String(prop) in this.properties;\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"propertyIsEnumerable\", wrapper);\n\n wrapper = function (obj) {\n while (true) {\n // Note, circular loops shouldn't be possible.\n obj = thisInterpreter.getPrototype(obj);\n if (!obj) {\n // No parent; reached the top.\n return false;\n }\n if (obj === this) {\n return true;\n }\n }\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Array constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Array().\n var newArray = this;\n } else {\n // Called as Array().\n var newArray = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n }\n var first = arguments[0];\n if (arguments.length === 1 && typeof first === \"number\") {\n if (isNaN(Interpreter.legalArrayLength(first))) {\n thisInterpreter.throwException(thisInterpreter.RANGE_ERROR, \"Invalid array length\");\n }\n newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n newArray.properties.length = i;\n }\n return newArray;\n };\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY);\n\n // Static methods on Array.\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n this.setProperty(\n this.ARRAY,\n \"isArray\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Array.\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"pop\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.push.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"shift\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.unshift.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany /*, var_args*/) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"splice\", wrapper);\n\n wrapper = function (opt_begin, opt_end) {\n var list = Array.prototype.slice.call(this.properties, opt_begin, opt_end);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0;\n // Start by copying the current array.\n var iLength = thisInterpreter.getProperty(this, \"length\");\n for (var i = 0; i < iLength; i++) {\n if (thisInterpreter.hasProperty(this, i)) {\n var element = thisInterpreter.getProperty(this, i);\n list[length] = element;\n }\n length++;\n }\n // Loop through all arguments and copy them in.\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"concat\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.indexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callbackfn, thisArg) {\",\n \"if (!this || typeof callbackfn !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\",\n \"k++;\",\n \"}\",\n \"return true;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var res = [];\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t) {\",\n \"var val = t[i];\",\n \"if (fun.call(thisArg, val, i, t)) res.push(val);\",\n \"}\",\n \"}\",\n \"return res;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n \"if (!Array.prototype.find) {\",\n \"Object.defineProperty(Array.prototype, 'find', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return kValue;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return undefined;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Poly fill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n \"if (!Array.prototype.findIndex) {\",\n \"Object.defineProperty(Array.prototype, 'findIndex', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return k;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return -1;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Polyfill\n \"Object.defineProperty(Array.prototype, 'includes', {\",\n \"value: function(searchElement, fromIndex) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"// 1. Let O be ? ToObject(this value).\",\n \"var o = Object(this);\",\n '// 2. Let len be ? ToLength(? Get(O, \"length\")).',\n \"var len = o.length >>> 0;\",\n \"// 3. If len is 0, return false.\",\n \"if (len === 0) {\",\n \"return false;\",\n \"}\",\n \"// 4. Let n be ? ToInteger(fromIndex).\",\n \"// (If fromIndex is undefined, this step produces the value 0.)\",\n \"var n = fromIndex | 0;\",\n \"// 5. If n ≥ 0, then\",\n \"// a. Let k be n.\",\n \"// 6. Else n < 0,\",\n \"// a. Let k be len + n.\",\n \"// b. If k < 0, let k be 0.\",\n \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\",\n \"function sameValueZero(x, y) {\",\n \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\",\n \"}\",\n \"// 7. Repeat, while k < len\",\n \"while (k < len) {\",\n \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\",\n \"// b. If SameValueZero(searchElement, elementK) is true, return true.\",\n \"if (sameValueZero(o[k], searchElement)) {\",\n \"return true;\",\n \"}\",\n \"// c. Increase k by 1. \",\n \"k++;\",\n \"}\",\n \"// 8. Return false\",\n \"return false;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') new TypeError;\",\n \"var T, A, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"A = new Array(len);\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) A[k] = callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"return A;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = 0, value;\",\n \"if (arguments.length === 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k < len && !(k in t)) k++;\",\n \"if (k >= len) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k++];\",\n \"}\",\n \"for (; k < len; k++) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\",\n \"if (arguments.length >= 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k >= 0 && !(k in t)) k--;\",\n \"if (k < 0) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k--];\",\n \"}\",\n \"for (; k >= 0; k--) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (!this || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t && fun.call(thisArg, t[i], i, t)) {\",\n \"return true;\",\n \"}\",\n \"}\",\n \"return false;\",\n \"}\",\n \"});\",\n\n \"(function() {\",\n \"var sort_ = Array.prototype.sort;\",\n \"Array.prototype.sort = function(opt_comp) {\",\n // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\",\n \"return sort_.call(this);\",\n \"}\",\n // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\",\n \"var changes = 0;\",\n \"for (var j = 0; j < this.length - i - 1; j++) {\",\n \"if (opt_comp(this[j], this[j + 1]) > 0) {\",\n \"var swap = this[j];\",\n \"this[j] = this[j + 1];\",\n \"this[j + 1] = swap;\",\n \"changes++;\",\n \"}\",\n \"}\",\n \"if (!changes) break;\",\n \"}\",\n \"return this;\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Array.prototype, 'toLocaleString',\",\n \"{configurable: true, writable: true, value:\",\n \"function() {\",\n \"var out = [];\",\n \"for (var i = 0; i < this.length; i++) {\",\n \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\",\n \"}\",\n \"return out.join(',');\",\n \"}\",\n \"});\",\n \"\",\n );\n};\n\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // String constructor.\n wrapper = function (value) {\n value = String(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new String().\n this.data = value;\n return this;\n } else {\n // Called as String().\n return value;\n }\n };\n this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING);\n\n // Static methods on String.\n this.setProperty(\n this.STRING,\n \"fromCharCode\",\n this.createNativeFunction(String.fromCharCode, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on String.\n // Methods with exclusively primitive arguments.\n var functions = [\n \"charAt\",\n \"charCodeAt\",\n \"concat\",\n \"indexOf\",\n \"lastIndexOf\",\n \"slice\",\n \"substr\",\n \"substring\",\n \"toLocaleLowerCase\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toUpperCase\",\n \"trim\",\n ];\n for (var i = 0; i < functions.length; i++) {\n this.setNativeFunctionPrototype(this.STRING, functions[i], String.prototype[functions[i]]);\n }\n\n wrapper = function (compareString, locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return String(this).localeCompare(compareString, locales, options);\n };\n this.setNativeFunctionPrototype(this.STRING, \"localeCompare\", wrapper);\n\n wrapper = function (separator, limit) {\n if (thisInterpreter.isa(separator, thisInterpreter.REGEXP)) {\n separator = separator.data;\n }\n var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\n };\n this.setNativeFunctionPrototype(this.STRING, \"split\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\n };\n this.setNativeFunctionPrototype(this.STRING, \"match\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n return String(this).search(regexp);\n };\n this.setNativeFunctionPrototype(this.STRING, \"search\", wrapper);\n\n wrapper = function (substr, newSubstr) {\n // Support for function replacements is the responsibility of a polyfill.\n if (thisInterpreter.isa(substr, thisInterpreter.REGEXP)) {\n substr = substr.data;\n }\n return String(this).replace(substr, newSubstr);\n };\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper);\n // Add a polyfill to handle replace's second argument being a function.\n this.polyfills_.push(\n \"(function() {\",\n \"var replace_ = String.prototype.replace;\",\n \"String.prototype.replace = function(substr, newSubstr) {\",\n \"if (typeof newSubstr !== 'function') {\",\n // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\",\n \"}\",\n \"var str = this;\",\n \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\",\n \"var m = substr.exec(str);\",\n \"while (m) {\",\n \"m.push(m.index, str);\",\n \"var inject = newSubstr.apply(null, m);\",\n \"subs.push([m.index, m[0].length, inject]);\",\n \"m = substr.global ? substr.exec(str) : null;\",\n \"}\",\n \"for (var i = subs.length - 1; i >= 0; i--) {\",\n \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\",\n \"}\",\n \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\",\n \"if (i !== -1) {\",\n \"var inject = newSubstr(str.substr(i, substr.length), i, str);\",\n \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\",\n \"}\",\n \"}\",\n \"return str;\",\n \"};\",\n \"})();\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\",\n \"String.prototype.endsWith = function(search, this_len) {\",\n \"if (this_len === undefined || this_len > this.length) {\",\n \"this_len = this.length;\",\n \"}\",\n \"return this.substring(this_len - search.length, this_len) === search;\",\n \"};\",\n \"}\",\n\n //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\",\n \"String.prototype.includes = function(search, start) {\",\n \"'use strict';\",\n \"if (typeof start !== 'number') {\",\n \"start = 0;\",\n \"}\",\n \" \",\n \"if (start + search.length > this.length) {\",\n \"return false;\",\n \"} else {\",\n \"return this.indexOf(search, start) !== -1;\",\n \"}\",\n \"};\",\n \"}\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\",\n \"String.prototype.startsWith = function(search, pos) {\",\n \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\",\n \"};\",\n \"}\",\n\n \"\",\n );\n};\n\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Boolean constructor.\n wrapper = function (value) {\n value = Boolean(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Boolean().\n this.data = value;\n return this;\n } else {\n // Called as Boolean().\n return value;\n }\n };\n this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Number constructor.\n wrapper = function (value) {\n value = Number(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Number().\n this.data = value;\n return this;\n } else {\n // Called as Number().\n return value;\n }\n };\n this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n // Instance methods on Number.\n wrapper = function (fractionDigits) {\n try {\n return Number(this).toExponential(fractionDigits);\n } catch (e) {\n // Throws if fractionDigits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toExponential\", wrapper);\n\n wrapper = function (digits) {\n try {\n return Number(this).toFixed(digits);\n } catch (e) {\n // Throws if digits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toFixed\", wrapper);\n\n wrapper = function (precision) {\n try {\n return Number(this).toPrecision(precision);\n } catch (e) {\n // Throws if precision isn't within range (depends on implementation).\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toPrecision\", wrapper);\n\n wrapper = function (radix) {\n try {\n return Number(this).toString(radix);\n } catch (e) {\n // Throws if radix isn't within 2-36.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toString\", wrapper);\n\n wrapper = function (locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return Number(this).toLocaleString(locales, options);\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Date constructor.\n wrapper = function (value, var_args) {\n if (!thisInterpreter.calledWithNew()) {\n // Called as Date().\n // Calling Date() as a function returns a string, no arguments are heeded.\n return Date();\n }\n // Called as new Date().\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE);\n\n // Static methods on Date.\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.setProperty(\n this.DATE,\n \"parse\",\n this.createNativeFunction(Date.parse, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n // Instance methods on Date.\n var functions = [\n \"getDate\",\n \"getDay\",\n \"getFullYear\",\n \"getHours\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getMonth\",\n \"getSeconds\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getYear\",\n \"setDate\",\n \"setFullYear\",\n \"setHours\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMonth\",\n \"setSeconds\",\n \"setTime\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setYear\",\n \"toDateString\",\n \"toISOString\",\n \"toJSON\",\n \"toGMTString\",\n \"toLocaleDateString\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toTimeString\",\n \"toUTCString\",\n ];\n for (var i = 0; i < functions.length; i++) {\n wrapper = (function (nativeFunc) {\n return function (var_args) {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n return this.data[nativeFunc].apply(this.data, args);\n };\n })(functions[i]);\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // RegExp constructor.\n wrapper = function (pattern, flags) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new RegExp().\n var rgx = this;\n } else {\n // Called as RegExp().\n var rgx = thisInterpreter.createObjectProto(thisInterpreter.REGEXP_PROTO);\n }\n pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"global\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"ignoreCase\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"multiline\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"source\",\n \"(?:)\",\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString();\n // Get lastIndex from wrapped regex, since this is settable.\n this.data.lastIndex = Number(thisInterpreter.getProperty(this, \"lastIndex\"));\n var match = this.data.exec(str);\n thisInterpreter.setProperty(this, \"lastIndex\", this.data.lastIndex);\n\n if (match) {\n var result = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n }\n // match has additional properties.\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n return null;\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this;\n // Error constructor.\n this.ERROR = this.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Error().\n var newError = this;\n } else {\n // Called as Error().\n var newError = thisInterpreter.createObject(thisInterpreter.ERROR);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n this.setProperty(scope, \"Error\", this.ERROR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"message\", \"\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"name\", \"Error\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n var createErrorSubclass = function (name) {\n var constructor = thisInterpreter.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new XyzError().\n var newError = this;\n } else {\n // Called as XyzError().\n var newError = thisInterpreter.createObject(constructor);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(\n constructor.properties[\"prototype\"],\n \"name\",\n name,\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n thisInterpreter.setProperty(scope, name, constructor);\n\n return constructor;\n };\n\n this.EVAL_ERROR = createErrorSubclass(\"EvalError\");\n this.RANGE_ERROR = createErrorSubclass(\"RangeError\");\n this.REFERENCE_ERROR = createErrorSubclass(\"ReferenceError\");\n this.SYNTAX_ERROR = createErrorSubclass(\"SyntaxError\");\n this.TYPE_ERROR = createErrorSubclass(\"TypeError\");\n this.URI_ERROR = createErrorSubclass(\"URIError\");\n};\n\n/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initMath = function (scope) {\n var thisInterpreter = this;\n var myMath = this.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"Math\", myMath);\n var mathConsts = [\"E\", \"LN2\", \"LN10\", \"LOG2E\", \"LOG10E\", \"PI\", \"SQRT1_2\", \"SQRT2\"];\n for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n var numFunctions = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"atan2\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"max\",\n \"min\",\n \"pow\",\n \"random\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\",\n ];\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(\n myMath,\n numFunctions[i],\n this.createNativeFunction(Math[numFunctions[i]], false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n};\n\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initJSON = function (scope) {\n var thisInterpreter = this;\n var myJSON = thisInterpreter.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"JSON\", myJSON);\n\n var wrapper = function (text) {\n try {\n var nativeObj = JSON.parse(text.toString());\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, e.message);\n }\n return thisInterpreter.nativeToPseudo(nativeObj);\n };\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n return str;\n };\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\n\n/**\n * Is an object of a certain class?\n * @param {Interpreter.Value} child Object to check.\n * @param {Interpreter.Object} constructor Constructor of object.\n * @return {boolean} True if object is the class or inherits from it.\n * False otherwise.\n */\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n var proto = constructor.properties[\"prototype\"];\n if (child === proto) {\n return true;\n }\n // The first step up the prototype chain is harder since the child might be\n // a primitive value. Subsequent steps can just follow the .proto property.\n child = this.getPrototype(child);\n while (child) {\n if (child === proto) {\n return true;\n }\n child = child.proto;\n }\n return false;\n};\n\n/**\n * Is a value a legal integer for an array length?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0;\n // Array length must be between 0 and 2^32-1 (inclusive).\n return n === Number(x) ? n : NaN;\n};\n\n/**\n * Is a value a legal integer for an array index?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0;\n // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\nInterpreter.Value;\n\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\n */\nInterpreter.Object = function (proto) {\n this.getter = Object.create(null);\n this.setter = Object.create(null);\n this.properties = Object.create(null);\n this.proto = proto;\n};\n\n/** @type {Interpreter.Object} */\nInterpreter.Object.prototype.proto = null;\n\n/** @type {boolean} */\nInterpreter.Object.prototype.isObject = true;\n\n/** @type {string} */\nInterpreter.Object.prototype.class = \"Object\";\n\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\nInterpreter.Object.prototype.data = null;\n\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n try {\n var strs = [];\n for (var i = 0; i < this.properties.length; i++) {\n var value = this.properties[i];\n strs[i] = value && value.isObject && cycles.indexOf(value) !== -1 ? \"...\" : value;\n }\n } finally {\n cycles.pop();\n }\n return strs.join(\",\");\n }\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n var name, message;\n // Bug: Does not support getters and setters for name or message.\n var obj = this;\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while ((obj = obj.proto));\n var obj = this;\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while ((obj = obj.proto));\n cycles.push(this);\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n return message ? name + \": \" + message : String(name);\n }\n\n // RegExp, Date, and boxed primitives.\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\n */\nInterpreter.Object.prototype.valueOf = function () {\n if (this.data === undefined || this.data === null || this.data instanceof RegExp) {\n return this; // An Object.\n }\n if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n return /** @type {(boolean|number|string)} */ (this.data); // Boxed primitive.\n};\n\n/**\n * Create a new data object based on a constructor's prototype.\n * @param {Interpreter.Object} constructor Parent constructor function,\n * or null if scope object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\n\n/**\n * Create a new data object based on a prototype.\n * @param {Interpreter.Object} proto Prototype object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n var obj = new Interpreter.Object(proto);\n // Functions have prototype objects.\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n }\n // Arrays have length.\n if (this.isa(obj, this.ARRAY)) {\n this.setProperty(obj, \"length\", 0, {\n configurable: false,\n enumerable: false,\n writable: true,\n });\n obj.class = \"Array\";\n }\n if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n return obj;\n};\n\n/**\n * Initialize a pseudo regular expression object based on a native regular\n * expression object.\n * @param {!Interpreter.Object} pseudoRegexp The existing object to set.\n * @param {!RegExp} nativeRegexp The native regular expression.\n */\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp;\n // lastIndex is settable, all others are read-only attributes\n this.setProperty(pseudoRegexp, \"lastIndex\", nativeRegexp.lastIndex, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"source\", nativeRegexp.source, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"global\", nativeRegexp.global, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"ignoreCase\", nativeRegexp.ignoreCase, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"multiline\", nativeRegexp.multiline, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n};\n\n/**\n * Create a new function.\n * @param {!Object} node AST node defining the function.\n * @param {!Object} scope Parent scope.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createFunction = function (node, scope) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.parentScope = scope;\n func.node = node;\n this.setProperty(func, \"length\", func.node[\"params\"].length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Create a new native function.\n * @param {!Function} nativeFunc JavaScript function.\n * @param {boolean=} opt_constructor If true, the function's\n * prototype will have its constructor property set to the function.\n * If false, the function cannot be called as a constructor (e.g. escape).\n * Defaults to undefined.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createNativeFunction = function (nativeFunc, opt_constructor) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.nativeFunc = nativeFunc;\n nativeFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", nativeFunc.length, Interpreter.READONLY_DESCRIPTOR);\n if (opt_constructor) {\n this.setProperty(func.properties[\"prototype\"], \"constructor\", func, Interpreter.NONENUMERABLE_DESCRIPTOR);\n } else if (opt_constructor === false) {\n func.illegalConstructor = true;\n this.setProperty(func, \"prototype\", undefined);\n }\n return func;\n};\n\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createAsyncFunction = function (asyncFunc) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.asyncFunc = asyncFunc;\n asyncFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", asyncFunc.length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Converts from a native JS object or value to a JS interpreter object.\n * Can handle JSON-style values, does NOT handle cycles.\n * @param {*} nativeObj The native JS object to be converted.\n * @return {Interpreter.Value} The equivalent JS interpreter object.\n */\nInterpreter.prototype.nativeToPseudo = function (nativeObj) {\n if ((typeof nativeObj !== \"object\" && typeof nativeObj !== \"function\") || nativeObj === null) {\n return nativeObj;\n }\n\n if (nativeObj instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, nativeObj);\n return pseudoRegexp;\n }\n\n if (nativeObj instanceof Date) {\n var pseudoDate = this.createObjectProto(this.DATE_PROTO);\n pseudoDate.data = nativeObj;\n return pseudoDate;\n }\n\n if (nativeObj instanceof Function) {\n var interpreter = this;\n var wrapper = function () {\n return interpreter.nativeToPseudo(\n nativeObj.apply(\n interpreter,\n Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n }),\n ),\n );\n };\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < nativeObj.length; i++) {\n if (i in nativeObj) {\n this.setProperty(pseudoObj, i, this.nativeToPseudo(nativeObj[i]));\n }\n }\n } else {\n // Object.\n pseudoObj = this.createObjectProto(this.OBJECT_PROTO);\n for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n return pseudoObj;\n};\n\n/**\n * Converts from a JS interpreter object to native JS object.\n * Can handle JSON-style values, plus cycles.\n * @param {Interpreter.Value} pseudoObj The JS interpreter object to be\n * converted.\n * @param {Object=} opt_cycles Cycle detection (used in recursive calls).\n * @return {*} The equivalent native JS object or value.\n */\nInterpreter.prototype.pseudoToNative = function (pseudoObj, opt_cycles) {\n if ((typeof pseudoObj !== \"object\" && typeof pseudoObj !== \"function\") || pseudoObj === null) {\n return pseudoObj;\n }\n\n if (this.isa(pseudoObj, this.REGEXP)) {\n // Regular expression.\n return pseudoObj.data;\n }\n\n if (this.isa(pseudoObj, this.DATE)) {\n // Date.\n return pseudoObj.data;\n }\n\n var cycles = opt_cycles || {\n pseudo: [],\n native: [],\n };\n var i = cycles.pseudo.indexOf(pseudoObj);\n if (i !== -1) {\n return cycles.native[i];\n }\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\n for (var i = 0; i < length; i++) {\n if (this.hasProperty(pseudoObj, i)) {\n nativeObj[i] = this.pseudoToNative(this.getProperty(pseudoObj, i), cycles);\n }\n }\n } else {\n // Object.\n nativeObj = {};\n cycles.native.push(nativeObj);\n var val;\n for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\n\n/**\n * Converts from a native JS array to a JS interpreter array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Array} nativeArray The JS array to be converted.\n * @return {!Interpreter.Object} The equivalent JS interpreter array.\n */\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n return pseudoArray;\n};\n\n/**\n * Converts from a JS interpreter array to native JS array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Interpreter.Object} pseudoArray The JS interpreter array,\n * or JS interpreter object pretending to be an array.\n * @return {!Array} The equivalent native JS array.\n */\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n }\n // pseudoArray might be an object pretending to be an array. In this case\n // it's possible that length is non-existent, invalid, or smaller than the\n // largest defined numeric property. Set length explicitly here.\n nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\n\n/**\n * Look up the prototype for this value.\n * @param {Interpreter.Value} value Data object.\n * @return {Interpreter.Object} Prototype object, null if none.\n */\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n if (value) {\n return value.proto;\n }\n return null;\n};\n\n/**\n * Fetch a property value from a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line numbers\n * @return {Interpreter.Value} Property value (may be undefined).\n */\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n if (obj === undefined || obj === null) {\n let lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\n }\n if (name === \"length\") {\n // Special cases for magic length property.\n if (this.isa(obj, this.STRING)) {\n return String(obj).length;\n }\n } else if (name.charCodeAt(0) < 0x40) {\n // Might have numbers in there?\n // Special cases for string array indexing\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\n if (getter) {\n // Flag this function as being a getter and thus needing immediate\n // execution (rather than being the value of the property).\n getter.isGetter = true;\n return getter;\n }\n return obj.properties[name];\n }\n } while ((obj = this.getPrototype(obj)));\n return undefined;\n};\n\n/**\n * Does the named property exist on a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @return {boolean} True if property exists.\n */\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n name = String(name);\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while ((obj = this.getPrototype(obj)));\n return false;\n};\n\n/**\n * Set a property value on a data object.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Interpreter.Value} value New property value.\n * Use Interpreter.VALUE_IN_DESCRIPTOR if value is handled by\n * descriptor instead.\n * @param {Object=} opt_descriptor Optional descriptor object.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n if (\n opt_descriptor &&\n (\"get\" in opt_descriptor || \"set\" in opt_descriptor) &&\n (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)\n ) {\n this.throwException(\n this.TYPE_ERROR,\n \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\",\n );\n }\n var strict = !this.stateStack || this.getScope().strict;\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n return;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (name === \"length\" || (!isNaN(n) && n < String(obj).length)) {\n // Can't set length or letters on String objects.\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\",\n );\n }\n return;\n }\n }\n if (obj.class === \"Array\") {\n // Arrays have a magic length variable that is bound to the elements.\n var length = obj.properties.length;\n var i;\n if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n value = opt_descriptor.value;\n }\n value = Interpreter.legalArrayLength(value);\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\n if (!isNaN(i) && value <= i) {\n delete obj.properties[i];\n }\n }\n }\n } else if (!isNaN((i = Interpreter.legalArrayIndex(name)))) {\n // Increase length if this index is larger.\n obj.properties.length = Math.max(length, i + 1);\n }\n }\n if (obj.preventExtensions && !(name in obj.properties)) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't add property '\" + name + \"', object is not extensible\");\n }\n return;\n }\n if (opt_descriptor) {\n // Define the property.\n if (\"get\" in opt_descriptor) {\n if (opt_descriptor.get) {\n obj.getter[name] = opt_descriptor.get;\n } else {\n delete obj.getter[name];\n }\n }\n if (\"set\" in opt_descriptor) {\n if (opt_descriptor.set) {\n obj.setter[name] = opt_descriptor.set;\n } else {\n delete obj.setter[name];\n }\n }\n var descriptor = {};\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\n }\n if (\"writable\" in opt_descriptor) {\n descriptor.writable = opt_descriptor.writable;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n if (\"value\" in opt_descriptor) {\n descriptor.value = opt_descriptor.value;\n delete obj.getter[name];\n delete obj.setter[name];\n } else if (value !== Interpreter.VALUE_IN_DESCRIPTOR) {\n descriptor.value = value;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n try {\n Object.defineProperty(obj.properties, name, descriptor);\n } catch (e) {\n this.throwException(this.TYPE_ERROR, \"Cannot redefine property: \" + name);\n }\n } else {\n // Set the property.\n if (value === Interpreter.VALUE_IN_DESCRIPTOR) {\n throw ReferenceError(\"Value not specified.\");\n }\n // Determine the parent (possibly self) where the property is defined.\n var defObj = obj;\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\",\n );\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\",\n );\n }\n }\n }\n }\n};\n\n/**\n * Convenience method for adding a native function as a non-enumerable property\n * onto an object's prototype.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {!Function} wrapper Function object.\n */\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(\n obj.properties[\"prototype\"],\n name,\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n return scope;\n};\n\n/**\n * Create a new scope dictionary.\n * @param {!Object} node AST node defining the scope container\n * (e.g. a function).\n * @param {Interpreter.Object} parentScope Scope to link to.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n this.populateScope_(node, scope);\n\n // Determine if this scope starts with 'use strict'.\n scope.strict = false;\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n if (\n firstNode &&\n firstNode.expression &&\n firstNode.expression[\"type\"] === \"Literal\" &&\n firstNode.expression.value === \"use strict\"\n ) {\n scope.strict = true;\n }\n }\n return scope;\n};\n\n/**\n * Create a new special scope dictionary. Similar to createScope(), but\n * doesn't assume that the scope is for a function body.\n * This is used for 'catch' clauses and 'with' statements.\n * @param {!Interpreter.Object} parentScope Scope to link to.\n * @param {Interpreter.Object=} opt_scope Optional object to transform into\n * scope.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\n\n/**\n * Retrieves a value from the scope chain.\n * @param {string} name Name of variable.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has inherited properties and\n // could also have getters.\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n }\n // Typeof operator is unique: it can safely look at non-defined variables.\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\n\n/**\n * Sets a value to the current scope.\n * @param {string} name Name of variable.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has readonly properties and\n // could also have setters.\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\n\n/**\n * Create a new scope for the given node.\n * @param {!Object} node AST node (program or function).\n * @param {!Interpreter.Object} scope Scope dictionary to populate.\n * @private\n */\nInterpreter.prototype.populateScope_ = function (node, scope) {\n if (node[\"type\"] === \"VariableDeclaration\") {\n for (var i = 0; i < node[\"declarations\"].length; i++) {\n this.setProperty(scope, node[\"declarations\"][i][\"id\"][\"name\"], undefined, Interpreter.VARIABLE_DESCRIPTOR);\n }\n } else if (node[\"type\"] === \"FunctionDeclaration\") {\n this.setProperty(scope, node[\"id\"][\"name\"], this.createFunction(node, scope), Interpreter.VARIABLE_DESCRIPTOR);\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"FunctionExpression\") {\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"ExpressionStatement\") {\n return; // Expressions can't contain variable/function declarations.\n }\n var nodeClass = node[\"constructor\"];\n for (var name in node) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n if (Array.isArray(prop)) {\n for (var i = 0; i < prop.length; i++) {\n if (prop[i] && prop[i].constructor === nodeClass) {\n this.populateScope_(prop[i], scope);\n }\n }\n } else {\n if (prop.constructor === nodeClass) {\n this.populateScope_(prop, scope);\n }\n }\n }\n }\n};\n\n/**\n * Remove start and end values from AST, or set start and end values to a\n * constant value. Used to remove highlighting from polyfills and to set\n * highlighting in an eval to cover the entire eval expression.\n * @param {!Object} node AST node.\n * @param {number=} start Starting character of all nodes, or undefined.\n * @param {number=} end Ending character of all nodes, or undefined.\n * @private\n */\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\n }\n }\n};\n\n/**\n * Is the current state directly being called with as a construction with 'new'.\n * @return {boolean} True if 'new foo()', false if 'foo()'.\n */\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\n\n/**\n * Gets a value from the scope chain or from an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValue = function (ref, node) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.getValueFromScope(ref[1], node);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.getProperty(ref[0], ref[1], node);\n }\n};\n\n/**\n * Sets a value to the scope chain or to an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValue = function (ref, value) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.setValueToScope(ref[1], value);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.setProperty(ref[0], ref[1], value);\n }\n};\n\n/**\n * Completion Value Types.\n * @enum {number}\n */\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4,\n};\n\n/**\n * Throw an exception in the interpreter that can be handled by an\n * interpreter try/catch statement. If unhandled, a real exception will\n * be thrown. Can be called with either an error class and a message, or\n * with an actual object to be thrown.\n * @param {!Interpreter.Object} errorClass Type of error (if message is\n * provided) or the value to throw (if no message).\n * @param {string=} opt_message Message being thrown.\n */\nInterpreter.prototype.throwException = function (errorClass, opt_message, lineNumber) {\n if (opt_message === undefined) {\n var error = errorClass; // This is a value to throw, not an error class.\n } else {\n var error = this.createObject(errorClass);\n this.setProperty(error, \"message\", opt_message, Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n var lineNumErrorMsg;\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg);\n // Abort anything related to the current step.\n throw Interpreter.STEP_ERROR;\n};\n\n/**\n * Unwind the stack to the innermost relevant enclosing TryStatement,\n * For/ForIn/WhileStatement or Call/NewExpression. If this results in\n * the stack being completely unwound the thread will be terminated\n * and the appropriate error being thrown.\n * @param {Interpreter.Completion} type Completion type.\n * @param {Interpreter.Value=} value Value computed, returned or thrown.\n * @param {string=} label Target label for break or return.\n */\nInterpreter.prototype.unwind = function (type, value, label, lineNumberMsg = \"\") {\n if (type === Interpreter.Completion.NORMAL) {\n throw TypeError(\"Should not unwind for NORMAL completions\");\n }\n\n for (var stack = this.stateStack; stack.length > 0; stack.pop()) {\n var state = stack[stack.length - 1];\n switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = { type: type, value: value, label: label };\n return;\n case \"CallExpression\":\n case \"NewExpression\":\n if (type === Interpreter.Completion.RETURN) {\n state.value = value;\n return;\n } else if (type !== Interpreter.Completion.THROW) {\n throw Error(\"Unsynatctic break/continue not rejected by Acorn\");\n }\n }\n if (type === Interpreter.Completion.BREAK) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop || state.isSwitch) {\n stack.pop();\n return;\n }\n } else if (type === Interpreter.Completion.CONTINUE) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop) {\n return;\n }\n }\n }\n\n // Unhandled completion. Throw a real error.\n var realError;\n if (this.isa(value, this.ERROR)) {\n var errorTable = {\n EvalError: EvalError,\n RangeError: RangeError,\n ReferenceError: ReferenceError,\n SyntaxError: SyntaxError,\n TypeError: TypeError,\n URIError: URIError,\n };\n var name = this.getProperty(value, \"name\").toString();\n var message = this.getProperty(value, \"message\").valueOf();\n var type = errorTable[name] || Error;\n realError = type(message + lineNumberMsg);\n } else {\n realError = String(value) + lineNumberMsg;\n }\n throw realError;\n};\n\n/**\n * Create a call to a getter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @private\n */\nInterpreter.prototype.createGetter_ = function (func, left) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is explicitly provided (o).\n var funcThis = Array.isArray(left) ? left[0] : left;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [];\n return state;\n};\n\n/**\n * Create a call to a setter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value to set.\n * @private\n */\nInterpreter.prototype.createSetter_ = function (func, left, value) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is implicitly the global object (x).\n var funcThis = Array.isArray(left) ? left[0] : this.global;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [value];\n return state;\n};\n\n/**\n * Class for a state.\n * @param {!Object} node AST node for the state.\n * @param {!Interpreter.Object} scope Scope object for the state.\n * @constructor\n */\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\n if (!state.array_) {\n state.array_ = this.createObjectProto(this.ARRAY_PROTO);\n state.array_.properties.length = elements.length;\n } else {\n this.setProperty(state.array_, n, state.value);\n n++;\n }\n while (n < elements.length) {\n // Skip missing elements - they're not defined, not undefined.\n if (elements[n]) {\n state.n_ = n;\n return new Interpreter.State(elements[n], state.scope);\n }\n n++;\n }\n stack.pop();\n stack[stack.length - 1].value = state.array_;\n};\n\nInterpreter.prototype[\"stepAssignmentExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"left\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftReference_);\n }\n }\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var value = state.leftValue_;\n var rightValue = state.value;\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n case \"+=\":\n value += rightValue;\n break;\n case \"-=\":\n value -= rightValue;\n break;\n case \"*=\":\n value *= rightValue;\n break;\n case \"/=\":\n value /= rightValue;\n break;\n case \"%=\":\n value %= rightValue;\n break;\n case \"<<=\":\n value <<= rightValue;\n break;\n case \">>=\":\n value >>= rightValue;\n break;\n case \">>>=\":\n value >>>= rightValue;\n break;\n case \"&=\":\n value &= rightValue;\n break;\n case \"^=\":\n value ^= rightValue;\n break;\n case \"|=\":\n value |= rightValue;\n break;\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n var setter = this.setValue(state.leftReference_, value);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBinaryExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n case \"!=\":\n value = leftValue != rightValue;\n break;\n case \"===\":\n value = leftValue === rightValue;\n break;\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n case \">\":\n value = leftValue > rightValue;\n break;\n case \">=\":\n value = leftValue >= rightValue;\n break;\n case \"<\":\n value = leftValue < rightValue;\n break;\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n case \"+\":\n value = leftValue + rightValue;\n break;\n case \"-\":\n value = leftValue - rightValue;\n break;\n case \"*\":\n value = leftValue * rightValue;\n break;\n case \"/\":\n value = leftValue / rightValue;\n break;\n case \"%\":\n value = leftValue % rightValue;\n break;\n case \"&\":\n value = leftValue & rightValue;\n break;\n case \"|\":\n value = leftValue | rightValue;\n break;\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n case \"<<\":\n value = leftValue << rightValue;\n break;\n case \">>\":\n value = leftValue >> rightValue;\n break;\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\n case \"in\":\n if (!rightValue || !rightValue.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"'in' expects an object, not '\" + rightValue + \"'\", lineNum);\n }\n value = this.hasProperty(rightValue, leftValue);\n break;\n case \"instanceof\":\n if (!this.isa(rightValue, this.FUNCTION)) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"Right-hand side of instanceof is not an object\", lineNum);\n }\n value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBlockStatement\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepBreakStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.BREAK, undefined, label);\n};\n\nInterpreter.prototype[\"stepCallExpression\"] = function (stack, state, node) {\n if (!state.doneCallee_) {\n state.doneCallee_ = 1;\n // Components needed to determine value of 'this'.\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\n if (func[0] === Interpreter.SCOPE_REFERENCE) {\n // (Globally or locally) named function. Is it named 'eval'?\n state.directEval_ = func[1] === \"eval\";\n } else {\n // Method function, 'this' is object (ignored if invoked as 'new').\n state.funcThis_ = func[0];\n }\n func = state.func_;\n if (func && typeof func === \"object\" && func.isGetter) {\n // Clear the getter flag and call the getter function.\n func.isGetter = false;\n state.doneCallee_ = 1;\n return this.createGetter_(/** @type {!Interpreter.Object} */ (func), state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n state.arguments_ = [];\n state.n_ = 0;\n }\n var func = state.func_;\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n }\n // Determine value of 'this' in function.\n if (node[\"type\"] === \"NewExpression\") {\n if (func.illegalConstructor) {\n // Illegal: new escape();\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a constructor\", lineNum);\n }\n // Constructor, 'this' is new object.\n var proto = func.properties[\"prototype\"];\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\n }\n state.funcThis_ = this.createObjectProto(proto);\n state.isConstructor = true;\n } else if (state.funcThis_ === undefined) {\n // Global function, 'this' is global object (or 'undefined' if strict).\n state.funcThis_ = state.scope.strict ? undefined : this.global;\n }\n state.doneArgs_ = true;\n }\n if (!state.doneExec_) {\n state.doneExec_ = true;\n if (!func || !func.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a function\", lineNum);\n }\n var funcNode = func.node;\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope);\n // Add all arguments.\n for (var i = 0; i < funcNode[\"params\"].length; i++) {\n var paramName = funcNode[\"params\"][i][\"name\"];\n var paramValue = state.arguments_.length > i ? state.arguments_[i] : undefined;\n this.setProperty(scope, paramName, paramValue);\n }\n // Build arguments variable.\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n this.setProperty(scope, \"arguments\", argsList);\n // Add the function's name (var x = function foo(){};)\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n if (name) {\n this.setProperty(scope, name, func);\n }\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\n if (typeof code !== \"string\") {\n // JS does not parse String objects:\n // eval(new String('1 + 1')) -> '1 + 1'\n state.value = code;\n } else {\n try {\n var ast = acorn.parse(code.toString(), Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"Invalid code: \" + e.message, lineNum);\n }\n var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]);\n // Create new scope and update it with definitions in eval().\n var scope = state.directEval_ ? state.scope : this.global;\n if (scope.strict) {\n // Strict mode get its own scope in eval.\n scope = this.createScope(ast, scope);\n } else {\n // Non-strict mode pollutes the current scope.\n this.populateScope_(ast, scope);\n }\n this.value = undefined; // Default value if no code.\n return new Interpreter.State(evalNode, scope);\n }\n } else if (func.nativeFunc) {\n state.value = func.nativeFunc.apply(state.funcThis_, state.arguments_);\n } else if (func.asyncFunc) {\n var thisInterpreter = this;\n var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\n };\n var argsWithCallback = state.arguments_.concat(callback);\n this.paused_ = true;\n func.asyncFunc.apply(state.funcThis_, argsWithCallback);\n return;\n } else {\n /* A child of a function is a function but is not callable. For example:\n var F = function() {};\n F.prototype = escape;\n var f = new F();\n f();\n */\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func.class + \" is not a function\", lineNum);\n }\n } else {\n // Execution complete. Put the return value on the stack.\n stack.pop();\n if (state.isConstructor && typeof state.value !== \"object\") {\n stack[stack.length - 1].value = state.funcThis_;\n } else {\n stack[stack.length - 1].value = state.value;\n }\n }\n};\n\nInterpreter.prototype[\"stepCatchClause\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n // Create an empty scope.\n var scope = this.createSpecialScope(state.scope);\n // Add the argument.\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue);\n // Execute catch clause.\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepConditionalExpression\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\n if (value && node[\"consequent\"]) {\n // Execute 'if' block.\n return new Interpreter.State(node[\"consequent\"], state.scope);\n } else if (!value && node[\"alternate\"]) {\n // Execute 'else' block.\n return new Interpreter.State(node[\"alternate\"], state.scope);\n }\n // eval('1;if(false){2}') -> undefined\n this.value = undefined;\n }\n stack.pop();\n if (node[\"type\"] === \"ConditionalExpression\") {\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepContinueStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.CONTINUE, undefined, label);\n};\n\nInterpreter.prototype[\"stepDebuggerStatement\"] = function (stack, state, node) {\n // Do nothing. May be overridden by developers.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepDoWhileStatement\"] = function (stack, state, node) {\n if (node[\"type\"] === \"DoWhileStatement\" && state.test_ === undefined) {\n // First iteration of do/while executes without checking test.\n state.value = true;\n state.test_ = true;\n }\n if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (!state.value) {\n // Done, exit loop.\n stack.pop();\n } else if (node[\"body\"]) {\n // Execute the body.\n state.test_ = false;\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepEmptyStatement\"] = function (stack, state, node) {\n stack.pop();\n};\n\nInterpreter.prototype[\"stepEvalProgram_\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = this.value;\n};\n\nInterpreter.prototype[\"stepExpressionStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"expression\"], state.scope);\n }\n stack.pop();\n // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\n this.value = state.value;\n};\n\nInterpreter.prototype[\"stepForInStatement\"] = function (stack, state, node) {\n // First, initialize a variable if exists. Only do so once, ever.\n if (!state.doneInit_) {\n state.doneInit_ = true;\n if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(\n this.SYNTAX_ERROR,\n \"for-in loop variable declaration may not have an initializer.\",\n lineNum,\n );\n }\n // Variable initialization: for (var x = 4 in y)\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n }\n // Second, look up the object. Only do so once, ever.\n if (!state.doneObject_) {\n state.doneObject_ = true;\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n }\n // Third, find the property name for this iteration.\n if (state.name_ === undefined) {\n gotPropName: while (true) {\n if (state.object_ && state.object_.isObject) {\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_.properties);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n } else if (state.object_ !== null && state.object_ !== undefined) {\n // Primitive value (other than null or undefined).\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n }\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n }\n // Fourth, find the variable\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\n if (left[\"type\"] === \"VariableDeclaration\") {\n // Inline variable declaration: for (var x in y)\n state.variable_ = [Interpreter.SCOPE_REFERENCE, left[\"declarations\"][0][\"id\"][\"name\"]];\n } else {\n // Arbitrary left side: for (foo().bar in y)\n state.variable_ = null;\n var nextState = new Interpreter.State(left, state.scope);\n nextState.components = true;\n return nextState;\n }\n }\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n // Fifth, set the variable.\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n }\n // Next step will be step three.\n state.name_ = undefined;\n // Reevaluate the variable since it could be a setter on the global object.\n state.doneVariable_ = false;\n state.doneSetter_ = false;\n // Sixth and finally, execute the body if there was one. this.\n if (node[\"body\"]) {\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepForStatement\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\n if (node[\"test\"] && !state.value) {\n // Done, exit loop.\n stack.pop();\n } else {\n // Execute the body.\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n } else if (mode === 3) {\n state.mode_ = 1;\n if (node[\"update\"]) {\n return new Interpreter.State(node[\"update\"], state.scope);\n }\n }\n};\n\nInterpreter.prototype[\"stepFunctionDeclaration\"] = function (stack, state, node) {\n // This was found and handled when the scope was populated.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepFunctionExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.createFunction(node, state.scope);\n};\n\nInterpreter.prototype[\"stepIdentifier\"] = function (stack, state, node) {\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n var value = this.getValueFromScope(node[\"name\"], node);\n // An identifier could be a getter if it's a property on the global object.\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var scope = state.scope;\n while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, this.global);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepIfStatement\"] = Interpreter.prototype[\"stepConditionalExpression\"];\n\nInterpreter.prototype[\"stepLabeledStatement\"] = function (stack, state, node) {\n // No need to hit this node again on the way back up the stack.\n stack.pop();\n // Note that a statement might have multiple labels.\n var labels = state.labels || [];\n labels.push(node[\"label\"][\"name\"]);\n var nextState = new Interpreter.State(node[\"body\"], state.scope);\n nextState.labels = labels;\n return nextState;\n};\n\nInterpreter.prototype[\"stepLiteral\"] = function (stack, state, node) {\n stack.pop();\n var value = node[\"value\"];\n if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepLogicalExpression\"] = function (stack, state, node) {\n if (node[\"operator\"] !== \"&&\" && node[\"operator\"] !== \"||\") {\n throw SyntaxError(\"Unknown logical operator: \" + node[\"operator\"]);\n }\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n if ((node[\"operator\"] === \"&&\" && !state.value) || (node[\"operator\"] === \"||\" && state.value)) {\n // Shortcut evaluation.\n stack.pop();\n stack[stack.length - 1].value = state.value;\n } else {\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n } else {\n stack.pop();\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepMemberExpression\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n }\n var propName;\n if (!node[\"computed\"]) {\n state.object_ = state.value;\n // obj.foo -- Just access 'foo' directly.\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value;\n // obj[foo] -- Compute value of 'foo'.\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, state.object_);\n }\n stack[stack.length - 1].value = value;\n }\n};\n\nInterpreter.prototype[\"stepNewExpression\"] = Interpreter.prototype[\"stepCallExpression\"];\n\nInterpreter.prototype[\"stepObjectExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var property = node[\"properties\"][n];\n if (!state.object_) {\n // First execution.\n state.object_ = this.createObjectProto(this.OBJECT_PROTO);\n state.properties_ = Object.create(null);\n } else {\n // Determine property name.\n var key = property[\"key\"];\n if (key[\"type\"] === \"Identifier\") {\n var propName = key[\"name\"];\n } else if (key[\"type\"] === \"Literal\") {\n var propName = key[\"value\"];\n } else {\n throw SyntaxError(\"Unknown object structure: \" + key[\"type\"]);\n }\n // Set the property computed in the previous execution.\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\n if (\"get\" in kinds || \"set\" in kinds) {\n // Set a property with a getter or setter.\n var descriptor = {\n configurable: true,\n enumerable: true,\n get: kinds[\"get\"],\n set: kinds[\"set\"],\n };\n this.setProperty(state.object_, key, null, descriptor);\n } else {\n // Set a normal property with a value.\n this.setProperty(state.object_, key, kinds[\"init\"]);\n }\n }\n stack.pop();\n stack[stack.length - 1].value = state.object_;\n};\n\nInterpreter.prototype[\"stepProgram\"] = function (stack, state, node) {\n var expression = node[\"body\"].shift();\n if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n state.done = true;\n // Don't pop the stateStack.\n // Leave the root scope on the tree in case the program is appended to.\n};\n\nInterpreter.prototype[\"stepReturnStatement\"] = function (stack, state, node) {\n if (node[\"argument\"] && !state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n }\n this.unwind(Interpreter.Completion.RETURN, state.value, undefined);\n};\n\nInterpreter.prototype[\"stepSequenceExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"expressions\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = state.value;\n};\n\nInterpreter.prototype[\"stepSwitchStatement\"] = function (stack, state, node) {\n if (!state.test_) {\n state.test_ = 1;\n return new Interpreter.State(node[\"discriminant\"], state.scope);\n }\n if (state.test_ === 1) {\n state.test_ = 2;\n // Preserve switch value between case tests.\n state.switchValue_ = state.value;\n state.defaultCase_ = -1;\n }\n\n while (true) {\n var index = state.index_ || 0;\n var switchCase = node[\"cases\"][index];\n if (!state.matched_ && switchCase && !switchCase[\"test\"]) {\n // Test on the default case is null.\n // Bypass (but store) the default case, and get back to it later.\n state.defaultCase_ = index;\n state.index_ = index + 1;\n continue;\n }\n if (!switchCase && !state.matched_ && state.defaultCase_ !== -1) {\n // Ran through all cases, no match. Jump to the default.\n state.matched_ = true;\n state.index_ = state.defaultCase_;\n continue;\n }\n if (switchCase) {\n if (!state.matched_ && !state.tested_ && switchCase[\"test\"]) {\n state.tested_ = true;\n return new Interpreter.State(switchCase[\"test\"], state.scope);\n }\n if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\n if (switchCase[\"consequent\"][n]) {\n state.isSwitch = true;\n state.n_ = n + 1;\n return new Interpreter.State(switchCase[\"consequent\"][n], state.scope);\n }\n }\n // Move on to next case.\n state.tested_ = false;\n state.n_ = 0;\n state.index_ = index + 1;\n } else {\n stack.pop();\n return;\n }\n }\n};\n\nInterpreter.prototype[\"stepThisExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.getValueFromScope(\"this\", node);\n};\n\nInterpreter.prototype[\"stepThrowStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n } else {\n this.throwException(state.value);\n }\n};\n\nInterpreter.prototype[\"stepTryStatement\"] = function (stack, state, node) {\n if (!state.doneBlock_) {\n state.doneBlock_ = true;\n return new Interpreter.State(node[\"block\"], state.scope);\n }\n if (state.cv && state.cv.type === Interpreter.Completion.THROW && !state.doneHandler_ && node[\"handler\"]) {\n state.doneHandler_ = true;\n var nextState = new Interpreter.State(node[\"handler\"], state.scope);\n nextState.throwValue = state.cv.value;\n state.cv = undefined; // This error has been handled, don't rethrow.\n return nextState;\n }\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n stack.pop();\n if (state.cv) {\n // There was no catch handler, or the catch/finally threw an error.\n // Throw the error up to a higher try.\n this.unwind(state.cv.type, state.cv.value, state.cv.label);\n }\n};\n\nInterpreter.prototype[\"stepUnaryExpression\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = node[\"operator\"] === \"delete\";\n return nextState;\n }\n stack.pop();\n var value = state.value;\n if (node[\"operator\"] === \"-\") {\n value = -value;\n } else if (node[\"operator\"] === \"+\") {\n value = +value;\n } else if (node[\"operator\"] === \"!\") {\n value = !value;\n } else if (node[\"operator\"] === \"~\") {\n value = ~value;\n } else if (node[\"operator\"] === \"delete\") {\n var result = true;\n // If value is not an array, then it is a primitive, or some other value.\n // If so, skip the delete and return true.\n if (Array.isArray(value)) {\n var obj = value[0];\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n var name = String(value[1]);\n try {\n delete obj.properties[name];\n } catch (e) {\n if (state.scope.strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot delete property '\" + name + \"' of '\" + obj + \"'\");\n } else {\n result = false;\n }\n }\n }\n value = result;\n } else if (node[\"operator\"] === \"typeof\") {\n value = value && value.class === \"Function\" ? \"function\" : typeof value;\n } else if (node[\"operator\"] === \"void\") {\n value = undefined;\n } else {\n throw SyntaxError(\"Unknown unary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepUpdateExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftSide_);\n }\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var leftValue = Number(state.leftValue_);\n var changeValue;\n if (node[\"operator\"] === \"++\") {\n changeValue = leftValue + 1;\n } else if (node[\"operator\"] === \"--\") {\n changeValue = leftValue - 1;\n } else {\n throw SyntaxError(\"Unknown update expression: \" + node[\"operator\"]);\n }\n var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = returnValue;\n};\n\nInterpreter.prototype[\"stepVariableDeclaration\"] = function (stack, state, node) {\n var declarations = node[\"declarations\"];\n var n = state.n_ || 0;\n var declarationNode = declarations[n];\n if (state.init_ && declarationNode) {\n // This setValue call never needs to deal with calling a setter function.\n // Note that this is setting the init value, not defining the variable.\n // Variable definition is done when scope is populated.\n this.setValueToScope(declarationNode[\"id\"][\"name\"], state.value);\n state.init_ = false;\n declarationNode = declarations[++n];\n }\n while (declarationNode) {\n // Skip any declarations that are not initialized. They have already\n // been defined as undefined in populateScope_.\n if (declarationNode[\"init\"]) {\n state.n_ = n;\n state.init_ = true;\n return new Interpreter.State(declarationNode[\"init\"], state.scope);\n }\n declarationNode = declarations[++n];\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepWithStatement\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n } else if (!state.doneBody_) {\n state.doneBody_ = true;\n var scope = this.createSpecialScope(state.scope, state.value);\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepWhileStatement\"] = Interpreter.prototype[\"stepDoWhileStatement\"];\n\n// Preserve top-level API functions from being pruned/renamed by JS compilers.\n// Add others as needed.\n// The global object ('window' in a browser, 'global' in node.js) is 'this'.\n//this['Interpreter'] = Interpreter;\nInterpreter.prototype[\"step\"] = Interpreter.prototype.step;\nInterpreter.prototype[\"run\"] = Interpreter.prototype.run;\nInterpreter.prototype[\"appendCode\"] = Interpreter.prototype.appendCode;\nInterpreter.prototype[\"createObject\"] = Interpreter.prototype.createObject;\nInterpreter.prototype[\"createObjectProto\"] = Interpreter.prototype.createObjectProto;\nInterpreter.prototype[\"createAsyncFunction\"] = Interpreter.prototype.createAsyncFunction;\nInterpreter.prototype[\"createNativeFunction\"] = Interpreter.prototype.createNativeFunction;\nInterpreter.prototype[\"getProperty\"] = Interpreter.prototype.getProperty;\nInterpreter.prototype[\"setProperty\"] = Interpreter.prototype.setProperty;\nInterpreter.prototype[\"nativeToPseudo\"] = Interpreter.prototype.nativeToPseudo;\nInterpreter.prototype[\"pseudoToNative\"] = Interpreter.prototype.pseudoToNative;\n// Obsolete. Do not use.\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\nexport { Interpreter };\n","import { CONSTANTS } from \"../../Constants\";\nimport { Server } from \"../Server\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function calculateServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0);\n\n //Get adjusted growth rate, which accounts for server security\n const growthRate = CONSTANTS.ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n //Calculate adjusted server growth rate based on parameters\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted =\n numServerGrowthCycles * serverGrowthPercentage * BitNodeMultipliers.ServerGrowthRate;\n\n //Apply serverGrowth for the calculated number of growth cycles\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.mults.hacking_grow * coreBonus);\n}\n","import { Typography } from \"@mui/material\";\nimport React from \"react\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport _ from \"lodash\";\n\n// This particular eslint-disable is correct.\n// In this super specific weird case we in fact do want a regex on an ANSII character.\n// eslint-disable-next-line no-control-regex\nconst ANSI_ESCAPE = new RegExp(\"\\u{001b}\\\\[(?.*?)m\", \"ug\");\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n success: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.colors.success,\n },\n error: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.error.main,\n },\n primary: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.primary.main,\n },\n info: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.info.main,\n },\n warning: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.warning.main,\n },\n }),\n);\n\nconst lineClass = (classes: Record, s: string): string => {\n const lineClassMap: Record = {\n error: classes.error,\n success: classes.success,\n info: classes.info,\n warn: classes.warning,\n };\n return lineClassMap[s] || classes.primary;\n};\n\ninterface IProps {\n text: unknown;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n}\n\nexport const ANSIITypography = React.memo((props: IProps): React.ReactElement => {\n const text = String(props.text);\n const classes = useStyles();\n const parts = [];\n\n // Build a look-alike regex match to place at the front of the matches list\n const INITIAL = {\n 0: \"\",\n index: 0,\n groups: { code: null },\n };\n const matches = [INITIAL, ...text.matchAll(ANSI_ESCAPE), null];\n if (matches.length > 2) {\n matches.slice(0, -1).forEach((m, i) => {\n const n = matches[i + 1];\n if (!m || m.index === undefined || m.groups === undefined) {\n return;\n }\n const startIndex = m.index + m[0].length;\n const stopIndex = n ? n.index : text.length;\n const partText = text.slice(startIndex, stopIndex);\n if (startIndex !== stopIndex) {\n // Don't generate \"empty\" spans\n parts.push({ code: m.groups.code, text: partText });\n }\n });\n }\n if (parts.length === 0) {\n // For example, if the string was empty or there were no escape sequence matches\n parts.push({ code: null, text: text });\n }\n return (\n \n {parts.map((part, index) => {\n const spanStyle = ansiCodeStyle(part.code);\n if (!_.isEmpty(spanStyle)) {\n // Only wrap parts with spans if the calculated spanStyle is non-empty...\n return (\n \n {part.text}\n \n );\n } else {\n // ... otherwise yield the unmodified, unwrapped part.\n return part.text;\n }\n })}\n \n );\n});\n\nfunction ansiCodeStyle(code: string | null): Record {\n // The ANSI colors actually have the dark color set as default and require extra work to get\n // bright colors. But these are rarely used or, if they are, are often re-mapped by the\n // terminal emulator to brighter colors. So for foreground colors we use the bright color set\n // and for background colors we use the dark color set. Of course, all colors are available\n // via the longer ESC[n8;5;c] sequence (n={3,4}, c=color). Ideally, these 8-bit maps could\n // be managed in the user preferences/theme.\n const COLOR_MAP_BRIGHT: Record = {\n 0: \"#404040\",\n 1: \"#ff0000\",\n 2: \"#00ff00\",\n 3: \"#ffff00\",\n 4: \"#0000ff\",\n 5: \"#ff00ff\",\n 6: \"#00ffff\",\n 7: \"#ffffff\",\n };\n const COLOR_MAP_DARK: Record = {\n 0: \"#000000\",\n 1: \"#800000\",\n 2: \"#008000\",\n 3: \"#808000\",\n 4: \"#000080\",\n 5: \"#800080\",\n 6: \"#008080\",\n 7: \"#c0c0c0\",\n };\n\n const ansi2rgb = (code: number): string => {\n /* eslint-disable yoda */\n if (0 <= code && code < 8) {\n // x8 RGB\n return COLOR_MAP_BRIGHT[code];\n }\n if (8 <= code && code < 16) {\n // x8 RGB - \"High Intensity\" (but here, actually the dark set)\n return COLOR_MAP_DARK[code];\n }\n if (16 <= code && code < 232) {\n // x216 RGB\n const base = code - 16;\n const ir = Math.floor(base / 36);\n const ig = Math.floor((base % 36) / 6);\n const ib = Math.floor((base % 6) / 1);\n const r = ir <= 0 ? 0 : 55 + ir * 40;\n const g = ig <= 0 ? 0 : 55 + ig * 40;\n const b = ib <= 0 ? 0 : 55 + ib * 40;\n return `rgb(${r}, ${g}, ${b})`;\n }\n if (232 <= code && code < 256) {\n // x32 greyscale\n const base = code - 232;\n const grey = base * 10 + 8;\n return `rgb(${grey}, ${grey}, ${grey})`;\n }\n // shouldn't get here (under normal circumstances), but just in case\n return \"initial\";\n };\n\n type styleKey = \"fontWeight\" | \"textDecoration\" | \"color\" | \"backgroundColor\" | \"display\";\n const style: {\n fontWeight?: string;\n textDecoration?: string;\n color?: string;\n backgroundColor?: string;\n display?: string;\n } = {};\n\n if (code === null || code === \"0\") {\n return style;\n }\n\n const codeParts = code\n .split(\";\")\n .map((p) => parseInt(p))\n .filter(\n (p, i, arr) =>\n // If the sequence is 38;5 (x256 foreground color) or 48;5 (x256 background color),\n // filter out the 5 so the next codePart after {38,48} is the color code.\n p != 5 || i == 0 || (arr[i - 1] != 38 && arr[i - 1] != 48),\n );\n\n let nextStyleKey: styleKey | null = null;\n codeParts.forEach((codePart) => {\n /* eslint-disable yoda */\n if (nextStyleKey !== null) {\n style[nextStyleKey] = ansi2rgb(codePart);\n nextStyleKey = null;\n }\n // Decorations\n else if (codePart == 1) {\n style.fontWeight = \"bold\";\n } else if (codePart == 4) {\n style.textDecoration = \"underline\";\n }\n // Forground Color (x8)\n else if (30 <= codePart && codePart < 38) {\n if (COLOR_MAP_BRIGHT[codePart % 10]) {\n style.color = COLOR_MAP_BRIGHT[codePart % 10];\n }\n }\n // Background Color (x8)\n else if (40 <= codePart && codePart < 48) {\n if (COLOR_MAP_DARK[codePart % 10]) {\n style.backgroundColor = COLOR_MAP_DARK[codePart % 10];\n }\n }\n // Forground Color (x256)\n else if (codePart == 38) {\n nextStyleKey = \"color\";\n }\n // Background Color (x256)\n else if (codePart == 48) {\n nextStyleKey = \"backgroundColor\";\n }\n });\n // If a background color is set, render this as an inline block element (instead of inline)\n // so that the background between lines (at least those that don't wrap) is uninterrupted.\n if (style.backgroundColor !== undefined) {\n style.display = \"inline-block\";\n }\n return style;\n}\n","import { GangMemberTask } from \"./GangMemberTask\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangMemberUpgrades } from \"./GangMemberUpgrades\";\nimport { IAscensionResult } from \"./IAscensionResult\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IGang } from \"./IGang\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport {\n calculateRespectGain,\n calculateMoneyGain,\n calculateWantedLevelGain,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"./formulas/formulas\";\n\ninterface IMults {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n}\n\nexport class GangMember {\n name: string;\n task = \"Unassigned\";\n\n earnedRespect = 0;\n\n hack = 1;\n str = 1;\n def = 1;\n dex = 1;\n agi = 1;\n cha = 1;\n\n hack_exp = 0;\n str_exp = 0;\n def_exp = 0;\n dex_exp = 0;\n agi_exp = 0;\n cha_exp = 0;\n\n hack_mult = 1;\n str_mult = 1;\n def_mult = 1;\n dex_mult = 1;\n agi_mult = 1;\n cha_mult = 1;\n\n hack_asc_points = 0;\n str_asc_points = 0;\n def_asc_points = 0;\n dex_asc_points = 0;\n agi_asc_points = 0;\n cha_asc_points = 0;\n\n upgrades: string[] = []; // Names of upgrades\n augmentations: string[] = []; // Names of augmentations only\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points: number): number {\n return calculateAscensionMult(points);\n }\n\n updateSkillLevels(): void {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower(): number {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName: string): boolean {\n if (!GangMemberTasks.hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n this.task = taskName;\n return true;\n }\n\n unassignFromTask(): void {\n this.task = \"Unassigned\";\n }\n\n getTask(): GangMemberTask {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if ((this.task as any) instanceof GangMemberTask) {\n this.task = (this.task as any).name;\n }\n\n if (GangMemberTasks.hasOwnProperty(this.task)) {\n return GangMemberTasks[this.task];\n }\n return GangMemberTasks[\"Unassigned\"];\n }\n\n calculateRespectGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateRespectGain(g, this, task);\n }\n\n calculateWantedLevelGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateWantedLevelGain(g, this, task);\n }\n\n calculateMoneyGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateMoneyGain(g, this, task);\n }\n\n expMult(): IMults {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1,\n };\n }\n\n gainExperience(numCycles = 1): void {\n const task = this.getTask();\n if (task === GangMemberTasks[\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp +=\n (task.hackWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.hack *\n this.calculateAscensionMult(this.hack_asc_points);\n this.str_exp +=\n (task.strWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.str *\n this.calculateAscensionMult(this.str_asc_points);\n this.def_exp +=\n (task.defWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.def *\n this.calculateAscensionMult(this.def_asc_points);\n this.dex_exp +=\n (task.dexWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.dex *\n this.calculateAscensionMult(this.dex_asc_points);\n this.agi_exp +=\n (task.agiWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.agi *\n this.calculateAscensionMult(this.agi_asc_points);\n this.cha_exp +=\n (task.chaWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.cha *\n this.calculateAscensionMult(this.cha_asc_points);\n }\n\n recordEarnedRespect(numCycles = 1, gang: IGang): void {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints(): IMults {\n return {\n hack: calculateAscensionPointsGain(this.hack_exp),\n str: calculateAscensionPointsGain(this.str_exp),\n def: calculateAscensionPointsGain(this.def_exp),\n dex: calculateAscensionPointsGain(this.dex_exp),\n agi: calculateAscensionPointsGain(this.agi_exp),\n cha: calculateAscensionPointsGain(this.cha_exp),\n };\n }\n\n canAscend(): boolean {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getCurrentAscensionMults(): IMults {\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points),\n };\n }\n\n getAscensionMultsAfterAscend(): IMults {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack),\n str: this.calculateAscensionMult(this.str_asc_points + points.str),\n def: this.calculateAscensionMult(this.def_asc_points + points.def),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),\n };\n }\n\n getAscensionResults(): IMults {\n const postAscend = this.getAscensionMultsAfterAscend();\n const preAscend = this.getCurrentAscensionMults();\n\n return {\n hack: postAscend.hack / preAscend.hack,\n str: postAscend.str / preAscend.str,\n def: postAscend.def / preAscend.def,\n dex: postAscend.dex / preAscend.dex,\n agi: postAscend.agi / preAscend.agi,\n cha: postAscend.cha / preAscend.cha,\n };\n }\n\n ascend(): IAscensionResult {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha;\n\n // Remove upgrades. Then re-calculate multipliers and stats\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = GangMemberUpgrades[this.augmentations[i]];\n this.applyUpgrade(aug);\n }\n\n // Clear exp and recalculate stats\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha,\n };\n }\n\n applyUpgrade(upg: GangMemberUpgrade): void {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg: GangMemberUpgrade, player: IPlayer, gang: IGang): boolean {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n\n if (player.money < gang.getUpgradeCost(upg)) return false;\n player.loseMoney(gang.getUpgradeCost(upg), \"gang\");\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n this.applyUpgrade(upg);\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"GangMember\", this);\n }\n\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): GangMember {\n return Generic_fromJSON(GangMember, value.data);\n }\n}\n\nReviver.constructors.GangMember = GangMember;\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { Sleeve } from \"./Sleeve\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { StaticAugmentations } from \"../../Augmentation/StaticAugmentations\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nexport function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const ownedAugNames: string[] = sleeve.augmentations.map((e) => {\n return e.name;\n });\n const availableAugs: Augmentation[] = [];\n\n // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n function isAvailableForSleeve(aug: Augmentation): boolean {\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n if (availableAugs.includes(aug)) {\n return false;\n }\n if (aug.isSpecial) {\n return false;\n }\n\n const validMults = [\n \"hacking_mult\",\n \"strength_mult\",\n \"defense_mult\",\n \"dexterity_mult\",\n \"agility_mult\",\n \"charisma_mult\",\n \"hacking_exp_mult\",\n \"strength_exp_mult\",\n \"defense_exp_mult\",\n \"dexterity_exp_mult\",\n \"agility_exp_mult\",\n \"charisma_exp_mult\",\n \"company_rep_mult\",\n \"faction_rep_mult\",\n \"crime_money_mult\",\n \"crime_success_mult\",\n \"work_money_mult\",\n ];\n for (const mult of Object.keys(aug.mults)) {\n if (validMults.includes(mult)) {\n return true;\n }\n }\n\n return false;\n }\n\n // If player is in a gang, then we return all augs that the player\n // has enough reputation for (since that gang offers all augs)\n if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName of Object.keys(StaticAugmentations)) {\n const aug = StaticAugmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.getCost(p).repCost) {\n availableAugs.push(aug);\n }\n }\n }\n\n for (const facName of p.factions) {\n if (facName === FactionNames.Bladeburners) {\n continue;\n }\n if (facName === FactionNames.Netburners) {\n continue;\n }\n const fac: Faction | null = Factions[facName];\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug: Augmentation = StaticAugmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.getCost(p).repCost) {\n availableAugs.push(aug);\n }\n }\n }\n\n return availableAugs;\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const StaneksGiftEvents = new EventEmitter<[]>();\n","/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\nimport { CityName } from \"./CityNames\";\nimport { LocationName } from \"./LocationNames\";\nimport { IConstructorParams } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nexport const LocationsMetadata: IConstructorParams[] = [\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.AevumAeroCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19,\n },\n name: LocationName.AevumBachmanAndAssociates,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55,\n },\n name: LocationName.AevumClarkeIncorporated,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 3,\n expMult: 2,\n name: LocationName.AevumCrushFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02,\n },\n name: LocationName.AevumECorp,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54,\n },\n name: LocationName.AevumFulcrumTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89,\n },\n name: LocationName.AevumGalacticCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29,\n },\n name: LocationName.AevumNetLinkTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35,\n },\n name: LocationName.AevumPolice,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.AevumRhoConstruction,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 10,\n expMult: 5,\n name: LocationName.AevumSnapFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n costMult: 4,\n expMult: 3,\n name: LocationName.AevumSummitUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85,\n },\n name: LocationName.AevumWatchdogSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n name: LocationName.AevumCasino,\n types: [LocationType.Casino],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n types: [LocationType.Company],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.IshimaNovaMedical,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2,\n },\n name: LocationName.IshimaOmegaSoftware,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4,\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38,\n },\n name: LocationName.IshimaStormTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32,\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18,\n },\n name: LocationName.NewTokyoDefComm,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5,\n },\n name: LocationName.NewTokyoNoodleBar,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52,\n },\n name: LocationName.NewTokyoVitaLife,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n name: LocationName.NewTokyoArcade,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62,\n },\n name: LocationName.Sector12AlphaEnterprises,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2,\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59,\n },\n name: LocationName.Sector12BladeIndustries,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CIA,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66,\n },\n name: LocationName.Sector12CarmichaelSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CityHall,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12DeltaOne,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12FoodNStuff,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.Sector12FourSigma,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n expMult: 1,\n costMult: 1,\n name: LocationName.Sector12IronGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13,\n },\n name: LocationName.Sector12JoesGuns,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36,\n },\n name: LocationName.Sector12MegaCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12NSA,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n costMult: 20,\n expMult: 10,\n name: LocationName.Sector12PowerhouseGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n costMult: 3,\n expMult: 2,\n name: LocationName.Sector12RothmanUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12UniversalEnergy,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59,\n },\n name: LocationName.VolhavenCompuTek,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28,\n },\n name: LocationName.VolhavenHeliosLabs,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35,\n },\n name: LocationName.VolhavenLexoCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 7,\n expMult: 4,\n name: LocationName.VolhavenMilleniumFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53,\n },\n name: LocationName.VolhavenNWO,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 5,\n expMult: 4,\n name: LocationName.VolhavenZBInstituteOfTechnology,\n types: [LocationType.University],\n },\n {\n city: null,\n name: LocationName.Hospital,\n types: [LocationType.Hospital],\n },\n {\n city: null,\n name: LocationName.Slums,\n types: [LocationType.Slums],\n },\n {\n city: null,\n name: LocationName.TravelAgency,\n types: [LocationType.TravelAgency],\n },\n {\n city: null,\n name: LocationName.WorldStockExchange,\n types: [LocationType.StockMarket],\n },\n {\n city: CityName.Chongqing,\n name: LocationName.ChongqingChurchOfTheMachineGod,\n types: [LocationType.Special],\n },\n {\n city: CityName.Ishima,\n name: LocationName.IshimaGlitch,\n types: [LocationType.Special],\n },\n];\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport FileSaver from \"file-saver\";\nimport JSZip from \"jszip\";\n\nexport function exportScripts(pattern: string, server: BaseServer): void {\n const matchEnding = pattern.length == 1 || pattern === \"*.*\" ? null : pattern.slice(1); // Treat *.* the same as *\n const zip = new JSZip();\n // Helper function to zip any file contents whose name matches the pattern\n const zipFiles = (fileNames: string[], fileContents: string[]): void => {\n for (let i = 0; i < fileContents.length; ++i) {\n let name = fileNames[i];\n if (name.startsWith(\"/\")) name = name.slice(1);\n if (!matchEnding || name.endsWith(matchEnding))\n zip.file(name, new Blob([fileContents[i]], { type: \"text/plain\" }));\n }\n };\n // In the case of script files, we pull from the server.scripts array\n if (!matchEnding || isScriptFilename(matchEnding))\n zipFiles(\n server.scripts.map((s) => s.filename),\n server.scripts.map((s) => s.code),\n );\n // In the case of text files, we pull from the server.scripts array\n if (!matchEnding || matchEnding.endsWith(\".txt\"))\n zipFiles(\n server.textFiles.map((s) => s.fn),\n server.textFiles.map((s) => s.text),\n );\n\n // Return an error if no files matched, rather than an empty zip folder\n if (Object.keys(zip.files).length == 0) throw new Error(`No files match the pattern ${pattern}`);\n const zipFn = `bitburner${isScriptFilename(pattern) ? \"Scripts\" : pattern === \"*.txt\" ? \"Texts\" : \"Files\"}.zip`;\n zip.generateAsync({ type: \"blob\" }).then((content: Blob) => FileSaver.saveAs(content, zipFn));\n}\n\nexport function download(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of download command. Usage: download [script/text file]\");\n return;\n }\n const fn = args[0] + \"\";\n // If the parameter starts with *, download all files that match the wildcard pattern\n if (fn.startsWith(\"*\")) {\n try {\n exportScripts(fn, server);\n return;\n } catch (e: unknown) {\n let msg = String(e);\n if (e !== null && typeof e == \"object\" && e.hasOwnProperty(\"message\")) {\n msg = String((e as { message: unknown }).message);\n }\n return terminal.error(msg);\n }\n } else if (isScriptFilename(fn)) {\n // Download a single script\n const script = terminal.getScript(player, fn);\n if (script != null) {\n return script.download();\n }\n } else if (fn.endsWith(\".txt\")) {\n // Download a single text file\n const txt = terminal.getTextFile(player, fn);\n if (txt != null) {\n return txt.download();\n }\n } else {\n terminal.error(`Cannot download this filetype`);\n return;\n }\n terminal.error(`${fn} does not exist`);\n return;\n } catch (e) {\n terminal.error(e + \"\");\n return;\n }\n}\n","export class PlayerOwnedSourceFile {\n // Source-File level\n lvl = 1;\n\n // Source-File number\n n = 1;\n\n constructor(n: number, level: number) {\n this.n = n;\n this.lvl = level;\n }\n}\n\nexport interface IPlayerOwnedSourceFile {\n lvl: number;\n n: number;\n}\n","import * as React from \"react\";\n\nexport const stealthIcon = (\n \n \n \n \n \n \n);\nexport const killIcon = (\n \n \n \n \n \n \n);\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\n\ninterface IProps {\n action: IAction;\n isActive: boolean;\n bladeburner: IBladeburner;\n rerender: () => void;\n}\n\nexport function ActionLevel({ action, isActive, bladeburner, rerender }: IProps): React.ReactElement {\n const player = use.Player();\n\n const canIncrease = action.level < action.maxLevel;\n const canDecrease = action.level > 1;\n\n function increaseLevel(): void {\n if (!canIncrease) return;\n ++action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n function decreaseLevel(): void {\n if (!canDecrease) return;\n --action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n return (\n \n \n \n {action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed\n for next level\n \n }\n >\n \n Level: {action.level} / {action.maxLevel}\n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface IProps {\n action: IAction;\n rerender: () => void;\n}\n\nexport function Autolevel(props: IProps): React.ReactElement {\n function onAutolevel(event: React.ChangeEvent): void {\n props.action.autoLevel = event.target.checked;\n props.rerender();\n }\n return (\n \n Automatically increase operation level when possible}>\n Autolevel:\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Operation } from \"../Operation\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { TeamSizeModal } from \"./TeamSizeModal\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n action: Operation;\n bladeburner: IBladeburner;\n}\nexport function TeamSizeButton(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n \n setOpen(false)} action={props.action} bladeburner={props.bladeburner} />\n \n );\n}\n","import { CheckBox, CheckBoxOutlineBlank, Construction } from \"@mui/icons-material\";\nimport { Box, Button, Container, List, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { GraftingWork } from \"../../../Work/GraftingWork\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { AugmentationNames } from \"../../../Augmentation/data/AugmentationNames\";\nimport { StaticAugmentations } from \"../../../Augmentation/StaticAugmentations\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { hasAugmentationPrereqs } from \"../../../Faction/FactionHelpers\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { Locations } from \"../../../Locations/Locations\";\nimport { PurchaseAugmentationsOrderSetting } from \"../../../Settings/SettingEnums\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { IMap } from \"../../../types\";\nimport { use } from \"../../../ui/Context\";\nimport { ConfirmationModal } from \"../../../ui/React/ConfirmationModal\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { convertTimeMsToTimeElapsedString, formatNumber } from \"../../../utils/StringHelperFunctions\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { GraftableAugmentation } from \"../GraftableAugmentation\";\nimport { calculateGraftingTimeWithBonus, getGraftingAvailableAugs } from \"../GraftingHelpers\";\n\nexport const GraftableAugmentations: IMap = {};\n\nconst canGraft = (player: IPlayer, aug: GraftableAugmentation): boolean => {\n if (player.money < aug.cost) {\n return false;\n }\n return hasAugmentationPrereqs(aug.augmentation);\n};\n\ninterface IProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst AugPreReqsChecklist = (props: IProps): React.ReactElement => {\n const aug = props.aug,\n player = props.player;\n\n return (\n \n Pre-Requisites:\n
\n {aug.prereqs.map((preAug) => (\n \n {player.hasAugmentation(preAug) ? : }\n {preAug}\n \n ))}\n
\n );\n};\n\nexport const GraftingRoot = (): React.ReactElement => {\n const player = use.Player();\n const router = use.Router();\n\n for (const aug of Object.values(StaticAugmentations)) {\n const name = aug.name;\n const graftableAug = new GraftableAugmentation(aug);\n GraftableAugmentations[name] = graftableAug;\n }\n\n const [selectedAug, setSelectedAug] = useState(getGraftingAvailableAugs(player)[0]);\n const [graftOpen, setGraftOpen] = useState(false);\n const selectedAugmentation = StaticAugmentations[selectedAug];\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const getAugsSorted = (): string[] => {\n const augs = getGraftingAvailableAugs(player);\n switch (Settings.PurchaseAugmentationsOrder) {\n case PurchaseAugmentationsOrderSetting.Cost:\n return augs.sort((a, b) => GraftableAugmentations[a].cost - GraftableAugmentations[b].cost);\n default:\n return augs;\n }\n };\n\n const switchSortOrder = (newOrder: PurchaseAugmentationsOrderSetting): void => {\n Settings.PurchaseAugmentationsOrder = newOrder;\n rerender();\n };\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n Grafting Laboratory\n \n You find yourself in a secret laboratory, owned by a mysterious researcher.\n
\n The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations\n without requiring a body reset.\n
\n
\n Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints,\n even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum\n of money, and being a lab rat.\n
\n\n \n \n Graft Augmentations\n \n \n \n \n \n {getGraftingAvailableAugs(player).length > 0 ? (\n \n \n {getAugsSorted().map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n \n {k}\n \n \n ))}\n \n \n \n {selectedAug}\n \n setGraftOpen(true)}\n sx={{ width: \"100%\" }}\n disabled={!canGraft(player, GraftableAugmentations[selectedAug])}\n >\n Graft Augmentation (\n \n \n \n )\n \n setGraftOpen(false)}\n onConfirm={() => {\n player.startWork(\n new GraftingWork({\n augmentation: selectedAug,\n singularity: false,\n player: player,\n }),\n );\n player.startFocusing();\n router.toWork();\n }}\n confirmationText={\n <>\n Cancelling grafting will not save grafting progress, and the money you spend will not{\" \"}\n be returned.\n {!player.hasAugmentation(AugmentationNames.CongruityImplant) && (\n <>\n
\n
\n Additionally, grafting an Augmentation will increase the potency of the Entropy virus.\n \n )}\n \n }\n />\n \n \n Time to Graft:{\" \"}\n {convertTimeMsToTimeElapsedString(\n calculateGraftingTimeWithBonus(player, GraftableAugmentations[selectedAug]),\n )}\n {/* Use formula so the displayed creation time is accurate to player bonus */}\n \n\n {selectedAugmentation.prereqs.length > 0 && (\n \n )}\n\n
\n\n \n {(() => {\n const info =\n typeof selectedAugmentation.info === \"string\" ? (\n {selectedAugmentation.info}\n ) : (\n selectedAugmentation.info\n );\n const tooltip = (\n <>\n {info}\n
\n
\n {selectedAugmentation.stats}\n \n );\n return tooltip;\n })()}\n
\n
\n
\n
\n ) : (\n All Augmentations owned\n )}\n
\n\n \n Entropy Virus\n\n \n \n Entropy strength: {player.entropy}\n
\n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n
\n
\n\n \n When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating\n hidden malware. However, grafted Augmentations do not provide this security measure.\n
\n
\n Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they've dubbed\n \"Entropy\". This virus seems to grow more potent with each grafted Augmentation...\n
\n
\n
\n );\n};\n","import React, { useEffect, useState } from \"react\";\n\nexport function BlinkingCursor(): React.ReactElement {\n const [on, setOn] = useState(true);\n useEffect(() => {\n const i = setInterval(() => setOn((old) => !old), 1000);\n return () => clearInterval(i);\n });\n return <>{on ? \"|\" : <> };\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextFormatIcon from \"@mui/icons-material/TextFormat\";\nimport { StyleEditorModal } from \"./StyleEditorModal\";\n\nexport function StyleEditorButton(): React.ReactElement {\n const [styleEditorOpen, setStyleEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setStyleEditorOpen(false)} />\n \n );\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { ThemeEditorModal } from \"./ThemeEditorModal\";\nimport { IRouter } from \"../../ui/Router\";\nimport ColorizeIcon from \"@mui/icons-material/Colorize\";\n\ninterface IProps {\n router: IRouter;\n}\n\nexport function ThemeEditorButton({ router }: IProps): React.ReactElement {\n const [themeEditorOpen, setThemeEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setThemeEditorOpen(false)} router={router} />\n \n );\n}\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Link } from \"@mui/material\";\n\nexport function ThemeCollaborate(): React.ReactElement {\n return (\n <>\n \n If you've created a theme that you believe should be added in game's theme browser, feel free to{\" \"}\n \n create a pull request\n \n .\n \n \n Head over to the{\" \"}\n \n theme-sharing\n {\" \"}\n discord channel for more.\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { deleteGame } from \"../../db\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from \"@mui/material\";\n\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { pushDisableRestore } from \"../../Electron\";\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n}\n\nexport function DeleteGameButton({ color = \"primary\" }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n return (\n <>\n \n \n \n {\n setModalOpened(false);\n deleteGame()\n .then(() => {\n pushDisableRestore();\n setTimeout(() => location.reload(), 1000);\n })\n .catch((r) => console.error(`Could not delete game: ${r}`));\n }}\n open={modalOpened}\n onClose={() => setModalOpened(false)}\n confirmationText={\"Really delete your game? (It's permanent!)\"}\n />\n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from \"@mui/material\";\nimport RestartAltIcon from \"@mui/icons-material/RestartAlt\";\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n noConfirmation?: boolean;\n onTriggered: () => void;\n}\n\nexport function SoftResetButton({\n color = \"primary\",\n noConfirmation = false,\n onTriggered,\n}: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n function handleButtonClick(): void {\n if (noConfirmation) {\n onTriggered();\n } else {\n setModalOpened(true);\n }\n }\n\n return (\n <>\n \n \n \n setModalOpened(false)}\n confirmationText={\"This will perform the same action as installing Augmentations, are you sure?\"}\n />\n \n );\n}\n","/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\nimport { CheckBox, CheckBoxOutlineBlank, CheckCircle, NewReleases, Report } from \"@mui/icons-material\";\nimport { Box, Button, Container, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Augmentation } from \"../Augmentation\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { PurchaseAugmentationModal } from \"./PurchaseAugmentationModal\";\n\ninterface IPreReqsProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst PreReqs = (props: IPreReqsProps): React.ReactElement => {\n const ownedPreReqs = props.aug.prereqs.filter((aug) => props.player.hasAugmentation(aug));\n const hasPreReqs = props.aug.prereqs.length > 0 && ownedPreReqs.length === props.aug.prereqs.length;\n\n return (\n \n \n This Augmentation has the following pre-requisite(s):\n \n {props.aug.prereqs.map((preAug) => (\n \n ))}\n \n }\n >\n \n {hasPreReqs ? (\n <>\n \n Pre-requisites Owned\n \n ) : (\n <>\n \n Missing {props.aug.prereqs.length - ownedPreReqs.length} pre-requisite(s)\n \n )}\n \n \n );\n};\n\ninterface IExclusiveProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst Exclusive = (props: IExclusiveProps): React.ReactElement => {\n return (\n \n \n This Augmentation can only be acquired from the following source(s):\n \n
    \n \n
  • \n {props.aug.factions[0]} faction\n
  • \n {props.player.isAwareOfGang() && !props.aug.isSpecial && (\n
  • \n Certain gangs\n
  • \n )}\n {props.player.canAccessGrafting() &&\n !props.aug.isSpecial &&\n props.aug.name !== AugmentationNames.TheRedPill && (\n
  • \n Grafting\n
  • \n )}\n
    \n
\n \n }\n >\n \n \n );\n};\n\ninterface IReqProps {\n value: string;\n color: string;\n fulfilled: boolean;\n}\n\nconst Requirement = (props: IReqProps): React.ReactElement => {\n return (\n \n {props.fulfilled ? : }\n {props.value}\n \n );\n};\n\ninterface IPurchasableAugsProps {\n augNames: string[];\n ownedAugNames: string[];\n player: IPlayer;\n\n canPurchase: (player: IPlayer, aug: Augmentation) => boolean;\n purchaseAugmentation: (player: IPlayer, aug: Augmentation, showModal: (open: boolean) => void) => void;\n\n rep?: number;\n sleeveAugs?: boolean;\n faction?: Faction;\n}\n\nexport const PurchasableAugmentations = (props: IPurchasableAugsProps): React.ReactElement => {\n return (\n \n {props.augNames.map((augName: string) => (\n \n ))}\n {props.ownedAugNames.map((augName: string) => (\n \n ))}\n \n );\n};\n\ninterface IPurchasableAugProps {\n parent: IPurchasableAugsProps;\n augName: string;\n owned: boolean;\n}\n\nexport function PurchasableAugmentation(props: IPurchasableAugProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n const aug = StaticAugmentations[props.augName];\n const augCosts = aug.getCost(props.parent.player);\n const cost = props.parent.sleeveAugs ? aug.baseCost : augCosts.moneyCost;\n const repCost = augCosts.repCost;\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const description = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n\n return (\n \n <>\n \n \n props.parent.purchaseAugmentation(props.parent.player, aug, (open): void => {\n setOpen(open);\n })\n }\n disabled={!props.parent.canPurchase(props.parent.player, aug) || props.owned}\n sx={{ width: \"48px\", height: \"36px\", float: \"left\", clear: \"none\", mr: 1 }}\n >\n {props.owned ? \"Owned\" : \"Buy\"}\n \n\n \n \n \n \n {props.augName}\n {props.augName === AugmentationNames.NeuroFluxGovernor &&\n ` - Level ${aug.getLevel(props.parent.player)}`}\n \n {description}\n \n }\n >\n \n {aug.name}\n {aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel(props.parent.player)}`}\n \n \n\n {aug.factions.length === 1 && !props.parent.sleeveAugs && (\n \n )}\n {aug.prereqs.length > 0 && !props.parent.sleeveAugs && }\n \n \n \n\n {props.owned || (\n \n cost}\n value={numeralWrapper.formatMoney(cost)}\n color={Settings.theme.money}\n />\n {props.parent.rep !== undefined && (\n = repCost}\n value={`${numeralWrapper.formatReputation(repCost)} rep`}\n color={Settings.theme.rep}\n />\n )}\n \n )}\n\n {Settings.SuppressBuyAugmentationConfirmation || (\n setOpen(false)}\n faction={props.parent.faction}\n aug={aug}\n />\n )}\n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { CityName } from \"../data/CityNames\";\nimport { TravelConfirmationModal } from \"./TravelConfirmationModal\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n router: IRouter;\n};\n\nfunction travel(p: IPlayer, router: IRouter, to: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!p.canAfford(cost)) {\n return;\n }\n\n p.loseMoney(cost, \"other\");\n p.travel(to);\n dialogBoxCreate(<>You are now in {to}!);\n router.toCity();\n}\n\nexport function TravelAgencyRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const [open, setOpen] = useState(false);\n const [destination, setDestination] = useState(CityName.Sector12);\n function rerender(): void {\n setRerender((o) => !o);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function startTravel(city: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!player.canAfford(cost)) {\n return;\n }\n if (Settings.SuppressTravelConfirmation) {\n travel(player, router, city);\n return;\n }\n setOpen(true);\n setDestination(city);\n }\n\n return (\n <>\n Travel Agency\n \n \n From here, you can travel to any other city! A ticket costs{\" \"}\n .\n \n {Settings.DisableASCIIArt ? (\n <>\n {Object.values(CityName)\n .filter((city: string) => city != props.p.city)\n .map((city: string) => {\n const match = Object.entries(CityName).find((entry) => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return (\n \n \n
\n
\n );\n })}\n \n ) : (\n startTravel(city)} />\n )}\n
\n travel(player, router, destination)}\n open={open}\n onClose={() => setOpen(false)}\n />\n \n );\n}\n","import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport Editor from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\nimport type { Monaco } from \"@monaco-editor/react\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\ntype ITextModel = monaco.editor.ITextModel;\nimport { OptionsModal } from \"./OptionsModal\";\nimport { Options } from \"./Options\";\nimport { isValidFilePath } from \"../../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { Script } from \"../../Script/Script\";\nimport { TextFile } from \"../../TextFile\";\nimport { calculateRamUsage, checkInfiniteLoop } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { DragDropContext, Droppable, Draggable, DropResult } from \"react-beautiful-dnd\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\nimport { debounce } from \"lodash\";\nimport { saveObject } from \"../../SaveObject\";\nimport { loadThemes, makeTheme, sanitizeTheme } from \"./themes\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nimport SettingsIcon from \"@mui/icons-material/Settings\";\nimport SyncIcon from \"@mui/icons-material/Sync\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { PromptEvent } from \"../../ui/React/PromptManager\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport libSource from \"!!raw-loader!../NetscriptDefinitions.d.ts\";\nimport { TextField, Tooltip } from \"@mui/material\";\nimport { ExternalAPI } from \"../../Netscript/APIWrapper\";\n\ninterface IProps {\n // Map of filename -> code\n files: Record;\n hostname: string;\n player: IPlayer;\n router: IRouter;\n vim: boolean;\n}\n\n// TODO: try to remove global symbols\nlet symbolsLoaded = false;\nlet symbols: string[] = [];\nexport function SetupTextEditor(): void {\n const ns = NetscriptFunctions({ args: [] } as unknown as WorkerScript);\n\n // Populates symbols for text editor\n function populate(ns: ExternalAPI): string[] {\n let symbols: string[] = [];\n const keys = Object.keys(ns);\n for (const key of keys) {\n const x = ns[key];\n if (typeof x === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(x));\n }\n if (typeof x === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\", \"alterReality\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol)).sort();\n}\n\n// Holds all the data for a open script\nclass OpenScript {\n fileName: string;\n code: string;\n hostname: string;\n lastPosition: monaco.Position;\n model: ITextModel;\n\n constructor(fileName: string, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {\n this.fileName = fileName;\n this.code = code;\n this.hostname = hostname;\n this.lastPosition = lastPosition;\n this.model = model;\n }\n}\n\nlet openScripts: OpenScript[] = [];\nlet currentScript: OpenScript | null = null;\n\n// Called every time script editor is opened\nexport function Root(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n const editorRef = useRef(null);\n const monacoRef = useRef(null);\n const vimStatusRef = useRef(null);\n const [vimEditor, setVimEditor] = useState(null);\n const [editor, setEditor] = useState(null);\n const [filter, setFilter] = useState(\"\");\n const [searchExpanded, setSearchExpanded] = useState(false);\n\n const [ram, setRAM] = useState(\"RAM: ???\");\n const [ramEntries, setRamEntries] = useState([[\"???\", \"\"]]);\n const [updatingRam, setUpdatingRam] = useState(false);\n const [decorations, setDecorations] = useState([]);\n\n const [optionsOpen, setOptionsOpen] = useState(false);\n const [options, setOptions] = useState({\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: props.vim || Settings.MonacoVim,\n });\n\n const [ramInfoOpen, setRamInfoOpen] = useState(false);\n\n // Prevent Crash if script is open on deleted server\n openScripts = openScripts.filter((script) => {\n return GetServer(script.hostname) !== null;\n });\n if (currentScript && GetServer(currentScript.hostname) === null) {\n currentScript = openScripts[0];\n if (currentScript === undefined) currentScript = null;\n }\n\n const [dimensions, setDimensions] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n useEffect(() => {\n const debouncedHandleResize = debounce(function handleResize() {\n setDimensions({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 250);\n\n window.addEventListener(\"resize\", debouncedHandleResize);\n\n return () => {\n window.removeEventListener(\"resize\", debouncedHandleResize);\n };\n }, []);\n\n useEffect(() => {\n if (currentScript !== null) {\n updateRAM(currentScript.code);\n }\n }, []);\n\n useEffect(() => {\n function keydown(event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n //Ctrl + b\n if (event.code == \"KeyB\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n props.router.toTerminal();\n }\n\n // CTRL/CMD + S\n if (event.code == \"KeyS\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n event.stopPropagation();\n save();\n }\n }\n document.addEventListener(\"keydown\", keydown);\n return () => document.removeEventListener(\"keydown\", keydown);\n });\n\n useEffect(() => {\n // setup monaco-vim\n if (options.vim && editor && !vimEditor) {\n try {\n // @ts-expect-error\n window.require([\"monaco-vim\"], function (MonacoVim: any) {\n setVimEditor(MonacoVim.initVimMode(editor, vimStatusRef.current));\n MonacoVim.VimMode.Vim.defineEx(\"write\", \"w\", function () {\n // your own implementation on what you want to do when :w is pressed\n save();\n });\n MonacoVim.VimMode.Vim.defineEx(\"quit\", \"q\", function () {\n props.router.toTerminal();\n });\n // \"wqriteandquit\" is not a typo, prefix must be found in full string\n MonacoVim.VimMode.Vim.defineEx(\"wqriteandquit\", \"wq\", function () {\n save();\n props.router.toTerminal();\n });\n\n // Setup \"go to next tab\" and \"go to previous tab\". This is a little more involved\n // since these aren't Ex commands (they run in normal mode, not after typing `:`)\n MonacoVim.VimMode.Vim.defineAction(\"nextTabs\", function (_cm: unknown, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the next tab (to the right). Wraps around when at the rightmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n const nextIndex = (currIndex + nTabs) % openScripts.length;\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.defineAction(\"prevTabs\", function (_cm: unknown, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the previous tab (to the left). Wraps around when at the leftmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n let nextIndex = currIndex - nTabs;\n while (nextIndex < 0) {\n nextIndex += openScripts.length;\n }\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.mapCommand(\"gt\", \"action\", \"nextTabs\", {}, { context: \"normal\" });\n MonacoVim.VimMode.Vim.mapCommand(\"gT\", \"action\", \"prevTabs\", {}, { context: \"normal\" });\n editor.focus();\n });\n } catch {}\n } else if (!options.vim) {\n // Whem vim mode is disabled\n vimEditor?.dispose();\n setVimEditor(null);\n }\n\n return () => {\n vimEditor?.dispose();\n };\n }, [options, editorRef, editor, vimEditor]);\n\n // Generates a new model for the script\n function regenerateModel(script: OpenScript): void {\n if (monacoRef.current !== null) {\n script.model = monacoRef.current.editor.createModel(\n script.code,\n script.fileName.endsWith(\".txt\") ? \"plaintext\" : \"javascript\",\n );\n }\n }\n\n const debouncedSetRAM = useMemo(\n () =>\n debounce((s, e) => {\n setRAM(s);\n setRamEntries(e);\n setUpdatingRam(false);\n }, 300),\n [],\n );\n\n async function updateRAM(newCode: string): Promise {\n if (currentScript != null && currentScript.fileName.endsWith(\".txt\")) {\n debouncedSetRAM(\"N/A\", [[\"N/A\", \"\"]]);\n return;\n }\n setUpdatingRam(true);\n const codeCopy = newCode + \"\";\n const ramUsage = await calculateRamUsage(props.player, codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage.cost > 0) {\n const entries = ramUsage.entries?.sort((a, b) => b.cost - a.cost) ?? [];\n const entriesDisp = [];\n for (const entry of entries) {\n entriesDisp.push([`${entry.name} (${entry.type})`, numeralWrapper.formatRAM(entry.cost)]);\n }\n\n debouncedSetRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage.cost), entriesDisp);\n return;\n }\n switch (ramUsage.cost) {\n case RamCalculationErrorCode.ImportError: {\n debouncedSetRAM(\"RAM: Import Error\", [[\"Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n debouncedSetRAM(\"RAM: HTTP Import Error\", [[\"HTTP Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n debouncedSetRAM(\"RAM: Syntax Error\", [[\"Syntax Error\", \"\"]]);\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n // Formats the code\n function beautify(): void {\n if (editorRef.current === null) return;\n editorRef.current.getAction(\"editor.action.formatDocument\").run();\n }\n\n // How to load function definition in monaco\n // https://github.com/Microsoft/monaco-editor/issues/1415\n // https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n // https://www.npmjs.com/package/@monaco-editor/react#development-playground\n // https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n // https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n // https://blog.checklyhq.com/customizing-monaco/\n // Before the editor is mounted\n function beforeMount(monaco: Monaco): void {\n if (symbolsLoaded) return;\n // Setup monaco auto completion for ns1\n symbolsLoaded = true;\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: (\n model: monaco.editor.ITextModel,\n position: monaco.Position,\n ): monaco.languages.CompletionList => {\n const word = model.getWordAtPosition(position);\n const suggestions: monaco.languages.CompletionItem[] = [];\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: word?.startColumn ?? 0,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n },\n });\n }\n return { suggestions: suggestions };\n },\n });\n\n (async function () {\n // We have to improve the default js language otherwise theme sucks\n // https://github.com/microsoft/monaco-editor/issues/1927#issuecomment-692909147\n // We should make a copy of javascript with our changes and make that a new custom language.\n const js = monaco.languages.getLanguages().find(({ id }) => id === \"javascript\");\n if (js === undefined) throw new Error(\"The javascript language isn't loaded in Monaco.\");\n // Define a new type in order to more properly cast what's coming out of monaco.\n type ActualLanguage = monaco.languages.ILanguageExtensionPoint & {\n loader: () => Promise<{ language: monaco.languages.IMonarchLanguage }>;\n };\n const hasLoader = (js: monaco.languages.ILanguageExtensionPoint): js is ActualLanguage =>\n js.hasOwnProperty(\"loader\");\n if (!hasLoader(js)) throw new Error(\"js extension point has no load entrypoint.\");\n const { language } = await js.loader();\n // replaced the bare tokens with regexes surrounded by \\b, e.g. \\b{token}\\b which matches a word-break on either side\n // this prevents the highlighter from highlighting pieces of variables that start with a reserved token name\n language.tokenizer.root.unshift([new RegExp(\"\\\\bns\\\\b\"), { token: \"ns\" }]);\n for (const symbol of symbols)\n language.tokenizer.root.unshift([new RegExp(`\\\\b${symbol}\\\\b`), { token: \"netscriptfunction\" }]);\n const otherKeywords = [\"let\", \"const\", \"var\", \"function\"];\n const otherKeyvars = [\"true\", \"false\", \"null\", \"undefined\"];\n otherKeywords.forEach((k) =>\n language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeywords\" }]),\n );\n otherKeyvars.forEach((k) =>\n language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeyvars\" }]),\n );\n language.tokenizer.root.unshift([new RegExp(\"\\\\bthis\\\\b\"), { token: \"this\" }]);\n })();\n\n const source = (libSource + \"\").replace(/export /g, \"\");\n monaco.languages.typescript.javascriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n loadThemes(monaco);\n sanitizeTheme(Settings.EditorTheme);\n monaco.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n }\n\n // When the editor is mounted\n function onMount(editor: IStandaloneCodeEditor, monaco: Monaco): void {\n // Required when switching between site navigation (e.g. from Script Editor -> Terminal and back)\n // the `useEffect()` for vim mode is called before editor is mounted.\n setEditor(editor);\n\n editorRef.current = editor;\n monacoRef.current = monaco;\n\n if (editorRef.current === null || monacoRef.current === null) return;\n\n if (!props.files && currentScript !== null) {\n // Open currentscript\n regenerateModel(currentScript);\n editorRef.current.setModel(currentScript.model);\n editorRef.current.setPosition(currentScript.lastPosition);\n editorRef.current.revealLineInCenter(currentScript.lastPosition.lineNumber);\n updateRAM(currentScript.code);\n editorRef.current.focus();\n return;\n }\n if (props.files) {\n const files = Object.entries(props.files);\n\n if (!files.length) {\n editorRef.current.focus();\n return;\n }\n\n for (const [filename, code] of files) {\n // Check if file is already opened\n const openScript = openScripts.find(\n (script) => script.fileName === filename && script.hostname === props.hostname,\n );\n if (openScript) {\n // Script is already opened\n if (openScript.model === undefined || openScript.model === null || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n\n currentScript = openScript;\n editorRef.current.setModel(openScript.model);\n editorRef.current.setPosition(openScript.lastPosition);\n editorRef.current.revealLineInCenter(openScript.lastPosition.lineNumber);\n updateRAM(openScript.code);\n } else {\n // Open script\n const newScript = new OpenScript(\n filename,\n code,\n props.hostname,\n new monacoRef.current.Position(0, 0),\n monacoRef.current.editor.createModel(code, filename.endsWith(\".txt\") ? \"plaintext\" : \"javascript\"),\n );\n openScripts.push(newScript);\n currentScript = { ...newScript };\n editorRef.current.setModel(newScript.model);\n updateRAM(newScript.code);\n }\n }\n }\n\n editorRef.current.focus();\n }\n\n function infLoop(newCode: string): void {\n if (editorRef.current === null || currentScript === null) return;\n if (!currentScript.fileName.endsWith(\".ns\") && !currentScript.fileName.endsWith(\".js\")) return;\n const awaitWarning = checkInfiniteLoop(newCode);\n if (awaitWarning !== -1) {\n const newDecorations = editorRef.current.deltaDecorations(decorations, [\n {\n range: {\n startLineNumber: awaitWarning,\n startColumn: 1,\n endLineNumber: awaitWarning,\n endColumn: 10,\n },\n options: {\n isWholeLine: true,\n glyphMarginClassName: \"myGlyphMarginClass\",\n glyphMarginHoverMessage: {\n value: \"Possible infinite loop, await something.\",\n },\n },\n },\n ]);\n setDecorations(newDecorations);\n } else {\n const newDecorations = editorRef.current.deltaDecorations(decorations, []);\n setDecorations(newDecorations);\n }\n }\n\n // When the code is updated within the editor\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n updateRAM(newCode);\n if (editorRef.current === null) return;\n const newPos = editorRef.current.getPosition();\n if (newPos === null) return;\n if (currentScript !== null) {\n currentScript = { ...currentScript, code: newCode, lastPosition: newPos };\n const curIndex = openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n const newArr = [...openScripts];\n const tempScript = currentScript;\n tempScript.code = newCode;\n newArr[curIndex] = tempScript;\n openScripts = [...newArr];\n }\n try {\n infLoop(newCode);\n } catch (err) {}\n }\n\n function saveScript(scriptToSave: OpenScript): void {\n const server = GetServer(scriptToSave.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(scriptToSave.fileName)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (scriptToSave.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (scriptToSave.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptToSave.fileName) {\n server.textFiles[i].write(scriptToSave.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n const textFile = new TextFile(scriptToSave.fileName, scriptToSave.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n }\n\n function save(): void {\n if (currentScript === null) {\n console.error(\"currentScript is null when it shouldn't be. Unable to save script\");\n return;\n }\n // this is duplicate code with saving later.\n if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (currentScript.fileName !== \"n00dles.script\" && currentScript.fileName !== \"n00dles.js\") {\n dialogBoxCreate(\"Don't change the script name for now.\");\n return;\n }\n const cleanCode = currentScript.code.replace(/\\s/g, \"\");\n const ns1 = \"while(true){hack('n00dles');}\";\n const ns2 = `exportasyncfunctionmain(ns){while(true){awaitns.hack('n00dles');}}`;\n if (cleanCode.indexOf(ns1) == -1 && cleanCode.indexOf(ns2) == -1) {\n dialogBoxCreate(\"Please copy and paste the code from the tutorial!\");\n return;\n }\n\n //Save the script\n saveScript(currentScript);\n\n iTutorialNextStep();\n\n return;\n }\n\n if (currentScript.fileName == \"\") {\n dialogBoxCreate(\"You must specify a filename!\");\n return;\n }\n\n if (!isValidFilePath(currentScript.fileName)) {\n dialogBoxCreate(\n \"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\",\n );\n return;\n }\n\n const server = GetServer(currentScript.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(currentScript.fileName)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (currentScript.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (currentScript.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === currentScript.fileName) {\n server.textFiles[i].write(currentScript.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n const textFile = new TextFile(currentScript.fileName, currentScript.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n }\n\n function reorder(list: Array, startIndex: number, endIndex: number): OpenScript[] {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result;\n }\n\n function onDragEnd(result: DropResult): void {\n // Dropped outside of the list\n if (!result.destination) {\n result;\n return;\n }\n\n const items = reorder(openScripts, result.source.index, result.destination.index);\n\n openScripts = items;\n }\n\n function currentTabIndex(): number | undefined {\n if (currentScript !== null) {\n return openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n }\n\n return undefined;\n }\n\n function onTabClick(index: number): void {\n if (currentScript !== null) {\n // Save currentScript to openScripts\n const curIndex = currentTabIndex();\n if (curIndex !== undefined) {\n openScripts[curIndex] = currentScript;\n }\n }\n\n currentScript = { ...openScripts[index] };\n\n if (editorRef.current !== null && openScripts[index] !== null) {\n if (openScripts[index].model === undefined || openScripts[index].model.isDisposed()) {\n regenerateModel(openScripts[index]);\n }\n editorRef.current.setModel(openScripts[index].model);\n\n editorRef.current.setPosition(openScripts[index].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index].lastPosition.lineNumber);\n updateRAM(openScripts[index].code);\n editorRef.current.focus();\n }\n }\n\n function onTabClose(index: number): void {\n // See if the script on the server is up to date\n const closingScript = openScripts[index];\n const savedScriptIndex = openScripts.findIndex(\n (script) => script.fileName === closingScript.fileName && script.hostname === closingScript.hostname,\n );\n let savedScriptCode = \"\";\n if (savedScriptIndex !== -1) {\n savedScriptCode = openScripts[savedScriptIndex].code;\n }\n const server = GetServer(closingScript.hostname);\n if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);\n\n const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);\n if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex].code) {\n PromptEvent.emit({\n txt: `Do you want to save changes to ${closingScript.fileName} on ${closingScript.hostname}?`,\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n closingScript.code = savedScriptCode;\n saveScript(closingScript);\n }\n },\n });\n }\n\n if (openScripts.length > 1) {\n openScripts = openScripts.filter((value, i) => i !== index);\n\n let indexOffset = -1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 0;\n }\n }\n\n // Change current script if we closed it\n currentScript = openScripts[index + indexOffset];\n if (editorRef.current !== null) {\n if (\n openScripts[index + indexOffset].model === undefined ||\n openScripts[index + indexOffset].model === null ||\n openScripts[index + indexOffset].model.isDisposed()\n ) {\n regenerateModel(openScripts[index + indexOffset]);\n }\n\n editorRef.current.setModel(openScripts[index + indexOffset].model);\n editorRef.current.setPosition(openScripts[index + indexOffset].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index + indexOffset].lastPosition.lineNumber);\n editorRef.current.focus();\n }\n rerender();\n } else {\n // No more scripts are open\n openScripts = [];\n currentScript = null;\n props.router.toTerminal();\n }\n }\n\n function onTabUpdate(index: number): void {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return;\n\n if (openScript.code !== serverScriptCode) {\n PromptEvent.emit({\n txt:\n \"Do you want to overwrite the current editor content with the contents of \" +\n openScript.fileName +\n \" on the server? This cannot be undone.\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n openScript.code = serverScriptCode;\n\n // Switch to target tab\n onTabClick(index);\n\n if (editorRef.current !== null && openScript !== null) {\n if (openScript.model === undefined || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n editorRef.current.setModel(openScript.model);\n\n editorRef.current.setValue(openScript.code);\n updateRAM(openScript.code);\n editorRef.current.focus();\n }\n }\n },\n });\n }\n }\n\n function dirty(index: number): string {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return \" *\";\n\n // The server code is stored with its starting & trailing whitespace removed\n const openScriptFormatted = Script.formatCode(openScript.code);\n return serverScriptCode !== openScriptFormatted ? \" *\" : \"\";\n }\n\n function getServerCode(index: number): string | null {\n const openScript = openScripts[index];\n const server = GetServer(openScript.hostname);\n if (server === null) throw new Error(`Server '${openScript.hostname}' should not be null, but it is.`);\n\n const serverScript = server.scripts.find((s) => s.filename === openScript.fileName);\n return serverScript?.code ?? null;\n }\n function handleFilterChange(event: React.ChangeEvent): void {\n setFilter(event.target.value);\n }\n function handleExpandSearch(): void {\n setFilter(\"\");\n setSearchExpanded(!searchExpanded);\n }\n const filteredOpenScripts = Object.values(openScripts).filter(\n (script) => script.hostname.includes(filter) || script.fileName.includes(filter),\n );\n\n // Toolbars are roughly 112px:\n // 8px body margin top\n // 38.5px filename tabs\n // 5px padding for top of editor\n // 44px bottom tool bar + 16px margin\n // + vim bar 34px\n const editorHeight = dimensions.height - (130 + (options.vim ? 34 : 0));\n const tabsMaxWidth = 1640;\n const tabMargin = 5;\n const tabMaxWidth = filteredOpenScripts.length ? tabsMaxWidth / filteredOpenScripts.length - tabMargin : 0;\n const tabIconWidth = 25;\n const tabTextWidth = tabMaxWidth - tabIconWidth * 2;\n return (\n <>\n
\n \n \n {(provided, snapshot) => (\n \n \n {searchExpanded ? (\n ,\n spellCheck: false,\n endAdornment: ,\n }}\n />\n ) : (\n \n )}\n \n {filteredOpenScripts.map(({ fileName, hostname }, index) => {\n const editingCurrentScript =\n currentScript?.fileName === filteredOpenScripts[index].fileName &&\n currentScript?.hostname === filteredOpenScripts[index].hostname;\n const externalScript = hostname !== \"home\";\n const colorProps = editingCurrentScript\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n };\n\n if (externalScript) {\n colorProps.color = Settings.theme.info;\n }\n const iconButtonStyle = {\n maxWidth: `${tabIconWidth}px`,\n minWidth: `${tabIconWidth}px`,\n minHeight: \"38.5px\",\n maxHeight: \"38.5px\",\n ...colorProps,\n };\n\n const scriptTabText = `${hostname}:~/${fileName} ${dirty(index)}`;\n return (\n \n {(provided) => (\n \n \n onTabClick(index)}\n onMouseDown={(e) => {\n e.preventDefault();\n if (e.button === 1) onTabClose(index);\n }}\n style={{\n maxWidth: `${tabTextWidth}px`,\n minHeight: \"38.5px\",\n overflow: \"hidden\",\n ...colorProps,\n }}\n >\n \n {scriptTabText}\n \n \n \n \n \n \n \n
\n )}\n
\n );\n })}\n {provided.placeholder}\n \n )}\n \n \n
\n Loading script editor!}\n height={`${editorHeight}px`}\n defaultLanguage=\"javascript\"\n defaultValue={\"\"}\n onChange={updateCode}\n theme={options.theme}\n options={{ ...options, glyphMargin: true }}\n />\n\n \n\n \n \n \n {\n setRamInfoOpen(true);\n }}\n >\n {ram}\n \n \n \n \n {\" \"}\n Documentation:{\" \"}\n \n Basic\n \n {\" | \"}\n \n Full\n \n \n \n {\n sanitizeTheme(Settings.EditorTheme);\n monacoRef.current?.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n setOptionsOpen(false);\n }}\n options={{\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: Settings.MonacoVim,\n }}\n save={(options: Options) => {\n sanitizeTheme(Settings.EditorTheme);\n monacoRef.current?.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n setOptions(options);\n Settings.MonacoTheme = options.theme;\n Settings.MonacoInsertSpaces = options.insertSpaces;\n Settings.MonacoFontSize = options.fontSize;\n Settings.MonacoWordWrap = options.wordWrap;\n Settings.MonacoVim = options.vim;\n }}\n />\n setRamInfoOpen(false)}>\n \n \n {ramEntries.map(([n, r]) => (\n \n \n {n}\n \n {r}\n \n \n \n ))}\n \n
\n
\n
\n \n \n No open files\n \n Use nano FILENAME in\n
\n the terminal to open files\n
\n
\n \n \n );\n}\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\nimport { isValidDirectoryPath, isInRootDirectory, getFirstParentDirectory } from \"./DirectoryHelpers\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nexport function getSubdirectories(serv: BaseServer, dir: string): string[] {\n const res: string[] = [];\n\n if (!isValidDirectoryPath(dir)) {\n return res;\n }\n\n let t_dir = dir;\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn: string): void {\n if (t_dir === \"/\" && isInRootDirectory(fn)) {\n const subdir = getFirstParentDirectory(fn);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = getFirstParentDirectory(remaining);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n\n/**\n * Returns true, if the server's directory itself or one of its subdirectory contains files.\n */\nexport function containsFiles(server: BaseServer, dir: string): boolean {\n const dirWithTrailingSlash = dir + (dir.slice(-1) === \"/\" ? \"\" : \"/\");\n\n return [...server.scripts.map((s) => s.filename), ...server.textFiles.map((t) => t.fn)].some((filename) =>\n filename.startsWith(dirWithTrailingSlash),\n );\n}\n","/**\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST to replace import urls with blobs\n */\nimport * as walk from \"acorn-walk\";\nimport { parse } from \"acorn\";\n\nimport { makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { ScriptUrl } from \"./Script/ScriptUrl\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { Script } from \"./Script/Script\";\nimport { areImportsEquals } from \"./Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Acorn type def is straight up incomplete so we have to fill with our own.\nexport type Node = any;\n\n// Makes a blob that contains the code of a given script.\nfunction makeScriptBlob(code: string): Blob {\n return new Blob([code], { type: \"text/javascript\" });\n}\n\nexport async function compile(player: IPlayer, script: Script, scripts: Script[]): Promise {\n if (!shouldCompile(script, scripts)) return;\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n await script.updateRamUsage(player, scripts);\n const uurls = _getScriptUrls(script, scripts, []);\n const url = uurls[uurls.length - 1].url;\n if (script.url && script.url !== url) {\n URL.revokeObjectURL(script.url);\n // Thoughts: Should we be revoking any URLs here?\n // If a script is modified repeatedly between two states,\n // we could reuse the blob at a later time.\n // BlobCache.removeByValue(script.url);\n // URL.revokeObjectURL(script.url);\n // if (script.dependencies.length > 0) {\n // script.dependencies.forEach((dep) => {\n // removeBlobFromCache(dep.url);\n // URL.revokeObjectURL(dep.url);\n // });\n // }\n }\n if (script.dependencies.length > 0) script.dependencies.forEach((dep) => URL.revokeObjectURL(dep.url));\n script.url = uurls[uurls.length - 1].url;\n script.module = new Promise((resolve) => resolve(eval(\"import(uurls[uurls.length - 1].url)\")));\n script.dependencies = uurls;\n}\n\n// Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\nexport async function executeJSScript(\n player: IPlayer,\n scripts: Script[] = [],\n workerScript: WorkerScript,\n): Promise {\n const script = workerScript.getScript();\n if (script === null) throw new Error(\"script is null\");\n await compile(player, script, scripts);\n workerScript.ramUsage = script.ramUsage;\n const loadedModule = await script.module;\n\n const ns = workerScript.env.vars;\n\n if (!loadedModule) {\n throw makeRuntimeRejectMsg(workerScript, `${script.filename} cannot be run because the script module won't load`);\n }\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because it does not have a main function.`,\n );\n }\n if (!ns) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because the NS object hasn't been constructed properly.`,\n );\n }\n return loadedModule.main(ns);\n}\n\nfunction isDependencyOutOfDate(filename: string, scripts: Script[], scriptModuleSequenceNumber: number): boolean {\n const depScript = scripts.find((s) => s.filename == filename);\n\n // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n if (!depScript) return true;\n\n const depIsMoreRecent = depScript.moduleSequenceNumber > scriptModuleSequenceNumber;\n return depIsMoreRecent;\n}\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\nfunction shouldCompile(script: Script, scripts: Script[]): boolean {\n if (!script.module) return true;\n return script.dependencies.some((dep) => isDependencyOutOfDate(dep.filename, scripts, script.moduleSequenceNumber));\n}\n\n// Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\nfunction _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): ScriptUrl[] {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n const urlStack: ScriptUrl[] = [];\n // Seen contains the dependents of the current script. Make sure we include that in the script dependents.\n for (const dependent of seen) {\n if (!script.dependents.some((s) => s.server === dependent.server && s.filename == dependent.filename)) {\n script.dependents.push({ server: dependent.server, filename: dependent.filename });\n }\n }\n seen.push(script);\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://\"\n //\n // Where the blob URL contains the script content.\n\n // Parse the code into an ast tree\n const ast = parse(script.code, { sourceType: \"module\", ecmaVersion: \"latest\", ranges: true });\n interface importNode {\n filename: string;\n start: number;\n end: number;\n }\n const importNodes: importNode[] = [];\n // Walk the nodes of this tree and find any import declaration statements.\n walk.simple(ast, {\n ImportDeclaration(node: Node) {\n // Push this import onto the stack to replace\n if (!node.source) return;\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n ExportNamedDeclaration(node: Node) {\n if (!node.source) return;\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n ExportAllDeclaration(node: Node) {\n if (!node.source) return;\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n });\n // Sort the nodes from last start index to first. This replaces the last import with a blob first,\n // preventing the ranges for other imports from being shifted.\n importNodes.sort((a, b) => b.start - a.start);\n let transformedCode = script.code;\n // Loop through each node and replace the script name with a blob url.\n for (const node of importNodes) {\n const filename = node.filename.startsWith(\"./\") ? node.filename.substring(2) : node.filename;\n\n // Find the corresponding script.\n const matchingScripts = scripts.filter((s) => areImportsEquals(s.filename, filename));\n if (matchingScripts.length === 0) continue;\n\n const [importedScript] = matchingScripts;\n\n const urls = _getScriptUrls(importedScript, scripts, seen);\n\n // The top url in the stack is the replacement import file for this script.\n urlStack.push(...urls);\n const blob = urls[urls.length - 1].url;\n\n // Replace the blob inside the import statement.\n transformedCode = transformedCode.substring(0, node.start) + blob + transformedCode.substring(node.end);\n }\n\n // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n transformedCode += `\\n//# sourceURL=${script.server}/${script.filename}`;\n\n const blob = URL.createObjectURL(makeScriptBlob(transformedCode));\n // Push the blob URL onto the top of the stack.\n urlStack.push(new ScriptUrl(script.filename, blob, script.moduleSequenceNumber));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url of urlStack) URL.revokeObjectURL(url.url);\n throw err;\n } finally {\n seen.pop();\n }\n}\n","import { toNative } from \"./toNative\";\nimport libarg from \"arg\";\nimport { ScriptArg } from \"../Netscript/ScriptArg\";\n\ntype FlagType = StringConstructor | NumberConstructor | BooleanConstructor | StringConstructor[];\ntype FlagsRet = { [key: string]: ScriptArg };\nexport function Flags(vargs: string[]): () => (data: unknown) => FlagsRet {\n return (/* ctx: NetscriptContext */) =>\n (schema: unknown): FlagsRet => {\n schema = toNative(schema);\n if (!Array.isArray(schema)) throw new Error(\"flags schema passed in is invalid.\");\n const args: {\n [key: string]: FlagType;\n } = {};\n\n for (const d of schema) {\n let t: FlagType = String;\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n const ret: FlagsRet = libarg(args, { argv: vargs });\n for (const d of schema) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n return ret;\n };\n}\n","import { Interpreter } from \"../ThirdParty/JSInterpreter\";\n\nconst defaultInterpreter = new Interpreter(\"\", () => undefined);\n\ninterface PseudoObject {\n properties: Record;\n class: string;\n}\n\nconst isPseudoObject = (v: unknown): v is PseudoObject =>\n !!v &&\n typeof v === \"object\" &&\n v.hasOwnProperty(\"properties\") &&\n v.hasOwnProperty(\"getter\") &&\n v.hasOwnProperty(\"setter\") &&\n v.hasOwnProperty(\"proto\");\n\n// the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\nexport function toNative(pseudoObj: unknown): unknown {\n if (pseudoObj == null) return null;\n if (!isPseudoObject(pseudoObj)) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n const arr: unknown[] = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n if (typeof length === \"number\") {\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n arr[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n }\n return arr;\n } else {\n // Object.\n const obj: Record = {};\n for (const key of Object.keys(pseudoObj.properties)) {\n const val = pseudoObj.properties[key];\n obj[key] = toNative(val);\n }\n return obj;\n }\n}\n","import * as React from \"react\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport FirstPageIcon from \"@mui/icons-material/FirstPage\";\nimport KeyboardArrowLeft from \"@mui/icons-material/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@mui/icons-material/KeyboardArrowRight\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (event: React.MouseEvent, newPage: number) => void;\n}\n\nexport function TablePaginationActionsAll(props: TablePaginationActionsProps): React.ReactElement {\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n \n \n {theme.direction === \"rtl\" ? : }\n \n \n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n \n );\n}\n","import ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport { Box, Collapse, ListItemButton, ListItemText, Paper, Table, TableBody, Typography } from \"@mui/material\";\nimport { uniqueId } from \"lodash\";\nimport React from \"react\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\nimport { defaultMultipliers, getBitNodeMultipliers } from \"../BitNode\";\nimport { IBitNodeMultipliers } from \"../BitNodeMultipliers\";\n\ninterface IProps {\n n: number;\n level?: number;\n}\n\nexport function BitnodeMultiplierDescription({ n, level }: IProps): React.ReactElement {\n const [open, setOpen] = React.useState(false);\n if (n === 1) return <>;\n\n return (\n \n setOpen((old) => !old)}>\n Bitnode Multipliers} />\n {open ? : }\n \n \n \n \n \n );\n}\n\nexport const BitNodeMultipliersDisplay = ({ n, level }: IProps): React.ReactElement => {\n const player = use.Player();\n // If a level argument has been provided, use that as the multiplier level\n // If not, then we have to assume that we want the next level up from the\n // current node's source file, so we get the min of that, the SF's max level,\n // or if it's BN12, ∞\n const maxSfLevel = n === 12 ? Infinity : 3;\n const mults = getBitNodeMultipliers(n, level ?? Math.min(player.sourceFileLvl(n) + 1, maxSfLevel));\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\ninterface IBNMultRows {\n [mult: string]: {\n name: string;\n content?: string;\n color?: string;\n };\n}\n\ninterface IBNMultTableProps {\n sectionName: string;\n rowData: IBNMultRows;\n mults: IBitNodeMultipliers;\n}\n\nconst BNMultTable = (props: IBNMultTableProps): React.ReactElement => {\n const rowsArray = Object.entries(props.rowData)\n .filter(([key]) => props.mults[key] !== defaultMultipliers[key])\n .map(([key, value]) => (\n \n ));\n\n return rowsArray.length > 0 ? (\n \n {props.sectionName}\n \n {rowsArray}\n
\n
\n ) : (\n <>\n );\n};\n\ninterface IMultsProps {\n n: number;\n mults: IBitNodeMultipliers;\n}\n\nfunction GeneralMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n WorldDaemonDifficulty: { name: `${SpecialServers.WorldDaemon} Difficulty` },\n DaedalusAugsRequirement: {\n name: \"Daedalus Augs Requirement\",\n content: String(mults.DaedalusAugsRequirement),\n },\n HacknetNodeMoney: { name: \"Hacknet Production\" },\n CodingContractMoney: { name: \"Coding Contract Reward\" },\n ClassGymExpGain: { name: \"Class/Gym Exp\" },\n };\n\n return ;\n}\n\nfunction AugmentationMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n AugmentationMoneyCost: { name: \"Money Cost\" },\n AugmentationRepCost: {\n name: \"Reputation Cost\",\n color: Settings.theme.rep,\n },\n };\n\n return ;\n}\n\nfunction CompanyMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n CompanyWorkMoney: {\n name: \"Work Money\",\n color: Settings.theme.money,\n },\n CompanyWorkExpGain: { name: \"Work Exp\" },\n };\n\n return ;\n}\n\nfunction StockMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n FourSigmaMarketDataCost: { name: \"Market Data Cost\" },\n FourSigmaMarketDataApiCost: { name: \"Market Data API Cost\" },\n };\n\n return ;\n}\n\nfunction FactionMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n RepToDonateToFaction: { name: \"Favor to Donate\" },\n FactionWorkRepGain: {\n name: \"Work Reputation\",\n color: Settings.theme.rep,\n },\n FactionWorkExpGain: { name: \"Work Exp\" },\n FactionPassiveRepGain: {\n name: \"Passive Rep\",\n color: Settings.theme.rep,\n },\n };\n\n return ;\n}\n\nfunction CrimeMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n CrimeExpGain: {\n name: \"Crime Exp\",\n color: Settings.theme.combat,\n },\n CrimeMoney: {\n name: \"Crime Money\",\n color: Settings.theme.combat,\n },\n };\n\n return ;\n}\n\nfunction SkillMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n HackingLevelMultiplier: {\n name: \"Hacking Level\",\n color: Settings.theme.hack,\n },\n StrengthLevelMultiplier: {\n name: \"Strength Level\",\n color: Settings.theme.combat,\n },\n DefenseLevelMultiplier: {\n name: \"Defense Level\",\n color: Settings.theme.combat,\n },\n DexterityLevelMultiplier: {\n name: \"Dexterity Level\",\n color: Settings.theme.combat,\n },\n AgilityLevelMultiplier: {\n name: \"Agility Level\",\n color: Settings.theme.combat,\n },\n CharismaLevelMultiplier: {\n name: \"Charisma Level\",\n color: Settings.theme.cha,\n },\n };\n\n return ;\n}\n\nfunction HackingMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n HackExpGain: {\n name: \"Hacking Exp\",\n color: Settings.theme.hack,\n },\n ServerGrowthRate: { name: \"Server Growth Rate\" },\n ServerMaxMoney: { name: \"Server Max Money\" },\n ServerStartingMoney: { name: \"Server Starting Money\" },\n ServerStartingSecurity: { name: \"Server Starting Security\" },\n ServerWeakenRate: { name: \"Server Weaken Rate\" },\n ManualHackMoney: {\n name: \"Manual Hack Money\",\n color: Settings.theme.money,\n },\n ScriptHackMoney: {\n name: \"Script Hack Money\",\n color: Settings.theme.money,\n },\n ScriptHackMoneyGain: {\n name: \"Money Gained From Hack\",\n color: Settings.theme.money,\n },\n };\n\n return ;\n}\n\nfunction PurchasedServersMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n PurchasedServerCost: {\n name: \"Base Cost\",\n content: mults.PurchasedServerCost.toFixed(3),\n },\n PurchasedServerSoftcap: {\n name: \"Softcap Cost\",\n content: mults.PurchasedServerSoftcap.toFixed(3),\n },\n PurchasedServerLimit: { name: \"Server Limit\" },\n PurchasedServerMaxRam: { name: \"Max RAM\" },\n HomeComputerRamCost: { name: \"Home RAM Cost\" },\n };\n\n return ;\n}\n\nfunction InfiltrationMults({ mults }: IMultsProps): React.ReactElement {\n const rows: IBNMultRows = {\n InfiltrationMoney: {\n name: \"Infiltration Money\",\n color: Settings.theme.money,\n },\n InfiltrationRep: {\n name: \"Infiltration Reputation\",\n color: Settings.theme.rep,\n },\n };\n\n return ;\n}\n\nfunction BladeburnerMults({ mults }: IMultsProps): React.ReactElement {\n const player = use.Player();\n if (!player.canAccessBladeburner()) return <>;\n\n const rows: IBNMultRows = {\n BladeburnerRank: { name: \"Rank Gain\" },\n BladeburnerSkillCost: { name: \"Skill Cost\" },\n };\n\n return ;\n}\n\nfunction StanekMults({ mults }: IMultsProps): React.ReactElement {\n const player = use.Player();\n if (!player.canAccessCotMG()) return <>;\n\n const extraSize = mults.StaneksGiftExtraSize.toFixed(3);\n const rows: IBNMultRows = {\n StnakesGiftPowerMultiplier: { name: \"Gift Power\" },\n StaneksGiftExtraSize: {\n name: \"Base Size Modifier\",\n content: `${mults.StaneksGiftExtraSize > defaultMultipliers.StaneksGiftExtraSize ? `+${extraSize}` : extraSize}`,\n },\n };\n\n return ;\n}\n\nfunction GangMults({ mults }: IMultsProps): React.ReactElement {\n const player = use.Player();\n if (player.bitNodeN !== 2 && player.sourceFileLvl(2) <= 0) return <>;\n\n const rows: IBNMultRows = {\n GangSoftcap: {\n name: \"Gang Softcap\",\n content: mults.GangSoftcap.toFixed(3),\n },\n GangUniqueAugs: { name: \"Unique Augmentations\" },\n };\n\n return ;\n}\n\nfunction CorporationMults({ mults }: IMultsProps): React.ReactElement {\n const player = use.Player();\n if (!player.canAccessCorporation()) return <>;\n\n const rows: IBNMultRows = {\n CorporationSoftcap: {\n name: \"Corporation Softcap\",\n content: mults.CorporationSoftcap.toFixed(3),\n },\n CorporationValuation: { name: \"Valuation\" },\n };\n\n return ;\n}\n","import * as React from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { TableCell as MuiTableCell, TableCellProps } from \"@mui/material\";\n\nconst useStyles = makeStyles({\n root: {\n border: \"1px solid white\",\n width: \"5px\",\n height: \"5px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\ntype IProps = {\n onMouseEnter?: () => void;\n onClick?: () => void;\n color: string;\n};\n\nexport function Cell(cellProps: IProps): React.ReactElement {\n return (\n \n );\n}\n","import { TableBody, TableRow } from \"@mui/material\";\nimport * as React from \"react\";\nimport { ActiveFragment } from \"../ActiveFragment\";\nimport { calculateGrid } from \"../Helper\";\nimport { IStaneksGift } from \"../IStaneksGift\";\nimport { Cell } from \"./Cell\";\n\ninterface IProps {\n width: number;\n height: number;\n ghostGrid: number[][];\n gift: IStaneksGift;\n enter(i: number, j: number): void;\n click(i: number, j: number): void;\n}\n\nfunction randomColor(fragment: ActiveFragment): string {\n // Can't set Math.random seed so copy casino. TODO refactor both RNG later.\n let s1 = Math.pow((fragment.x + 1) * (fragment.y + 1), 10);\n let s2 = s1;\n let s3 = s1;\n\n const colors = [];\n for (let i = 0; i < 3; i++) {\n s1 = (171 * s1) % 30269;\n s2 = (172 * s2) % 30307;\n s3 = (170 * s3) % 30323;\n colors.push((s1 / 30269.0 + s2 / 30307.0 + s3 / 30323.0) % 1.0);\n }\n\n return `rgb(${colors[0] * 256}, ${colors[1] * 256}, ${colors[2] * 256})`;\n}\n\nexport function Grid(props: IProps): React.ReactElement {\n const activeGrid = calculateGrid(props.gift);\n\n function color(worldX: number, worldY: number): string {\n if (props.ghostGrid[worldX][worldY] && activeGrid[worldX][worldY]) return \"red\";\n if (props.ghostGrid[worldX][worldY]) return \"white\";\n\n if (activeGrid[worldX][worldY]) {\n const fragment = props.gift.fragmentAt(worldX, worldY);\n if (!fragment) throw new Error(\"ActiveFragment should not be null\");\n return randomColor(fragment);\n }\n return \"\";\n }\n\n // switch the width/length to make axis consistent.\n const elems = [];\n for (let j = 0; j < props.height; j++) {\n const cells = [];\n for (let i = 0; i < props.width; i++) {\n cells.push(\n props.enter(i, j)} onClick={() => props.click(i, j)} color={color(i, j)} />,\n );\n }\n elems.push({cells});\n }\n\n return {elems};\n}\n","import { GetServer } from \"../Server/AllServers\";\nimport { RunningScript } from \"./RunningScript\";\n\nexport function getRamUsageFromRunningScript(script: RunningScript): number {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = GetServer(script.server);\n if (server == null) {\n return 0;\n }\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === script.filename) {\n // Cache the ram usage for the next call\n script.ramUsage = server.scripts[i].ramUsage;\n return script.ramUsage;\n }\n }\n\n return 0;\n}\n","import { ITerminal } from \"../../ITerminal\";\nimport { removeLeadingSlash, removeTrailingSlash } from \"../../DirectoryHelpers\";\nimport { IRouter, ScriptEditorRouteOptions } from \"../../../ui/Router\";\nimport { IPlayer } from \"../../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../../Script/isScriptFilename\";\nimport { CursorPositions } from \"../../../ScriptEditor/CursorPositions\";\nimport { Script } from \"../../../Script/Script\";\nimport { isEmpty } from \"lodash\";\n\ninterface EditorParameters {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n server: BaseServer;\n args: (string | number | boolean)[];\n}\n\nfunction isNs2(filename: string): boolean {\n return filename.endsWith(\".ns\") || filename.endsWith(\".js\");\n}\n\nconst newNs2Template = `/** @param {NS} ns */\nexport async function main(ns) {\n\n}`;\n\ninterface ISimpleScriptGlob {\n glob: string;\n preGlob: string;\n postGlob: string;\n globError: string;\n globMatches: string[];\n globAgainst: Script[];\n}\n\nfunction containsSimpleGlob(filename: string): boolean {\n return filename.includes(\"*\");\n}\n\nfunction detectSimpleScriptGlob(\n args: EditorParameters[\"args\"],\n player: IPlayer,\n terminal: ITerminal,\n): ISimpleScriptGlob | null {\n if (args.length == 1 && containsSimpleGlob(`${args[0]}`)) {\n const filename = `${args[0]}`;\n const scripts = player.getCurrentServer().scripts;\n const parsedGlob = parseSimpleScriptGlob(filename, scripts, terminal);\n return parsedGlob;\n }\n return null;\n}\n\nfunction parseSimpleScriptGlob(globString: string, globDatabase: Script[], terminal: ITerminal): ISimpleScriptGlob {\n const parsedGlob: ISimpleScriptGlob = {\n glob: globString,\n preGlob: \"\",\n postGlob: \"\",\n globError: \"\",\n globMatches: [],\n globAgainst: globDatabase,\n };\n\n // Ensure deep globs are minified to simple globs, which act as deep globs in this impl\n globString = globString.replace(\"**\", \"*\");\n\n // Ensure only a single glob is present\n if (globString.split(\"\").filter((c) => c == \"*\").length !== 1) {\n parsedGlob.globError = \"Only a single glob is supported per command.\\nexample: `nano my-dir/*.js`\";\n return parsedGlob;\n }\n\n // Split arg around glob, normalize preGlob path\n [parsedGlob.preGlob, parsedGlob.postGlob] = globString.split(\"*\");\n parsedGlob.preGlob = removeLeadingSlash(parsedGlob.preGlob);\n\n // Add CWD to preGlob path\n const cwd = removeTrailingSlash(terminal.cwd());\n parsedGlob.preGlob = `${cwd}/${parsedGlob.preGlob}`;\n\n // For every script on the current server, filter matched scripts per glob values & persist\n globDatabase.forEach((script) => {\n const filename = script.filename.startsWith(\"/\") ? script.filename : `/${script.filename}`;\n if (filename.startsWith(parsedGlob.preGlob) && filename.endsWith(parsedGlob.postGlob)) {\n parsedGlob.globMatches.push(filename);\n }\n });\n\n // Rebuild glob for potential error reporting\n parsedGlob.glob = `${parsedGlob.preGlob}*${parsedGlob.postGlob}`;\n\n return parsedGlob;\n}\n\nexport function commonEditor(\n command: string,\n { terminal, router, player, args }: EditorParameters,\n scriptEditorRouteOptions?: ScriptEditorRouteOptions,\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect usage of ${command} command. Usage: ${command} [scriptname]`);\n return;\n }\n\n let filesToLoadOrCreate = args;\n try {\n const globSearch = detectSimpleScriptGlob(args, player, terminal);\n if (globSearch) {\n if (isEmpty(globSearch.globError) === false) throw new Error(globSearch.globError);\n filesToLoadOrCreate = globSearch.globMatches;\n }\n\n const files = filesToLoadOrCreate.map((arg) => {\n const filename = `${arg}`;\n\n if (isScriptFilename(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n const fileIsNs2 = isNs2(filename);\n const code = script !== null ? script.code : fileIsNs2 ? newNs2Template : \"\";\n\n if (code === newNs2Template) {\n CursorPositions.saveCursor(filename, {\n row: 3,\n column: 5,\n });\n }\n\n return [filepath, code];\n }\n\n if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n return [filepath, txt === null ? \"\" : txt.text];\n }\n\n throw new Error(\n `Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with ${command}`,\n );\n });\n\n if (globSearch && files.length === 0) {\n throw new Error(`Could not find any valid files to open with ${command} using glob: \\`${globSearch.glob}\\``);\n }\n\n router.toScriptEditor(Object.fromEntries(files), scriptEditorRouteOptions);\n } catch (e) {\n terminal.error(`${e}`);\n }\n}\n","// by Discord: H3draut3r#6722, feel free to ask me any questions. i probably don't know the answer 🤣\nexport function HammingEncode(value: number): string {\n // encoding following Hammings rule\n function HammingSumOfParity(_lengthOfDBits: number): number {\n // will calculate the needed amount of parityBits 'without' the \"overall\"-Parity (that math took me 4 Days to get it working)\n return _lengthOfDBits < 3 || _lengthOfDBits == 0 // oh and of course using ternary operators, it's a pretty neat function\n ? _lengthOfDBits == 0\n ? 0\n : _lengthOfDBits + 1\n : // the following math will only work, if the length is greater equal 3, otherwise it's \"kind of\" broken :D\n Math.ceil(Math.log2(_lengthOfDBits * 2)) <=\n Math.ceil(Math.log2(1 + _lengthOfDBits + Math.ceil(Math.log2(_lengthOfDBits))))\n ? Math.ceil(Math.log2(_lengthOfDBits) + 1)\n : Math.ceil(Math.log2(_lengthOfDBits));\n }\n const _data = value.toString(2).split(\"\"); // first, change into binary string, then create array with 1 bit per index\n const _sumParity: number = HammingSumOfParity(_data.length); // get the sum of needed parity bits (for later use in encoding)\n const count = (arr: Array, val: string): number =>\n arr.reduce((a: number, v: string) => (v === val ? a + 1 : a), 0);\n // function count for specific entries in the array, for later use\n\n const _build = [\"x\", \"x\", ..._data.splice(0, 1)]; // init the \"pre-build\"\n for (let i = 2; i < _sumParity; i++) {\n // add new paritybits and the corresponding data bits (pre-building array)\n _build.push(\"x\", ..._data.splice(0, Math.pow(2, i) - 1));\n }\n // now the \"calculation\"... get the paritybits ('x') working\n for (const index of _build.reduce(function (a: Array, e: string, i: number) {\n if (e == \"x\") a.push(i);\n return a;\n }, [])) {\n // that reduce will result in an array of index numbers where the \"x\" is placed\n const _tempcount = index + 1; // set the \"stepsize\" for the parityBit\n const _temparray = []; // temporary array to store the extracted bits\n const _tempdata = [..._build]; // only work with a copy of the _build\n while (_tempdata[index] !== undefined) {\n // as long as there are bits on the starting index, do \"cut\"\n const _temp: Array = _tempdata.splice(index, _tempcount * 2); // cut stepsize*2 bits, then...\n _temparray.push(..._temp.splice(0, _tempcount)); // ... cut the result again and keep the first half\n }\n _temparray.splice(0, 1); // remove first bit, which is the parity one\n _build[index] = (count(_temparray, \"1\") % 2).toString(); // count with remainder of 2 and\"toString\" to store the parityBit\n } // parity done, now the \"overall\"-parity is set\n _build.unshift((count(_build, \"1\") % 2).toString()); // has to be done as last element\n return _build.join(\"\"); // return the _build as string\n}\n\nexport function HammingDecode(_data: string): number {\n //check for altered bit and decode\n const _build = _data.split(\"\"); // ye, an array for working, again\n const _testArray = []; //for the \"truthtable\". if any is false, the data has an altered bit, will check for and fix it\n const _sumParity = Math.ceil(Math.log2(_data.length)); // sum of parity for later use\n const count = (arr: Array, val: string): number =>\n arr.reduce((a: number, v: string) => (v === val ? a + 1 : a), 0);\n // the count.... again ;)\n\n let _overallParity = _build.splice(0, 1).join(\"\"); // store first index, for checking in next step and fix the _build properly later on\n _testArray.push(_overallParity == (count(_build, \"1\") % 2).toString() ? true : false); // first check with the overall parity bit\n for (let i = 0; i < _sumParity; i++) {\n // for the rest of the remaining parity bits we also \"check\"\n const _tempIndex = Math.pow(2, i) - 1; // get the parityBits Index\n const _tempStep = _tempIndex + 1; // set the stepsize\n const _tempData = [..._build]; // get a \"copy\" of the build-data for working\n const _tempArray = []; // init empty array for \"testing\"\n while (_tempData[_tempIndex] != undefined) {\n // extract from the copied data until the \"starting\" index is undefined\n const _temp = [..._tempData.splice(_tempIndex, _tempStep * 2)]; // extract 2*stepsize\n _tempArray.push(..._temp.splice(0, _tempStep)); // and cut again for keeping first half\n }\n const _tempParity = _tempArray.shift(); // and again save the first index separated for checking with the rest of the data\n _testArray.push(_tempParity == (count(_tempArray, \"1\") % 2).toString() ? true : false);\n // is the _tempParity the calculated data? push answer into the 'truthtable'\n }\n let _fixIndex = 0; // init the \"fixing\" index and start with 0\n for (let i = 1; i < _sumParity + 1; i++) {\n // simple binary adding for every boolean in the _testArray, starting from 2nd index of it\n _fixIndex += _testArray[i] ? 0 : Math.pow(2, i) / 2;\n }\n _build.unshift(_overallParity); // now we need the \"overall\" parity back in it's place\n // try fix the actual encoded binary string if there is an error\n if (_fixIndex > 0 && _testArray[0] == false) {\n // if the overall is false and the sum of calculated values is greater equal 0, fix the corresponding hamming-bit\n _build[_fixIndex] = _build[_fixIndex] == \"0\" ? \"1\" : \"0\";\n } else if (_testArray[0] == false) {\n // otherwise, if the the overall_parity is the only wrong, fix that one\n _overallParity = _overallParity == \"0\" ? \"1\" : \"0\";\n } else if (_testArray[0] == true && _testArray.some((truth) => truth == false)) {\n return 0; // uhm, there's some strange going on... 2 bits are altered? How? This should not happen 👀\n }\n // oof.. halfway through... we fixed an possible altered bit, now \"extract\" the parity-bits from the _build\n for (let i = _sumParity; i >= 0; i--) {\n // start from the last parity down the 2nd index one\n _build.splice(Math.pow(2, i), 1);\n }\n _build.splice(0, 1); // remove the overall parity bit and we have our binary value\n return parseInt(_build.join(\"\"), 2); // parse the integer with redux 2 and we're done!\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport class Contract extends Action {\n constructor(params: IActionParams | null = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Contract\", this);\n }\n\n static fromJSON(value: IReviverValue): Contract {\n return Generic_fromJSON(Contract, value.data);\n }\n}\n\nReviver.constructors.Contract = Contract;\n","export const ConsoleHelpText: {\n [key: string]: string[];\n helpList: string[];\n automate: string[];\n clear: string[];\n cls: string[];\n help: string[];\n log: string[];\n skill: string[];\n start: string[];\n stop: string[];\n} = {\n helpList: [\n \"Use 'help [command]' to get more information about a particular Bladeburner console command.\",\n \" \",\n \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\",\n \" clear/cls Clear the console\",\n \" help [cmd] Display this help text, or help text for a specific command\",\n \" log [en/dis] [type] Enable or disable logging for events and actions\",\n \" skill [action] [name] Level or display info about your Bladeburner skills\",\n \" start [type] [name] Start a Bladeburner action/task\",\n \" stop Stops your current Bladeburner action/task\",\n \" \",\n ],\n automate: [\n \"Usage: automate [var] [val] [hi/low]\",\n \" \",\n \"A simple way to automate your Bladeburner actions. This console command can be used \" +\n \"to automatically start an action when your stamina rises above a certain threshold, and \" +\n \"automatically switch to another action when your stamina drops below another threshold.\",\n \" \",\n \" automate status - Check the current status of your automation and get a brief description of what it'll do\",\n \" automate en - Enable the automation feature\",\n \" automate dis - Disable the automation feature\",\n \" \",\n \"There are four properties that must be set for this automation to work properly. Here is how to set them:\",\n \" \",\n \" automate stamina 100 high\",\n \" automate contract Tracking high\",\n \" automate stamina 50 low\",\n \" automate general 'Field Analysis' low\",\n \" \",\n \"Using the four console commands above will set the automation to perform Tracking contracts \" +\n \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" +\n \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" +\n \"exactly match whatever the name is in the UI.\",\n \" \",\n ],\n clear: [\"Usage: clear\", \" \", \"Clears the console\", \" \"],\n cls: [\"Usage: cls\", \" \", \"Clears the console\", \" \"],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Running 'help' with no arguments displays the general help text, which lists all console commands \" +\n \"and a brief description of what they do. A command can be specified to get more specific help text \" +\n \"about that particular command. For example:\",\n \" \",\n \" help automate\",\n \" \",\n \"will display specific information about using the automate console command\",\n \" \",\n ],\n log: [\n \"Usage: log [en/dis] [type]\",\n \" \",\n \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" +\n \"in the console. There are also random events that are logged in the console as well. The five categories of \" +\n \"things that get logged are:\",\n \" \",\n \"[general, contracts, ops, blackops, events]\",\n \" \",\n \"The logging for these categories can be enabled or disabled like so:\",\n \" \",\n \" log dis contracts - Disables logging that occurs when contracts are completed\",\n \" log en contracts - Enables logging that occurs when contracts are completed\",\n \" log dis events - Disables logging for Bladeburner random events\",\n \" \",\n \"Logging can be universally enabled/disabled using the 'all' keyword:\",\n \" \",\n \" log dis all\",\n \" log en all\",\n \" \",\n ],\n skill: [\n \"Usage: skill [action] [name]\",\n \" \",\n \"Level or display information about your skills.\",\n \" \",\n \"To display information about all of your skills and your multipliers, use:\",\n \" \",\n \" skill list\",\n \" \",\n \"To display information about a specific skill, specify the name of the skill afterwards. \" +\n \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" +\n \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\",\n \" \",\n \" skill list Reaper\",\n \" skill list 'Digital Observer'\",\n \" \",\n \"This console command can also be used to level up skills:\",\n \" \",\n \" skill level [skill name]\",\n \" \",\n ],\n start: [\n \"Usage: start [type] [name]\",\n \" \",\n \"Start an action. An action is specified by its type and its name. The \" +\n \"name is case-sensitive. It must appear exactly as it does in the UI. If \" +\n \"the name of the action has whitespace, enclose it in double quotation marks. \" +\n \"Valid action types include:\",\n \" \",\n \"[general, contract, op, blackop]\",\n \" \",\n \"Examples:\",\n \" \",\n \" start contract Tracking\",\n \" start op 'Undercover Operation'\",\n \" \",\n ],\n stop: [\"Usage: stop\", \" \", \"Stop your current action and go idle.\", \" \"],\n};\n","// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\nimport { Research } from \"./Research\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nimport { IMap } from \"../types\";\n\ninterface IConstructorParams {\n children?: Node[];\n cost: number;\n text: string;\n parent?: Node | null;\n}\n\nexport class Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n children: Node[] = [];\n\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n cost = 0;\n\n // Whether or not this Research has been unlocked\n researched = false;\n\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n parent: Node | null = null;\n\n // Name of the Research held in this Node\n text = \"\";\n\n constructor(p: IConstructorParams = { cost: 0, text: \"\" }) {\n if (ResearchMap[p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n: Node): void {\n this.children.push(n);\n n.parent = this;\n }\n\n // Recursive function for finding a Node with the specified text\n findNode(text: string): Node | null {\n // Is this the Node?\n if (this.text === text) {\n return this;\n }\n\n // Recursively search chilren\n let res = null;\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n: Node): void {\n this.parent = n;\n }\n}\n\n// A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\nexport class ResearchTree {\n // Object containing names of all acquired Research by name\n researched: IMap = {};\n\n // Root Node\n root: Node | null = null;\n\n // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n getAllNodes(): string[] {\n const res: string[] = [];\n const queue: Node[] = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Get total multipliers from this Research Tree\n getAdvertisingMultiplier(): number {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier(): number {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier(): number {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier(): number {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier(): number {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier(): number {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier(): number {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier(): number {\n return this.getMultiplierHelper(\"storageMult\");\n }\n\n // Helper function for all the multiplier getter fns\n getMultiplierHelper(propName: string): number {\n let res = 1;\n if (this.root == null) {\n return res;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n\n // If the Node has not been researched, there's no need to\n // process it or its children\n if (node == null || !node.researched) {\n continue;\n }\n\n const research: Research | null = ResearchMap[node.text];\n\n // Safety checks\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult =\n {\n advertisingMult: research.advertisingMult,\n employeeChaMult: research.employeeChaMult,\n employeeCreMult: research.employeeCreMult,\n employeeEffMult: research.employeeEffMult,\n employeeIntMult: research.employeeIntMult,\n productionMult: research.productionMult,\n productProductionMult: research.productProductionMult,\n salesMult: research.salesMult,\n sciResearchMult: research.sciResearchMult,\n storageMult: research.storageMult,\n }[propName] ?? null;\n\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n findNode(name: string): Node | null {\n if (this.root == null) {\n return null;\n }\n return this.root.findNode(name);\n }\n\n // Marks a Node as researched\n research(name: string): void {\n if (this.root == null) {\n return;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n }\n\n // Set the tree's Root Node\n setRoot(root: Node): void {\n this.root = root;\n }\n}\n","/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nexport const TicksPerCycle = 75;\n","export const StanekConstants: {\n RAMBonus: number;\n BaseSize: number;\n MaxSize: number;\n} = {\n RAMBonus: 0.1,\n BaseSize: 9,\n MaxSize: 25,\n};\n","import { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { Player } from \"../Player\";\nimport { Script } from \"../Script/Script\";\nimport { GetAllServers } from \"../Server/AllServers\";\n\nconst detect: [string, string][] = [\n [\"getHackTime\", \"returns milliseconds\"],\n [\"getGrowTime\", \"returns milliseconds\"],\n [\"getWeakenTime\", \"returns milliseconds\"],\n [\"getActionTime\", \"returns milliseconds\"],\n [\"hackAnalyzePercent\", \"renamed 'hackAnalyze' and returns decimal\"],\n [\"hackChance\", \"renamed 'hackAnalyzeChance'\"],\n [\"basic.calculateSkill\", \"renamed 'skills.calculateSkill'\"],\n [\"basic.calculateExp\", \"renamed 'skills.calculateExp'\"],\n [\"basic.hackChance\", \"renamed 'hacking.hackChance'\"],\n [\"basic.hackExp\", \"renamed 'hacking.hackExp'\"],\n [\"basic.hackPercent\", \"renamed 'hacking.hackPercent'\"],\n [\"basic.growPercent\", \"renamed 'hacking.growPercent'\"],\n [\"basic.hackTime\", \"renamed 'hacking.hackTime'\"],\n [\"basic.growTime\", \"renamed 'hacking.growTime'\"],\n [\"basic.weakenTime\", \"renamed 'hacking.weakenTime'\"],\n [\"write\", \"needs to be awaited\"],\n [\"scp\", \"needs to be awaited\"],\n [\"sleep\", \"Can no longer be called simultenaously.\"],\n [\"hacking_skill\", \"renamed 'hacking'\"],\n [\"tryWrite\", \"renamed 'tryWritePort'\"],\n];\n\nconst changes: [RegExp, string][] = [\n [/ns.getHackTime/g, \"((...a)=>ns.getHackTime(...a)/1000)\"],\n [/ns.getGrowTime/g, \"((...a)=>ns.getGrowTime(...a)/1000)\"],\n [/ns.getWeakenTime/g, \"((...a)=>ns.getWeakenTime(...a)/1000)\"],\n [/ns.bladeburner.getActionTime/g, \"((...a)=>ns.bladeburner.getActionTime(...a)/1000)\"],\n [/ns.hackAnalyzePercent/g, \"((...a)=>ns.hackAnalyze(...a)*100)\"],\n [/ns.hackChance/g, \"ns.hackAnalyzeChance\"],\n [/ns.tryWrite/g, \"ns.tryWritePort\"],\n [/formulas.basic.calculateSkill/g, \"formulas.skills.calculateSkill\"],\n [/formulas.basic.calculateExp/g, \"formulas.skills.calculateExp\"],\n [/formulas.basic.hackChance/g, \"formulas.hacking.hackChance\"],\n [/formulas.basic.hackExp/g, \"formulas.hacking.hackExp\"],\n [/formulas.basic.hackPercent/g, \"formulas.hacking.hackPercent\"],\n [/formulas.basic.growPercent/g, \"formulas.hacking.growPercent\"],\n [/formulas.basic.hackTime/g, \"formulas.hacking.hackTime\"],\n [/formulas.basic.growTime/g, \"formulas.hacking.growTime\"],\n [/formulas.basic.weakenTime/g, \"formulas.hacking.weakenTime\"],\n];\nfunction hasChanges(code: string): boolean {\n for (const change of changes) {\n if (code.match(change[0])) return true;\n }\n return false;\n}\n\nfunction convert(code: string): string {\n const lines = code.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const orig = lines[i];\n let line = lines[i];\n for (const change of changes) {\n line = line.replace(change[0], change[1]);\n }\n if (line != orig) {\n out.push(`// =============================== original line ===============================`);\n out.push(`/**`);\n out.push(` * ${orig}`);\n out.push(\" */\");\n out.push(`// =============================================================================`);\n }\n out.push(line);\n }\n return out.join(\"\\n\");\n}\n\nexport function AwardNFG(n = 1): void {\n const nf = Player.augmentations.find((a) => a.name === AugmentationNames.NeuroFluxGovernor);\n if (nf) {\n nf.level += n;\n } else {\n const nf = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n nf.level = n;\n Player.augmentations.push(nf);\n }\n}\n\nexport function v1APIBreak(): void {\n interface IFileLine {\n file: string;\n line: number;\n }\n let txt = \"\";\n for (const server of GetAllServers()) {\n for (const change of detect) {\n const s: IFileLine[] = [];\n for (const script of server.scripts) {\n const lines = script.code.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].includes(change[0])) {\n s.push({\n file: script.filename,\n line: i + 1,\n });\n }\n }\n }\n\n if (s.length === 0) continue;\n\n txt += `// Detected change ${change[0]}, reason: ${change[1]}\\n`;\n for (const fl of s) {\n txt += `${fl.file}:${fl.line}\\n`;\n }\n }\n }\n if (txt !== \"\") {\n const home = Player.getHomeComputer();\n home.writeToTextFile(\"v1_DETECTED_CHANGES.txt\", txt);\n }\n\n for (const server of GetAllServers()) {\n const backups: Script[] = [];\n for (const script of server.scripts) {\n if (!hasChanges(script.code)) continue;\n const prefix = script.filename.includes(\"/\") ? \"/BACKUP_\" : \"BACKUP_\";\n backups.push(new Script(Player, prefix + script.filename, script.code, script.server));\n script.code = convert(script.code);\n }\n server.scripts = server.scripts.concat(backups);\n }\n}\n","// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\nimport { CompanyPosition } from \"./CompanyPosition\";\nimport { CompanyPositions } from \"./CompanyPositions\";\n\nexport function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName: string | null = currPos.nextPosition;\n if (nextPosName == null) {\n return null;\n }\n\n return CompanyPositions[nextPosName];\n}\n","import { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessBladeburner(this: IPlayer): boolean {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || this.sourceFileLvl(6) > 0 || this.sourceFileLvl(7) > 0;\n}\n\nexport function inBladeburner(this: IPlayer): boolean {\n if (this.bladeburner == null) {\n return false;\n }\n return this.bladeburner instanceof Bladeburner;\n}\n\nexport function startBladeburner(this: IPlayer): void {\n this.bladeburner = new Bladeburner(this);\n}\n","import { Corporation } from \"../../Corporation/Corporation\";\nimport {\n CorporationUnlockUpgradeIndex,\n CorporationUnlockUpgrades,\n} from \"../../Corporation/data/CorporationUnlockUpgrades\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessCorporation(this: IPlayer): boolean {\n return this.bitNodeN === 3 || this.sourceFileLvl(3) > 0;\n}\n\nexport function hasCorporation(this: IPlayer): boolean {\n if (this.corporation == null) {\n return false;\n }\n return this.corporation instanceof Corporation;\n}\n\nexport function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {\n this.corporation = new Corporation({\n name: corpName,\n });\n\n if (this.sourceFileLvl(3) === 3) {\n const warehouseApi = CorporationUnlockUpgrades[CorporationUnlockUpgradeIndex.WarehouseAPI].index;\n const OfficeApi = CorporationUnlockUpgrades[CorporationUnlockUpgradeIndex.OfficeAPI].index;\n\n this.corporation.unlockUpgrades[warehouseApi] = 1;\n this.corporation.unlockUpgrades[OfficeApi] = 1;\n }\n\n this.corporation.totalShares += additionalShares;\n}\n","import { Work } from \"../../Work/Work\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function start(this: IPlayer, w: Work): void {\n if (this.currentWork !== null) {\n this.currentWork.finish(this, true);\n }\n this.currentWork = w;\n}\nexport function process(this: IPlayer, cycles = 1): void {\n if (this.currentWork === null) return;\n const finished = this.currentWork.process(this, cycles);\n if (finished) {\n this.finishWork(false);\n }\n}\nexport function finish(this: IPlayer, cancelled: boolean): void {\n if (this.currentWork === null) return;\n this.currentWork.finish(this, cancelled);\n this.currentWork = null;\n}\n","/**\n * Game engine. Handles the main game loop.\n */\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\nimport { initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { generateRandomContract } from \"./CodingContractGenerator\";\nimport { initCompanies } from \"./Company/Companies\";\nimport { Corporation } from \"./Corporation/Corporation\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { processPassiveFactionRepGain, inviteToFaction } from \"./Faction/FactionHelpers\";\nimport { Router } from \"./ui/GameRoot\";\nimport { Page } from \"./ui/Router\";\nimport { SetupTextEditor } from \"./ScriptEditor/ui/ScriptEditorRoot\";\n\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"./PersonObjects/formulas/reputation\";\nimport { hasHacknetServers, processHacknetEarnings } from \"./Hacknet/HacknetHelpers\";\nimport { iTutorialStart } from \"./InteractiveTutorial\";\nimport { checkForMessagesToSend } from \"./Message/MessageHelpers\";\nimport { loadAllRunningScripts, updateOnlineScriptTimes } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { saveObject, loadGame } from \"./SaveObject\";\nimport { initForeignServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { ThemeEvents } from \"./Themes/ui/Theme\";\nimport { initSymbolToStockMap, processStockPrices } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\nimport { Sleeve } from \"./PersonObjects/Sleeve/Sleeve\";\n\nimport { Money } from \"./ui/React/Money\";\nimport { Hashes } from \"./ui/React/Hashes\";\nimport { Reputation } from \"./ui/React/Reputation\";\n\nimport { AlertEvents } from \"./ui/React/AlertManager\";\nimport { exceptionAlert } from \"./utils/helpers/exceptionAlert\";\n\nimport { startExploits } from \"./Exploits/loops\";\nimport { calculateAchievements } from \"./Achievements/Achievements\";\n\nimport React from \"react\";\nimport { setupUncaughtPromiseHandler } from \"./UncaughtPromiseHandler\";\nimport { Button, Typography } from \"@mui/material\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\n\nconst Engine: {\n _lastUpdate: number;\n updateGame: (numCycles?: number) => void;\n Counters: {\n [key: string]: number | undefined;\n autoSaveCounter: number;\n updateSkillLevelsCounter: number;\n updateDisplays: number;\n updateDisplaysLong: number;\n updateActiveScriptsDisplay: number;\n createProgramNotifications: number;\n augmentationsNotifications: number;\n checkFactionInvitations: number;\n passiveFactionGrowth: number;\n messages: number;\n mechanicProcess: number;\n contractGeneration: number;\n achievementsCounter: number;\n };\n decrementAllCounters: (numCycles?: number) => void;\n checkCounters: () => void;\n load: (saveString: string) => void;\n start: () => void;\n} = {\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n\n updateGame: function (numCycles = 1) {\n const time = numCycles * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Terminal.process(Router, Player, numCycles);\n\n Player.processWork(numCycles);\n\n // Update stock prices\n if (Player.hasWseAccount) {\n processStockPrices(numCycles);\n }\n\n // Gang, if applicable\n if (Player.inGang() && Player.gang !== null) {\n Player.gang.process(numCycles, Player);\n }\n\n // Staneks gift\n staneksGift.process(Player, numCycles);\n\n // Corporation\n if (Player.corporation instanceof Corporation) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n Player.corporation.storeCycles(numCycles);\n }\n\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCycles);\n }\n\n // Sleeves\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCycles);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCycles, true);\n }\n }\n }\n\n // Counters\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters();\n\n // Update the running time of all active scripts\n updateOnlineScriptTimes(numCycles);\n\n // Hacknet Nodes\n processHacknetEarnings(Player, numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5, // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000, // Generate Coding Contracts\n achievementsCounter: 60, // Check if we have new achievements\n },\n\n decrementAllCounters: function (numCycles = 1) {\n for (const counterName of Object.keys(Engine.Counters)) {\n const counter = Engine.Counters[counterName];\n if (counter === undefined) throw new Error(\"counter should not be undefined\");\n Engine.Counters[counterName] = counter - numCycles;\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (Settings.AutosaveInterval == null) {\n Settings.AutosaveInterval = 60;\n }\n if (Settings.AutosaveInterval === 0) {\n warnAutosaveDisabled();\n Engine.Counters.autoSaveCounter = 60 * 5; // Let's check back in a bit\n } else {\n Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;\n saveObject.saveGame(!Settings.SuppressSavedGameToast);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = Player.checkForFactionInvitations();\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n inviteToFaction(randFaction);\n }\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n const adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n processPassiveFactionRepGain(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n checkForMessagesToSend();\n if (Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n if (Player.corporation instanceof Corporation) {\n Player.corporation.process(Player);\n }\n if (Engine.Counters.mechanicProcess <= 0) {\n if (Player.bladeburner instanceof Bladeburner) {\n try {\n Player.bladeburner.process(Router, Player);\n } catch (e) {\n exceptionAlert(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n generateRandomContract();\n }\n Engine.Counters.contractGeneration = 3000;\n }\n\n if (Engine.Counters.achievementsCounter <= 0) {\n calculateAchievements();\n Engine.Counters.achievementsCounter = 300;\n }\n },\n\n load: function (saveString) {\n startExploits();\n setupUncaughtPromiseHandler();\n // Load game from save or create new game\n\n if (loadGame(saveString)) {\n ThemeEvents.emit();\n\n initBitNodeMultipliers(Player);\n initAugmentations(); // Also calls Player.reapplyAllAugmentations()\n Player.reapplyAllSourceFiles();\n if (Player.hasWseAccount) {\n initSymbolToStockMap();\n }\n\n // Apply penalty for entropy accumulation\n Player.applyEntropy(Player.entropy);\n\n // Calculate the number of cycles have elapsed while offline\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);\n\n // Generate coding contracts\n if (Player.sourceFiles.length > 0) {\n let numContracts = 0;\n if (numCyclesOffline < 3000 * 100) {\n // if we have less than 100 rolls, just roll them exactly.\n for (let i = 0; i < numCyclesOffline / 3000; i++) {\n if (Math.random() < 0.25) numContracts++;\n }\n } else {\n // just average it.\n numContracts = (numCyclesOffline / 3000) * 0.25;\n }\n for (let i = 0; i < numContracts; i++) {\n generateRandomContract();\n }\n }\n\n let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome, \"hacking\");\n // Process offline progress\n loadAllRunningScripts(Player); // This also takes care of offline production for those scripts\n if (Player.currentWork !== null) {\n Player.focus = true;\n Player.processWork(numCyclesOffline);\n } else {\n for (let i = 0; i < Player.factions.length; i++) {\n const facName = Player.factions[i];\n if (!Factions.hasOwnProperty(facName)) continue;\n const faction = Factions[facName];\n if (!faction.isMember) continue;\n // No rep for special factions.\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No rep for gangs.\n if (Player.getGangName() === facName) continue;\n\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n // can be infinite, doesn't matter.\n const reputationRate = Math.max(hRep, sRep, fRep) / Player.factions.length;\n\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n }\n\n // Hacknet Nodes offline progress\n const offlineProductionFromHacknetNodes = processHacknetEarnings(Player, numCyclesOffline);\n const hacknetProdInfo = hasHacknetServers(Player) ? (\n <>\n hashes\n \n ) : (\n \n );\n\n // Passive faction rep gain offline\n processPassiveFactionRepGain(numCyclesOffline);\n\n // Stock Market offline progress\n if (Player.hasWseAccount) {\n processStockPrices(numCyclesOffline);\n }\n\n // Gang progress for BitNode 2\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n gang.process(numCyclesOffline, Player);\n }\n\n // Corporation offline progress\n if (Player.corporation instanceof Corporation) {\n Player.corporation.storeCycles(numCyclesOffline);\n }\n\n // Bladeburner offline progress\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCyclesOffline);\n }\n\n staneksGift.process(Player, numCyclesOffline);\n\n // Sleeves offline progress\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCyclesOffline);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCyclesOffline, true);\n }\n }\n }\n\n // Update total playtime\n const time = numCyclesOffline * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Player.lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n const timeOfflineString = convertTimeMsToTimeElapsedString(time);\n setTimeout(\n () =>\n AlertEvents.emit(\n <>\n Offline for {timeOfflineString}. While you were offline:\n
    \n
  • \n \n Your scripts generated \n \n
  • \n
  • \n Your Hacknet Nodes generated {hacknetProdInfo}\n
  • \n
  • \n \n You gained reputation divided amongst your factions\n \n
  • \n
\n ,\n ),\n 250,\n );\n } else {\n // No save found, start new game\n initBitNodeMultipliers(Player);\n Engine.start(); // Run main game loop and Scripts loop\n Player.init();\n initForeignServers(Player.getHomeComputer());\n initCompanies();\n initFactions();\n initAugmentations();\n\n // Start interactive tutorial\n iTutorialStart();\n }\n SetupTextEditor();\n },\n\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % CONSTANTS._idleSpeed;\n\n // Divide this by cycle time to determine how many cycles have elapsed since last update\n diff = Math.floor(diff / CONSTANTS._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n Player.lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n window.requestAnimationFrame(Engine.start);\n },\n};\n\n/**\n * Shows a toast warning that lets the player know that auto-saves are disabled, with an button to re-enable them.\n */\nfunction warnAutosaveDisabled(): void {\n // If the player has suppressed those warnings let's just exit right away.\n if (Settings.SuppressAutosaveDisabledWarnings) return;\n\n // We don't want this warning to show up on certain pages.\n // When in recovery or importing we want to keep autosave disabled.\n const ignoredPages = [Page.Recovery, Page.ImportSave];\n if (ignoredPages.includes(Router.page())) return;\n\n const warningToast = (\n <>\n Auto-saves are disabled!\n {\n // We reset the value to a default\n Settings.AutosaveInterval = 60;\n }}\n >\n Enable\n \n \n );\n SnackbarEvents.emit(warningToast, ToastVariant.WARNING, 5000);\n}\n\nexport { Engine };\n","export { Theme as Default } from \"./default\";\nexport { Theme as DefaultLite } from \"./default-lite\";\nexport { Theme as Monokai } from \"./monokai-ish\";\nexport { Theme as Warmer } from \"./warmer\";\nexport { Theme as DarkPlus } from \"./dark-plus\";\nexport { Theme as MayukaiDark } from \"./mayukai-dark\";\nexport { Theme as Purple } from \"./purple\";\nexport { Theme as SmoothGreen } from \"./smooth-green\";\nexport { Theme as Dracula } from \"./dracula\";\nexport { Theme as DarkBlue } from \"./dark-blue\";\nexport { Theme as DiscordLike } from \"./discord-like\";\nexport { Theme as OneDark } from \"./one-dark\";\nexport { Theme as MutedGoldBlue } from \"./muted-gold-blue\";\nexport { Theme as Light } from \"./light\";\n","import React, { useState, useEffect } from \"react\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport { Terminal } from \"../Terminal\";\nimport { load } from \"../db\";\nimport { Player } from \"../Player\";\nimport { Engine } from \"../engine\";\nimport { GameRoot } from \"./GameRoot\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { ActivateRecoveryMode } from \"./React/RecoveryRoot\";\nimport { hash } from \"../hash/hash\";\nimport { pushGameReady } from \"../Electron\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n backgroundColor: theme.colors.backgroundprimary,\n },\n }),\n);\n\nexport function LoadingScreen(): React.ReactElement {\n const classes = useStyles();\n const [show, setShow] = useState(false);\n const [loaded, setLoaded] = useState(false);\n\n const version = `v${CONSTANTS.VersionString} (${hash()})`;\n if (process.env.NODE_ENV === \"development\") {\n document.title = `[dev] Bitburner ${version}`;\n } else {\n document.title = `Bitburner ${version}`;\n }\n\n useEffect(() => {\n const id = setTimeout(() => {\n if (!loaded) setShow(true);\n }, 2000);\n return () => clearTimeout(id);\n });\n\n useEffect(() => {\n async function doLoad(): Promise {\n await load()\n .then((saveString) => {\n try {\n Engine.load(saveString);\n } catch (err: unknown) {\n ActivateRecoveryMode();\n setLoaded(true);\n throw err;\n }\n\n pushGameReady();\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n return (\n \n {loaded ? (\n \n ) : (\n \n \n \n \n \n Loading Bitburner {version}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n )}\n \n );\n}\n","/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { calculateEntropy } from \"../Grafting/EntropyAccumulation\";\n\nexport function hasAugmentation(this: IPlayer, aug: string | Augmentation, ignoreQueued = false): boolean {\n const augName: string = aug instanceof Augmentation ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n if (!ignoreQueued) {\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nexport function applyEntropy(this: IPlayer, stacks = 1): void {\n // Re-apply all multipliers\n this.reapplyAllAugmentations();\n this.reapplyAllSourceFiles();\n\n this.mults = calculateEntropy(this, stacks);\n}\n","/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nexport function isValidNumber(n: number): boolean {\n return typeof n === \"number\" && !isNaN(n);\n}\n","/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\n\nexport class Order {\n readonly pos: PositionTypes;\n readonly price: number;\n shares: number;\n readonly stockSymbol: string;\n readonly type: OrderTypes;\n\n constructor(\n stockSymbol = \"\",\n shares = 0,\n price = 0,\n typ: OrderTypes = OrderTypes.LimitBuy,\n pos: PositionTypes = PositionTypes.Long,\n ) {\n // Validate arguments\n let invalidArgs = false;\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n\n /**\n * Serialize the Order to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Order\", this);\n }\n\n /**\n * Initializes a Order from a JSON save state\n */\n static fromJSON(value: IReviverValue): Order {\n return Generic_fromJSON(Order, value.data);\n }\n}\n\nReviver.constructors.Order = Order;\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Fragment } from \"./Fragment\";\nimport { ActiveFragment } from \"./ActiveFragment\";\nimport { FragmentType } from \"./FragmentType\";\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { CalculateEffect } from \"./formulas/effect\";\nimport { StaneksGiftEvents } from \"./StaneksGiftEvents\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StanekConstants } from \"./data/Constants\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../Player\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport class StaneksGift implements IStaneksGift {\n storedCycles = 0;\n fragments: ActiveFragment[] = [];\n\n baseSize(): number {\n return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13);\n }\n\n width(): number {\n return Math.max(2, Math.min(Math.floor(this.baseSize() / 2 + 1), StanekConstants.MaxSize));\n }\n height(): number {\n return Math.max(3, Math.min(Math.floor(this.baseSize() / 2 + 0.6), StanekConstants.MaxSize));\n }\n\n charge(player: IPlayer, af: ActiveFragment, threads: number): void {\n if (threads > af.highestCharge) {\n af.numCharge = (af.highestCharge * af.numCharge) / threads + 1;\n af.highestCharge = threads;\n } else {\n af.numCharge += threads / af.highestCharge;\n }\n\n const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];\n cotmg.playerReputation += (player.mults.faction_rep * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;\n }\n\n inBonus(): boolean {\n return (this.storedCycles * CONSTANTS._idleSpeed) / 1000 > 1;\n }\n\n process(p: IPlayer, numCycles = 1): void {\n if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;\n this.storedCycles += numCycles;\n this.storedCycles -= 10;\n this.storedCycles = Math.max(0, this.storedCycles);\n this.updateMults(p);\n StaneksGiftEvents.emit();\n }\n\n effect(fragment: ActiveFragment): number {\n // Find all the neighbooring cells\n const cells = fragment.neighboors();\n // find the neighbooring active fragments.\n const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1]));\n\n // Filter out undefined with typescript \"Type guard\". Whatever\n let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v);\n\n neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster);\n let boost = 1;\n\n neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i);\n for (const neighboor of neighboors) {\n boost *= neighboor.fragment().power;\n }\n return CalculateEffect(fragment.highestCharge, fragment.numCharge, fragment.fragment().power, boost);\n }\n\n canPlace(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (rootX < 0 || rootY < 0) return false;\n if (rootX + fragment.width(rotation) > this.width()) return false;\n if (rootY + fragment.height(rotation) > this.height()) return false;\n if (this.count(fragment) >= fragment.limit) return false;\n const newFrag = new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment });\n for (const aFrag of this.fragments) {\n if (aFrag.collide(newFrag)) return false;\n }\n return true;\n }\n\n place(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (!this.canPlace(rootX, rootY, rotation, fragment)) return false;\n this.fragments.push(new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment }));\n return true;\n }\n\n findFragment(rootX: number, rootY: number): ActiveFragment | undefined {\n return this.fragments.find((f) => f.x === rootX && f.y === rootY);\n }\n\n fragmentAt(worldX: number, worldY: number): ActiveFragment | undefined {\n for (const aFrag of this.fragments) {\n if (aFrag.fullAt(worldX, worldY)) {\n return aFrag;\n }\n }\n\n return undefined;\n }\n\n count(fragment: Fragment): number {\n let amt = 0;\n for (const aFrag of this.fragments) {\n if (aFrag.fragment().id === fragment.id) amt++;\n }\n return amt;\n }\n\n delete(rootX: number, rootY: number): boolean {\n for (let i = 0; i < this.fragments.length; i++) {\n if (this.fragments[i].x === rootX && this.fragments[i].y === rootY) {\n this.fragments.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n clear(): void {\n this.fragments = [];\n }\n\n clearCharge(): void {\n this.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n updateMults(p: IPlayer): void {\n // applyEntropy also reapplies all augmentations and source files\n // This wraps up the reset nicely\n p.applyEntropy(p.entropy);\n\n for (const aFrag of this.fragments) {\n const fragment = aFrag.fragment();\n\n const power = this.effect(aFrag);\n switch (fragment.type) {\n case FragmentType.HackingChance:\n p.mults.hacking_chance *= power;\n break;\n case FragmentType.HackingSpeed:\n p.mults.hacking_speed *= power;\n break;\n case FragmentType.HackingMoney:\n p.mults.hacking_money *= power;\n break;\n case FragmentType.HackingGrow:\n p.mults.hacking_grow *= power;\n break;\n case FragmentType.Hacking:\n p.mults.hacking *= power;\n p.mults.hacking_exp *= power;\n break;\n case FragmentType.Strength:\n p.mults.strength *= power;\n p.mults.strength_exp *= power;\n break;\n case FragmentType.Defense:\n p.mults.defense *= power;\n p.mults.defense_exp *= power;\n break;\n case FragmentType.Dexterity:\n p.mults.dexterity *= power;\n p.mults.dexterity_exp *= power;\n break;\n case FragmentType.Agility:\n p.mults.agility *= power;\n p.mults.agility_exp *= power;\n break;\n case FragmentType.Charisma:\n p.mults.charisma *= power;\n p.mults.charisma_exp *= power;\n break;\n case FragmentType.HacknetMoney:\n p.mults.hacknet_node_money *= power;\n break;\n case FragmentType.HacknetCost:\n p.mults.hacknet_node_purchase_cost /= power;\n p.mults.hacknet_node_ram_cost /= power;\n p.mults.hacknet_node_core_cost /= power;\n p.mults.hacknet_node_level_cost /= power;\n break;\n case FragmentType.Rep:\n p.mults.company_rep *= power;\n p.mults.faction_rep *= power;\n break;\n case FragmentType.WorkMoney:\n p.mults.work_money *= power;\n break;\n case FragmentType.Crime:\n p.mults.crime_success *= power;\n p.mults.crime_money *= power;\n break;\n case FragmentType.Bladeburner:\n p.mults.bladeburner_max_stamina *= power;\n p.mults.bladeburner_stamina_gain *= power;\n p.mults.bladeburner_analysis *= power;\n p.mults.bladeburner_success_chance *= power;\n break;\n }\n }\n p.updateSkillLevels();\n }\n\n prestigeAugmentation(): void {\n this.clearCharge();\n }\n\n prestigeSourceFile(): void {\n this.clear();\n this.storedCycles = 0;\n }\n\n /**\n * Serialize Staneks Gift to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"StaneksGift\", this);\n }\n\n /**\n * Initializes Staneks Gift from a JSON save state\n */\n static fromJSON(value: IReviverValue): StaneksGift {\n return Generic_fromJSON(StaneksGift, value.data);\n }\n}\n\nReviver.constructors.StaneksGift = StaneksGift;\n","/**\n * Class representing a visitable location in the world\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\nimport { LocationType } from \"./LocationTypeEnum\";\n\ninterface IInfiltrationMetadata {\n maxClearanceLevel: number;\n startingSecurityLevel: number;\n}\n\nexport interface IConstructorParams {\n city?: CityName | null;\n costMult?: number;\n expMult?: number;\n infiltrationData?: IInfiltrationMetadata;\n name?: LocationName;\n types?: LocationType[];\n techVendorMaxRam?: number;\n techVendorMinRam?: number;\n}\n\nexport class Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n city: CityName | null = null;\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n costMult = 0;\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n expMult = 0;\n\n /**\n * Companies can be infiltrated. This contains the data required for that\n * infiltration event\n */\n infiltrationData?: IInfiltrationMetadata;\n\n /**\n * Identifier for location\n */\n name: LocationName = LocationName.Void;\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n types: LocationType[] = [];\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMaxRam = 0;\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMinRam = 0;\n\n constructor(p: IConstructorParams) {\n if (p.city) {\n this.city = p.city;\n }\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n if (p.name) {\n this.name = p.name;\n }\n if (p.types) {\n this.types = p.types;\n }\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n}\n","import React from \"react\";\n\nimport { Typography, Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { StatsRow } from \"../../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../../ui/React/CharacterOverview\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { MoneyRate } from \"../../../ui/React/MoneyRate\";\nimport { ReputationRate } from \"../../../ui/React/ReputationRate\";\nimport { use } from \"../../../ui/Context\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\ninterface IProps {\n sleeve: Sleeve;\n}\n\nexport function StatsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n
\n
\n );\n}\n\nexport function EarningsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n const player = use.Player();\n\n let data: (string | JSX.Element)[][] = [];\n if (props.sleeve.currentTask === SleeveTaskType.Crime) {\n data = [\n [\n `Money`,\n <>\n (on success)\n ,\n ],\n [`Hacking Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.hack)} (2x on success)`],\n [`Strength Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.str)} (2x on success)`],\n [`Defense Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.def)} (2x on success)`],\n [`Dexterity Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.dex)} (2x on success)`],\n [`Agility Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.agi)} (2x on success)`],\n [`Charisma Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.cha)} (2x on success)`],\n ];\n } else {\n data = [\n [`Money:`, ],\n [`Hacking Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.hack)} / sec`],\n [`Strength Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.str)} / sec`],\n [`Defense Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.def)} / sec`],\n [`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.dex)} / sec`],\n [`Agility Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.agi)} / sec`],\n [`Charisma Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.cha)} / sec`],\n ];\n if (props.sleeve.currentTask === SleeveTaskType.Company || props.sleeve.currentTask === SleeveTaskType.Faction) {\n const repGain: number = props.sleeve.getRepGain(player);\n data.push([`Reputation:`, ]);\n }\n }\n\n return (\n \n \n \n \n Earnings\n \n \n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n \n
\n );\n}\n","/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\nimport React from \"react\";\nimport { GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\n// TODO make this an enum when this gets converted to TypeScript\nexport const ServerType = {\n All: 0,\n Foreign: 1, // Hackable, non-owned servers\n Owned: 2, // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3, // Everything from Owned except home computer\n};\n\ninterface IProps {\n purchase: () => void;\n canPurchase: boolean;\n serverType: number;\n onChange: (event: SelectChangeEvent) => void;\n value: string;\n}\n\nexport function ServerDropdown(props: IProps): React.ReactElement {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s: BaseServer): boolean {\n const purchased = s instanceof Server && s.purchasedByPlayer;\n const type = props.serverType;\n switch (type) {\n case ServerType.All:\n return true;\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n case ServerType.Owned:\n return purchased || s instanceof HacknetServer || s.hostname === \"home\";\n case ServerType.Purchased:\n return purchased || s instanceof HacknetServer;\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n for (const server of GetAllServers().sort((a, b) => a.hostname.localeCompare(b.hostname))) {\n if (isValidServer(server)) {\n servers.push(\n \n {server.hostname}\n ,\n );\n }\n }\n\n return (\n \n Buy\n \n }\n sx={{ mx: 1 }}\n value={props.value}\n onChange={props.onChange}\n >\n {servers}\n \n );\n}\n","import * as React from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { Game, reachedLimit } from \"./Game\";\nimport { Deck } from \"./CardDeck/Deck\";\nimport { Hand } from \"./CardDeck/Hand\";\nimport { InputAdornment } from \"@mui/material\";\nimport { ReactCard } from \"./CardDeck/ReactCard\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\n\nconst MAX_BET = 100e6;\nexport const DECK_COUNT = 5; // 5-deck multideck\n\nenum Result {\n Pending = \"\",\n PlayerWon = \"You won!\",\n PlayerWonByBlackjack = \"You Won! Blackjack!\",\n DealerWon = \"You lost!\",\n Tie = \"Push! (Tie)\",\n}\n\ntype Props = {\n p: IPlayer;\n};\n\ntype State = {\n playerHand: Hand;\n dealerHand: Hand;\n bet: number;\n betInput: string;\n gameInProgress: boolean;\n result: Result;\n gains: number; // Track gains only for this session\n wagerInvalid: boolean;\n wagerInvalidHelperText: string;\n};\n\nexport class Blackjack extends Game {\n deck: Deck;\n\n constructor(props: Props) {\n super(props);\n\n this.deck = new Deck(DECK_COUNT);\n\n const initialBet = 1e6;\n\n this.state = {\n playerHand: new Hand([]),\n dealerHand: new Hand([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n };\n }\n\n canStartGame = (): boolean => {\n const { p } = this.props;\n const { bet } = this.state;\n\n return p.canAfford(bet);\n };\n\n startGame = (): void => {\n if (!this.canStartGame() || reachedLimit(this.props.p)) {\n return;\n }\n\n // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e) TODO: Save/Restore the RNG state to limit the value of save-scumming.\n this.props.p.loseMoney(this.state.bet, \"casino\");\n\n const playerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending,\n });\n\n // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n };\n\n // Returns an array of numbers representing all possible values of the given Hand. The reason it needs to be\n // an array is because an Ace can count as both 1 and 11.\n getHandValue = (hand: Hand): number[] => {\n let result: number[] = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n if (value >= 10) {\n result = result.map((x) => x + 10);\n } else if (value === 1) {\n result = result.flatMap((x) => [x + 1, x + 11]);\n } else {\n result = result.map((x) => x + value);\n }\n }\n\n return result;\n };\n\n // Returns the single hand value used for determine things like victory and whether or not\n // the dealer has to hit. Essentially this uses the biggest value that's 21 or under. If no such value exists,\n // then it means the hand is busted and we can just return whatever\n getTrueHandValue = (hand: Hand): number => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter((x) => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n };\n\n // Returns all hand values that are 21 or under. If no values are 21 or under, then the first value is returned.\n getHandDisplayValues = (hand: Hand): number[] => {\n const handValues = this.getHandValue(hand);\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter((x) => x <= 21))];\n }\n };\n\n isHandBusted = (hand: Hand): boolean => {\n return this.getTrueHandValue(hand) > 21;\n };\n\n playerHit = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n\n this.setState({\n playerHand: newHand,\n });\n\n // Check if player busted, and finish the game if so\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n };\n\n playerStay = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n let newDealerHand = this.state.dealerHand;\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand,\n });\n\n // If dealer has busted, then player wins\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand);\n\n // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n };\n\n finishGame = (result: Result): void => {\n const gains =\n result === Result.DealerWon\n ? 0 // We took away the bet at the start, don't need to take more\n : result === Result.Tie\n ? this.state.bet // We took away the bet at the start, give it back\n : result === Result.PlayerWon\n ? 2 * this.state.bet // Give back their bet plus their winnings\n : result === Result.PlayerWonByBlackjack\n ? 2.5 * this.state.bet // Blackjack pays out 1.5x bet!\n : (() => {\n throw new Error(`Unexpected result: ${result}`);\n })(); // This can't happen, right?\n this.win(this.props.p, gains);\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains - this.state.bet, // Not updated upfront - only tracks the final outcome\n });\n };\n\n wagerOnChange = (event: React.ChangeEvent): void => {\n const { p } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\",\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\",\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\",\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\",\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending, // Reset previous game status to clear the win/lose text UI\n });\n }\n };\n\n // Start game button\n startOnClick = (event: React.MouseEvent): void => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n };\n\n render(): React.ReactNode {\n const { betInput, playerHand, dealerHand, gameInProgress, result, wagerInvalid, wagerInvalidHelperText, gains } =\n this.state;\n\n // Get the player totals to display.\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n\n return (\n <>\n {/* Wager input */}\n \n \n {\"Wager (Max: \"}\n \n {\")\"}\n \n }\n disabled={gameInProgress}\n onChange={this.wagerOnChange}\n error={wagerInvalid}\n helperText={wagerInvalid ? wagerInvalidHelperText : \"\"}\n type=\"number\"\n style={{\n width: \"200px\",\n }}\n InputProps={{\n startAdornment: (\n \n $\n \n ),\n }}\n />\n\n \n {\"Total earnings this session: \"}\n \n \n \n\n {/* Buttons */}\n {!gameInProgress ? (\n \n ) : (\n <>\n \n \n \n )}\n\n {/* Main game part. Displays both if the game is in progress OR if there's a result so you can see\n * the cards that led to that result. */}\n {(gameInProgress || result !== Result.Pending) && (\n <>\n \n \n Player\n {playerHand.cards.map((card, i) => (\n \n ))}\n\n \n Count:{\" \"}\n {playerHandValues\n .map((value, i) => {value})\n .reduce((prev, curr) => [prev, \" or \", curr])}\n \n \n \n\n
\n\n \n \n Dealer\n {dealerHand.cards.map((card, i) => (\n // Hide every card except the first while game is in progress\n \n \n \n )}\n\n {/* Results from previous round */}\n {result !== Result.Pending && (\n \n {result} \n {result === Result.PlayerWon && }\n {result === Result.PlayerWonByBlackjack && }\n {result === Result.DealerWon && }\n \n )}\n \n );\n }\n}\n","import React, { FC } from \"react\";\nimport { Card, Suit } from \"./Card\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Paper from \"@mui/material/Paper\";\n\ntype Props = {\n card: Card;\n hidden?: boolean;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n card: {\n padding: \"10px\",\n border: \"solid 1px #808080\",\n backgroundColor: \"white\",\n display: \"inline-block\",\n borderRadius: \"10px\",\n fontSize: \"18.5px\",\n textAlign: \"center\",\n margin: \"3px\",\n fontWeight: \"bold\",\n },\n red: {\n color: \"red\",\n },\n\n black: {\n color: \"black\",\n },\n value: {\n fontSize: \"20px\",\n fontFamily: \"sans-serif\",\n },\n }),\n);\n\nexport const ReactCard: FC = ({ card, hidden }) => {\n const classes = useStyles();\n let suit: React.ReactNode;\n switch (card.suit) {\n case Suit.Clubs:\n suit = ;\n break;\n case Suit.Diamonds:\n suit = ;\n break;\n case Suit.Hearts:\n suit = ;\n break;\n case Suit.Spades:\n suit = ;\n break;\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n return (\n \n <>\n {hidden ? \" - \" : card.formatValue()}\n {hidden ? \" - \" : suit}\n \n \n );\n};\n","import { Milestone } from \"./Milestone\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Server } from \"../Server/Server\";\n\nfunction allFactionAugs(p: IPlayer, f: Faction): boolean {\n const factionAugs = f.augmentations.slice().filter((aug) => aug !== \"NeuroFlux Governor\");\n for (const factionAug of factionAugs) {\n if (\n !p.augmentations.some((aug) => {\n return aug.name == factionAug;\n })\n )\n return false;\n }\n return true;\n}\n\nexport const Milestones: Milestone[] = [\n {\n title: \"Gain root access on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return server instanceof Server && server.hasAdminRights;\n },\n },\n {\n title: \"Install the backdoor on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return server instanceof Server && server.backdoorInstalled;\n },\n },\n {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.CyberSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.CyberSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.CyberSec]);\n },\n },\n {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.NiteSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.NiteSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.NiteSec]);\n },\n },\n {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.TheBlackHand);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.TheBlackHand}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.TheBlackHand]);\n },\n },\n {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.BitRunners);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.BitRunners}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.BitRunners]);\n },\n },\n {\n title: \"Complete fl1ght.exe\",\n fulfilled: (p: IPlayer): boolean => {\n // technically wrong but whatever\n return p.factions.includes(FactionNames.Daedalus);\n },\n },\n {\n title: `Install the special Augmentation from ${FactionNames.Daedalus}`,\n fulfilled: (p: IPlayer): boolean => {\n return p.augmentations.some((aug) => aug.name == \"The Red Pill\");\n },\n },\n {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: (): boolean => {\n return false;\n },\n },\n];\n","import { StockSymbols } from \"./StockSymbols\";\n\nexport const TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0,\n};\n\nfor (const key of Object.keys(StockSymbols)) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(StockSymbols[key].length, TickerHeaderFormatData.longestSymbol);\n}\n","import React from \"react\";\n\nimport { Box, Typography } from \"@mui/material\";\n\nimport { Achievement } from \"./Achievements\";\nimport { Settings } from \"../Settings/Settings\";\nimport { AchievementIcon } from \"./AchievementIcon\";\n\ninterface IProps {\n achievement: Achievement;\n unlockedOn?: number;\n cssFiltersUnlocked: string;\n cssFiltersLocked: string;\n}\n\nexport function AchievementEntry({\n achievement,\n unlockedOn,\n cssFiltersUnlocked,\n cssFiltersLocked,\n}: IProps): JSX.Element {\n if (!achievement) return <>;\n const isUnlocked = !!unlockedOn;\n\n const mainColor = isUnlocked ? Settings.theme.primary : Settings.theme.secondarylight;\n\n let achievedOn = \"\";\n if (unlockedOn) {\n achievedOn = new Date(unlockedOn).toLocaleString();\n }\n\n return (\n \n \n \n \n \n {achievement.Name}\n \n \n {achievement.Description}\n \n {isUnlocked && (\n \n Acquired on {achievedOn}\n \n )}\n \n \n \n );\n}\n","// @ts-nocheck\n/* tslint:disable */\n/* eslint-disable */\n\n/*\n Taken from:\n https://codepen.io/sosuke/pen/Pjoqqp\n --------------------------------------------------------\n This utility transform an hex color into css filter rules.\n Useful to change color of a black image to match a given color\n*/\n\nclass Color {\n constructor(r, g, b) {\n this.set(r, g, b);\n }\n\n toString() {\n return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`;\n }\n\n set(r, g, b) {\n this.r = this.clamp(r);\n this.g = this.clamp(g);\n this.b = this.clamp(b);\n }\n\n hueRotate(angle = 0) {\n angle = (angle / 180) * Math.PI;\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n\n this.multiply([\n 0.213 + cos * 0.787 - sin * 0.213,\n 0.715 - cos * 0.715 - sin * 0.715,\n 0.072 - cos * 0.072 + sin * 0.928,\n 0.213 - cos * 0.213 + sin * 0.143,\n 0.715 + cos * 0.285 + sin * 0.14,\n 0.072 - cos * 0.072 - sin * 0.283,\n 0.213 - cos * 0.213 - sin * 0.787,\n 0.715 - cos * 0.715 + sin * 0.715,\n 0.072 + cos * 0.928 + sin * 0.072,\n ]);\n }\n\n grayscale(value = 1) {\n this.multiply([\n 0.2126 + 0.7874 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 + 0.2848 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 + 0.9278 * (1 - value),\n ]);\n }\n\n sepia(value = 1) {\n this.multiply([\n 0.393 + 0.607 * (1 - value),\n 0.769 - 0.769 * (1 - value),\n 0.189 - 0.189 * (1 - value),\n 0.349 - 0.349 * (1 - value),\n 0.686 + 0.314 * (1 - value),\n 0.168 - 0.168 * (1 - value),\n 0.272 - 0.272 * (1 - value),\n 0.534 - 0.534 * (1 - value),\n 0.131 + 0.869 * (1 - value),\n ]);\n }\n\n saturate(value = 1) {\n this.multiply([\n 0.213 + 0.787 * value,\n 0.715 - 0.715 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 + 0.285 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 - 0.715 * value,\n 0.072 + 0.928 * value,\n ]);\n }\n\n multiply(matrix) {\n const newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);\n const newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);\n const newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);\n this.r = newR;\n this.g = newG;\n this.b = newB;\n }\n\n brightness(value = 1) {\n this.linear(value);\n }\n contrast(value = 1) {\n this.linear(value, -(0.5 * value) + 0.5);\n }\n\n linear(slope = 1, intercept = 0) {\n this.r = this.clamp(this.r * slope + intercept * 255);\n this.g = this.clamp(this.g * slope + intercept * 255);\n this.b = this.clamp(this.b * slope + intercept * 255);\n }\n\n invert(value = 1) {\n this.r = this.clamp((value + (this.r / 255) * (1 - 2 * value)) * 255);\n this.g = this.clamp((value + (this.g / 255) * (1 - 2 * value)) * 255);\n this.b = this.clamp((value + (this.b / 255) * (1 - 2 * value)) * 255);\n }\n\n hsl() {\n // Code taken from https://stackoverflow.com/a/9493060/2688027, licensed under CC BY-SA.\n const r = this.r / 255;\n const g = this.g / 255;\n const b = this.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h,\n s,\n l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: h * 100,\n s: s * 100,\n l: l * 100,\n };\n }\n\n clamp(value) {\n if (value > 255) {\n value = 255;\n } else if (value < 0) {\n value = 0;\n }\n return value;\n }\n}\n\nexport class Solver {\n constructor(target) {\n this.target = target;\n this.targetHSL = target.hsl();\n this.reusedColor = new Color(0, 0, 0);\n }\n\n solve() {\n const result = this.solveNarrow(this.solveWide());\n return {\n values: result.values,\n loss: result.loss,\n filter: this.css(result.values),\n };\n }\n\n solveWide() {\n const A = 5;\n const c = 15;\n const a = [60, 180, 18000, 600, 1.2, 1.2];\n\n let best = { loss: Infinity };\n for (let i = 0; best.loss > 25 && i < 3; i++) {\n const initial = [50, 20, 3750, 50, 100, 100];\n const result = this.spsa(A, a, c, initial, 1000);\n if (result.loss < best.loss) {\n best = result;\n }\n }\n return best;\n }\n\n solveNarrow(wide) {\n const A = wide.loss;\n const c = 2;\n const A1 = A + 1;\n const a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];\n return this.spsa(A, a, c, wide.values, 500);\n }\n\n spsa(A, a, c, values, iters) {\n const alpha = 1;\n const gamma = 0.16666666666666666;\n\n let best = null;\n let bestLoss = Infinity;\n const deltas = new Array(6);\n const highArgs = new Array(6);\n const lowArgs = new Array(6);\n\n for (let k = 0; k < iters; k++) {\n const ck = c / Math.pow(k + 1, gamma);\n for (let i = 0; i < 6; i++) {\n deltas[i] = Math.random() > 0.5 ? 1 : -1;\n highArgs[i] = values[i] + ck * deltas[i];\n lowArgs[i] = values[i] - ck * deltas[i];\n }\n\n const lossDiff = this.loss(highArgs) - this.loss(lowArgs);\n for (let i = 0; i < 6; i++) {\n const g = (lossDiff / (2 * ck)) * deltas[i];\n const ak = a[i] / Math.pow(A + k + 1, alpha);\n values[i] = fix(values[i] - ak * g, i);\n }\n\n const loss = this.loss(values);\n if (loss < bestLoss) {\n best = values.slice(0);\n bestLoss = loss;\n }\n }\n return { values: best, loss: bestLoss };\n\n function fix(value, idx) {\n let max = 100;\n if (idx === 2 /* saturate */) {\n max = 7500;\n } else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {\n max = 200;\n }\n\n if (idx === 3 /* hue-rotate */) {\n if (value > max) {\n value %= max;\n } else if (value < 0) {\n value = max + (value % max);\n }\n } else if (value < 0) {\n value = 0;\n } else if (value > max) {\n value = max;\n }\n return value;\n }\n }\n\n loss(filters) {\n // Argument is array of percentages.\n const color = this.reusedColor;\n color.set(0, 0, 0);\n\n color.invert(filters[0] / 100);\n color.sepia(filters[1] / 100);\n color.saturate(filters[2] / 100);\n color.hueRotate(filters[3] * 3.6);\n color.brightness(filters[4] / 100);\n color.contrast(filters[5] / 100);\n\n const colorHSL = color.hsl();\n return (\n Math.abs(color.r - this.target.r) +\n Math.abs(color.g - this.target.g) +\n Math.abs(color.b - this.target.b) +\n Math.abs(colorHSL.h - this.targetHSL.h) +\n Math.abs(colorHSL.s - this.targetHSL.s) +\n Math.abs(colorHSL.l - this.targetHSL.l)\n );\n }\n\n css(filters) {\n function fmt(idx, multiplier = 1) {\n return Math.round(filters[idx] * multiplier);\n }\n return `invert(${fmt(0)}%) sepia(${fmt(1)}%) saturate(${fmt(2)}%) hue-rotate(${fmt(3, 3.6)}deg) brightness(${fmt(\n 4,\n )}%) contrast(${fmt(5)}%)`;\n }\n}\n\nfunction hexToRgb(hex): number[] {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, (m, r, g, b) => {\n return r + r + g + g + b + b;\n });\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : null;\n}\n\nexport function getFiltersFromHex(hex): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return \"\";\n\n const [r, g, b] = rgb;\n const color = new Color(r, g, b);\n const solver = new Solver(color);\n return solver.solve().filter;\n}\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default\",\n description: \"Default game theme, most supported\",\n credit: \"hydroflame\",\n screenshot: img1,\n colors: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default-lite\",\n description: \"Less eye-straining default theme\",\n credit: \"NmuGmu\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888\",\n screenshot: img1,\n colors: {\n primarylight: \"#28CF28\",\n primary: \"#21A821\",\n primarydark: \"#177317\",\n successlight: \"#1CFF1C\",\n success: \"#16CA16\",\n successdark: \"#0D910D\",\n errorlight: \"#FF3B3B\",\n error: \"#C32D2D\",\n errordark: \"#8E2121\",\n secondarylight: \"#B3B3B3\",\n secondary: \"#838383\",\n secondarydark: \"#676767\",\n warninglight: \"#FFFF3A\",\n warning: \"#C3C32A\",\n warningdark: \"#8C8C1E\",\n infolight: \"#64CBFF\",\n info: \"#3399CC\",\n infodark: \"#246D91\",\n welllight: \"#404040\",\n well: \"#1C1C1C\",\n white: \"#C3C3C3\",\n black: \"#0A0B0B\",\n hp: \"#C62E2E\",\n money: \"#D6BB27\",\n hack: \"#ADFF2F\",\n combat: \"#E8EDCD\",\n cha: \"#8B5FAF\",\n int: \"#537CC8\",\n rep: \"#E8EDCD\",\n disabled: \"#5AB5A5\",\n backgroundprimary: \"#0C0D0E\",\n backgroundsecondary: \"#121415\",\n button: \"#252829\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Monokai'ish\",\n description: \"Monokai'ish\",\n credit: \"eltea\",\n screenshot: img1,\n colors: {\n primarylight: \"#FFF\",\n primary: \"#F8F8F2\",\n primarydark: \"#FAFAEB\",\n successlight: \"#ADE146\",\n success: \"#A6E22E\",\n successdark: \"#98E104\",\n errorlight: \"#FF69A0\",\n error: \"#F92672\",\n errordark: \"#D10F56\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E1D992\",\n warning: \"#E6DB74\",\n warningdark: \"#EDDD54\",\n infolight: \"#92E1F1\",\n info: \"#66D9EF\",\n infodark: \"#31CDED\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#F92672\",\n money: \"#E6DB74\",\n hack: \"#A6E22E\",\n combat: \"#75715E\",\n cha: \"#AE81FF\",\n int: \"#66D9EF\",\n rep: \"#E69F66\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#272822\",\n backgroundsecondary: \"#1B1C18\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Warmer\",\n credit: \"hexnaught\",\n description: \"Warmer, softer theme\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938\",\n screenshot: img1,\n colors: {\n primarylight: \"#EA9062\",\n primary: \"#DD7B4A\",\n primarydark: \"#D3591C\",\n successlight: \"#6ACF6A\",\n success: \"#43BF43\",\n successdark: \"#3E913E\",\n errorlight: \"#C15757\",\n error: \"#B34141\",\n errordark: \"#752525\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E6E69D\",\n warning: \"#DADA56\",\n warningdark: \"#A1A106\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#AD84CF\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#76C6B7\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark+\",\n credit: \"LoganMD\",\n description: \"VSCode Dark+\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#CCCCAE\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#00D200\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#C80000\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#969090\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#C8C800\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Mayukai Dark\",\n description: \"Mayukai Dark-esque\",\n credit: \"Festive Noire\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994\",\n screenshot: img1,\n colors: {\n primarylight: \"#DDDFC5\",\n primary: \"#CDCFB6\",\n primarydark: \"#9D9F8C\",\n successlight: \"#00EF00\",\n success: \"#00A500\",\n successdark: \"#007A00\",\n errorlight: \"#F92672\",\n error: \"#CA1C5C\",\n errordark: \"#90274A\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#D3D300\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#00010A\",\n white: \"#fff\",\n black: \"#020509\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#8CCF27\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#080C11\",\n backgroundsecondary: \"#03080F\",\n button: \"#00010A\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Purple\",\n credit: \"zer0ney\",\n description: \"Essentially all defaults except for purple replacing the main colors\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395\",\n screenshot: img1,\n colors: {\n primarylight: \"#BA55D3\",\n primary: \"#9370DB\",\n primarydark: \"#8A2BE2\",\n successlight: \"#BA55D3\",\n success: \"#9370DB\",\n successdark: \"#8A2BE2\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Smooth Green\",\n description: \"A nice green theme that doesn't hurt your eyes.\",\n credit: \"Swidt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#B0D9A3\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#6BC16B\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#3D713D\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#8FAF85\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#38F100\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#2F3C2B\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#4AA52E\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#35A135\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#2F3C2B\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dracula\",\n description: \"Dracula Look-alike\",\n credit: \"H3draut3r\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144\",\n screenshot: img1,\n colors: {\n primarylight: \"#7082B8\",\n primary: \"#F8F8F2\",\n primarydark: \"#FF79C6\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#FD4545\",\n error: \"#FF2D2D\",\n errordark: \"#C62424\",\n secondarylight: \"#AAA\",\n secondary: \"#8BE9FD\",\n secondarydark: \"#666\",\n warninglight: \"#FFC281\",\n warning: \"#FFB86C\",\n warningdark: \"#E6A055\",\n infolight: \"#A0A0FF\",\n info: \"#7070FF\",\n infodark: \"#4040FF\",\n welllight: \"#44475A\",\n well: \"#363948\",\n white: \"#fff\",\n black: \"#282A36\",\n hp: \"#D34448\",\n money: \"#50FA7B\",\n hack: \"#F1FA8C\",\n combat: \"#BD93F9\",\n cha: \"#FF79C6\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#282A36\",\n backgroundsecondary: \"#21222C\",\n button: \"#21222C\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark Blue\",\n description: \"Very dark with a blue/purplelly primary\",\n credit: \"Saynt_Garmo\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340\",\n screenshot: img1,\n colors: {\n primarylight: \"#023DDE\",\n primary: \"#4A41C8\",\n primarydark: \"#005299\",\n successlight: \"#00FF00\",\n success: \"#D1DAD1\",\n successdark: \"#BFCABF\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#040505\",\n white: \"#fff\",\n black: \"#000000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#091419\",\n backgroundsecondary: \"#000000\",\n button: \"#000000\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Discord-like\",\n description: \"Discord inspired theme\",\n credit: \"Thermite\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818\",\n screenshot: img1,\n colors: {\n primarylight: \"#7389DC\",\n primary: \"#7389DC\",\n primarydark: \"#5964F1\",\n successlight: \"#00CC00\",\n success: \"#20DF20\",\n successdark: \"#0CB80C\",\n errorlight: \"#EA5558\",\n error: \"#EC4145\",\n errordark: \"#E82528\",\n secondarylight: \"#C3C3C3\",\n secondary: \"#9C9C9C\",\n secondarydark: \"#4E4E4E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#1C4FB3\",\n welllight: \"#999999\",\n well: \"#35383C\",\n white: \"#FFFFFF\",\n black: \"#202225\",\n hp: \"#FF5656\",\n money: \"#43FF43\",\n hack: \"#FFAB3D\",\n combat: \"#8A90FD\",\n cha: \"#FF51D9\",\n int: \"#6495ed\",\n rep: \"#FFFF30\",\n disabled: \"#474B51\",\n backgroundprimary: \"#2F3136\",\n backgroundsecondary: \"#35393E\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"One Dark\",\n description: \"Dark with a greenish tint\",\n credit: \"Dexalt142\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512\",\n screenshot: img1,\n colors: {\n primarylight: \"#98C379\",\n primary: \"#98C379\",\n primarydark: \"#98C379\",\n successlight: \"#98C379\",\n success: \"#98C379\",\n successdark: \"#98C379\",\n errorlight: \"#E06C75\",\n error: \"#BE5046\",\n errordark: \"#BE5046\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E5C07B\",\n warning: \"#E5C07B\",\n warningdark: \"#D19A66\",\n infolight: \"#61AFEF\",\n info: \"#61AFEF\",\n infodark: \"#61AFEF\",\n welllight: \"#4B5263\",\n well: \"#282C34\",\n white: \"#ABB2BF\",\n black: \"#282C34\",\n hp: \"#E06C75\",\n money: \"#E5C07B\",\n hack: \"#98C379\",\n combat: \"#ABB2BF\",\n cha: \"#C678DD\",\n int: \"#61AFEF\",\n rep: \"#ABB2BF\",\n disabled: \"#56B6C2\",\n backgroundprimary: \"#282C34\",\n backgroundsecondary: \"#21252B\",\n button: \"#4B5263\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Muted Gold & Blue\",\n description: \"Muted gold with blue accents.\",\n credit: \"Sloth\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563\",\n screenshot: img1,\n colors: {\n primarylight: \"#E3B54A\",\n primary: \"#CAA243\",\n primarydark: \"#7E6937\",\n successlight: \"#82FF82\",\n success: \"#6FDA6F\",\n successdark: \"#64C364\",\n errorlight: \"#FD5555\",\n error: \"#D84A4A\",\n errordark: \"#AC3939\",\n secondarylight: \"#D8D0B8\",\n secondary: \"#B1AA95\",\n secondarydark: \"#736E5E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#111111\",\n white: \"#fff\",\n black: \"#070300\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#0A0A0E\",\n backgroundsecondary: \"#0E0E10\",\n button: \"#222222\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Light\",\n description: \"Cobbled Together Light Theme\",\n credit: \"matt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432\",\n screenshot: img1,\n colors: {\n primarylight: \"#535353\",\n primary: \"#1A1A1A\",\n primarydark: \"#0d0d0d\",\n successlight: \"#63c439\",\n success: \"#428226\",\n successdark: \"#2E5A1B\",\n errorlight: \"#df7051\",\n error: \"#C94824\",\n errordark: \"#91341B\",\n secondarylight: \"#b3b3b3\",\n secondary: \"#9B9B9B\",\n secondarydark: \"#7A7979\",\n warninglight: \"#e8d464\",\n warning: \"#C6AD20\",\n warningdark: \"#9F8A16\",\n infolight: \"#6299cf\",\n info: \"#3778B7\",\n infodark: \"#30689C\",\n welllight: \"#f9f9f9\",\n well: \"#eaeaea\",\n white: \"#F7F7F7\",\n black: \"#F7F7F7\",\n hp: \"#BF5C41\",\n money: \"#E1B121\",\n hack: \"#47BC38\",\n combat: \"#656262\",\n cha: \"#A568AC\",\n int: \"#889BCF\",\n rep: \"#656262\",\n disabled: \"#70B4BF\",\n backgroundprimary: \"#F7F7F7\",\n backgroundsecondary: \"#f9f9f9\",\n button: \"#eaeaea\",\n },\n};\n","export default \"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png\";","export default \"dist/images/6caf35202b10b52e1fc2743f674c33e8.png\";","export default \"dist/images/cb88977ea837bccb9cceb727adc78302.png\";","export default \"dist/images/4e0e750f2f09de58219773edd46cbbf5.png\";","export default \"dist/images/e97de4daa946331c7e99dee9c05d629c.png\";","export default \"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png\";","export default \"dist/images/85a7b2896acb62be76f3ea7100fe9012.png\";","export default \"dist/images/5aa87b7de67a77c914088783b055e1cf.png\";","export default \"dist/images/c7164b072d62c91c27c6d607b5207e7b.png\";","export default \"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png\";","export default \"dist/images/a1110d6c8d16a14c4570411750248399.png\";","export default \"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png\";","export default \"dist/images/297df8c0e47764ea113951318b2acf55.png\";","export default \"dist/images/e66b0c327f97d08e4253f52234d659eb.png\";","import { ITerminal, Output, Link, RawOutput, TTimer } from \"./ITerminal\";\nimport { IRouter } from \"../ui/Router\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { Programs } from \"../Programs/Programs\";\nimport { CodingContractResult } from \"../CodingContracts\";\nimport { TerminalEvents, TerminalClearEvents } from \"./TerminalEvents\";\n\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\n\nimport { removeLeadingSlash, isInRootDirectory, evaluateFilePath } from \"./DirectoryHelpers\";\nimport { checkIfConnectedToDarkweb } from \"../DarkWeb/DarkWeb\";\nimport { iTutorialNextStep, iTutorialSteps, ITutorial } from \"../InteractiveTutorial\";\nimport { getServerOnNetwork, processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\n\nimport { alias } from \"./commands/alias\";\nimport { analyze } from \"./commands/analyze\";\nimport { backdoor } from \"./commands/backdoor\";\nimport { buy } from \"./commands/buy\";\nimport { cat } from \"./commands/cat\";\nimport { cd } from \"./commands/cd\";\nimport { check } from \"./commands/check\";\nimport { connect } from \"./commands/connect\";\nimport { cp } from \"./commands/cp\";\nimport { download } from \"./commands/download\";\nimport { expr } from \"./commands/expr\";\nimport { free } from \"./commands/free\";\nimport { grow } from \"./commands/grow\";\nimport { hack } from \"./commands/hack\";\nimport { help } from \"./commands/help\";\nimport { history } from \"./commands/history\";\nimport { home } from \"./commands/home\";\nimport { hostname } from \"./commands/hostname\";\nimport { kill } from \"./commands/kill\";\nimport { killall } from \"./commands/killall\";\nimport { ls } from \"./commands/ls\";\nimport { lscpu } from \"./commands/lscpu\";\nimport { mem } from \"./commands/mem\";\nimport { mv } from \"./commands/mv\";\nimport { nano } from \"./commands/nano\";\nimport { ps } from \"./commands/ps\";\nimport { rm } from \"./commands/rm\";\nimport { run } from \"./commands/run\";\nimport { scan } from \"./commands/scan\";\nimport { scananalyze } from \"./commands/scananalyze\";\nimport { scp } from \"./commands/scp\";\nimport { sudov } from \"./commands/sudov\";\nimport { tail } from \"./commands/tail\";\nimport { top } from \"./commands/top\";\nimport { unalias } from \"./commands/unalias\";\nimport { vim } from \"./commands/vim\";\nimport { weaken } from \"./commands/weaken\";\nimport { wget } from \"./commands/wget\";\nimport { hash } from \"../hash/hash\";\nimport { apr1 } from \"./commands/apr1\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nexport class Terminal implements ITerminal {\n // Flags to determine whether the player is currently running a hack or an analyze\n action: TTimer | null = null;\n\n commandHistory: string[] = [];\n commandHistoryIndex = 0;\n\n outputHistory: (Output | Link | RawOutput)[] = [\n new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\"),\n ];\n\n // True if a Coding Contract prompt is opened\n contractOpen = false;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir = \"/\";\n\n process(router: IRouter, player: IPlayer, cycles: number): void {\n if (this.action === null) return;\n this.action.timeLeft -= (CONSTANTS._idleSpeed * cycles) / 1000;\n if (this.action.timeLeft < 0.01) this.finishAction(router, player, false);\n TerminalEvents.emit();\n }\n\n append(item: Output | Link | RawOutput): void {\n this.outputHistory.push(item);\n if (this.outputHistory.length > Settings.MaxTerminalCapacity) {\n this.outputHistory.splice(0, this.outputHistory.length - Settings.MaxTerminalCapacity);\n }\n TerminalEvents.emit();\n }\n\n print(s: string): void {\n this.append(new Output(s, \"primary\"));\n }\n\n printRaw(node: React.ReactNode): void {\n this.append(new RawOutput(node));\n }\n\n error(s: string): void {\n this.append(new Output(s, \"error\"));\n }\n\n success(s: string): void {\n this.append(new Output(s, \"success\"));\n }\n\n info(s: string): void {\n this.append(new Output(s, \"info\"));\n }\n\n warn(s: string): void {\n this.append(new Output(s, \"warn\"));\n }\n\n startHack(player: IPlayer): void {\n // Hacking through Terminal should be faster than hacking through a script\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"h\", server);\n }\n\n startGrow(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateGrowTime(server, player) / 16, \"g\", server);\n }\n startWeaken(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateWeakenTime(server, player) / 16, \"w\", server);\n }\n\n startBackdoor(player: IPlayer): void {\n // Backdoor should take the same amount of time as hack\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot backdoor this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"b\", server);\n }\n\n startAnalyze(player: IPlayer): void {\n this.print(\"Analyzing system...\");\n const server = player.getCurrentServer();\n this.startAction(1, \"a\", server);\n }\n\n startAction(n: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer): void {\n this.action = new TTimer(n, action, server);\n }\n\n // Complete the hack/analyze command\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n\n // Calculate whether hack was successful\n const hackChance = calculateHackingChance(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = calculateHackingExpGain(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n router.toBitVerse(false, false);\n return;\n }\n let moneyGained = calculatePercentMoneyHacked(server, player) * BitNodeMultipliers.ManualHackMoney;\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);\n\n const oldSec = server.hackDifficulty;\n server.fortify(CONSTANTS.ServerFortifyAmount);\n const newSec = server.hackDifficulty;\n\n this.print(\n `Hack successful on '${server.hostname}'! Gained ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} hacking exp`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n } else {\n // Failure\n player.gainHackingExp(expGainedOnFailure);\n this.print(\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(expGainedOnFailure)} hacking exp`,\n );\n }\n }\n\n finishGrow(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n growth,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n }\n\n finishWeaken(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n server.weaken(CONSTANTS.ServerWeakenAmount);\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Security decreased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)} (min: ${numeralWrapper.formatSecurity(server.minDifficulty)})` +\n ` and Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n }\n\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (!cancelled) {\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n router.toBitVerse(false, false);\n return;\n }\n this.print(`Backdoor on '${server.hostname}' successful!`);\n }\n }\n\n finishAnalyze(player: IPlayer, currServ: BaseServer, cancelled = false): void {\n if (!cancelled) {\n const isHacknet = currServ instanceof HacknetServer;\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = (!isHacknet && currServ.hasAdminRights) || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const canRunScripts = hasAdminRights && currServ.maxRam > 0;\n this.print(\"Can run scripts on this host: \" + (canRunScripts ? \"YES\" : \"NO\"));\n this.print(\"RAM: \" + numeralWrapper.formatRAM(currServ.maxRam));\n if (currServ instanceof Server) {\n this.print(\"Backdoor: \" + (currServ.backdoorInstalled ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill for hack() and backdoor: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? numeralWrapper.formatServerSecurity(security) : \"N/A\"));\n const hackingChance = calculateHackingChance(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? numeralWrapper.formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = calculateHackingTime(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? convertTimeMsToTimeElapsedString(hackingTime, true) : \"N/A\"));\n }\n this.print(\n `Total money available on server: ${\n currServ instanceof Server ? numeralWrapper.formatMoney(currServ.moneyAvailable) : \"N/A\"\n }`,\n );\n if (currServ instanceof Server) {\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n }\n\n finishAction(router: IRouter, player: IPlayer, cancelled = false): void {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n if (!this.action.server) throw new Error(\"Missing action target server\");\n\n this.print(this.getProgressText());\n if (this.action.action === \"h\") {\n this.finishHack(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"g\") {\n this.finishGrow(player, this.action.server, cancelled);\n } else if (this.action.action === \"w\") {\n this.finishWeaken(player, this.action.server, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, this.action.server, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n this.action = null;\n TerminalEvents.emit();\n }\n\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null {\n if (isScriptFilename(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename: string): string {\n const path = evaluateFilePath(filename, this.cwd());\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (isInRootDirectory(path)) {\n return removeLeadingSlash(path);\n }\n\n return path;\n }\n\n getScript(player: IPlayer, filename: string): Script | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player: IPlayer, filename: string): TextFile | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player: IPlayer, filename: string): string | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd(): string {\n return this.currDir;\n }\n\n setcwd(dir: string): void {\n this.currDir = dir;\n TerminalEvents.emit();\n }\n\n async runContract(player: IPlayer, contractName: string): Promise {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n //Check if the contract still exists by the time the promise is fullfilled\n if (serv.getContract(contractName) == null) {\n this.contractOpen = false;\n return this.error(\"Contract no longer exists (Was it solved by a script?)\");\n }\n\n switch (res) {\n case CodingContractResult.Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n serv.removeContract(contract);\n break;\n case CodingContractResult.Failure:\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n this.error(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.error(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n break;\n case CodingContractResult.Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player: IPlayer, depth = 1, all = false): void {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \");\n\n // Map of all servers to keep track of which have been visited\n const visited: {\n [key: string]: number | undefined;\n } = {};\n for (const server of GetAllServers()) {\n visited[server.hostname] = 0;\n }\n\n const stack: BaseServer[] = [];\n const depthQueue: number[] = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof HacknetServer;\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.hostname] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.hostname] = 1;\n }\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = getServerOnNetwork(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n if (d == 0) {\n continue;\n } // Don't print current server\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n if (player.hasProgram(Programs.AutoLink.name)) {\n this.append(new Link(titleDashes, s.hostname));\n } else {\n this.print(titleDashes + s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n if (s instanceof Server) {\n this.print(\n `${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`,\n );\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n }\n this.print(dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam));\n this.print(\" \");\n }\n }\n\n connectToServer(player: IPlayer, server: string): void {\n const serv = GetServer(server);\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.hostname;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n if (player.getCurrentServer().hostname == \"darkweb\") {\n checkIfConnectedToDarkweb(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router: IRouter, player: IPlayer, commands: string): void {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n\n // Handle Terminal History - multiple commands should be saved as one\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n player.terminalCommandHistory = this.commandHistory;\n }\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = ParseCommands(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear(): void {\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\")];\n TerminalEvents.emit();\n TerminalClearEvents.emit();\n }\n\n prestige(): void {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router: IRouter, player: IPlayer, command: string): void {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n }\n // Allow usage of ./\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n }\n // Only split the first space\n const commandArray = ParseCommand(command);\n if (commandArray.length == 0) {\n return;\n }\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n if (ITutorial.isRunning) {\n const n00dlesServ = GetServer(\"n00dles\");\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n }\n switch (ITutorial.currStep) {\n case iTutorialSteps.TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalConnect:\n if (commandArray.length == 2) {\n if (\n commandArray[0] == \"connect\" &&\n (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.hostname)\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalHackingMechanics:\n if (commandArray.length !== 1 || ![\"grow\", \"weaken\", \"hack\"].includes(commandArray[0] + \"\")) {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalGoHome:\n if (commandArray.length == 1 && commandArray[0] == \"home\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalCreateScript:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"nano\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalRunScript:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"run\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.ActiveScriptsToTerminal:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"tail\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.error(\"Please follow the tutorial, or click 'EXIT' if you'd like to skip it\");\n return;\n }\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n /* Command parser */\n const commandName = commandArray[0];\n if (typeof commandName === \"number\" || typeof commandName === \"boolean\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands: {\n [key: string]: (\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n ) => void;\n } = {\n \"scan-analyze\": scananalyze,\n alias: alias,\n analyze: analyze,\n backdoor: backdoor,\n buy: buy,\n cat: cat,\n cd: cd,\n check: check,\n clear: () => this.clear(),\n cls: () => this.clear(),\n connect: connect,\n cp: cp,\n download: download,\n expr: expr,\n free: free,\n grow: grow,\n hack: hack,\n help: help,\n history: history,\n home: home,\n hostname: hostname,\n kill: kill,\n killall: killall,\n ls: ls,\n lscpu: lscpu,\n mem: mem,\n mv: mv,\n nano: nano,\n ps: ps,\n rm: rm,\n run: run,\n scan: scan,\n scp: scp,\n sudov: sudov,\n tail: tail,\n apr1: apr1,\n top: top,\n unalias: unalias,\n vim: vim,\n weaken: weaken,\n wget: wget,\n };\n\n const f = commands[commandName.toLowerCase()];\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText(): string {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return createProgressBarText({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50,\n });\n }\n}\n","import { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { MinHeap } from \"../utils/Heap\";\n\nimport { comprGenChar, comprLZGenerate, comprLZEncode, comprLZDecode } from \"../utils/CompressionContracts\";\nimport { HammingEncode, HammingDecode } from \"../utils/HammingCodeTools\";\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\nexport type GeneratorFunc = () => unknown;\n\n/* Function that checks if the provided solution is the correct one */\nexport type SolverFunc = (data: unknown, answer: string) => boolean;\n\n/* Function that returns a string with the problem's description.\n Requires the 'data' of a Contract as input */\nexport type DescriptionFunc = (data: unknown) => string;\n\ninterface ICodingContractTypeMetadata {\n desc: DescriptionFunc;\n difficulty: number;\n gen: GeneratorFunc;\n name: string;\n numTries: number;\n solver: SolverFunc;\n}\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr: unknown[][]): string {\n const components: string[] = [];\n arr.forEach((e: unknown) => {\n let s = String(e);\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nexport const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [\n {\n desc: (n: unknown): string => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\n \" \",\n );\n },\n difficulty: 1,\n gen: (): number => {\n return getRandomInt(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"number\") throw new Error(\"solver expected number\");\n let fac = 2;\n let n: number = data;\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n },\n },\n {\n desc: (_n: unknown): string => {\n const n = _n as number[];\n return [\n \"Given the following integer array, find the contiguous subarray\",\n \"(containing at least one number) which has the largest sum and return that sum.\",\n \"'Sum' refers to the sum of all the numbers in the subarray.\\n\",\n `${n.toString()}`,\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(5, 40);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n const nums: number[] = data.slice();\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n },\n },\n {\n desc: (n: unknown): string => {\n if (typeof n !== \"number\") throw new Error(\"solver expected number\");\n return [\n \"It is possible write four as a sum in exactly four different ways:\\n\\n\",\n \"    3 + 1\\n\",\n \"    2 + 2\\n\",\n \"    2 + 1 + 1\\n\",\n \"    1 + 1 + 1 + 1\\n\\n\",\n `How many different distinct ways can the number ${n} be written as a sum of at least`,\n \"two positive integers?\",\n ].join(\" \");\n },\n difficulty: 1.5,\n gen: (): number => {\n return getRandomInt(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"number\") throw new Error(\"solver expected number\");\n const ways: number[] = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n for (let i = 1; i < data; ++i) {\n for (let j: number = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as [number, number[]];\n const n: number = data[0];\n const s: number[] = data[1];\n return [\n `How many different distinct ways can the number ${n} be written`,\n \"as a sum of integers contained in the set:\\n\\n\",\n `[${s}]?\\n\\n`,\n \"You may use each integer in the set zero or more times.\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): [number, number[]] => {\n const n: number = getRandomInt(12, 200);\n const maxLen: number = getRandomInt(8, 12);\n const s: number[] = [];\n // Bias towards small numbers is intentional to have much bigger answers in general\n // to force people better optimize their solutions\n for (let i = 1; i <= n; i++) {\n if (s.length == maxLen) {\n break;\n }\n if (Math.random() < 0.6 || n - i < maxLen - s.length) {\n s.push(i);\n }\n }\n return [n, s];\n },\n name: \"Total Ways to Sum II\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as [number, number[]];\n // https://www.geeksforgeeks.org/coin-change-dp-7/?ref=lbp\n const n = data[0];\n const s = data[1];\n const ways: number[] = [1];\n ways.length = n + 1;\n ways.fill(0, 1);\n for (let i = 0; i < s.length; i++) {\n for (let j = s[i]; j <= n; j++) {\n ways[j] += ways[j - s[i]];\n }\n }\n return ways[n] === parseInt(ans, 10);\n },\n },\n {\n desc: (_n: unknown): string => {\n const n = _n as number[][];\n let d: string = [\n \"Given the following array of arrays of numbers representing a 2D matrix,\",\n \"return the elements of the matrix as an array in spiral order:\\n\\n\",\n ].join(\" \");\n // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n d += \"    [\\n\";\n d += n\n .map(\n (line: number[]) =>\n \"        [\" +\n line.map((x: number) => `${x}`.padStart(2, \" \")).join(\",\") +\n \"]\",\n )\n .join(\"\\n\");\n d += \"\\n    ]\\n\";\n d += [\n \"\\nHere is an example of what spiral order should be:\\n\\n\",\n \"    [\\n\",\n \"        [1, 2, 3]\\n\",\n \"        [4, 5, 6]\\n\",\n \"        [7, 8, 9]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\",\n \"Note that the matrix will not always be square:\\n\\n\",\n \"    [\\n\",\n \"        [1,  2,  3,  4]\\n\",\n \"        [5,  6,  7,  8]\\n\",\n \"        [9, 10, 11, 12]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\",\n ].join(\" \");\n\n return d;\n },\n difficulty: 2,\n gen: (): number[][] => {\n const m: number = getRandomInt(1, 15);\n const n: number = getRandomInt(1, 15);\n const matrix: number[][] = [];\n matrix.length = m;\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = getRandomInt(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[][];\n const spiral: number[] = [];\n const m: number = data.length;\n const n: number = data[0].length;\n let u = 0;\n let d: number = m - 1;\n let l = 0;\n let r: number = n - 1;\n let k = 0;\n while (true) {\n // Up\n for (let col: number = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n if (++u > d) {\n break;\n }\n\n // Right\n for (let row: number = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n if (--r < l) {\n break;\n }\n\n // Down\n for (let col: number = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n if (--d < u) {\n break;\n }\n\n // Left\n for (let row: number = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns = sanitizedPlayerAns.split(\",\").map((s) => parseInt(s));\n if (spiral.length !== playerAns.length) {\n return false;\n }\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (_arr: unknown): string => {\n const arr = _arr as number[];\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine whether you are\",\n \"able to reach the last index.\\n\\n\",\n \"Your answer should be submitted as 1 or 0, representing true and false respectively\",\n ].join(\" \");\n },\n difficulty: 2.5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = getRandomInt(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n const n: number = data.length;\n let i = 0;\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n const solution: boolean = i === n;\n return (ans === \"1\" && solution) || (ans === \"0\" && !solution);\n },\n },\n {\n desc: (_arr: unknown): string => {\n const arr = _arr as number[];\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine the minimum number of\",\n \"jumps to reach the end of the array.\\n\\n\",\n \"If it's impossible to reach the end, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < 10; j++) {\n if (Math.random() <= j / 10 + 0.1) {\n arr[i] = j;\n break;\n }\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game II\",\n numTries: 3,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n const n: number = data.length;\n let reach = 0;\n let jumps = 0;\n let lastJump = -1;\n while (reach < n - 1) {\n let jumpedFrom = -1;\n for (let i = reach; i > lastJump; i--) {\n if (i + data[i] > reach) {\n reach = i + data[i];\n jumpedFrom = i;\n }\n }\n if (jumpedFrom === -1) {\n jumps = 0;\n break;\n }\n lastJump = jumpedFrom;\n jumps++;\n }\n return jumps === parseInt(ans, 10);\n },\n },\n {\n desc: (_arr: unknown): string => {\n const arr = _arr as number[][];\n return [\n \"Given the following array of arrays of numbers representing a list of\",\n \"intervals, merge all overlapping intervals.\\n\\n\",\n `[${convert2DArrayToString(arr)}]\\n\\n`,\n \"Example:\\n\\n\",\n \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\",\n \"would merge into [[1, 6], [8, 16]].\\n\\n\",\n \"The intervals must be returned in ASCENDING order.\",\n \"You can assume that in an interval, the first number will always be\",\n \"smaller than the second.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[][] => {\n const intervals: number[][] = [];\n const numIntervals: number = getRandomInt(3, 20);\n for (let i = 0; i < numIntervals; ++i) {\n const start: number = getRandomInt(1, 25);\n const end: number = start + getRandomInt(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[][];\n const intervals: number[][] = data.slice();\n intervals.sort((a: number[], b: number[]) => {\n return a[0] - b[0];\n });\n\n const result: number[][] = [];\n let start: number = intervals[0][0];\n let end: number = intervals[0][1];\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n result.push([start, end]);\n\n const sanitizedResult: string = convert2DArrayToString(result);\n const sanitizedAns: string = ans.replace(/\\s/g, \"\");\n\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n },\n },\n {\n desc: (data: unknown): string => {\n return [\n \"Given the following string containing only digits, return\",\n \"an array with all possible valid IP address combinations\",\n \"that can be created from the string:\\n\\n\",\n `${data}\\n\\n`,\n \"Note that an octet cannot begin with a '0' unless the number\",\n \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\",\n \"Examples:\\n\\n\",\n \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\",\n \"1938718066 -> [193.87.180.66]\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): string => {\n let str = \"\";\n for (let i = 0; i < 4; ++i) {\n const num: number = getRandomInt(0, 255);\n const convNum: string = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"string\") throw new Error(\"solver expected string\");\n const ret: string[] = [];\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A = parseInt(data.substring(0, a), 10);\n const B = parseInt(data.substring(a, a + b), 10);\n const C = parseInt(data.substring(a + b, a + b + c), 10);\n const D = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip: string = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr: string[] = sanitizedAns.split(\",\");\n if (ansArr.length !== ret.length) {\n return false;\n }\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[];\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\",\n \"then the answer should be 0. Note\",\n \"that you have to buy the stock before you can sell it\",\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n let maxCur = 0;\n let maxSoFar = 0;\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, (maxCur += data[i] - data[i - 1]));\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[];\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using as many\",\n \"transactions as you'd like. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n let profit = 0;\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[];\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"two transactions. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n let hold1 = Number.MIN_SAFE_INTEGER;\n let hold2 = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as [number, number[]];\n const k = data[0];\n const prices = data[1];\n return [\n \"You are given the following array with two elements:\\n\\n\",\n `[${k}, [${prices}]]\\n\\n`,\n \"The first element is an integer k. The second element is an\",\n \"array of stock prices (which are numbers) where the i-th element\",\n \"represents the stock price on day i.\\n\\n\",\n \"Determine the maximum possible profit you can earn using at most\",\n \"k transactions. A transaction is defined as buying and then selling\",\n \"one share of the stock. Note that you cannot engage in multiple\",\n \"transactions at once. In other words, you must sell the stock before\",\n \"you can buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 8,\n gen: (): [number, number[]] => {\n const k = getRandomInt(2, 10);\n const len = getRandomInt(3, 50);\n const prices: number[] = [];\n prices.length = len;\n for (let i = 0; i < len; ++i) {\n prices[i] = getRandomInt(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as [number, number[]];\n const k: number = data[0];\n const prices: number[] = data[1];\n\n const len = prices.length;\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n if (k > len / 2) {\n let res = 0;\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold: number[] = [];\n const rele: number[] = [];\n hold.length = k + 1;\n rele.length = k + 1;\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur: number;\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[][];\n function createTriangleRecurse(data: number[][], level = 0): string {\n const numLevels: number = data.length;\n if (level >= numLevels) {\n return \"\";\n }\n const numSpaces = numLevels - level + 1;\n\n let str: string = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data: number[][]): string {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n\n return [\n \"Given a triangle, find the minimum path sum from top to bottom. In each step\",\n \"of the path, you may only move to adjacent numbers in the row below.\",\n \"The triangle is represented as a 2D array of numbers:\\n\\n\",\n `${triangle}\\n\\n`,\n \"Example: If you are given the following triangle:\\n\\n[\\n\",\n \"     [2],\\n\",\n \"    [3,4],\\n\",\n \"   [6,5,7],\\n\",\n \"  [4,1,8,3]\\n\",\n \"]\\n\\n\",\n \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const triangle: number[][] = [];\n const levels: number = getRandomInt(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = getRandomInt(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[][];\n const n: number = data.length;\n const dp: number[] = data[n - 1].slice();\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[];\n const numRows = data[0];\n const numColumns = data[1];\n return [\n \"You are in a grid with\",\n `${numRows} rows and ${numColumns} columns, and you are`,\n \"positioned in the top-left corner of that grid. You are trying to\",\n \"reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Determine how many\",\n \"unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an array\",\n \"with the number of rows and columns:\\n\\n\",\n `[${numRows}, ${numColumns}]`,\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const numRows: number = getRandomInt(2, 14);\n const numColumns: number = getRandomInt(2, 14);\n\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[];\n const n: number = data[0]; // Number of rows\n const m: number = data[1]; // Number of columns\n const currentRow: number[] = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as number[][];\n let gridString = \"\";\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `${gridString}\\n`,\n \"You are trying reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Furthermore, there are obstacles on the grid\",\n \"that you cannot move onto. These obstacles are denoted by '1', while empty\",\n \"spaces are denoted by 0.\\n\\n\",\n \"Determine how many unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const numRows: number = getRandomInt(2, 12);\n const numColumns: number = getRandomInt(2, 12);\n\n const grid: number[][] = [];\n grid.length = numRows;\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n }\n\n // 15% chance of an element being an obstacle\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[][];\n const obstacleGrid: number[][] = [];\n obstacleGrid.length = data.length;\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n },\n },\n {\n name: \"Shortest Path in a Grid\",\n desc: (_data: unknown): string => {\n const data = _data as number[][];\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `  [${data.map((line) => \"[\" + line + \"]\").join(\",\\n   \")}]\\n\\n`,\n \"You are trying to find the shortest path to the bottom-right corner of the grid,\",\n \"but there are obstacles on the grid that you cannot move onto.\",\n \"These obstacles are denoted by '1', while empty spaces are denoted by 0.\\n\\n\",\n \"Determine the shortest path from start to finish, if one exists.\",\n \"The answer should be given as a string of UDLR characters, indicating the moves along the path\\n\\n\",\n \"NOTE: If there are multiple equally short paths, any of them is accepted as answer.\",\n \"If there is no path, the answer should be an empty string.\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\\n\\n\",\n \"Examples:\\n\\n\",\n \"    [[0,1,0,0,0],\\n\",\n \"     [0,0,0,1,0]]\\n\",\n \"\\n\",\n \"Answer: 'DRRURRD'\\n\\n\",\n \"    [[0,1],\\n\",\n \"     [1,0]]\\n\",\n \"\\n\",\n \"Answer: ''\\n\\n\",\n ].join(\" \");\n },\n difficulty: 7,\n numTries: 10,\n gen: (): number[][] => {\n const height = getRandomInt(6, 12);\n const width = getRandomInt(6, 12);\n const dstY = height - 1;\n const dstX = width - 1;\n const minPathLength = dstY + dstX; // Math.abs(dstY - srcY) + Math.abs(dstX - srcX)\n\n const grid: number[][] = new Array(height);\n for (let y = 0; y < height; y++) grid[y] = new Array(width).fill(0);\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n if (y == 0 && x == 0) continue; // Don't block start\n if (y == dstY && x == dstX) continue; // Don't block destination\n\n // Generate more obstacles the farther a position is from start and destination.\n // Raw distance factor peaks at 50% at half-way mark. Rescale to 40% max.\n // Obstacle chance range of [15%, 40%] produces ~78% solvable puzzles\n const distanceFactor = (Math.min(y + x, dstY - y + dstX - x) / minPathLength) * 0.8;\n if (Math.random() < Math.max(0.15, distanceFactor)) grid[y][x] = 1;\n }\n }\n\n return grid;\n },\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as number[][];\n const width = data[0].length;\n const height = data.length;\n const dstY = height - 1;\n const dstX = width - 1;\n\n const distance: [number][] = new Array(height);\n //const prev: [[number, number] | undefined][] = new Array(height);\n const queue = new MinHeap<[number, number]>();\n\n for (let y = 0; y < height; y++) {\n distance[y] = new Array(width).fill(Infinity) as [number];\n //prev[y] = new Array(width).fill(undefined) as [undefined];\n }\n\n function validPosition(y: number, x: number): boolean {\n return y >= 0 && y < height && x >= 0 && x < width && data[y][x] == 0;\n }\n\n // List in-bounds and passable neighbors\n function* neighbors(y: number, x: number): Generator<[number, number]> {\n if (validPosition(y - 1, x)) yield [y - 1, x]; // Up\n if (validPosition(y + 1, x)) yield [y + 1, x]; // Down\n if (validPosition(y, x - 1)) yield [y, x - 1]; // Left\n if (validPosition(y, x + 1)) yield [y, x + 1]; // Right\n }\n\n // Prepare starting point\n distance[0][0] = 0;\n queue.push([0, 0], 0);\n\n // Take next-nearest position and expand potential paths from there\n while (queue.size > 0) {\n const [y, x] = queue.pop() as [number, number];\n for (const [yN, xN] of neighbors(y, x)) {\n const d = distance[y][x] + 1;\n if (d < distance[yN][xN]) {\n if (distance[yN][xN] == Infinity)\n // Not reached previously\n queue.push([yN, xN], d);\n // Found a shorter path\n else queue.changeWeight(([yQ, xQ]) => yQ == yN && xQ == xN, d);\n //prev[yN][xN] = [y, x];\n distance[yN][xN] = d;\n }\n }\n }\n\n // No path at all?\n if (distance[dstY][dstX] == Infinity) return ans == \"\";\n\n // There is a solution, require that the answer path is as short as the shortest\n // path we found\n if (ans.length > distance[dstY][dstX]) return false;\n\n // Further verify that the answer path is a valid path\n let ansX = 0;\n let ansY = 0;\n for (const direction of ans) {\n switch (direction) {\n case \"U\":\n ansY -= 1;\n break;\n case \"D\":\n ansY += 1;\n break;\n case \"L\":\n ansX -= 1;\n break;\n case \"R\":\n ansX += 1;\n break;\n default:\n return false; // Invalid character\n }\n if (!validPosition(ansY, ansX)) return false;\n }\n\n // Path was valid, finally verify that the answer path brought us to the end coordinates\n return ansY == dstY && ansX == dstX;\n },\n },\n {\n desc: (data: unknown): string => {\n return [\n \"Given the following string:\\n\\n\",\n `${data}\\n\\n`,\n \"remove the minimum number of invalid parentheses in order to validate\",\n \"the string. If there are multiple minimal ways to validate the string,\",\n \"provide all of the possible results. The answer should be provided\",\n \"as an array of strings. If it is impossible to validate the string\",\n \"the result should be an array with only an empty string.\\n\\n\",\n \"IMPORTANT: The string may contain letters, not just parentheses.\",\n `Examples:\\n`,\n `\"()())()\" -> [()()(), (())()]\\n`,\n `\"(a)())()\" -> [(a)()(), (a())()]\\n`,\n `\")(\" -> [\"\"]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): string => {\n const len: number = getRandomInt(6, 20);\n const chars: string[] = [];\n chars.length = len;\n\n // 80% chance of the first parenthesis being (\n Math.random() < 0.8 ? (chars[0] = \"(\") : (chars[0] = \")\");\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"string\") throw new Error(\"solver expected string\");\n let left = 0;\n let right = 0;\n const res: string[] = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(\n pair: number,\n index: number,\n left: number,\n right: number,\n s: string,\n solution: string,\n res: string[],\n ): void {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n res.push(solution);\n }\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (sanitizedPlayerAnsArr.length !== res.length) {\n return false;\n }\n for (const resultInAnswer of res) {\n if (!sanitizedPlayerAnsArr.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (_data: unknown): string => {\n const data = _data as [string, number];\n const digits: string = data[0];\n const target: number = data[1];\n\n return [\n \"You are given the following string which contains only digits between 0 and 9:\\n\\n\",\n `${digits}\\n\\n`,\n `You are also given a target number of ${target}. Return all possible ways`,\n \"you can add the +(add), -(subtract), and *(multiply) operators to the string such\",\n \"that it evaluates to the target number. (Normal order of operations applies.)\\n\\n\",\n \"The provided answer should be an array of strings containing the valid expressions.\",\n \"The data provided by this problem is an array with two elements. The first element\",\n \"is the string of digits, while the second element is the target number:\\n\\n\",\n `[\"${digits}\", ${target}]\\n\\n`,\n \"NOTE: The order of evaluation expects script operator precedence\",\n \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\",\n `\"1+01\" is not a valid expression`,\n \"Examples:\\n\\n\",\n `Input: digits = \"123\", target = 6\\n`,\n `Output: [1+2+3, 1*2*3]\\n\\n`,\n `Input: digits = \"105\", target = 5\\n`,\n `Output: [1*0+5, 10-5]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): [string, number] => {\n const numDigits = getRandomInt(4, 12);\n const digitsArray: string[] = [];\n digitsArray.length = numDigits;\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(getRandomInt(1, 9));\n } else {\n digitsArray[i] = String(getRandomInt(0, 9));\n }\n }\n\n const target: number = getRandomInt(-100, 100);\n const digits: string = digitsArray.join(\"\");\n\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as [string, number];\n const num = data[0];\n const target = data[1];\n\n function helper(\n res: string[],\n path: string,\n num: string,\n target: number,\n pos: number,\n evaluated: number,\n multed: number,\n ): void {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n return false;\n }\n\n const result: string[] = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n name: \"HammingCodes: Integer to Encoded Binary\",\n numTries: 10,\n difficulty: 5,\n desc: (n: unknown): string => {\n return [\n \"You are given the following decimal Value: \\n\",\n `${n} \\n`,\n \"Convert it into a binary string and encode it as a 'Hamming-Code'. eg:\\n \",\n \"Value 8 will result into binary '1000', which will be encoded\",\n \"with the pattern 'pppdpddd', where p is a paritybit and d a databit,\\n\",\n \"or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'.\\n\\n\",\n \"NOTE: You need an parity Bit on Index 0 as an 'overall'-paritybit. \\n\",\n \"NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which explains the 'rule' of encoding,\",\n \"including the first Index parity-bit mentioned on the first note.\\n\\n\",\n \"Now the only one rule for this encoding:\\n\",\n \" It's not allowed to add additional leading '0's to the binary value\\n\",\n \"That means, the binary value has to be encoded as it is\",\n ].join(\" \");\n },\n gen: (): number => {\n return getRandomInt(Math.pow(2, 4), Math.pow(2, getRandomInt(1, 57)));\n },\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"number\") throw new Error(\"solver expected number\");\n return ans === HammingEncode(data);\n },\n },\n {\n name: \"HammingCodes: Encoded Binary to Integer\",\n difficulty: 8,\n numTries: 10,\n desc: (n: unknown): string => {\n return [\n \"You are given the following encoded binary string: \\n\",\n `'${n}' \\n`,\n \"The string is a Hamming code with 1 'possible' error on a random index.\\n\",\n \"If there is an error, find the bit that is an error and fix it.\\n\",\n \"Extract the encoded decimal value and return a string with that value.\\n\\n\",\n \"NOTE: The length of the binary string is dynamic.\\n\",\n \"NOTE 2: Index 0 is an 'overall' parity bit. Watch the Hamming code video from 3Blue1Brown for more information.\\n\",\n \"NOTE 3: There's approximately a 55% chance for an altered bit. So... MAYBE there is an altered bit 😉\\n\",\n \"NOTE 4: Return the decimal value as a string.\",\n ].join(\" \");\n },\n gen: (): string => {\n const _alteredBit = Math.round(Math.random());\n const _buildArray: Array = HammingEncode(\n getRandomInt(Math.pow(2, 4), Math.pow(2, getRandomInt(1, 57))),\n ).split(\"\");\n if (_alteredBit) {\n const _randomIndex: number = getRandomInt(0, _buildArray.length - 1);\n _buildArray[_randomIndex] = _buildArray[_randomIndex] == \"0\" ? \"1\" : \"0\";\n }\n return _buildArray.join(\"\");\n },\n solver: (data: unknown, ans: string): boolean => {\n if (typeof data !== \"string\") throw new Error(\"solver expected string\");\n return parseInt(ans, 10) === HammingDecode(data);\n },\n },\n {\n name: \"Proper 2-Coloring of a Graph\",\n difficulty: 7,\n numTries: 5,\n desc: (_data: unknown): string => {\n const data = _data as [number, [number, number][]];\n return [\n `You are given the following data, representing a graph:\\n`,\n `${JSON.stringify(data)}\\n`,\n `Note that \"graph\", as used here, refers to the field of graph theory, and has`,\n `no relation to statistics or plotting.`,\n `The first element of the data represents the number of vertices in the graph.`,\n `Each vertex is a unique number between 0 and ${data[0] - 1}.`,\n `The next element of the data represents the edges of the graph.`,\n `Two vertices u,v in a graph are said to be adjacent if there exists an edge [u,v].`,\n `Note that an edge [u,v] is the same as an edge [v,u], as order does not matter.`,\n `You must construct a 2-coloring of the graph, meaning that you have to assign each`,\n `vertex in the graph a \"color\", either 0 or 1, such that no two adjacent vertices have`,\n `the same color. Submit your answer in the form of an array, where element i`,\n `represents the color of vertex i. If it is impossible to construct a 2-coloring of`,\n `the given graph, instead submit an empty array.\\n\\n`,\n `Examples:\\n\\n`,\n `Input: [4, [[0, 2], [0, 3], [1, 2], [1, 3]]]\\n`,\n `Output: [0, 0, 1, 1]\\n\\n`,\n `Input: [3, [[0, 1], [0, 2], [1, 2]]]\\n`,\n `Output: []`,\n ].join(\" \");\n },\n gen: (): [number, [number, number][]] => {\n //Generate two partite sets\n const n = Math.floor(Math.random() * 5) + 3;\n const m = Math.floor(Math.random() * 5) + 3;\n\n //50% chance of spawning any given valid edge in the bipartite graph\n const edges: [number, number][] = [];\n for (let i = 0; i < n; i++) {\n for (let j = 0; j < m; j++) {\n if (Math.random() > 0.5) {\n edges.push([i, n + j]);\n }\n }\n }\n\n //Add an edge at random with no regard to partite sets\n let a = Math.floor(Math.random() * (n + m));\n let b = Math.floor(Math.random() * (n + m));\n if (a > b) [a, b] = [b, a]; //Enforce lower numbers come first\n if (a != b && !edges.includes([a, b])) {\n edges.push([a, b]);\n }\n\n //Randomize array in-place using Durstenfeld shuffle algorithm.\n function shuffle(array: T[]): void {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n\n //Replace instances of the original vertex names in-place\n const vertexShuffler = Array.from(Array(n + m).keys());\n shuffle(vertexShuffler);\n for (let i = 0; i < edges.length; i++) {\n edges[i] = [vertexShuffler[edges[i][0]], vertexShuffler[edges[i][1]]];\n if (edges[i][0] > edges[i][1]) {\n //Enforce lower numbers come first\n [edges[i][0], edges[i][1]] = [edges[i][1], edges[i][0]];\n }\n }\n\n //Shuffle the order of the edges themselves, as well\n shuffle(edges);\n\n return [n + m, edges];\n },\n solver: (_data: unknown, ans: string): boolean => {\n const data = _data as [number, [number, number][]];\n //Case where the player believes there is no solution.\n //Attempt to construct one to check if this is correct.\n if (ans == \"[]\") {\n //Helper function to get neighbourhood of a vertex\n function neighbourhood(vertex: number): number[] {\n const adjLeft = data[1].filter(([a]) => a == vertex).map(([, b]) => b);\n const adjRight = data[1].filter(([, b]) => b == vertex).map(([a]) => a);\n return adjLeft.concat(adjRight);\n }\n\n //Verify that there is no solution by attempting to create a proper 2-coloring.\n const coloring: (number | undefined)[] = Array(data[0]).fill(undefined);\n while (coloring.some((val) => val === undefined)) {\n //Color a vertex in the graph\n const initialVertex: number = coloring.findIndex((val) => val === undefined);\n coloring[initialVertex] = 0;\n const frontier: number[] = [initialVertex];\n\n //Propogate the coloring throughout the component containing v greedily\n while (frontier.length > 0) {\n const v: number = frontier.pop() || 0;\n const neighbors: number[] = neighbourhood(v);\n\n //For each vertex u adjacent to v\n for (const id in neighbors) {\n const u: number = neighbors[id];\n\n //Set the color of u to the opposite of v's color if it is new,\n //then add u to the frontier to continue the algorithm.\n if (coloring[u] === undefined) {\n if (coloring[v] === 0) coloring[u] = 1;\n else coloring[u] = 0;\n\n frontier.push(u);\n }\n\n //Assert u,v do not have the same color\n else if (coloring[u] === coloring[v]) {\n //If u,v do have the same color, no proper 2-coloring exists, meaning\n //the player was correct to say there is no proper 2-coloring of the graph.\n return true;\n }\n }\n }\n }\n\n //If this code is reached, there exists a proper 2-coloring of the input\n //graph, and thus the player was incorrect in submitting no answer.\n return false;\n }\n\n //Sanitize player input\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n const coloring: number[] = sanitizedPlayerAnsArr.map((val) => parseInt(val));\n\n //Solution provided case\n if (coloring.length == data[0]) {\n const edges = data[1];\n const validColors = [0, 1];\n //Check that the provided solution is a proper 2-coloring\n return edges.every(([a, b]) => {\n const aColor = coloring[a];\n const bColor = coloring[b];\n return (\n validColors.includes(aColor) && //Enforce the first endpoint is color 0 or 1\n validColors.includes(bColor) && //Enforce the second endpoint is color 0 or 1\n aColor != bColor //Enforce the endpoints are different colors\n );\n });\n }\n\n //Return false if the coloring is the wrong size\n else return false;\n },\n },\n {\n name: \"Compression I: RLE Compression\",\n difficulty: 2,\n numTries: 10,\n desc: (plaintext: unknown): string => {\n return [\n \"Run-length encoding (RLE) is a data compression technique which encodes data as a series of runs of\",\n \"a repeated single character. Runs are encoded as a length, followed by the character itself. Lengths\",\n \"are encoded as a single ASCII digit; runs of 10 characters or more are encoded by splitting them\",\n \"into multiple runs.\\n\\n\",\n \"You are given the following input string:\\n\",\n `    ${plaintext}\\n`,\n \"Encode it using run-length encoding with the minimum possible output length.\\n\\n\",\n \"Examples:\\n\",\n \"    aaaaabccc            ->  5a1b3c\\n\",\n \"    aAaAaA               ->  1a1A1a1A1a1A\\n\",\n \"    111112333            ->  511233\\n\",\n \"    zzzzzzzzzzzzzzzzzzz  ->  9z9z1z  (or 9z8z2z, etc.)\\n\",\n ].join(\" \");\n },\n gen: (): string => {\n const length = 50 + Math.floor(25 * (Math.random() + Math.random()));\n let plain = \"\";\n\n while (plain.length < length) {\n const r = Math.random();\n\n let n = 1;\n if (r < 0.3) {\n n = 1;\n } else if (r < 0.6) {\n n = 2;\n } else if (r < 0.9) {\n n = Math.floor(10 * Math.random());\n } else {\n n = 10 + Math.floor(5 * Math.random());\n }\n\n const c = comprGenChar();\n plain += c.repeat(n);\n }\n\n return plain.substring(0, length);\n },\n solver: (plain: unknown, ans: string): boolean => {\n if (typeof plain !== \"string\") throw new Error(\"solver expected string\");\n if (ans.length % 2 !== 0) {\n return false;\n }\n\n let ans_plain = \"\";\n for (let i = 0; i + 1 < ans.length; i += 2) {\n const length = ans.charCodeAt(i) - 0x30;\n if (length < 0 || length > 9) {\n return false;\n }\n\n ans_plain += ans[i + 1].repeat(length);\n }\n if (ans_plain !== plain) {\n return false;\n }\n\n let length = 0;\n for (let i = 0; i < plain.length; ) {\n let run_length = 1;\n while (i + run_length < plain.length && plain[i + run_length] === plain[i]) {\n ++run_length;\n }\n i += run_length;\n\n while (run_length > 0) {\n run_length -= 9;\n length += 2;\n }\n }\n\n return ans.length <= length;\n },\n },\n {\n name: \"Compression II: LZ Decompression\",\n difficulty: 4,\n numTries: 10,\n desc: (compressed: unknown): string => {\n return [\n \"Lempel-Ziv (LZ) compression is a data compression technique which encodes data using references to\",\n \"earlier parts of the data. In this variant of LZ, data is encoded in two types of chunk. Each chunk\",\n \"begins with a length L, encoded as a single ASCII digit from 1 to 9, followed by the chunk data,\",\n \"which is either:\\n\\n\",\n \"1. Exactly L characters, which are to be copied directly into the uncompressed data.\\n\",\n \"2. A reference to an earlier part of the uncompressed data. To do this, the length is followed\",\n \"by a second ASCII digit X: each of the L output characters is a copy of the character X\",\n \"places before it in the uncompressed data.\\n\\n\",\n \"For both chunk types, a length of 0 instead means the chunk ends immediately, and the next character\",\n \"is the start of a new chunk. The two chunk types alternate, starting with type 1, and the final\",\n \"chunk may be of either type.\\n\\n\",\n \"You are given the following LZ-encoded string:\\n\",\n `    ${compressed}\\n`,\n \"Decode it and output the original string.\\n\\n\",\n \"Example: decoding '5aaabb450723abb' chunk-by-chunk\\n\",\n \"    5aaabb           ->  aaabb\\n\",\n \"    5aaabb45         ->  aaabbaaab\\n\",\n \"    5aaabb450        ->  aaabbaaab\\n\",\n \"    5aaabb45072      ->  aaabbaaababababa\\n\",\n \"    5aaabb450723abb  ->  aaabbaaababababaabb\",\n ].join(\" \");\n },\n gen: (): string => {\n return comprLZEncode(comprLZGenerate());\n },\n solver: (compr: unknown, ans: string): boolean => {\n if (typeof compr !== \"string\") throw new Error(\"solver expected string\");\n return ans === comprLZDecode(compr);\n },\n },\n {\n name: \"Compression III: LZ Compression\",\n difficulty: 10,\n numTries: 10,\n desc: (plaintext: unknown): string => {\n return [\n \"Lempel-Ziv (LZ) compression is a data compression technique which encodes data using references to\",\n \"earlier parts of the data. In this variant of LZ, data is encoded in two types of chunk. Each chunk\",\n \"begins with a length L, encoded as a single ASCII digit from 1 to 9, followed by the chunk data,\",\n \"which is either:\\n\\n\",\n \"1. Exactly L characters, which are to be copied directly into the uncompressed data.\\n\",\n \"2. A reference to an earlier part of the uncompressed data. To do this, the length is followed\",\n \"by a second ASCII digit X: each of the L output characters is a copy of the character X\",\n \"places before it in the uncompressed data.\\n\\n\",\n \"For both chunk types, a length of 0 instead means the chunk ends immediately, and the next character\",\n \"is the start of a new chunk. The two chunk types alternate, starting with type 1, and the final\",\n \"chunk may be of either type.\\n\\n\",\n \"You are given the following input string:\\n\",\n `    ${plaintext}\\n`,\n \"Encode it using Lempel-Ziv encoding with the minimum possible output length.\\n\\n\",\n \"Examples (some have other possible encodings of minimal length):\\n\",\n \"    abracadabra     ->  7abracad47\\n\",\n \"    mississippi     ->  4miss433ppi\\n\",\n \"    aAAaAAaAaAA     ->  3aAA53035\\n\",\n \"    2718281828      ->  627182844\\n\",\n \"    abcdefghijk     ->  9abcdefghi02jk\\n\",\n \"    aaaaaaaaaaaa    ->  3aaa91\\n\",\n \"    aaaaaaaaaaaaa   ->  1a91031\\n\",\n \"    aaaaaaaaaaaaaa  ->  1a91041\",\n ].join(\" \");\n },\n gen: (): string => {\n return comprLZGenerate();\n },\n solver: (plain: unknown, ans: string): boolean => {\n if (typeof plain !== \"string\") throw new Error(\"solver expected string\");\n return comprLZDecode(ans) === plain && ans.length <= comprLZEncode(plain).length;\n },\n },\n];\n","/** Binary heap. */\nabstract class BinHeap {\n /**\n * Heap data array consisting of [weight, payload] pairs, arranged by weight\n * to satisfy heap condition.\n *\n * Encodes the binary tree by storing tree root at index 0 and\n * left child of element i at `i * 2 + 1` and\n * right child of element i at `i * 2 + 2`.\n */\n protected data: [number, T][];\n\n constructor() {\n this.data = [];\n }\n\n /** Get number of elements in the heap. */\n public get size(): number {\n return this.data.length;\n }\n\n /** Add a new element to the heap. */\n public push(value: T, weight: number): void {\n const i = this.data.length;\n this.data[i] = [weight, value];\n this.heapifyUp(i);\n }\n\n /** Get the value of the root-most element of the heap, without changing the heap. */\n public peek(): T | undefined {\n if (this.data.length == 0) return undefined;\n\n return this.data[0][1];\n }\n\n /** Remove the root-most element of the heap and return the removed element's value. */\n public pop(): T | undefined {\n if (this.data.length == 0) return undefined;\n\n const value = this.data[0][1];\n\n this.data[0] = this.data[this.data.length - 1];\n this.data.length = this.data.length - 1;\n\n this.heapifyDown(0);\n\n return value;\n }\n\n /** Change the weight of an element in the heap. */\n public changeWeight(predicate: (value: T) => boolean, weight: number): void {\n // Find first element with matching value, if any\n const i = this.data.findIndex((e) => predicate(e[1]));\n if (i == -1) return;\n\n // Update that element's weight\n this.data[i][0] = weight;\n\n // And re-heapify if needed\n const p = Math.floor((i - 1) / 2);\n\n if (!this.heapOrderABeforeB(this.data[p][0], this.data[i][0]))\n // Needs to shift root-wards?\n this.heapifyUp(i);\n // Try shifting deeper\n else this.heapifyDown(i);\n }\n\n /** Restore heap condition, starting at index i and traveling towards root. */\n protected heapifyUp(i: number): void {\n // Swap the new element up towards root until it reaches root position or\n // settles under under a suitable parent\n while (i > 0) {\n const p = Math.floor((i - 1) / 2);\n\n // Reached heap-ordered state already?\n if (this.heapOrderABeforeB(this.data[p][0], this.data[i][0])) break;\n\n // Swap\n const tmp = this.data[p];\n this.data[p] = this.data[i];\n this.data[i] = tmp;\n\n // And repeat at parent index\n i = p;\n }\n }\n\n /** Restore heap condition, starting at index i and traveling away from root. */\n protected heapifyDown(i: number): void {\n // Swap the shifted element down in the heap until it either reaches the\n // bottom layer or is in correct order relative to it's children\n while (i < this.data.length) {\n const l = i * 2 + 1;\n const r = i * 2 + 2;\n let toSwap = i;\n\n // Find which one of element i and it's children should be closest to root\n if (l < this.data.length && this.heapOrderABeforeB(this.data[l][0], this.data[toSwap][0])) toSwap = l;\n if (r < this.data.length && this.heapOrderABeforeB(this.data[r][0], this.data[toSwap][0])) toSwap = r;\n\n // Already in order?\n if (i == toSwap) break;\n\n // Not in order. Swap child that should be closest to root up to 'i' and repeat\n const tmp = this.data[toSwap];\n this.data[toSwap] = this.data[i];\n this.data[i] = tmp;\n\n i = toSwap;\n }\n }\n\n /**\n * Should element with weight `weightA` be closer to root than element with\n * weight `weightB`?\n */\n protected abstract heapOrderABeforeB(weightA: number, weightB: number): boolean;\n}\n\n/** Binary max-heap. */\nexport class MaxHeap extends BinHeap {\n heapOrderABeforeB(weightA: number, weightB: number): boolean {\n return weightA > weightB;\n }\n}\n\n/** Binary min-heap. */\nexport class MinHeap extends BinHeap {\n heapOrderABeforeB(weightA: number, weightB: number): boolean {\n return weightA < weightB;\n }\n}\n","// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\nexport function createRandomString(n: number): string {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n","import { BaseServer } from \"../Server/BaseServer\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\n\nexport interface IProgramCreate {\n level: number;\n req(p: IPlayer): boolean; // Function that indicates whether player meets requirements\n time: number;\n tooltip: string;\n}\n\nexport class Program {\n name = \"\";\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n\n constructor(\n name: string,\n create: IProgramCreate | null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,\n ) {\n this.name = name;\n this.create = create;\n this.run = run;\n }\n}\n","import { IProgramCreate } from \"../Program\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { ITerminal } from \"../../Terminal/ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { BitFlumeEvent } from \"../../BitNode/ui/BitFlumeModal\";\nimport { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from \"../../Hacking\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nfunction requireHackingLevel(lvl: number) {\n return function (p: IPlayer) {\n return p.hacking + p.intelligence / 2 >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking >= 1;\n };\n}\n\ninterface IProgramCreationParams {\n key: string;\n name: string;\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n}\n\nexport const programsMetadata: IProgramCreationParams[] = [\n {\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: CONSTANTS.MillisecondsPerFiveMinutes,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n if (server.openPortCount >= server.numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + server.hostname);\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n },\n },\n {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: CONSTANTS.MillisecondsPerFiveMinutes * 2,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: CONSTANTS.MillisecondsPer8Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n },\n },\n {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n },\n },\n {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]): void => {\n if (args.length !== 1) {\n terminal.error(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = GetServer(args[0]);\n if (targetServer == null) {\n terminal.error(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.error(`ServerProfiler.exe can only be run on normal servers.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(\n `Netscript hack() execution time: ${convertTimeMsToTimeElapsedString(\n calculateHackingTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript grow() execution time: ${convertTimeMsToTimeElapsedString(\n calculateGrowTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript weaken() execution time: ${convertTimeMsToTimeElapsedString(\n calculateWeakenTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n },\n },\n {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n },\n },\n {\n key: \"Formulas\",\n name: \"Formulas.exe\",\n create: {\n level: 1000,\n tooltip: \"This program allows you to use the formulas API\",\n req: requireHackingLevel(1000),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"Formulas.exe lets you use the formulas API.\");\n },\n },\n {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: CONSTANTS.MillisecondsPerFiveMinutes / 20,\n },\n run: (): void => {\n BitFlumeEvent.emit();\n },\n },\n {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {\n const numAugReq = BitNodeMultipliers.DaedalusAugsRequirement;\n const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(`-- ${FactionNames.Daedalus} --`);\n },\n },\n];\n","/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nexport function isValidIPAddress(ipaddress: string): boolean {\n const byteRange = \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n const regexStr = `^${byteRange}\\.${byteRange}\\.${byteRange}\\.${byteRange}$`;\n const ipAddressRegex = new RegExp(regexStr);\n\n return ipAddressRegex.test(ipaddress);\n}\n","/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nexport function getTimestamp(): string {\n const d: Date = new Date();\n // A negative slice value takes from the end of the string rather than the beginning.\n const stringWidth = -2;\n const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);\n const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);\n\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n}\n","export function CalculateShareMult(power: number): number {\n const x = 1 + Math.log(power) / 25;\n if (isNaN(x) || !isFinite(x)) return 1;\n return x;\n}\n","import { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { FactionWorkType } from \"../data/FactionWorkType\";\nimport { newWorkStats, WorkStats } from \"../WorkStats\";\n\nconst gameCPS = 1000 / CONSTANTS._idleSpeed; // 5 cycles per second\n\nexport const FactionWorkStats: Record = {\n [FactionWorkType.HACKING]: newWorkStats({ hackExp: 15 }),\n [FactionWorkType.FIELD]: newWorkStats({\n hackExp: 10,\n strExp: 10,\n defExp: 10,\n dexExp: 10,\n agiExp: 10,\n chaExp: 10,\n }),\n [FactionWorkType.SECURITY]: newWorkStats({\n hackExp: 5,\n strExp: 15,\n defExp: 15,\n dexExp: 15,\n agiExp: 15,\n }),\n};\n\nexport function calculateFactionExp(player: IPlayer, tpe: FactionWorkType): WorkStats {\n let focusBonus = 1;\n if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n const baseStats = FactionWorkStats[tpe];\n return {\n money: 0,\n reputation: 0,\n hackExp:\n (focusBonus * (baseStats.hackExp * player.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n strExp:\n (focusBonus * (baseStats.strExp * player.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n defExp:\n (focusBonus * (baseStats.defExp * player.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n dexExp:\n (focusBonus * (baseStats.dexExp * player.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n agiExp:\n (focusBonus * (baseStats.agiExp * player.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n chaExp:\n (focusBonus * (baseStats.chaExp * player.mults.charisma_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,\n intExp: 0,\n };\n}\n","import * as posNames from \"./companypositionnames\";\nimport { IConstructorParams } from \"../Company\";\n\nimport { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\n// Create Objects containing Company Positions by category\n// Will help in metadata construction later\nconst AllSoftwarePositions: IMap = {};\nconst AllITPositions: IMap = {};\nconst AllNetworkEngineerPositions: IMap = {};\nconst SecurityEngineerPositions: IMap = {};\nconst AllTechnologyPositions: IMap = {};\nconst AllBusinessPositions: IMap = {};\nconst AllAgentPositions: IMap = {};\nconst AllSecurityPositions: IMap = {};\nconst AllSoftwareConsultantPositions: IMap = {};\nconst AllBusinessConsultantPositions: IMap = {};\nconst SoftwarePositionsUpToHeadOfEngineering: IMap = {};\nconst SoftwarePositionsUpToLeadDeveloper: IMap = {};\nconst BusinessPositionsUpToOperationsManager: IMap = {};\nconst WaiterOnly: IMap = {};\nconst EmployeeOnly: IMap = {};\nconst PartTimeWaiterOnly: IMap = {};\nconst PartTimeEmployeeOnly: IMap = {};\nconst OperationsManagerOnly: IMap = {};\nconst CEOOnly: IMap = {};\n\nposNames.SoftwareCompanyPositions.forEach((e) => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.ITCompanyPositions.forEach((e) => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.NetworkEngineerCompanyPositions.forEach((e) => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nAllTechnologyPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\nSecurityEngineerPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\n\nposNames.BusinessCompanyPositions.forEach((e) => {\n AllBusinessPositions[e] = true;\n});\n\nposNames.SecurityCompanyPositions.forEach((e) => {\n AllSecurityPositions[e] = true;\n});\n\nposNames.AgentCompanyPositions.forEach((e) => {\n AllAgentPositions[e] = true;\n});\n\nposNames.SoftwareConsultantCompanyPositions.forEach((e) => {\n AllSoftwareConsultantPositions[e] = true;\n});\n\nposNames.BusinessConsultantCompanyPositions.forEach((e) => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < posNames.SoftwareCompanyPositions.length; ++i) {\n const e = posNames.SoftwareCompanyPositions[i];\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\nfor (let i = 0; i < posNames.BusinessCompanyPositions.length; ++i) {\n const e = posNames.BusinessCompanyPositions[i];\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[posNames.MiscCompanyPositions[0]] = true;\nEmployeeOnly[posNames.MiscCompanyPositions[1]] = true;\nPartTimeWaiterOnly[posNames.PartTimeCompanyPositions[0]] = true;\nPartTimeEmployeeOnly[posNames.PartTimeCompanyPositions[1]] = true;\nOperationsManagerOnly[posNames.BusinessCompanyPositions[3]] = true;\nCEOOnly[posNames.BusinessCompanyPositions[5]] = true;\n\n// Metadata\nexport const companiesMetadata: IConstructorParams[] = [\n {\n name: LocationName.AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12CIA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.Sector12NSA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllBusinessPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToLeadDeveloper,\n BusinessPositionsUpToOperationsManager,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllAgentPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n];\n","export interface IConstructorParams {\n name: string;\n cost: number;\n desc: string;\n advertisingMult?: number;\n employeeChaMult?: number;\n employeeCreMult?: number;\n employeeEffMult?: number;\n employeeIntMult?: number;\n productionMult?: number;\n productProductionMult?: number;\n salesMult?: number;\n sciResearchMult?: number;\n storageMult?: number;\n}\n\nexport class Research {\n // Name of research. This will be used to identify researches in the Research Tree\n name = \"\";\n\n // How much scientific research it costs to unlock this\n cost = 0;\n\n // Description of what the Research does\n desc = \"\";\n\n // All possible generic upgrades for the company, in the form of multipliers\n advertisingMult = 1;\n employeeChaMult = 1;\n employeeCreMult = 1;\n employeeEffMult = 1;\n employeeIntMult = 1;\n productionMult = 1;\n productProductionMult = 1;\n salesMult = 1;\n sciResearchMult = 1;\n storageMult = 1;\n\n constructor(p: IConstructorParams = { name: \"\", cost: 0, desc: \"\" }) {\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n}\n","import { IConstructorParams } from \"../Research\";\n\nexport const researchMetadata: IConstructorParams[] = [\n {\n name: \"AutoBrew\",\n cost: 12e3,\n desc:\n \"Automatically keep your employees fully caffeinated with \" +\n \"coffee injections. This research will keep the energy of all \" +\n \"employees at its maximum possible value, for no cost. \" +\n \"This will also disable the Coffee upgrade.\",\n },\n {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc:\n \"Automatically analyzes your employees' happiness and morale \" +\n \"and boosts them whenever it detects a decrease. This research will \" +\n \"keep the morale and happiness of all employees at their maximum possible \" +\n \"values, for no cost. \" +\n \"This will also disable the 'Throw Party' feature.\",\n },\n {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc:\n \"Research how to automatically administer performance-enhacing drugs to all of \" +\n \"your employees. This unlocks Drug-related Research.\",\n },\n {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc:\n \"Research the art of buying materials in bulk. This allows you to purchase \" +\n \"any amount of a material instantly.\",\n },\n {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc:\n \"Develop an advanced and harmless synthetic drug that is administered to \" +\n \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1,\n },\n {\n name: \"Drones\",\n cost: 5e3,\n desc:\n \"Acquire the knowledge needed to create advanced drones. This research does nothing \" +\n \"by itself, but unlocks other Drone-related research.\",\n },\n {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc:\n \"Manufacture and use Assembly Drones to improve the efficiency of \" +\n \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2,\n },\n {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc:\n \"Manufacture and use intelligent Transport Drones to optimize \" +\n \"your warehouses. This increases the storage space of all warehouses \" +\n \"by 50%.\",\n storageMult: 1.5,\n },\n {\n name: \"Go-Juice\",\n cost: 25e3,\n desc:\n \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" +\n \"the brain's dopamine production. This increases the maximum energy of all \" +\n \"employees by 10.\",\n },\n {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc:\n \"Construct a cutting edge facility dedicated to advanced research and \" +\n \"and development. This allows you to spend Scientific Research \" +\n \"on powerful upgrades. It also globally increases Scientific Research \" +\n \"production by 10%.\",\n sciResearchMult: 1.1,\n },\n {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc:\n \"Use automated software to handle the hiring of employees. With this \" +\n \"research, each office will automatically hire one employee per \" +\n \"market cycle if there is available space.\",\n },\n {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc:\n \"Use automated software to handle the training of employees. With this \" +\n \"research, each employee hired with HRBuddy-Recruitment will automatically \" +\n \"be assigned to 'Training', rather than being unassigned.\",\n },\n {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their maximum happiness by 10.\",\n },\n {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc:\n \"Develop advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know what price to sell your Materials/Products \" +\n \"at in order to avoid losing sales due to having too high of a mark-up. \" +\n \"It also lets you automatically use that sale price.\",\n },\n {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc:\n \"Develop double-advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know how many sales of a Material/Product you lose or gain \" +\n \"from having too high or too low or a sale price. It also lets you automatically \" +\n \"set the sale price of your Materials/Products at the optimal price such that \" +\n \"the amount sold matches the amount produced.\",\n },\n {\n name: \"Overclock\",\n cost: 15e3,\n desc:\n \"Equip employees with a headset that uses transcranial direct current \" +\n \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" +\n \"This research increases the intelligence and efficiency of all \" +\n \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25,\n },\n {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc:\n \"Create assemblers that can be used for universal production. \" +\n \"These assemblers use deep learning to improve their efficiency \" +\n \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1,\n },\n {\n name: \"Sti.mu\",\n cost: 30e3,\n desc:\n \"Upgrade the tDCS headset to stimulate regions of the brain that \" +\n \"control confidence and enthusiasm. This research increases the max \" +\n \"morale of all employees by 10.\",\n },\n {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative issues for your corporation.\",\n },\n {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 3 to 4).\",\n },\n {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 4 to 5).\",\n },\n {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc:\n \"Improve the software used to manage the industry's production line \" +\n \"for its various products. This allows you to manage the production and \" +\n \"sale of a product before it's finished being designed.\",\n },\n {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc:\n \"Streamline the manufacturing of this industry's various products. \" +\n \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05,\n },\n];\n","/**\n * Object representing an upgrade that can be purchased with hashes\n */\nexport interface IConstructorParams {\n cost?: number;\n costPerLevel: number;\n desc: string;\n hasTargetServer?: boolean;\n name: string;\n value: number;\n effectText?: (level: number) => JSX.Element | null;\n}\n\nexport class HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n cost?: number;\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n costPerLevel = 0;\n\n /**\n * Description of what the upgrade does\n */\n desc = \"\";\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n hasTargetServer = false;\n\n // Name of upgrade\n name = \"\";\n\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n value = 0;\n\n constructor(p: IConstructorParams) {\n if (p.cost != null) {\n this.cost = p.cost;\n }\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n }\n\n // Functions that returns the UI element to display the effect of this upgrade.\n effectText: (level: number) => JSX.Element | null = () => null;\n\n getCost(levels: number): number {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n}\n","// Metadata used to construct all Hash Upgrades\nimport React from \"react\";\nimport { IConstructorParams } from \"../HashUpgrade\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport const HashUpgradesMetadata: IConstructorParams[] = [\n {\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for \n \n ),\n value: 1e6,\n },\n {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for Corporation funds.\n \n ),\n value: 1e9,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to decrease the minimum security of a single server by 2%. \" +\n \"Note that a server's minimum security cannot go below 1. This effect persists \" +\n \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to increase the maximum amount of money on a single server by 2%. \" +\n \"Note that a server's maximum money is soft capped above $10t. \" +\n \"This effect persists until you install Augmentations (since servers \" +\n \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when studying at a university by 20%. \" +\n \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: (level: number): JSX.Element | null => <>Improves studying by {level * 20}%,\n value: 20, // Improves studying by value%\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" +\n \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: (level: number): JSX.Element | null => <>Improves training by {level * 20}%,\n value: 20, // Improves training by value%\n },\n {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {level}k Scientific Research in your industries.\n ),\n value: 1000,\n },\n {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(100 * level, \"0a\")} Bladeburner rank\n ),\n value: 100,\n },\n {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(10 * level, \"0a\")} Bladeburner Skill Points\n ),\n value: 10,\n },\n {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.,\n value: 1,\n },\n];\n","import { NS } from \"../ScriptEditor/NetscriptDefinitions\";\n\n/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nexport class Environment {\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n stopFlag = false;\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n vars: NS | null = null;\n}\n","/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nexport function isPowerOfTwo(n: number): boolean {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n }\n\n // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n return (n & (n - 1)) === 0;\n}\n","/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\nimport { StockSymbols } from \"./StockSymbols\";\nimport { IConstructorParams } from \"../Stock\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const InitStockMetadata: IConstructorParams[] = [\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumECorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12MegaCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3,\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12BladeIndustries],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3,\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumClarkeIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3,\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniTekIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100,\n },\n name: LocationName.Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12FourSigma],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3,\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.ChongqingKuaiGongInternational],\n },\n\n {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120,\n },\n name: LocationName.AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumFulcrumTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3,\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80,\n },\n name: LocationName.IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.IshimaStormTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoDefComm],\n },\n\n {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3,\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenHeliosLabs],\n },\n\n {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3,\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoVitaLife],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12IcarusMicrosystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50,\n },\n name: LocationName.Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12UniversalEnergy],\n },\n\n {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3,\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.AevumAeroCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniaCybersystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3,\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.ChongqingSolarisSpaceSystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3,\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoGlobalPharmaceuticals],\n },\n\n {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.IshimaNovaMedical],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240,\n },\n name: LocationName.AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3,\n },\n symbol: StockSymbols[LocationName.AevumWatchdogSecurity],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3,\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115,\n },\n name: LocationName.VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenLexoCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3,\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: LocationName.AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.AevumRhoConstruction],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175,\n },\n name: LocationName.Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12AlphaEnterprises],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3,\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.VolhavenSysCoreSecurities],\n },\n\n {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3,\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80,\n },\n name: LocationName.VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.VolhavenCompuTek],\n },\n\n {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3,\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200,\n },\n name: LocationName.AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3,\n },\n symbol: StockSymbols[LocationName.AevumNetLinkTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3,\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90,\n },\n name: LocationName.IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.IshimaOmegaSoftware],\n },\n\n {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500,\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6,\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.Sector12FoodNStuff],\n },\n\n {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3,\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100,\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3,\n },\n symbol: StockSymbols[\"Sigma Cosmetics\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200,\n },\n name: LocationName.Sector12JoesGuns,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.Sector12JoesGuns],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120,\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5,\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3,\n },\n symbol: StockSymbols[\"Catalyst Ventures\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3,\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Microdyne Technologies\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Titan Laboratories\"],\n },\n];\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Gang } from \"../Gang/Gang\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangMemberTasks } from \"../Gang/GangMemberTasks\";\nimport { GangMemberUpgrades } from \"../Gang/GangMemberUpgrades\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GangMember } from \"../Gang/GangMember\";\nimport { GangMemberTask } from \"../Gang/GangMemberTask\";\n\nimport {\n Gang as IGang,\n GangGenInfo,\n GangOtherInfo,\n GangMemberInfo,\n GangMemberAscension,\n EquipmentStats,\n GangTaskStats,\n GangOtherInfoObject,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\n\nexport function NetscriptGang(player: IPlayer, workerScript: WorkerScript): InternalAPI {\n const checkGangApiAccess = function (ctx: NetscriptContext): void {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n const hasAccess = gang instanceof Gang;\n if (!hasAccess) {\n throw ctx.makeRuntimeErrorMsg(`You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (ctx: NetscriptContext, name: string): GangMember {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n for (const member of gang.members) if (member.name === name) return member;\n throw ctx.makeRuntimeErrorMsg(`Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (ctx: NetscriptContext, name: string): GangMemberTask {\n const task = GangMemberTasks[name];\n if (!task) {\n throw ctx.makeRuntimeErrorMsg(`Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n return {\n createGang:\n (ctx: NetscriptContext) =>\n (_faction: unknown): boolean => {\n const faction = ctx.helper.string(\"faction\", _faction);\n // this list is copied from Faction/ui/Root.tsx\n\n if (!player.canAccessGang() || !GangConstants.Names.includes(faction)) return false;\n if (player.inGang()) return false;\n if (!player.factions.includes(faction)) return false;\n\n const isHacking = faction === FactionNames.NiteSec || faction === FactionNames.TheBlackHand;\n player.startGang(faction, isHacking);\n return true;\n },\n inGang: () => (): boolean => {\n return player.inGang();\n },\n getMemberNames: (ctx: NetscriptContext) => (): string[] => {\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.members.map((member) => member.name);\n },\n getGangInformation: (ctx: NetscriptContext) => (): GangGenInfo => {\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return {\n faction: gang.facName,\n isHacking: gang.isHackingGang,\n moneyGainRate: gang.moneyGainRate,\n power: gang.getPower(),\n respect: gang.respect,\n respectGainRate: gang.respectGainRate,\n territory: gang.getTerritory(),\n territoryClashChance: gang.territoryClashChance,\n territoryWarfareEngaged: gang.territoryWarfareEngaged,\n wantedLevel: gang.wanted,\n wantedLevelGainRate: gang.wantedGainRate,\n wantedPenalty: gang.getWantedPenalty(),\n };\n },\n getOtherGangInformation: (ctx: NetscriptContext) => (): GangOtherInfo => {\n checkGangApiAccess(ctx);\n const cpy: Record = {};\n for (const gang of Object.keys(AllGangs)) {\n cpy[gang] = Object.assign({}, AllGangs[gang]);\n }\n\n return cpy;\n },\n getMemberInformation:\n (ctx: NetscriptContext) =>\n (_memberName: unknown): GangMemberInfo => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(ctx, memberName);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice(),\n\n respectGain: member.calculateRespectGain(gang),\n wantedLevelGain: member.calculateWantedLevelGain(gang),\n moneyGain: member.calculateMoneyGain(gang),\n };\n },\n canRecruitMember: (ctx: NetscriptContext) => (): boolean => {\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.canRecruitMember();\n },\n recruitMember:\n (ctx: NetscriptContext) =>\n (_memberName: unknown): boolean => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const recruited = gang.recruitMember(memberName);\n if (recruited) {\n workerScript.log(\"gang.recruitMember\", () => `Successfully recruited Gang Member '${memberName}'`);\n } else {\n workerScript.log(\"gang.recruitMember\", () => `Failed to recruit Gang Member '${memberName}'`);\n }\n\n return recruited;\n },\n getTaskNames: (ctx: NetscriptContext) => (): string[] => {\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const tasks = gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask:\n (ctx: NetscriptContext) =>\n (_memberName: unknown, _taskName: unknown): boolean => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n const taskName = ctx.helper.string(\"taskName\", _taskName);\n checkGangApiAccess(ctx);\n const member = getGangMember(ctx, memberName);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (!gang.getAllTaskNames().includes(taskName)) {\n workerScript.log(\n \"gang.setMemberTask\",\n () =>\n `Failed to assign Gang Member '${memberName}' to Invalid task '${taskName}'. '${memberName}' is now Unassigned`,\n );\n return member.assignToTask(\"Unassigned\");\n }\n const success = member.assignToTask(taskName);\n if (success) {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,\n );\n } else {\n workerScript.log(\n \"gang.setMemberTask\",\n () =>\n `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,\n );\n }\n\n return success;\n },\n getTaskStats:\n (ctx: NetscriptContext) =>\n (_taskName: unknown): GangTaskStats => {\n const taskName = ctx.helper.string(\"taskName\", _taskName);\n checkGangApiAccess(ctx);\n const task = getGangTask(ctx, taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: (ctx: NetscriptContext) => (): string[] => {\n checkGangApiAccess(ctx);\n return Object.keys(GangMemberUpgrades);\n },\n getEquipmentCost:\n (ctx: NetscriptContext) =>\n (_equipName: unknown): number => {\n const equipName = ctx.helper.string(\"equipName\", _equipName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const upg = GangMemberUpgrades[equipName];\n if (upg === null) return Infinity;\n return gang.getUpgradeCost(upg);\n },\n getEquipmentType:\n (ctx: NetscriptContext) =>\n (_equipName: unknown): string => {\n const equipName = ctx.helper.string(\"equipName\", _equipName);\n checkGangApiAccess(ctx);\n const upg = GangMemberUpgrades[equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats:\n (ctx: NetscriptContext) =>\n (_equipName: unknown): EquipmentStats => {\n const equipName = ctx.helper.string(\"equipName\", _equipName);\n checkGangApiAccess(ctx);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) {\n throw ctx.makeRuntimeErrorMsg(`Invalid equipment: ${equipName}`);\n }\n const typecheck: EquipmentStats = equipment.mults;\n return Object.assign({}, typecheck) as any;\n },\n purchaseEquipment:\n (ctx: NetscriptContext) =>\n (_memberName: unknown, _equipName: unknown): boolean => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n const equipName = ctx.helper.string(\"equipName\", _equipName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(ctx, memberName);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, player, gang);\n if (res) {\n workerScript.log(\"gang.purchaseEquipment\", () => `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\n \"gang.purchaseEquipment\",\n () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,\n );\n }\n\n return res;\n },\n ascendMember:\n (ctx: NetscriptContext) =>\n (_memberName: unknown): GangMemberAscension | undefined => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(ctx, memberName);\n if (!member.canAscend()) return;\n return gang.ascendMember(member, workerScript);\n },\n getAscensionResult:\n (ctx: NetscriptContext) =>\n (_memberName: unknown): GangMemberAscension | undefined => {\n const memberName = ctx.helper.string(\"memberName\", _memberName);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(ctx, memberName);\n if (!member.canAscend()) return;\n return {\n respect: member.earnedRespect,\n ...member.getAscensionResults(),\n };\n },\n setTerritoryWarfare:\n (ctx: NetscriptContext) =>\n (_engage: unknown): void => {\n const engage = ctx.helper.boolean(_engage);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (engage) {\n gang.territoryWarfareEngaged = true;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Engaging in Gang Territory Warfare\");\n } else {\n gang.territoryWarfareEngaged = false;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash:\n (ctx: NetscriptContext) =>\n (_otherGang: unknown): number => {\n const otherGang = ctx.helper.string(\"otherGang\", _otherGang);\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (AllGangs[otherGang] == null) {\n throw ctx.makeRuntimeErrorMsg(`Invalid gang: ${otherGang}`);\n }\n\n const playerPower = AllGangs[gang.facName].power;\n const otherPower = AllGangs[otherGang].power;\n\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: (ctx: NetscriptContext) => (): number => {\n checkGangApiAccess(ctx);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return Math.round(gang.storedCycles / 5) * 1000;\n },\n };\n}\n","import { ITaskParams } from \"../ITaskParams\";\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\ninterface IGangMemberTaskMetadata {\n /**\n * Description of the task\n */\n desc: string;\n\n /**\n * Whether or not this task is meant for Combat-type gangs\n */\n isCombat: boolean;\n\n /**\n * Whether or not this task is for Hacking-type gangs\n */\n isHacking: boolean;\n\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * An object containing weighting parameters for the task. These parameters are used for\n * various calculations (respect gain, wanted gain, etc.)\n */\n params: ITaskParams;\n}\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nexport const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [\n {\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: { hackWeight: 100 }, // This is just to get by the weight check in the GangMemberTask constructor\n },\n {\n desc: \"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 3,\n hackWeight: 100,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 7.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5,\n },\n },\n {\n desc: \"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 18,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5,\n },\n },\n {\n desc: \"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8,\n },\n },\n {\n desc: \"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12,\n },\n },\n {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 45,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25,\n },\n },\n {\n desc: \"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36,\n },\n },\n {\n desc: \"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 3,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 3.6,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 15,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15,\n },\n },\n },\n {\n desc: \"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 7.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5,\n },\n },\n },\n {\n desc: \"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 45,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14,\n },\n },\n {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 114,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 174,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25,\n },\n },\n },\n {\n desc: \"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 72,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28,\n },\n },\n {\n desc: \"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6,\n },\n },\n },\n {\n desc: \"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2,\n },\n },\n },\n {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9, // Gets harder with more territory\n },\n },\n },\n {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100,\n },\n },\n {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: { hackWeight: 100, difficulty: 45 },\n },\n {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: { chaWeight: 100, difficulty: 8 },\n },\n {\n desc: \"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5,\n },\n },\n];\n","import { IMults, UpgradeType } from \"./data/upgrades\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nexport class GangMemberUpgrade {\n name: string;\n cost: number;\n type: UpgradeType;\n desc: string;\n mults: IMults;\n\n constructor(name = \"\", cost = 0, type: UpgradeType = UpgradeType.Weapon, mults: IMults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n\n this.desc = this.createDescription();\n }\n\n createDescription(): string {\n const lines = [\"Effects:\"];\n if (this.mults.str != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n if (this.mults.def != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n if (this.mults.dex != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n if (this.mults.agi != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n if (this.mults.cha != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n if (this.mults.hack != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n return lines.join(\"
\");\n }\n\n // User friendly version of type.\n getType(): string {\n switch (this.type) {\n case UpgradeType.Weapon:\n return \"Weapon\";\n case UpgradeType.Armor:\n return \"Armor\";\n case UpgradeType.Vehicle:\n return \"Vehicle\";\n case UpgradeType.Rootkit:\n return \"Rootkit\";\n case UpgradeType.Augmentation:\n return \"Augmentation\";\n default:\n return \"\";\n }\n }\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\nexport const PowerMultiplier: {\n [key: string]: number | undefined;\n} = {\n [FactionNames.SlumSnakes]: 1,\n [FactionNames.Tetrads]: 2,\n [FactionNames.TheSyndicate]: 2,\n [FactionNames.TheDarkArmy]: 2,\n [FactionNames.SpeakersForTheDead]: 5,\n [FactionNames.NiteSec]: 2,\n [FactionNames.TheBlackHand]: 5,\n};\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { SleeveTaskType } from \"../PersonObjects/Sleeve/SleeveTaskTypesEnum\";\nimport { findSleevePurchasableAugs } from \"../PersonObjects/Sleeve/SleeveHelpers\";\nimport { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { findCrime } from \"../Crime/CrimeHelpers\";\n\nimport {\n AugmentPair,\n Sleeve as ISleeve,\n SleeveInformation,\n SleeveSkills,\n SleeveTask,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { checkEnum } from \"../utils/helpers/checkEnum\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\nimport { FactionWorkType } from \"../Work/data/FactionWorkType\";\n\nexport function NetscriptSleeve(player: IPlayer): InternalAPI {\n const checkSleeveAPIAccess = function (ctx: NetscriptContext): void {\n if (player.bitNodeN !== 10 && !player.sourceFileLvl(10)) {\n throw ctx.makeRuntimeErrorMsg(\n \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\",\n );\n }\n };\n\n const checkSleeveNumber = function (ctx: NetscriptContext, sleeveNumber: number): void {\n if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n ctx.log(() => msg);\n throw ctx.makeRuntimeErrorMsg(msg);\n }\n };\n\n const getSleeveStats = function (sleeveNumber: number): SleeveSkills {\n const sl = player.sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking: sl.hacking,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma,\n };\n };\n\n return {\n getNumSleeves: (ctx: NetscriptContext) => (): number => {\n checkSleeveAPIAccess(ctx);\n return player.sleeves.length;\n },\n setToShockRecovery:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n return player.sleeves[sleeveNumber].shockRecovery(player);\n },\n setToSynchronize:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n return player.sleeves[sleeveNumber].synchronize(player);\n },\n setToCommitCrime:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _crimeRoughName: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const crimeRoughName = ctx.helper.string(\"crimeName\", _crimeRoughName);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n const crime = findCrime(crimeRoughName);\n if (crime === null) {\n return false;\n }\n return player.sleeves[sleeveNumber].commitCrime(player, crime.name);\n },\n setToUniversityCourse:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _universityName: unknown, _className: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const universityName = ctx.helper.string(\"universityName\", _universityName);\n const className = ctx.helper.string(\"className\", _className);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n return player.sleeves[sleeveNumber].takeUniversityCourse(player, universityName, className);\n },\n travel:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _cityName: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const cityName = ctx.helper.string(\"cityName\", _cityName);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n if (checkEnum(CityName, cityName)) {\n return player.sleeves[sleeveNumber].travel(player, cityName);\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid city name: '${cityName}'.`);\n }\n },\n setToCompanyWork:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, acompanyName: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const companyName = ctx.helper.string(\"companyName\", acompanyName);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n // Cannot work at the same company that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {\n throw ctx.makeRuntimeErrorMsg(\n `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForCompany(player, companyName);\n },\n setToFactionWork:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _factionName: unknown, _workType: unknown): boolean | undefined => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const factionName = ctx.helper.string(\"factionName\", _factionName);\n const workType = ctx.helper.string(\"workType\", _workType);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n // Cannot work at the same faction that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Faction && other.currentTaskLocation === factionName) {\n throw ctx.makeRuntimeErrorMsg(\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n if (player.gang && player.gang.facName == factionName) {\n throw ctx.makeRuntimeErrorMsg(\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because you have started a gang with them.`,\n );\n }\n\n return player.sleeves[sleeveNumber].workForFaction(player, factionName, workType);\n },\n setToGymWorkout:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const gymName = ctx.helper.string(\"gymName\", _gymName);\n const stat = ctx.helper.string(\"stat\", _stat);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n return player.sleeves[sleeveNumber].workoutAtGym(player, gymName, stat);\n },\n getSleeveStats:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): SleeveSkills => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n return getSleeveStats(sleeveNumber);\n },\n getTask:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): SleeveTask => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n task: SleeveTaskType[sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: FactionWorkType[sl.factionWorkType],\n className: sl.className,\n };\n },\n getInformation:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): SleeveInformation => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n tor: false,\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(player.jobs), // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(player.jobs),\n maxHp: sl.max_hp,\n\n mult: {\n agility: sl.mults.agility,\n agilityExp: sl.mults.agility_exp,\n charisma: sl.mults.charisma,\n charismaExp: sl.mults.charisma_exp,\n companyRep: sl.mults.company_rep,\n crimeMoney: sl.mults.crime_money,\n crimeSuccess: sl.mults.crime_success,\n defense: sl.mults.defense,\n defenseExp: sl.mults.defense_exp,\n dexterity: sl.mults.dexterity,\n dexterityExp: sl.mults.dexterity_exp,\n factionRep: sl.mults.faction_rep,\n hacking: sl.mults.hacking,\n hackingExp: sl.mults.hacking_exp,\n strength: sl.mults.strength,\n strengthExp: sl.mults.strength_exp,\n workMoney: sl.mults.work_money,\n },\n\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money,\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money,\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money,\n },\n workRepGain: sl.getRepGain(player),\n };\n },\n getSleeveAugmentations:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): string[] => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n const augs = [];\n for (let i = 0; i < player.sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(player.sleeves[sleeveNumber].augmentations[i].name);\n }\n return augs;\n },\n getSleevePurchasableAugs:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown): AugmentPair[] => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n const purchasableAugs = findSleevePurchasableAugs(player.sleeves[sleeveNumber], player);\n const augs = [];\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.baseCost,\n });\n }\n\n return augs;\n },\n purchaseSleeveAug:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _augName: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const augName = ctx.helper.string(\"augName\", _augName);\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n if (getSleeveStats(sleeveNumber).shock > 0) {\n throw ctx.makeRuntimeErrorMsg(`Sleeve shock too high: Sleeve ${sleeveNumber}`);\n }\n\n const aug = StaticAugmentations[augName];\n if (!aug) {\n throw ctx.makeRuntimeErrorMsg(`Invalid aug: ${augName}`);\n }\n\n return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);\n },\n setToBladeburnerAction:\n (ctx: NetscriptContext) =>\n (_sleeveNumber: unknown, _action: unknown, _contract?: unknown): boolean => {\n const sleeveNumber = ctx.helper.number(\"sleeveNumber\", _sleeveNumber);\n const action = ctx.helper.string(\"action\", _action);\n let contract: string;\n if (typeof _contract === \"undefined\") {\n contract = \"------\";\n } else {\n contract = ctx.helper.string(\"contract\", _contract);\n }\n checkSleeveAPIAccess(ctx);\n checkSleeveNumber(ctx, sleeveNumber);\n\n // Cannot Take on Contracts if another sleeve is performing that action\n if (action === \"Take on contracts\") {\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Bladeburner && other.bbAction === action) {\n throw ctx.helper.makeRuntimeErrorMsg(\n `Sleeve ${sleeveNumber} cannot take of contracts because Sleeve ${i} is already performing that action.`,\n );\n }\n }\n }\n\n return player.sleeves[sleeveNumber].bladeburner(player, action, contract);\n },\n };\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport * as bcrypt from \"bcryptjs\";\nimport { Apr1Events as devMenu } from \"../ui/Apr1\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\n\nexport interface INetscriptExtra {\n heart: {\n break(): number;\n };\n openDevMenu(): void;\n exploit(): void;\n bypass(doc: Document): void;\n alterReality(): void;\n rainbow(guess: string): void;\n}\n\nexport function NetscriptExtra(player: IPlayer): InternalAPI {\n return {\n heart: {\n // Easter egg function\n break: () => (): number => {\n return player.karma;\n },\n },\n openDevMenu: () => (): void => {\n devMenu.emit();\n },\n exploit: () => (): void => {\n player.giveExploit(Exploit.UndocumentedFunctionCall);\n },\n bypass:\n (ctx: NetscriptContext) =>\n (doc: unknown): void => {\n // reset both fields first\n type temporary = { completely_unused_field: unknown };\n const d = doc as temporary;\n d.completely_unused_field = undefined;\n const real_document = document as unknown as temporary;\n real_document.completely_unused_field = undefined;\n // set one to true and check that it affected the other.\n real_document.completely_unused_field = true;\n if (d.completely_unused_field && ctx.workerScript.ramUsage === 1.6) {\n player.giveExploit(Exploit.Bypass);\n }\n d.completely_unused_field = undefined;\n real_document.completely_unused_field = undefined;\n },\n alterReality: () => (): void => {\n // We need to trick webpack into not optimizing a variable that is guaranteed to be false (and doesn't use prototypes)\n let x = false;\n const recur = function (depth: number): void {\n if (depth === 0) return;\n x = !x;\n recur(depth - 1);\n };\n recur(2);\n console.warn(\"I am sure that this variable is false.\");\n if (x !== false) {\n console.warn(\"Reality has been altered!\");\n player.giveExploit(Exploit.RealityAlteration);\n }\n },\n rainbow:\n (ctx: NetscriptContext) =>\n (guess: unknown): boolean => {\n function tryGuess(): boolean {\n // eslint-disable-next-line no-sync\n const verified = bcrypt.compareSync(\n ctx.helper.string(\"guess\", guess),\n \"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO\",\n );\n if (verified) {\n player.giveExploit(Exploit.INeedARainbow);\n return true;\n }\n return false;\n }\n return tryGuess();\n },\n };\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n purchaseHashUpgrade,\n updateHashManagerCapacity,\n} from \"../Hacknet/HacknetHelpers\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HashUpgrades } from \"../Hacknet/HashUpgrades\";\nimport { HashUpgrade } from \"../Hacknet/HashUpgrade\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { Hacknet as IHacknet, NodeStats } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\n\nexport function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript): InternalAPI {\n // Utility function to get Hacknet Node object\n const getHacknetNode = function (ctx: NetscriptContext, i: number): HacknetNode | HacknetServer {\n if (i < 0 || i >= player.hacknetNodes.length) {\n throw ctx.makeRuntimeErrorMsg(\"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (hasHacknetServers(player)) {\n const hi = player.hacknetNodes[i];\n if (typeof hi !== \"string\") throw new Error(\"hacknet node was not a string\");\n const hserver = GetServer(hi);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"hacknet server was not actually hacknet server\");\n if (hserver == null) {\n throw ctx.makeRuntimeErrorMsg(\n `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`,\n );\n }\n\n return hserver;\n } else {\n const node = player.hacknetNodes[i];\n if (!(node instanceof HacknetNode)) throw new Error(\"hacknet node was not node.\");\n return node;\n }\n };\n\n return {\n numNodes: () => (): number => {\n return player.hacknetNodes.length;\n },\n maxNumNodes: () => (): number => {\n if (hasHacknetServers(player)) {\n return HacknetServerConstants.MaxServers;\n }\n return Infinity;\n },\n purchaseNode: () => (): number => {\n return purchaseHacknet(player);\n },\n getPurchaseNodeCost: () => (): number => {\n if (hasHacknetServers(player)) {\n return getCostOfNextHacknetServer(player);\n } else {\n return getCostOfNextHacknetNode(player);\n }\n },\n getNodeStats:\n (ctx: NetscriptContext) =>\n (_i: unknown): NodeStats => {\n const i = ctx.helper.number(\"i\", _i);\n const node = getHacknetNode(ctx, i);\n const hasUpgraded = hasHacknetServers(player);\n const res: NodeStats = {\n name: node instanceof HacknetServer ? node.hostname : node.name,\n level: node.level,\n ram: node instanceof HacknetServer ? node.maxRam : node.ram,\n cores: node.cores,\n production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: node instanceof HacknetServer ? node.totalHashesGenerated : node.totalMoneyGenerated,\n };\n\n if (hasUpgraded && node instanceof HacknetServer) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n res.ramUsed = node.ramUsed;\n }\n\n return res;\n },\n upgradeLevel:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): boolean => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return purchaseLevelUpgrade(player, node, n);\n },\n upgradeRam:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): boolean => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return purchaseRamUpgrade(player, node, n);\n },\n upgradeCore:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): boolean => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return purchaseCoreUpgrade(player, node, n);\n },\n upgradeCache:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): boolean => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n if (!hasHacknetServers(player)) {\n return false;\n }\n const node = getHacknetNode(ctx, i);\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.upgradeCache\", () => \"Can only be called on hacknet servers\");\n return false;\n }\n const res = purchaseCacheUpgrade(player, node, n);\n if (res) {\n updateHashManagerCapacity(player);\n }\n return res;\n },\n getLevelUpgradeCost:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): number => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return node.calculateLevelUpgradeCost(n, player.mults.hacknet_node_level_cost);\n },\n getRamUpgradeCost:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): number => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return node.calculateRamUpgradeCost(n, player.mults.hacknet_node_ram_cost);\n },\n getCoreUpgradeCost:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): number => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n const node = getHacknetNode(ctx, i);\n return node.calculateCoreUpgradeCost(n, player.mults.hacknet_node_core_cost);\n },\n getCacheUpgradeCost:\n (ctx: NetscriptContext) =>\n (_i: unknown, _n: unknown = 1): number => {\n const i = ctx.helper.number(\"i\", _i);\n const n = ctx.helper.number(\"n\", _n);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n const node = getHacknetNode(ctx, i);\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.getCacheUpgradeCost\", () => \"Can only be called on hacknet servers\");\n return -1;\n }\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: () => (): number => {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.hashes;\n },\n hashCapacity: () => (): number => {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.capacity;\n },\n hashCost:\n (ctx: NetscriptContext) =>\n (_upgName: unknown): number => {\n const upgName = ctx.helper.string(\"upgName\", _upgName);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n\n return player.hashManager.getUpgradeCost(upgName);\n },\n spendHashes:\n (ctx: NetscriptContext) =>\n (_upgName: unknown, _upgTarget: unknown = \"\"): boolean => {\n const upgName = ctx.helper.string(\"upgName\", _upgName);\n const upgTarget = ctx.helper.string(\"upgTarget\", _upgTarget);\n if (!hasHacknetServers(player)) {\n return false;\n }\n return purchaseHashUpgrade(player, upgName, upgTarget);\n },\n getHashUpgrades: () => (): string[] => {\n if (!hasHacknetServers(player)) {\n return [];\n }\n return Object.values(HashUpgrades).map((upgrade: HashUpgrade) => upgrade.name);\n },\n getHashUpgradeLevel:\n (ctx: NetscriptContext) =>\n (_upgName: unknown): number => {\n const upgName = ctx.helper.string(\"upgName\", _upgName);\n const level = player.hashManager.upgrades[upgName];\n if (level === undefined) {\n throw ctx.makeRuntimeErrorMsg(`Invalid Hash Upgrade: ${upgName}`);\n }\n return level;\n },\n getStudyMult: () => (): number => {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getStudyMult();\n },\n getTrainingMult: () => (): number => {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getTrainingMult();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { Fragments, FragmentById } from \"../CotMG/Fragment\";\nimport { FragmentType } from \"../CotMG/FragmentType\";\n\nimport {\n Fragment as IFragment,\n ActiveFragment as IActiveFragment,\n Stanek as IStanek,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { NetscriptContext, InternalAPI } from \"../Netscript/APIWrapper\";\nimport { applyAugmentation } from \"../Augmentation/AugmentationHelpers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { Factions } from \"../Faction/Factions\";\n\nexport function NetscriptStanek(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): InternalAPI {\n function checkStanekAPIAccess(func: string): void {\n if (!player.hasAugmentation(AugmentationNames.StaneksGift1, true)) {\n throw helper.makeRuntimeErrorMsg(func, \"Stanek's Gift is not installed\");\n }\n }\n\n return {\n giftWidth: () =>\n function (): number {\n checkStanekAPIAccess(\"giftWidth\");\n return staneksGift.width();\n },\n giftHeight: () =>\n function (): number {\n checkStanekAPIAccess(\"giftHeight\");\n return staneksGift.height();\n },\n chargeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): Promise {\n //Get the fragment object using the given coordinates\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"chargeFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n //Check whether the selected fragment can ge charged\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`No fragment with root (${rootX}, ${rootY}).`);\n if (fragment.fragment().type == FragmentType.Booster) {\n throw _ctx.makeRuntimeErrorMsg(\n `The fragment with root (${rootX}, ${rootY}) is a Booster Fragment and thus cannot be charged.`,\n );\n }\n //Charge the fragment\n const time = staneksGift.inBonus() ? 200 : 1000;\n return netscriptDelay(time, workerScript).then(function () {\n staneksGift.charge(player, fragment, workerScript.scriptRef.threads);\n _ctx.log(() => `Charged fragment with ${_ctx.workerScript.scriptRef.threads} threads.`);\n return Promise.resolve();\n });\n },\n fragmentDefinitions: (_ctx: NetscriptContext) =>\n function (): IFragment[] {\n checkStanekAPIAccess(\"fragmentDefinitions\");\n _ctx.log(() => `Returned ${Fragments.length} fragments`);\n return Fragments.map((f) => f.copy());\n },\n activeFragments: (_ctx: NetscriptContext) =>\n function (): IActiveFragment[] {\n checkStanekAPIAccess(\"activeFragments\");\n _ctx.log(() => `Returned ${staneksGift.fragments.length} fragments`);\n return staneksGift.fragments.map((af) => {\n return { ...af.copy(), ...af.fragment().copy() };\n });\n },\n clearGift: (_ctx: NetscriptContext) =>\n function (): void {\n checkStanekAPIAccess(\"clearGift\");\n _ctx.log(() => `Cleared Stanek's Gift.`);\n staneksGift.clear();\n },\n canPlaceFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n const rotation = _ctx.helper.number(\"rotation\", _rotation);\n const fragmentId = _ctx.helper.number(\"fragmentId\", _fragmentId);\n checkStanekAPIAccess(\"canPlaceFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`Invalid fragment id: ${fragmentId}`);\n const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);\n return can;\n },\n placeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n const rotation = _ctx.helper.number(\"rotation\", _rotation);\n const fragmentId = _ctx.helper.number(\"fragmentId\", _fragmentId);\n checkStanekAPIAccess(\"placeFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`Invalid fragment id: ${fragmentId}`);\n return staneksGift.place(rootX, rootY, rotation, fragment);\n },\n getFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): IActiveFragment | undefined {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"getFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (fragment !== undefined) return fragment.copy();\n return undefined;\n },\n removeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"removeFragment\");\n return staneksGift.delete(rootX, rootY);\n },\n acceptGift: (_ctx: NetscriptContext) =>\n function (): boolean {\n //Check if the player is eligible to join the church\n if (\n player.canAccessCotMG() &&\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length == 0 &&\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length == 0\n ) {\n //Attempt to join CotMG\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n //Attempt to install the first Stanek aug\n if (\n !player.hasAugmentation(AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n _ctx.log(\n () => `'${FactionNames.ChurchOfTheMachineGod}' joined and '${AugmentationNames.StaneksGift1}' installed.`,\n );\n }\n }\n //Return true iff the player is in CotMG and has the first Stanek aug installed\n return (\n Factions[FactionNames.ChurchOfTheMachineGod].isMember &&\n player.hasAugmentation(AugmentationNames.StaneksGift1)\n );\n },\n };\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nexport function CalculateEffect(highestCharge: number, numCharge: number, power: number, boost: number): number {\n return (\n 1 +\n (Math.log(highestCharge + 1) / 60) *\n Math.pow((numCharge + 1) / 5, 0.07) *\n power *\n boost *\n BitNodeMultipliers.StaneksGiftPowerMultiplier\n );\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { Infiltration as IInfiltration, InfiltrationLocation } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { calculateDifficulty, calculateReward } from \"../Infiltration/formulas/game\";\nimport {\n calculateInfiltratorsRepReward,\n calculateSellInformationCashReward,\n calculateTradeInformationRepReward,\n} from \"../Infiltration/formulas/victory\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Factions } from \"../Faction/Factions\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\nimport { checkEnum } from \"../utils/helpers/checkEnum\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\n\nexport function NetscriptInfiltration(player: IPlayer): InternalAPI {\n const getLocationsWithInfiltrations = Object.values(Locations).filter(\n (location: Location) => location.infiltrationData,\n );\n\n const calculateInfiltrationData = (ctx: NetscriptContext, locationName: string): InfiltrationLocation => {\n if (!checkEnum(LocationName, locationName)) throw new Error(`Location '${locationName}' does not exists.`);\n const location = Locations[locationName];\n if (location === undefined) throw ctx.makeRuntimeErrorMsg(`Location '${location}' does not exists.`);\n if (location.infiltrationData === undefined)\n throw ctx.makeRuntimeErrorMsg(`Location '${location}' does not provide infiltrations.`);\n const startingSecurityLevel = location.infiltrationData.startingSecurityLevel;\n const difficulty = calculateDifficulty(player, startingSecurityLevel);\n const reward = calculateReward(player, startingSecurityLevel);\n const maxLevel = location.infiltrationData.maxClearanceLevel;\n return {\n location: location,\n reward: {\n tradeRep: calculateTradeInformationRepReward(player, reward, maxLevel, difficulty),\n sellCash: calculateSellInformationCashReward(player, reward, maxLevel, difficulty),\n SoARep: calculateInfiltratorsRepReward(player, Factions[FactionNames.ShadowsOfAnarchy], difficulty),\n },\n difficulty: difficulty,\n };\n };\n return {\n getPossibleLocations: () => (): string[] => {\n return getLocationsWithInfiltrations.map((l) => l.name);\n },\n getInfiltration:\n (ctx: NetscriptContext) =>\n (_location: unknown): InfiltrationLocation => {\n const location = ctx.helper.string(\"location\", _location);\n return calculateInfiltrationData(ctx, location);\n },\n };\n}\n","import {\n GameInfo,\n IStyleSettings,\n UserInterface as IUserInterface,\n UserInterfaceTheme,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeEvents } from \"../Themes/ui/Theme\";\nimport { defaultTheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { CONSTANTS } from \"../Constants\";\nimport { hash } from \"../hash/hash\";\nimport { InternalAPI, NetscriptContext } from \"src/Netscript/APIWrapper\";\nimport { Terminal } from \"../../src/Terminal\";\n\nexport function NetscriptUserInterface(): InternalAPI {\n return {\n getTheme: () => (): UserInterfaceTheme => {\n return { ...Settings.theme };\n },\n\n getStyles: () => (): IStyleSettings => {\n return { ...Settings.styles };\n },\n\n setTheme:\n (ctx: NetscriptContext) =>\n (newTheme: UserInterfaceTheme): void => {\n const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/;\n const currentTheme = { ...Settings.theme };\n const errors: string[] = [];\n for (const key of Object.keys(newTheme)) {\n if (!currentTheme[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else if (!hex.test(newTheme[key] ?? \"\")) {\n errors.push(`Invalid color \"${key}\": ${newTheme[key]}`);\n } else {\n currentTheme[key] = newTheme[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.theme, currentTheme);\n ThemeEvents.emit();\n ctx.log(() => `Successfully set theme`);\n } else {\n ctx.log(() => `Failed to set theme. Errors: ${errors.join(\", \")}`);\n }\n },\n\n setStyles:\n (ctx: NetscriptContext) =>\n (newStyles: IStyleSettings): void => {\n const currentStyles = { ...Settings.styles };\n const errors: string[] = [];\n for (const key of Object.keys(newStyles)) {\n if (!(currentStyles as any)[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else {\n (currentStyles as any)[key] = (newStyles as any)[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.styles, currentStyles);\n ThemeEvents.emit();\n ctx.log(() => `Successfully set styles`);\n } else {\n ctx.log(() => `Failed to set styles. Errors: ${errors.join(\", \")}`);\n }\n },\n\n resetTheme: (ctx: NetscriptContext) => (): void => {\n Settings.theme = { ...defaultTheme };\n ThemeEvents.emit();\n ctx.log(() => `Reinitialized theme to default`);\n },\n\n resetStyles: (ctx: NetscriptContext) => (): void => {\n Settings.styles = { ...defaultStyles };\n ThemeEvents.emit();\n ctx.log(() => `Reinitialized styles to default`);\n },\n\n getGameInfo: () => (): GameInfo => {\n const version = CONSTANTS.VersionString;\n const commit = hash();\n const platform = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1 ? \"Steam\" : \"Browser\";\n\n const gameInfo = {\n version,\n commit,\n platform,\n };\n\n return gameInfo;\n },\n\n clearTerminal: (ctx: NetscriptContext) => (): void => {\n ctx.log(() => `Clearing terminal`);\n Terminal.clear();\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Bladeburner } from \"../Bladeburner/Bladeburner\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Bladeburner as INetscriptBladeburner, BladeburnerCurAction } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { IAction } from \"src/Bladeburner/IAction\";\nimport { InternalAPI, NetscriptContext } from \"src/Netscript/APIWrapper\";\nimport { BlackOperation } from \"../Bladeburner/BlackOperation\";\n\nexport function NetscriptBladeburner(player: IPlayer, workerScript: WorkerScript): InternalAPI {\n const checkBladeburnerAccess = function (ctx: NetscriptContext, skipjoined = false): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const apiAccess =\n player.bitNodeN === 7 ||\n player.sourceFiles.some((a) => {\n return a.n === 7;\n });\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw ctx.makeRuntimeErrorMsg(apiDenied);\n }\n if (!skipjoined) {\n const bladeburnerAccess = bladeburner instanceof Bladeburner;\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw ctx.makeRuntimeErrorMsg(bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (ctx: NetscriptContext, city: string): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n if (!bladeburner.cities.hasOwnProperty(city)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid city: ${city}`);\n }\n };\n\n const getBladeburnerActionObject = function (ctx: NetscriptContext, type: string, name: string): IAction {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const actionId = bladeburner.getActionIdFromTypeAndName(type, name);\n if (!actionId) {\n throw ctx.makeRuntimeErrorMsg(`Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw ctx.makeRuntimeErrorMsg(`Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n return {\n getContractNames: (ctx: NetscriptContext) => (): string[] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: (ctx: NetscriptContext) => (): string[] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: (ctx: NetscriptContext) => (): string[] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank:\n (ctx: NetscriptContext) =>\n (_blackOpName: unknown): number => {\n const blackOpName = ctx.helper.string(\"blackOpName\", _blackOpName);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, \"blackops\", blackOpName);\n if (!(action instanceof BlackOperation)) throw new Error(\"action was not a black operation\");\n return action.reqdRank;\n },\n getGeneralActionNames: (ctx: NetscriptContext) => (): string[] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: (ctx: NetscriptContext) => (): string[] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getSkillNamesNetscriptFn();\n },\n startAction:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): boolean => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.startActionNetscriptFn(player, type, name, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n stopBladeburnerAction: (ctx: NetscriptContext) => (): void => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.resetAction();\n },\n getCurrentAction: (ctx: NetscriptContext) => (): BladeburnerCurAction => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n },\n getActionTime:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n const time = bladeburner.getActionTimeNetscriptFn(player, type, name);\n if (typeof time === \"string\") {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n ctx.log(() => errorLogText);\n return -1;\n } else {\n return time;\n }\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getActionCurrentTime: (ctx: NetscriptContext) => (): number => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n const timecomputed =\n Math.min(bladeburner.actionTimeCurrent + bladeburner.actionTimeOverflow, bladeburner.actionTimeToComplete) *\n 1000;\n return timecomputed;\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getActionEstimatedSuccessChance:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): [number, number] => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n const chance = bladeburner.getActionEstimatedSuccessChanceNetscriptFn(player, type, name);\n if (typeof chance === \"string\") {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n ctx.log(() => errorLogText);\n return [-1, -1];\n } else {\n return chance;\n }\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getActionRepGain:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown, _level: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n const level = ctx.helper.number(\"level\", _level);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n let rewardMultiplier;\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank;\n },\n getActionCountRemaining:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getActionMaxLevel:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n return action.level;\n },\n getActionAutolevel:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): boolean => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n return action.autoLevel;\n },\n setActionAutolevel:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown, _autoLevel: unknown = true): void => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n const autoLevel = ctx.helper.boolean(_autoLevel);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown, _level: unknown = 1): void => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n const level = ctx.helper.number(\"level\", _level);\n checkBladeburnerAccess(ctx);\n const action = getBladeburnerActionObject(ctx, type, name);\n if (level < 1 || level > action.maxLevel) {\n ctx.helper.makeRuntimeErrorMsg(`Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n action.level = level;\n },\n getRank: (ctx: NetscriptContext) => (): number => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.rank;\n },\n getSkillPoints: (ctx: NetscriptContext) => (): number => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.skillPoints;\n },\n getSkillLevel:\n (ctx: NetscriptContext) =>\n (_skillName: unknown): number => {\n const skillName = ctx.helper.string(\"skillName\", _skillName);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getSkillUpgradeCost:\n (ctx: NetscriptContext) =>\n (_skillName: unknown, _count: unknown = 1): number => {\n const skillName = ctx.helper.string(\"skillName\", _skillName);\n const count = ctx.helper.number(\"count\", _count);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, count, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n upgradeSkill:\n (ctx: NetscriptContext) =>\n (_skillName: unknown, _count: unknown = 1): boolean => {\n const skillName = ctx.helper.string(\"skillName\", _skillName);\n const count = ctx.helper.number(\"count\", _count);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.upgradeSkillNetscriptFn(skillName, count, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getTeamSize:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n setTeamSize:\n (ctx: NetscriptContext) =>\n (_type: unknown, _name: unknown, _size: unknown): number => {\n const type = ctx.helper.string(\"type\", _type);\n const name = ctx.helper.string(\"name\", _name);\n const size = ctx.helper.number(\"size\", _size);\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e: unknown) {\n throw ctx.makeRuntimeErrorMsg(String(e));\n }\n },\n getCityEstimatedPopulation:\n (ctx: NetscriptContext) =>\n (_cityName: unknown): number => {\n const cityName = ctx.helper.string(\"cityName\", _cityName);\n checkBladeburnerAccess(ctx);\n checkBladeburnerCity(ctx, cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].popEst;\n },\n getCityCommunities:\n (ctx: NetscriptContext) =>\n (_cityName: unknown): number => {\n const cityName = ctx.helper.string(\"cityName\", _cityName);\n checkBladeburnerAccess(ctx);\n checkBladeburnerCity(ctx, cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].comms;\n },\n getCityChaos:\n (ctx: NetscriptContext) =>\n (_cityName: unknown): number => {\n const cityName = ctx.helper.string(\"cityName\", _cityName);\n checkBladeburnerAccess(ctx);\n checkBladeburnerCity(ctx, cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].chaos;\n },\n getCity: (ctx: NetscriptContext) => (): string => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.city;\n },\n switchCity:\n (ctx: NetscriptContext) =>\n (_cityName: unknown): boolean => {\n const cityName = ctx.helper.string(\"cityName\", _cityName);\n checkBladeburnerAccess(ctx);\n checkBladeburnerCity(ctx, cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n bladeburner.city = cityName;\n return true;\n },\n getStamina: (ctx: NetscriptContext) => (): [number, number] => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return [bladeburner.stamina, bladeburner.maxStamina];\n },\n joinBladeburnerFaction: (ctx: NetscriptContext) => (): boolean => {\n checkBladeburnerAccess(ctx, true);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: (ctx: NetscriptContext) => (): boolean => {\n if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {\n if (player.bitNodeN === 8) {\n return false;\n }\n if (player.bladeburner instanceof Bladeburner) {\n return true; // Already member\n } else if (\n player.strength >= 100 &&\n player.defense >= 100 &&\n player.dexterity >= 100 &&\n player.agility >= 100\n ) {\n player.bladeburner = new Bladeburner(player);\n ctx.log(() => \"You have been accepted into the Bladeburner division\");\n\n return true;\n } else {\n ctx.log(() => \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n return false;\n },\n getBonusTime: (ctx: NetscriptContext) => (): number => {\n checkBladeburnerAccess(ctx);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return Math.round(bladeburner.storedCycles / 5) * 1000;\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { is2DArray } from \"../utils/helpers/is2DArray\";\nimport { CodingContract } from \"../CodingContracts\";\nimport { CodingAttemptOptions, CodingContract as ICodingContract } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { InternalAPI, NetscriptContext } from \"src/Netscript/APIWrapper\";\n\nexport function NetscriptCodingContract(player: IPlayer, workerScript: WorkerScript): InternalAPI {\n const getCodingContract = function (\n ctx: NetscriptContext,\n func: string,\n hostname: string,\n filename: string,\n ): CodingContract {\n const server = ctx.helper.getServer(hostname);\n const contract = server.getContract(filename);\n if (contract == null) {\n throw ctx.makeRuntimeErrorMsg(`Cannot find contract '${filename}' on server '${hostname}'`);\n }\n\n return contract;\n };\n\n return {\n attempt:\n (ctx: NetscriptContext) =>\n (\n answer: unknown,\n _filename: unknown,\n _hostname: unknown = workerScript.hostname,\n { returnReward }: CodingAttemptOptions = { returnReward: false },\n ): boolean | string => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const contract = getCodingContract(ctx, \"attempt\", hostname, filename);\n\n // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n let answerStr = \"\";\n if (is2DArray(answer)) {\n const answerComponents = [];\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", String(answer[i]), \"]\"].join(\"\"));\n }\n\n answerStr = answerComponents.join(\",\");\n } else {\n answerStr = String(answer);\n }\n\n const creward = contract.reward;\n if (creward === null) throw new Error(\"Somehow solved a contract that didn't have a reward\");\n\n const serv = ctx.helper.getServer(hostname);\n if (contract.isSolution(answerStr)) {\n const reward = player.gainCodingContractReward(creward, contract.getDifficulty());\n ctx.log(() => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`);\n serv.removeContract(filename);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n ctx.log(() => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`);\n serv.removeContract(filename);\n } else {\n ctx.log(\n () =>\n `Coding Contract attempt '${filename}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType:\n (ctx: NetscriptContext) =>\n (_filename: unknown, _hostname: unknown = workerScript.hostname): string => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const contract = getCodingContract(ctx, \"getContractType\", hostname, filename);\n return contract.getType();\n },\n getData:\n (ctx: NetscriptContext) =>\n (_filename: unknown, _hostname: unknown = workerScript.hostname): unknown => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const contract = getCodingContract(ctx, \"getData\", hostname, filename);\n const data = contract.getData();\n if (Array.isArray(data)) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription:\n (ctx: NetscriptContext) =>\n (_filename: unknown, _hostname: unknown = workerScript.hostname): string => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const contract = getCodingContract(ctx, \"getDescription\", hostname, filename);\n return contract.getDescription();\n },\n getNumTriesRemaining:\n (ctx: NetscriptContext) =>\n (_filename: unknown, _hostname: unknown = workerScript.hostname): number => {\n const filename = ctx.helper.string(\"filename\", _filename);\n const hostname = ctx.helper.string(\"hostname\", _hostname);\n const contract = getCodingContract(ctx, \"getNumTriesRemaining\", hostname, filename);\n return contract.getMaxNumTries() - contract.tries;\n },\n };\n}\n","export function isArray(arr: unknown): arr is unknown[] {\n return Array.isArray(arr);\n}\n\n// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nexport function is2DArray(arr: unknown): arr is unknown[][] {\n return isArray(arr) && arr.every((u) => isArray(u));\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { OfficeSpace } from \"../Corporation/OfficeSpace\";\nimport { Employee } from \"../Corporation/Employee\";\nimport { Product } from \"../Corporation/Product\";\nimport { Material } from \"../Corporation/Material\";\nimport { Warehouse } from \"../Corporation/Warehouse\";\nimport { IIndustry } from \"../Corporation/IIndustry\";\nimport { ICorporation } from \"../Corporation/ICorporation\";\n\nimport {\n Corporation as NSCorporation,\n CorporationInfo,\n Employee as NSEmployee,\n Product as NSProduct,\n Material as NSMaterial,\n Warehouse as NSWarehouse,\n Division as NSDivision,\n WarehouseAPI,\n OfficeAPI,\n InvestmentOffer,\n Office as NSOffice,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport {\n NewIndustry,\n NewCity,\n UnlockUpgrade,\n LevelUpgrade,\n IssueDividends,\n SellMaterial,\n SellProduct,\n SetSmartSupply,\n BuyMaterial,\n AssignJob,\n AutoAssignJob,\n UpgradeOfficeSize,\n PurchaseWarehouse,\n UpgradeWarehouse,\n BuyCoffee,\n ThrowParty,\n HireAdVert,\n MakeProduct,\n Research,\n ExportMaterial,\n CancelExportMaterial,\n SetMaterialMarketTA1,\n SetMaterialMarketTA2,\n SetProductMarketTA1,\n SetProductMarketTA2,\n BulkPurchase,\n SellShares,\n BuyBackShares,\n SetSmartSupplyUseLeftovers,\n LimitMaterialProduction,\n LimitProductProduction,\n UpgradeWarehouseCost,\n} from \"../Corporation/Actions\";\nimport { CorporationUnlockUpgrades } from \"../Corporation/data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrades } from \"../Corporation/data/CorporationUpgrades\";\nimport { EmployeePositions } from \"../Corporation/EmployeePositions\";\nimport { Industry } from \"../Corporation/Industry\";\nimport { IndustryResearchTrees, IndustryStartingCosts } from \"../Corporation/IndustryData\";\nimport { CorporationConstants } from \"../Corporation/data/Constants\";\nimport { ResearchMap } from \"../Corporation/ResearchMap\";\nimport { Factions } from \"../Faction/Factions\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { InternalAPI, NetscriptContext } from \"src/Netscript/APIWrapper\";\n\nexport function NetscriptCorporation(player: IPlayer): InternalAPI {\n function createCorporation(corporationName: string, selfFund = true): boolean {\n if (!player.canAccessCorporation() || player.hasCorporation()) return false;\n if (!corporationName) return false;\n if (player.bitNodeN !== 3 && !selfFund) throw new Error(\"cannot use seed funds outside of BitNode 3\");\n if (BitNodeMultipliers.CorporationSoftcap < 0.15)\n throw new Error(`You cannot create a corporation in Bitnode ${player.bitNodeN}`);\n\n if (selfFund) {\n if (!player.canAfford(150e9)) return false;\n\n player.startCorporation(corporationName);\n player.loseMoney(150e9, \"corporation\");\n } else {\n player.startCorporation(corporationName, 500e6);\n }\n return true;\n }\n\n function hasUnlockUpgrade(upgradeName: string): boolean {\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n return corporation.unlockUpgrades[upgN] === 1;\n }\n\n function getUnlockUpgradeCost(upgradeName: string): number {\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n return upgrade.price;\n }\n\n function getUpgradeLevel(ctx: NetscriptContext, _upgradeName: string): number {\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n return corporation.upgrades[upgN];\n }\n\n function getUpgradeLevelCost(ctx: NetscriptContext, _upgradeName: string): number {\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n const baseCost = upgrade.basePrice;\n const priceMult = upgrade.priceMult;\n const level = corporation.upgrades[upgN];\n return baseCost * Math.pow(priceMult, level);\n }\n\n function getExpandIndustryCost(industryName: string): number {\n const cost = IndustryStartingCosts[industryName];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industryName}'`);\n }\n return cost;\n }\n\n function getExpandCityCost(): number {\n return CorporationConstants.OfficeInitialCost;\n }\n\n function getInvestmentOffer(): InvestmentOffer {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return {\n funds: 0,\n shares: 0,\n round: corporation.fundingRound + 1, // Make more readable\n }; // Don't throw an error here, no reason to have a second function to check if you can get investment.\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n return {\n funds: funding,\n shares: investShares,\n round: corporation.fundingRound + 1, // Make more readable\n };\n }\n\n function acceptInvestmentOffer(): boolean {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return false;\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n return true;\n }\n\n function goPublic(numShares: number): boolean {\n const corporation = getCorporation();\n const initialSharePrice = corporation.determineValuation() / corporation.totalShares;\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to issue!\");\n corporation.public = true;\n corporation.sharePrice = initialSharePrice;\n corporation.issuedShares = numShares;\n corporation.numShares -= numShares;\n corporation.addFunds(numShares * initialSharePrice);\n return true;\n }\n\n function getResearchCost(division: IIndustry, researchName: string): number {\n const researchTree = IndustryResearchTrees[division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = ResearchMap[researchName];\n return research.cost;\n }\n\n function hasResearched(division: IIndustry, researchName: string): boolean {\n return division.researched[researchName] === undefined ? false : (division.researched[researchName] as boolean);\n }\n\n function bribe(factionName: string, amountCash: number, amountShares: number): boolean {\n if (!player.factions.includes(factionName)) throw new Error(\"Invalid faction name\");\n if (isNaN(amountCash) || amountCash < 0 || isNaN(amountShares) || amountShares < 0)\n throw new Error(\"Invalid value for amount field! Must be numeric, grater than 0.\");\n\n const corporation = getCorporation();\n if (corporation.funds < amountCash) return false;\n if (corporation.numShares < amountShares) return false;\n const faction = Factions[factionName];\n const info = faction.getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(factionName)) return false;\n\n const repGain = (amountCash + amountShares * corporation.sharePrice) / CorporationConstants.BribeToRepRatio;\n faction.playerReputation += repGain;\n corporation.funds = corporation.funds - amountCash;\n corporation.numShares -= amountShares;\n\n return true;\n }\n\n function getCorporation(): ICorporation {\n const corporation = player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\n return corporation;\n }\n\n function getDivision(divisionName: string): IIndustry {\n const corporation = getCorporation();\n const division = corporation.divisions.find((div) => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName: string, cityName: string): OfficeSpace {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName: string, cityName: string): Warehouse {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName: string, cityName: string, materialName: string): Material {\n const warehouse = getWarehouse(divisionName, cityName);\n const matName = materialName.replace(/ /g, \"\");\n const material = warehouse.materials[matName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName: string, productName: string): Product {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName: string, cityName: string, employeeName: string): Employee {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find((e) => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n function checkAccess(ctx: NetscriptContext, api?: number): void {\n if (player.corporation === null) throw ctx.makeRuntimeErrorMsg(\"Must own a corporation.\");\n if (!api) return;\n\n if (!player.corporation.unlockUpgrades[api]) throw ctx.makeRuntimeErrorMsg(\"You do not have access to this API.\");\n }\n\n function getSafeDivision(division: Industry): NSDivision {\n const cities: string[] = [];\n for (const office of Object.values(division.offices)) {\n if (office === 0) continue;\n cities.push(office.loc);\n }\n\n return {\n name: division.name,\n type: division.type,\n awareness: division.awareness,\n popularity: division.popularity,\n prodMult: division.prodMult,\n research: division.sciResearch.qty,\n lastCycleRevenue: division.lastCycleRevenue,\n lastCycleExpenses: division.lastCycleExpenses,\n thisCycleRevenue: division.thisCycleRevenue,\n thisCycleExpenses: division.thisCycleExpenses,\n upgrades: [0, division.numAdVerts],\n cities: cities,\n products: division.products === undefined ? [] : Object.keys(division.products),\n makesProducts: division.makesProducts,\n };\n }\n\n const warehouseAPI: InternalAPI = {\n getPurchaseWarehouseCost: (ctx: NetscriptContext) => (): number => {\n checkAccess(ctx, 7);\n return CorporationConstants.WarehouseInitialCost;\n },\n getUpgradeWarehouseCost:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _amt: unknown = 1): number => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const amt = ctx.helper.number(\"amount\", _amt);\n if (amt < 1) {\n throw ctx.makeRuntimeErrorMsg(\"You must provide a positive number\");\n }\n const warehouse = getWarehouse(divisionName, cityName);\n return UpgradeWarehouseCost(warehouse, amt);\n },\n hasWarehouse:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): boolean => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n return warehouse !== 0;\n },\n getWarehouse:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): NSWarehouse => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return {\n level: warehouse.level,\n loc: warehouse.loc,\n size: warehouse.size,\n sizeUsed: warehouse.sizeUsed,\n smartSupplyEnabled: warehouse.smartSupplyEnabled,\n };\n },\n getMaterial:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown): NSMaterial => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const material = getMaterial(divisionName, cityName, materialName);\n const corporation = getCorporation();\n return {\n cost: material.bCost,\n sCost: material.sCost,\n name: material.name,\n qty: material.qty,\n qlt: material.qlt,\n dmd: corporation.unlockUpgrades[2] ? material.dmd : undefined,\n cmp: corporation.unlockUpgrades[3] ? material.cmp : undefined,\n prod: material.prd,\n sell: material.sll,\n };\n },\n getProduct:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _productName: unknown): NSProduct => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const product = getProduct(divisionName, productName);\n const corporation = getCorporation();\n return {\n name: product.name,\n dmd: corporation.unlockUpgrades[2] ? product.dmd : undefined,\n cmp: corporation.unlockUpgrades[3] ? product.cmp : undefined,\n rat: product.rat,\n properties: {\n qlt: product.qlt,\n per: product.per,\n dur: product.dur,\n rel: product.rel,\n aes: product.aes,\n fea: product.fea,\n },\n pCost: product.pCost,\n sCost: product.sCost,\n cityData: product.data,\n developmentProgress: product.prog,\n };\n },\n purchaseWarehouse:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const corporation = getCorporation();\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _amt: unknown = 1): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const amt = ctx.helper.number(\"amount\", _amt);\n const corporation = getCorporation();\n if (amt < 1) {\n throw ctx.makeRuntimeErrorMsg(\"You must provide a positive number\");\n }\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName), amt);\n },\n sellMaterial:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown, _price: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const amt = ctx.helper.string(\"amt\", _amt);\n const price = ctx.helper.string(\"price\", _price);\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct:\n (ctx: NetscriptContext) =>\n (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _amt: unknown,\n _price: unknown,\n _all: unknown,\n ): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const amt = ctx.helper.string(\"amt\", _amt);\n const price = ctx.helper.string(\"price\", _price);\n const all = ctx.helper.boolean(_all);\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _productName: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const productName = ctx.helper.string(\"productName\", _productName);\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _enabled: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const enabled = ctx.helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw ctx.makeRuntimeErrorMsg(`You have not purchased the Smart Supply upgrade!`);\n SetSmartSupply(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _enabled: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const enabled = ctx.helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw ctx.makeRuntimeErrorMsg(`You have not purchased the Smart Supply upgrade!`);\n SetSmartSupplyUseLeftovers(warehouse, material, enabled);\n },\n buyMaterial:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const amt = ctx.helper.number(\"amt\", _amt);\n if (amt < 0) throw new Error(\"Invalid value for amount field! Must be numeric and greater than 0\");\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n bulkPurchase:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n if (!hasResearched(getDivision(divisionName), \"Bulk Purchasing\"))\n throw new Error(`You have not researched Bulk Purchasing in ${divisionName}`);\n const corporation = getCorporation();\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const amt = ctx.helper.number(\"amt\", _amt);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n BulkPurchase(corporation, warehouse, material, amt);\n },\n makeProduct:\n (ctx: NetscriptContext) =>\n (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _designInvest: unknown,\n _marketingInvest: unknown,\n ): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const designInvest = ctx.helper.number(\"designInvest\", _designInvest);\n const marketingInvest = ctx.helper.number(\"marketingInvest\", _marketingInvest);\n const corporation = getCorporation();\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n limitProductProduction:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _productName: unknown, _cityName: unknown, _qty: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const qty = ctx.helper.number(\"qty\", _qty);\n LimitProductProduction(getProduct(divisionName, productName), cityName, qty);\n },\n exportMaterial:\n (ctx: NetscriptContext) =>\n (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void => {\n checkAccess(ctx, 7);\n const sourceDivision = ctx.helper.string(\"sourceDivision\", _sourceDivision);\n const sourceCity = ctx.helper.string(\"sourceCity\", _sourceCity);\n const targetDivision = ctx.helper.string(\"targetDivision\", _targetDivision);\n const targetCity = ctx.helper.string(\"targetCity\", _targetCity);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const amt = ctx.helper.string(\"amt\", _amt);\n ExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n getDivision(targetDivision),\n );\n },\n cancelExportMaterial:\n (ctx: NetscriptContext) =>\n (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void => {\n checkAccess(ctx, 7);\n const sourceDivision = ctx.helper.string(\"sourceDivision\", _sourceDivision);\n const sourceCity = ctx.helper.string(\"sourceCity\", _sourceCity);\n const targetDivision = ctx.helper.string(\"targetDivision\", _targetDivision);\n const targetCity = ctx.helper.string(\"targetCity\", _targetCity);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const amt = ctx.helper.string(\"amt\", _amt);\n CancelExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n );\n },\n limitMaterialProduction:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _qty: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const qty = ctx.helper.number(\"qty\", _qty);\n LimitMaterialProduction(getMaterial(divisionName, cityName, materialName), qty);\n },\n setMaterialMarketTA1:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _on: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const on = ctx.helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw ctx.makeRuntimeErrorMsg(`You have not researched MarketTA.I for division: ${divisionName}`);\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _on: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const materialName = ctx.helper.string(\"materialName\", _materialName);\n const on = ctx.helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw ctx.makeRuntimeErrorMsg(`You have not researched MarketTA.II for division: ${divisionName}`);\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _productName: unknown, _on: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const on = ctx.helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw ctx.makeRuntimeErrorMsg(`You have not researched MarketTA.I for division: ${divisionName}`);\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _productName: unknown, _on: unknown): void => {\n checkAccess(ctx, 7);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const productName = ctx.helper.string(\"productName\", _productName);\n const on = ctx.helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw ctx.makeRuntimeErrorMsg(`You have not researched MarketTA.II for division: ${divisionName}`);\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n };\n\n const officeAPI: InternalAPI = {\n getHireAdVertCost:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown): number => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return division.getAdVertCost();\n },\n getHireAdVertCount:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown): number => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return division.numAdVerts;\n },\n getResearchCost:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _researchName: unknown): number => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const researchName = ctx.helper.string(\"researchName\", _researchName);\n return getResearchCost(getDivision(divisionName), researchName);\n },\n hasResearched:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _researchName: unknown): boolean => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const researchName = ctx.helper.string(\"researchName\", _researchName);\n return hasResearched(getDivision(divisionName), researchName);\n },\n getOfficeSizeUpgradeCost:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _size: unknown): number => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const size = ctx.helper.number(\"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n return CorporationConstants.OfficeInitialCost * mult;\n },\n assignJob:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _employeeName: unknown, _job: unknown): void => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const employeeName = ctx.helper.string(\"employeeName\", _employeeName);\n const job = ctx.helper.string(\"job\", _job);\n\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n const office = getOffice(divisionName, cityName);\n\n AssignJob(office, employeeName, job);\n },\n setAutoJobAssignment:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _job: unknown, _amount: unknown): boolean => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const amount = ctx.helper.number(\"amount\", _amount);\n const job = ctx.helper.string(\"job\", _job);\n\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n const office = getOffice(divisionName, cityName);\n\n return AutoAssignJob(office, job, amount);\n },\n hireEmployee:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): NSEmployee | undefined => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n const employee = office.hireRandomEmployee();\n if (employee === undefined) return undefined;\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n upgradeOfficeSize:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _size: unknown): void => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const size = ctx.helper.number(\"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _costPerEmployee: unknown): number => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const costPerEmployee = ctx.helper.number(\"costPerEmployee\", _costPerEmployee);\n\n if (costPerEmployee < 0) {\n throw new Error(\"Invalid value for Cost Per Employee field! Must be numeric and greater than 0\");\n }\n\n const corporation = getCorporation();\n const office = getOffice(divisionName, cityName);\n\n return ThrowParty(corporation, office, costPerEmployee);\n },\n buyCoffee:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): boolean => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n\n const corporation = getCorporation();\n const office = getOffice(divisionName, cityName);\n\n return BuyCoffee(corporation, office);\n },\n hireAdVert:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown): void => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const corporation = getCorporation();\n HireAdVert(corporation, getDivision(divisionName));\n },\n research:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _researchName: unknown): void => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const researchName = ctx.helper.string(\"researchName\", _researchName);\n Research(getDivision(divisionName), researchName);\n },\n getOffice:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): NSOffice => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return {\n loc: office.loc,\n size: office.size,\n minEne: office.minEne,\n maxEne: office.maxEne,\n minHap: office.minHap,\n maxHap: office.maxHap,\n minMor: office.minMor,\n maxMor: office.maxMor,\n employees: office.employees.map((e) => e.name),\n employeeProd: {\n Operations: office.employeeProd[EmployeePositions.Operations],\n Engineer: office.employeeProd[EmployeePositions.Engineer],\n Business: office.employeeProd[EmployeePositions.Business],\n Management: office.employeeProd[EmployeePositions.Management],\n \"Research & Development\": office.employeeProd[EmployeePositions.RandD],\n Training: office.employeeProd[EmployeePositions.Training],\n Unassigned: 0,\n },\n employeeJobs: {\n Operations: office.employeeJobs[EmployeePositions.Operations],\n Engineer: office.employeeJobs[EmployeePositions.Engineer],\n Business: office.employeeJobs[EmployeePositions.Business],\n Management: office.employeeJobs[EmployeePositions.Management],\n \"Research & Development\": office.employeeJobs[EmployeePositions.RandD],\n Training: office.employeeJobs[EmployeePositions.Training],\n Unassigned: office.employeeJobs[EmployeePositions.Unassigned],\n },\n };\n },\n getEmployee:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown, _employeeName: unknown): NSEmployee => {\n checkAccess(ctx, 8);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n const employeeName = ctx.helper.string(\"employeeName\", _employeeName);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n };\n\n return {\n ...warehouseAPI,\n ...officeAPI,\n expandIndustry:\n (ctx: NetscriptContext) =>\n (_industryName: unknown, _divisionName: unknown): void => {\n checkAccess(ctx);\n const industryName = ctx.helper.string(\"industryName\", _industryName);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const corporation = getCorporation();\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown, _cityName: unknown): void => {\n checkAccess(ctx);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const cityName = ctx.helper.city(\"cityName\", _cityName);\n if (!CorporationConstants.Cities.includes(cityName)) throw new Error(\"Invalid city name\");\n const corporation = getCorporation();\n const division = getDivision(divisionName);\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): void => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): void => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends:\n (ctx: NetscriptContext) =>\n (_rate: unknown): void => {\n checkAccess(ctx);\n const rate = ctx.helper.number(\"rate\", _rate);\n const max = CorporationConstants.DividendMaxRate;\n if (rate < 0 || rate > max)\n throw new Error(`Invalid value for rate field! Must be numeric, greater than 0, and less than ${max}`);\n const corporation = getCorporation();\n if (!corporation.public) throw ctx.makeRuntimeErrorMsg(`Your company has not gone public!`);\n IssueDividends(corporation, rate);\n },\n\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision:\n (ctx: NetscriptContext) =>\n (_divisionName: unknown): NSDivision => {\n checkAccess(ctx);\n const divisionName = ctx.helper.string(\"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return getSafeDivision(division);\n },\n getCorporation: (ctx: NetscriptContext) => (): CorporationInfo => {\n checkAccess(ctx);\n const corporation = getCorporation();\n return {\n name: corporation.name,\n funds: corporation.funds,\n revenue: corporation.revenue,\n expenses: corporation.expenses,\n public: corporation.public,\n totalShares: corporation.totalShares,\n numShares: corporation.numShares,\n shareSaleCooldown: corporation.shareSaleCooldown,\n issuedShares: corporation.issuedShares,\n sharePrice: corporation.sharePrice,\n dividendRate: corporation.dividendRate,\n dividendTax: corporation.dividendTax,\n dividendEarnings: corporation.getCycleDividends() / CorporationConstants.SecsPerMarketCycle,\n state: corporation.state.getState(),\n divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),\n };\n },\n createCorporation:\n (ctx: NetscriptContext) =>\n (_corporationName: unknown, _selfFund: unknown = true): boolean => {\n const corporationName = ctx.helper.string(\"corporationName\", _corporationName);\n const selfFund = ctx.helper.boolean(_selfFund);\n return createCorporation(corporationName, selfFund);\n },\n hasUnlockUpgrade:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): boolean => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n return hasUnlockUpgrade(upgradeName);\n },\n getUnlockUpgradeCost:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): number => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n return getUnlockUpgradeCost(upgradeName);\n },\n getUpgradeLevel:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): number => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n return getUpgradeLevel(ctx, upgradeName);\n },\n getUpgradeLevelCost:\n (ctx: NetscriptContext) =>\n (_upgradeName: unknown): number => {\n checkAccess(ctx);\n const upgradeName = ctx.helper.string(\"upgradeName\", _upgradeName);\n return getUpgradeLevelCost(ctx, upgradeName);\n },\n getExpandIndustryCost:\n (ctx: NetscriptContext) =>\n (_industryName: unknown): number => {\n checkAccess(ctx);\n const industryName = ctx.helper.string(\"industryName\", _industryName);\n return getExpandIndustryCost(industryName);\n },\n getExpandCityCost: (ctx: NetscriptContext) => (): number => {\n checkAccess(ctx);\n return getExpandCityCost();\n },\n getInvestmentOffer: (ctx: NetscriptContext) => (): InvestmentOffer => {\n checkAccess(ctx);\n return getInvestmentOffer();\n },\n acceptInvestmentOffer: (ctx: NetscriptContext) => (): boolean => {\n checkAccess(ctx);\n return acceptInvestmentOffer();\n },\n goPublic:\n (ctx: NetscriptContext) =>\n (_numShares: unknown): boolean => {\n checkAccess(ctx);\n const numShares = ctx.helper.number(\"numShares\", _numShares);\n return goPublic(numShares);\n },\n sellShares:\n (ctx: NetscriptContext) =>\n (_numShares: unknown): number => {\n checkAccess(ctx);\n const numShares = ctx.helper.number(\"numShares\", _numShares);\n return SellShares(getCorporation(), player, numShares);\n },\n buyBackShares:\n (ctx: NetscriptContext) =>\n (_numShares: unknown): boolean => {\n checkAccess(ctx);\n const numShares = ctx.helper.number(\"numShares\", _numShares);\n return BuyBackShares(getCorporation(), player, numShares);\n },\n bribe:\n (ctx: NetscriptContext) =>\n (_factionName: unknown, _amountCash: unknown, _amountShares: unknown): boolean => {\n checkAccess(ctx);\n const factionName = ctx.helper.string(\"factionName\", _factionName);\n const amountCash = ctx.helper.number(\"amountCash\", _amountCash);\n const amountShares = ctx.helper.number(\"amountShares\", _amountShares);\n return bribe(factionName, amountCash, amountShares);\n },\n getBonusTime: (ctx: NetscriptContext) => (): number => {\n checkAccess(ctx);\n return Math.round(getCorporation().storedCycles / 5) * 1000;\n },\n };\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Industries, IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Material } from \"./Material\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { calculateEffectWithFactors } from \"../utils/calculateEffectWithFactors\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Product } from \"./Product\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { Warehouse } from \"./Warehouse\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n corp?: ICorporation;\n type?: string;\n}\n\nexport class Industry implements IIndustry {\n name = \"\";\n type = Industries.Agriculture;\n sciResearch = new Material({ name: \"Scientific Research\" });\n researched: { [key: string]: boolean | undefined } = {};\n reqMats: { [key: string]: number | undefined } = {};\n\n //An array of the name of materials being produced\n prodMats: string[] = [];\n\n products: { [key: string]: Product | undefined } = {};\n makesProducts = false;\n\n awareness = 0;\n popularity = 0; //Should always be less than awareness\n startingCost = 0;\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n reFac = 0; //Real estate Factor\n sciFac = 0; //Scientific Research Factor, affects quality\n hwFac = 0; //Hardware factor\n robFac = 0; //Robotics Factor\n aiFac = 0; //AI Cores factor;\n advFac = 0; //Advertising factor, affects sales\n\n prodMult = 0; //Production multiplier\n\n //Financials\n lastCycleRevenue: number;\n lastCycleExpenses: number;\n thisCycleRevenue: number;\n thisCycleExpenses: number;\n\n state = \"START\";\n newInd = true;\n\n //Maps locations to warehouses. 0 if no warehouse at that location\n warehouses: { [key: string]: Warehouse | 0 };\n\n //Maps locations to offices. 0 if no office at that location\n offices: { [key: string]: OfficeSpace | 0 } = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new OfficeSpace({\n loc: CityName.Sector12,\n size: CorporationConstants.OfficeInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n numAdVerts = 0;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : Industries.Agriculture;\n\n //Financials\n this.lastCycleRevenue = 0;\n this.lastCycleExpenses = 0;\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n this.warehouses = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new Warehouse({\n corp: params.corp,\n industry: this,\n loc: CityName.Sector12,\n size: CorporationConstants.WarehouseInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n this.init();\n }\n\n init(): void {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = IndustryStartingCosts[this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n switch (this.type) {\n case Industries.Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2,\n };\n this.prodMats = [\"Energy\"];\n break;\n case Industries.Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1,\n };\n this.prodMats = [\"Water\"];\n break;\n case Industries.Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n case Industries.Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5,\n };\n this.prodMats = [\"Food\"];\n break;\n case Industries.Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8,\n };\n this.prodMats = [\"Metal\"];\n break;\n case Industries.Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5,\n };\n this.prodMats = [\"Chemicals\"];\n break;\n case Industries.Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5,\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n case Industries.Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1,\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n case Industries.Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3,\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n case Industries.Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n case Industries.Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5,\n };\n this.makesProducts = true;\n break;\n case Industries.RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4,\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText(): string {\n if (!this.makesProducts) return \"\";\n switch (this.type) {\n case Industries.Food:\n return \"create and manage restaurants\";\n case Industries.Tobacco:\n return \"create tobacco and tobacco-related products\";\n case Industries.Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n case Industries.Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n case Industries.Robotics:\n return \"build specialized robots and robot-related products\";\n case Industries.Software:\n return \"develop computer software\";\n case Industries.Healthcare:\n return \"build and manage hospitals\";\n case Industries.RealEstate:\n return \"develop and manage real estate properties\";\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts(): number {\n if (!this.makesProducts) return 0;\n\n // Calculate additional number of allowed Products from Research/Upgrades\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n\n return CorporationConstants.BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts(): boolean {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n }\n\n //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n calculateProductionFactors(): void {\n let multSum = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const warehouse = this.warehouses[city];\n if (!(warehouse instanceof Warehouse)) {\n continue;\n }\n\n const materials = warehouse.materials;\n\n const cityMult =\n Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) *\n Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) *\n Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) *\n Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? (this.prodMult = 1) : (this.prodMult = multSum);\n }\n\n updateWarehouseSizeUsed(warehouse: Warehouse): void {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n }\n }\n }\n\n process(marketCycles = 1, state: string, corporation: ICorporation): void {\n this.state = state;\n\n //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n dialogBoxCreate(\n \"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\",\n );\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n }\n this.lastCycleRevenue = this.thisCycleRevenue / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n if (this.lastCycleRevenue > 0) {\n this.newInd = false;\n }\n\n // Process offices (and the employees in them)\n let employeeSalary = 0;\n for (const officeLoc of Object.keys(this.offices)) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n if (office instanceof OfficeSpace) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n this.thisCycleExpenses = this.thisCycleExpenses + employeeSalary;\n\n // Process change in demand/competition of materials/products\n this.processMaterialMarket();\n this.processProductMarket(marketCycles);\n\n // Process loss of popularity\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity);\n\n // Process Dreamsense gains\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n if (popularityGain > 0) {\n const awareness = this.awareness + awarenessGain * marketCycles;\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = this.popularity + popularityGain * marketCycles;\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n }\n\n return;\n }\n\n // Process production, purchase, and import/export of materials\n let res = this.processMaterials(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n\n // Process creation, production & sale of products\n res = this.processProducts(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n }\n\n // Process change in demand and competition for this industry's materials\n processMaterialMarket(): void {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats;\n\n //Only 'process the market' for materials that this industry deals with\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[CorporationConstants.Cities[i]] instanceof Warehouse) {\n const wh = this.warehouses[CorporationConstants.Cities[i]];\n if (wh === 0) continue;\n for (const name of Object.keys(reqMats)) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n }\n\n //Produced materials are stored in an array\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n }\n\n //Process these twice because these boost production\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n }\n\n // Process change in demand and competition for this industry's products\n processProductMarket(marketCycles = 1): void {\n // Demand gradually decreases, and competition gradually increases\n for (const name of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = getRandomInt(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (\n this.type === Industries.Pharmaceutical ||\n this.type === Industries.Software ||\n this.type === Industries.Robotics\n ) {\n change *= 3;\n }\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n }\n\n //Process production, purchase, and import/export of materials\n processMaterials(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors();\n\n //At the start of the export state, set the imports of everything to 0\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n if (!(this.warehouses[city] instanceof Warehouse)) {\n continue;\n }\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof Warehouse) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\": {\n /* Process purchase of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n\n // smart supply\n const smartBuy: { [key: string]: number | undefined } = {};\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName];\n\n //Smart supply tracker is stored as per second rate\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n }\n\n // Find which material were trying to create the least amount of product with.\n let worseAmt = 1e99;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n }\n\n // Align all the materials to the smallest amount.\n for (const matName of Object.keys(smartBuy)) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n }\n\n // Calculate the total size of all things were trying to buy\n let totalSize = 0;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * MaterialSizes[matName];\n }\n\n // Shrink to the size of available space.\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n if (totalSize > freeSpace) {\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor((buyAmt * freeSpace) / totalSize);\n }\n }\n\n // Use the materials already in the warehouse if the option is on.\n for (const matName of Object.keys(smartBuy)) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n }\n\n // buy them\n for (const matName of Object.keys(smartBuy)) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n break;\n }\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]];\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office) *\n this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() *\n this.getProductionMultiplier(); // Multiplier from Research\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n\n // Calculate net change in warehouse storage making the produced materials will cost\n let totalMatSize = 0;\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += MaterialSizes[this.prodMats[tmp]];\n }\n for (const reqMatName of Object.keys(this.reqMats)) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= MaterialSizes[reqMatName] * normQty;\n }\n // If not enough space in warehouse, limit the amount of produced materials\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n }\n\n // Keep track of production for smart supply (/s)\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n // Make sure we have enough resource to make our materials\n let producableFrac = 1;\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n }\n\n // Make our materials if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(this.reqMats)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt =\n office.employeeProd[EmployeePositions.Engineer] / 90 +\n Math.pow(this.sciResearch.qty, this.sciFac) +\n Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n }\n\n //Per second\n const fooProd = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName of Object.keys(this.reqMats)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n }\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n\n // Determine the cost that the material will be sold at\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n if (mat.marketTa2) {\n const prod = mat.prd;\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n (mat.qlt + 0.001) *\n marketFactor *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n }\n\n // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n mat.marketTa2Price = optimalPrice;\n\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (isString(mat.sCost)) {\n sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n }\n\n // Calculate how much of the material sells (per second)\n let markup = 1;\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n mat.maxsll =\n (mat.qlt + 0.001) *\n marketFactor *\n markup *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (isString(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = (mat.sllman[1] as string).replace(/MAX/g, (mat.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell amount for material \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. The sell amount \" +\n \"is being set to zero\",\n );\n sellAmt = 0;\n }\n sellAmt = Math.min(mat.maxsll, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = mat.maxsll;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(mat.maxsll, mat.sllman[1] as number);\n }\n\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n break;\n\n case \"EXPORT\":\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(\n /MAX/g,\n (mat.qty / (CorporationConstants.SecsPerMarketCycle * marketCycles) + \"\").toUpperCase(),\n );\n let amt = 0;\n try {\n amt = eval(amtStr);\n } catch (e) {\n dialogBoxCreate(\n \"Calculating export for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division failed with \" +\n \"error: \" +\n e,\n );\n continue;\n }\n if (isNaN(amt)) {\n dialogBoxCreate(\n \"Error calculating export amount for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division.\",\n );\n continue;\n }\n amt = amt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n if (amt === 0) {\n break; //None left\n }\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n if (!(expWarehouse instanceof Warehouse)) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n }\n\n // Make sure theres enough space in warehouse\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / MaterialSizes[matName]);\n amt = Math.min(maxAmt, amt);\n }\n expWarehouse.materials[matName].imp +=\n amt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n }\n //totalExp should be per second\n mat.totalExp /= CorporationConstants.SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n if (office instanceof OfficeSpace) {\n this.sciResearch.qty +=\n 0.004 *\n Math.pow(office.employeeProd[EmployeePositions.RandD], 0.5) *\n corporation.getScientificResearchMultiplier() *\n this.getScientificResearchMultiplier();\n }\n }\n return [revenue, expenses];\n }\n\n //Process production & sale of this industry's FINISHED products (including all of their stats)\n processProducts(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0;\n const expenses = 0;\n\n //Create products\n if (this.state === \"PRODUCTION\") {\n for (const prodName of Object.keys(this.products)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue;\n\n prod.createProduct(marketCycles, office.employeeProd);\n if (prod.prog >= 100) {\n prod.finishProduct(this);\n }\n break;\n }\n }\n }\n\n //Produce Products\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod instanceof Product && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n return [revenue, expenses];\n }\n\n //Processes FINISHED products\n processProduct(marketCycles = 1, product: Product, corporation: ICorporation): number {\n let totalProfit = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n if (warehouse instanceof Warehouse) {\n switch (this.state) {\n case \"PRODUCTION\": {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office, { forProduct: true }) *\n corporation.getProductionMultiplier() *\n this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n let prod;\n\n //Account for whether production is manually limited\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n //Calculate net change in warehouse storage making the Products will cost\n let netStorageSize = product.siz;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= MaterialSizes[reqMatName] * normQty;\n }\n }\n\n //If there's not enough space in warehouse, limit the amount of Product\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n //Make sure we have enough resources to make our Products\n let producableFrac = 1;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n //Make our Products if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n }\n //Quantity\n product.data[city][0] += prod * producableFrac;\n }\n\n //Keep track of production Per second\n product.data[city][1] = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n break;\n }\n case \"SALE\": {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n }\n\n // Since its a product, its production cost is increased for labor\n product.pCost *= CorporationConstants.ProductProductionCostRatio;\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n const markupLimit = product.rat / product.mku;\n let sCost;\n if (product.marketTa2) {\n const prod = product.data[city][1];\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n }\n\n // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (isString(product.sCost)) {\n const sCostString = product.sCost as string;\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n product.maxsll =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n Math.pow(markup, 2) *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (product.sllman[city][0] && isString(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, (product.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n try {\n tmp = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell price expression for \" +\n product.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. Sell price is being set to MAX\",\n );\n tmp = product.maxsll;\n }\n sellAmt = Math.min(product.maxsll, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(product.maxsll, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = product.maxsll;\n }\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n break;\n }\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n }\n }\n return totalProfit;\n }\n\n discontinueProduct(product: Product): void {\n for (const productName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n getAdVertCost(): number {\n return 1e9 * Math.pow(1.06, this.numAdVerts);\n }\n\n applyAdVert(corporation: ICorporation): void {\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n const awareness = (this.awareness + 3 * advMult) * (1.01 * advMult);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = (this.popularity + 1 * advMult) * ((1 + getRandomInt(1, 3) / 100) * advMult);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n\n ++this.numAdVerts;\n }\n\n // Returns how much of a material can be produced based of office productivity (employee stats)\n getOfficeProductivity(office: OfficeSpace, params: { forProduct?: boolean } = {}): number {\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n\n if (total <= 0) return 0;\n\n // Management is a multiplier for the production from Operations and Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor;\n\n // Generic multiplier for the production. Used for game-balancing purposes\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n }\n\n // Returns a multiplier based on the office' 'Business' employees that affects sales\n getBusinessFactor(office: OfficeSpace): number {\n const businessProd = 1 + office.employeeProd[EmployeePositions.Business];\n\n return calculateEffectWithFactors(businessProd, 0.26, 10e3);\n }\n\n //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n getAdvertisingFactors(): [number, number, number, number] {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n }\n\n //Returns a multiplier based on a materials demand and competition that affects sales\n getMarketFactor(mat: { dmd: number; cmp: number }): number {\n return Math.max(0.1, (mat.dmd * (100 - mat.cmp)) / 100);\n }\n\n // Returns a boolean indicating whether this Industry has the specified Research\n hasResearch(name: string): boolean {\n return this.researched[name] === true;\n }\n\n updateResearchTree(): void {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`);\n\n // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research of Object.keys(this.researched)) {\n researchTree.research(research);\n }\n }\n }\n\n // Get multipliers from Research\n getAdvertisingMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Industry\", this);\n }\n\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n static fromJSON(value: IReviverValue): Industry {\n return Generic_fromJSON(Industry, value.data);\n }\n}\n\nReviver.constructors.Industry = Industry;\n","/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n */\nexport function calculateEffectWithFactors(n: number, expFac: number, linearFac: number): number {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\n","import { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from \"../utils/JSONReviver\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n morale?: number;\n happiness?: number;\n energy?: number;\n intelligence?: number;\n charisma?: number;\n experience?: number;\n creativity?: number;\n efficiency?: number;\n salary?: number;\n loc?: string;\n}\n\nexport class Employee {\n name: string;\n mor: number;\n hap: number;\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n sal: number;\n cyclesUntilRaise = CorporationConstants.CyclesPerEmployeeRaise;\n loc: string;\n pos: string;\n nextPos: string;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"Bobby\";\n\n //Morale, happiness, and energy are 0-100\n this.mor = params.morale ? params.morale : getRandomInt(50, 100);\n this.hap = params.happiness ? params.happiness : getRandomInt(50, 100);\n this.ene = params.energy ? params.energy : getRandomInt(50, 100);\n\n this.int = params.intelligence ? params.intelligence : getRandomInt(10, 50);\n this.cha = params.charisma ? params.charisma : getRandomInt(10, 50);\n this.exp = params.experience ? params.experience : getRandomInt(10, 50);\n this.cre = params.creativity ? params.creativity : getRandomInt(10, 50);\n this.eff = params.efficiency ? params.efficiency : getRandomInt(10, 50);\n this.sal = params.salary ? params.salary : getRandomInt(0.1, 5);\n\n this.loc = params.loc ? params.loc : \"\";\n this.pos = EmployeePositions.Unassigned;\n this.nextPos = this.pos;\n }\n\n //Returns the amount the employee needs to be paid\n process(marketCycles = 1): number {\n const gain = 0.003 * marketCycles;\n const det = gain * Math.random();\n this.exp += gain;\n\n //Training\n const trainingEff = gain * Math.random();\n if (this.pos === EmployeePositions.Training) {\n //To increase creativity and intelligence special upgrades are needed\n this.cha += trainingEff;\n this.exp += trainingEff;\n this.eff += trainingEff;\n }\n\n this.ene -= det;\n this.hap -= det;\n\n const salary = this.sal * marketCycles * CorporationConstants.SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation: ICorporation, industry: IIndustry): number {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n const prodBase = this.mor * this.hap * this.ene * 1e-6;\n let prodMult = 0;\n switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case EmployeePositions.Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n case EmployeePositions.Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n case EmployeePositions.Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n case EmployeePositions.Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n case EmployeePositions.RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n case EmployeePositions.Unassigned:\n case EmployeePositions.Training:\n prodMult = 0;\n break;\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n return prodBase * prodMult;\n }\n\n toJSON(): IReviverValue {\n return Generic_toJSON(\"Employee\", this);\n }\n\n static fromJSON(value: IReviverValue): Employee {\n return Generic_fromJSON(Employee, value.data);\n }\n}\n\nReviver.constructors.Employee = Employee;\n","import { Industries } from \"./IndustryData\";\nimport { IMap } from \"../types\";\n\nexport interface IProductRatingWeight {\n Aesthetics?: number;\n Durability?: number;\n Features?: number;\n Quality?: number;\n Performance?: number;\n Reliability?: number;\n}\n\nexport const ProductRatingWeights: IMap = {\n [Industries.Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2,\n },\n [Industries.Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2,\n },\n [Industries.Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2,\n },\n [Industries.Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n [Industries.Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2,\n },\n [Industries.Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2,\n },\n [Industries.Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1,\n },\n [Industries.RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1,\n },\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateServerGrowth } from \"../Server/formulas/grow\";\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateNodeCost,\n} from \"../Hacknet/formulas/HacknetNodes\";\nimport {\n calculateHashGainRate as HScalculateHashGainRate,\n calculateLevelUpgradeCost as HScalculateLevelUpgradeCost,\n calculateRamUpgradeCost as HScalculateRamUpgradeCost,\n calculateCoreUpgradeCost as HScalculateCoreUpgradeCost,\n calculateCacheUpgradeCost as HScalculateCacheUpgradeCost,\n calculateServerCost as HScalculateServerCost,\n} from \"../Hacknet/formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { calculateSkill, calculateExp } from \"../PersonObjects/formulas/skill\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { Programs } from \"../Programs/Programs\";\nimport {\n Formulas as IFormulas,\n HacknetNodeConstants as DefHacknetNodeConstants,\n HacknetServerConstants as DefHacknetServerConstants,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport {\n calculateRespectGain,\n calculateWantedLevelGain,\n calculateMoneyGain,\n calculateWantedPenalty,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"../Gang/formulas/formulas\";\nimport { favorToRep as calculateFavorToRep, repToFavor as calculateRepToFavor } from \"../Faction/formulas/favor\";\nimport { repFromDonation } from \"../Faction/formulas/donation\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\n\nexport function NetscriptFormulas(player: IPlayer, helper: INetscriptHelper): InternalAPI {\n const checkFormulasAccess = function (ctx: NetscriptContext): void {\n if (!player.hasProgram(Programs.Formulas.name)) {\n throw helper.makeRuntimeErrorMsg(`formulas.${ctx.function}`, `Requires Formulas.exe to run.`);\n }\n };\n return {\n reputation: {\n calculateFavorToRep:\n (ctx: NetscriptContext) =>\n (_favor: unknown): number => {\n const favor = ctx.helper.number(\"favor\", _favor);\n checkFormulasAccess(ctx);\n return calculateFavorToRep(favor);\n },\n calculateRepToFavor:\n (ctx: NetscriptContext) =>\n (_rep: unknown): number => {\n const rep = ctx.helper.number(\"rep\", _rep);\n checkFormulasAccess(ctx);\n return calculateRepToFavor(rep);\n },\n repFromDonation:\n (ctx: NetscriptContext) =>\n (_amount: unknown, _player: unknown): number => {\n const amount = ctx.helper.number(\"amount\", _amount);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return repFromDonation(amount, player);\n },\n },\n skills: {\n calculateSkill:\n (ctx: NetscriptContext) =>\n (_exp: unknown, _mult: unknown = 1): number => {\n const exp = ctx.helper.number(\"exp\", _exp);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return calculateSkill(exp, mult);\n },\n calculateExp:\n (ctx: NetscriptContext) =>\n (_skill: unknown, _mult: unknown = 1): number => {\n const skill = ctx.helper.number(\"skill\", _skill);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return calculateExp(skill, mult);\n },\n },\n hacking: {\n hackChance:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculateHackingChance(server, player);\n },\n hackExp:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculateHackingExpGain(server, player);\n },\n hackPercent:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent:\n (ctx: NetscriptContext) =>\n (_server: unknown, _threads: unknown, _player: unknown, _cores: unknown = 1): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n const threads = ctx.helper.number(\"threads\", _threads);\n const cores = ctx.helper.number(\"cores\", _cores);\n checkFormulasAccess(ctx);\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculateHackingTime(server, player) * 1000;\n },\n growTime:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculateGrowTime(server, player) * 1000;\n },\n weakenTime:\n (ctx: NetscriptContext) =>\n (_server: unknown, _player: unknown): number => {\n const server = ctx.helper.server(_server);\n const player = ctx.helper.player(_player);\n checkFormulasAccess(ctx);\n return calculateWeakenTime(server, player) * 1000;\n },\n },\n hacknetNodes: {\n moneyGainRate:\n (ctx: NetscriptContext) =>\n (_level: unknown, _ram: unknown, _cores: unknown, _mult: unknown = 1): number => {\n const level = ctx.helper.number(\"level\", _level);\n const ram = ctx.helper.number(\"ram\", _ram);\n const cores = ctx.helper.number(\"cores\", _cores);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number => {\n const startingLevel = ctx.helper.number(\"startingLevel\", _startingLevel);\n const extraLevels = ctx.helper.number(\"extraLevels\", _extraLevels);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number => {\n const startingRam = ctx.helper.number(\"startingRam\", _startingRam);\n const extraLevels = ctx.helper.number(\"extraLevels\", _extraLevels);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number => {\n const startingCore = ctx.helper.number(\"startingCore\", _startingCore);\n const extraCores = ctx.helper.number(\"extraCores\", _extraCores);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost:\n (ctx: NetscriptContext) =>\n (_n: unknown, _mult: unknown): number => {\n const n = ctx.helper.number(\"n\", _n);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return calculateNodeCost(n, mult);\n },\n constants: (ctx: NetscriptContext) => (): DefHacknetNodeConstants => {\n checkFormulasAccess(ctx);\n return Object.assign({}, HacknetNodeConstants);\n },\n },\n hacknetServers: {\n hashGainRate:\n (ctx: NetscriptContext) =>\n (_level: unknown, _ramUsed: unknown, _maxRam: unknown, _cores: unknown, _mult: unknown = 1): number => {\n const level = ctx.helper.number(\"level\", _level);\n const ramUsed = ctx.helper.number(\"ramUsed\", _ramUsed);\n const maxRam = ctx.helper.number(\"maxRam\", _maxRam);\n const cores = ctx.helper.number(\"cores\", _cores);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return HScalculateHashGainRate(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number => {\n const startingLevel = ctx.helper.number(\"startingLevel\", _startingLevel);\n const extraLevels = ctx.helper.number(\"extraLevels\", _extraLevels);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number => {\n const startingRam = ctx.helper.number(\"startingRam\", _startingRam);\n const extraLevels = ctx.helper.number(\"extraLevels\", _extraLevels);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number => {\n const startingCore = ctx.helper.number(\"startingCore\", _startingCore);\n const extraCores = ctx.helper.number(\"extraCores\", _extraCores);\n const costMult = ctx.helper.number(\"costMult\", _costMult);\n checkFormulasAccess(ctx);\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost:\n (ctx: NetscriptContext) =>\n (_startingCache: unknown, _extraCache: unknown = 1): number => {\n const startingCache = ctx.helper.number(\"startingCache\", _startingCache);\n const extraCache = ctx.helper.number(\"extraCache\", _extraCache);\n checkFormulasAccess(ctx);\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost:\n (ctx: NetscriptContext) =>\n (_upgName: unknown, _level: unknown): number => {\n const upgName = helper.string(\"hashUpgradeCost\", \"upgName\", _upgName);\n const level = ctx.helper.number(\"level\", _level);\n checkFormulasAccess(ctx);\n const upg = player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw helper.makeRuntimeErrorMsg(\n \"formulas.hacknetServers.calculateHashUpgradeCost\",\n `Invalid Hash Upgrade: ${upgName}`,\n );\n }\n return upg.getCost(level);\n },\n hacknetServerCost:\n (ctx: NetscriptContext) =>\n (_n: unknown, _mult: unknown = 1): number => {\n const n = ctx.helper.number(\"n\", _n);\n const mult = ctx.helper.number(\"mult\", _mult);\n checkFormulasAccess(ctx);\n return HScalculateServerCost(n, mult);\n },\n constants: (ctx: NetscriptContext) => (): DefHacknetServerConstants => {\n checkFormulasAccess(ctx);\n return Object.assign({}, HacknetServerConstants);\n },\n },\n gang: {\n wantedPenalty:\n (ctx: NetscriptContext) =>\n (_gang: unknown): number => {\n const gang = ctx.helper.gang(_gang);\n checkFormulasAccess(ctx);\n return calculateWantedPenalty(gang);\n },\n respectGain:\n (ctx: NetscriptContext) =>\n (_gang: unknown, _member: unknown, _task: unknown): number => {\n const gang = ctx.helper.gang(_gang);\n const member = ctx.helper.gangMember(_member);\n const task = ctx.helper.gangTask(_task);\n checkFormulasAccess(ctx);\n return calculateRespectGain(gang, member, task);\n },\n wantedLevelGain:\n (ctx: NetscriptContext) =>\n (_gang: unknown, _member: unknown, _task: unknown): number => {\n const gang = ctx.helper.gang(_gang);\n const member = ctx.helper.gangMember(_member);\n const task = ctx.helper.gangTask(_task);\n checkFormulasAccess(ctx);\n return calculateWantedLevelGain(gang, member, task);\n },\n moneyGain:\n (ctx: NetscriptContext) =>\n (_gang: unknown, _member: unknown, _task: unknown): number => {\n const gang = ctx.helper.gang(_gang);\n const member = ctx.helper.gangMember(_member);\n const task = ctx.helper.gangTask(_task);\n checkFormulasAccess(ctx);\n return calculateMoneyGain(gang, member, task);\n },\n ascensionPointsGain:\n (ctx: NetscriptContext) =>\n (_exp: unknown): number => {\n const exp = ctx.helper.number(\"exp\", _exp);\n checkFormulasAccess(ctx);\n return calculateAscensionPointsGain(exp);\n },\n ascensionMultiplier:\n (ctx: NetscriptContext) =>\n (_points: unknown): number => {\n const points = ctx.helper.number(\"points\", _points);\n checkFormulasAccess(ctx);\n return calculateAscensionMult(points);\n },\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport { StockMarket, SymbolToStockMap, placeOrder, cancelOrder, initStockMarketFn } from \"../StockMarket/StockMarket\";\nimport { getBuyTransactionCost, getSellTransactionGain } from \"../StockMarket/StockMarketHelpers\";\nimport { OrderTypes } from \"../StockMarket/data/OrderTypes\";\nimport { PositionTypes } from \"../StockMarket/data/PositionTypes\";\nimport { StockSymbols } from \"../StockMarket/data/StockSymbols\";\nimport {\n getStockMarket4SDataCost,\n getStockMarket4STixApiCost,\n getStockMarketWseCost,\n getStockMarketTixApiCost,\n} from \"../StockMarket/StockMarketCosts\";\nimport { Stock } from \"../StockMarket/Stock\";\nimport { StockOrder, TIX } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { InternalAPI, NetscriptContext } from \"src/Netscript/APIWrapper\";\n\nexport function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript): InternalAPI {\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (ctx: NetscriptContext): void {\n if (!player.hasWseAccount) {\n throw ctx.makeRuntimeErrorMsg(`You don't have WSE Access! Cannot use ${ctx.function}()`);\n }\n if (!player.hasTixApiAccess) {\n throw ctx.makeRuntimeErrorMsg(`You don't have TIX API Access! Cannot use ${ctx.function}()`);\n }\n };\n\n const getStockFromSymbol = function (ctx: NetscriptContext, symbol: string): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw ctx.makeRuntimeErrorMsg(`Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n\n return {\n getSymbols: (ctx: NetscriptContext) => (): string[] => {\n checkTixApiAccess(ctx);\n return Object.values(StockSymbols);\n },\n getPrice:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n\n return stock.price;\n },\n getAskPrice:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n\n return stock.getAskPrice();\n },\n getBidPrice:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n\n return stock.getBidPrice();\n },\n getPosition:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): [number, number, number, number] => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n checkTixApiAccess(ctx);\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw ctx.makeRuntimeErrorMsg(`Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getMaxShares:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n\n return stock.maxShares;\n },\n getPurchaseCost:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown, _posType: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n let shares = ctx.helper.number(\"shares\", _shares);\n const posType = ctx.helper.string(\"posType\", _posType);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return Infinity;\n }\n\n const res = getBuyTransactionCost(stock, shares, pos);\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getSaleGain:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown, _posType: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n let shares = ctx.helper.number(\"shares\", _shares);\n const posType = ctx.helper.string(\"posType\", _posType);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return 0;\n }\n\n const res = getSellTransactionGain(stock, shares, pos);\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.getAskPrice() : 0;\n },\n sellStock:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n checkTixApiAccess(ctx);\n const stock = getStockFromSymbol(ctx, symbol);\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n short:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n checkTixApiAccess(ctx);\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw ctx.makeRuntimeErrorMsg(\"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n const stock = getStockFromSymbol(ctx, symbol);\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n sellShort:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n checkTixApiAccess(ctx);\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw ctx.makeRuntimeErrorMsg(\"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n const stock = getStockFromSymbol(ctx, symbol);\n const res = sellShort(stock, shares, workerScript, {});\n\n return res ? stock.getAskPrice() : 0;\n },\n placeOrder:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown, _price: unknown, _type: unknown, _pos: unknown): boolean => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n const price = ctx.helper.number(\"price\", _price);\n const type = ctx.helper.string(\"type\", _type);\n const pos = ctx.helper.string(\"pos\", _pos);\n checkTixApiAccess(ctx);\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw ctx.makeRuntimeErrorMsg(\"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n const stock = getStockFromSymbol(ctx, symbol);\n\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid position type: ${pos}`);\n }\n\n return placeOrder(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder:\n (ctx: NetscriptContext) =>\n (_symbol: unknown, _shares: unknown, _price: unknown, _type: unknown, _pos: unknown): boolean => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n const shares = ctx.helper.number(\"shares\", _shares);\n const price = ctx.helper.number(\"price\", _price);\n const type = ctx.helper.string(\"type\", _type);\n const pos = ctx.helper.string(\"pos\", _pos);\n checkTixApiAccess(ctx);\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw ctx.makeRuntimeErrorMsg(\"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n const stock = getStockFromSymbol(ctx, symbol);\n if (isNaN(shares) || isNaN(price)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw ctx.makeRuntimeErrorMsg(`Invalid position type: ${pos}`);\n }\n const params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos,\n };\n return cancelOrder(params, workerScript);\n },\n getOrders: (ctx: NetscriptContext) => (): StockOrder => {\n checkTixApiAccess(ctx);\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw ctx.makeRuntimeErrorMsg(\"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders: StockOrder = {};\n\n const stockMarketOrders = StockMarket[\"Orders\"];\n for (const symbol of Object.keys(stockMarketOrders)) {\n const orderBook = stockMarketOrders[symbol];\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos,\n });\n }\n }\n }\n\n return orders;\n },\n getVolatility:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw ctx.makeRuntimeErrorMsg(\"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(ctx, symbol);\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getForecast:\n (ctx: NetscriptContext) =>\n (_symbol: unknown): number => {\n const symbol = ctx.helper.string(\"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw ctx.makeRuntimeErrorMsg(\"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(ctx, symbol);\n\n let forecast = 50;\n stock.b ? (forecast += stock.otlkMag) : (forecast -= stock.otlkMag);\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: (ctx: NetscriptContext) => (): boolean => {\n if (player.has4SData) {\n ctx.log(() => \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (player.money < getStockMarket4SDataCost()) {\n ctx.log(() => \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n player.has4SData = true;\n player.loseMoney(getStockMarket4SDataCost(), \"stock\");\n ctx.log(() => \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: (ctx: NetscriptContext) => (): boolean => {\n checkTixApiAccess(ctx);\n\n if (player.has4SDataTixApi) {\n ctx.log(() => \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (player.money < getStockMarket4STixApiCost()) {\n ctx.log(() => \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n player.has4SDataTixApi = true;\n player.loseMoney(getStockMarket4STixApiCost(), \"stock\");\n ctx.log(() => \"Purchased 4S Market Data TIX API\");\n return true;\n },\n purchaseWseAccount: (ctx: NetscriptContext) => (): boolean => {\n if (player.hasWseAccount) {\n ctx.log(() => \"Already purchased WSE Account\");\n return true;\n }\n\n if (player.money < getStockMarketWseCost()) {\n ctx.log(() => \"Not enough money to purchase WSE Account Access\");\n return false;\n }\n\n player.hasWseAccount = true;\n initStockMarketFn();\n player.loseMoney(getStockMarketWseCost(), \"stock\");\n ctx.log(() => \"Purchased WSE Account Access\");\n return true;\n },\n purchaseTixApi: (ctx: NetscriptContext) => (): boolean => {\n if (player.hasTixApiAccess) {\n ctx.log(() => \"Already purchased TIX API\");\n return true;\n }\n\n if (player.money < getStockMarketTixApiCost()) {\n ctx.log(() => \"Not enough money to purchase TIX API Access\");\n return false;\n }\n\n player.hasTixApiAccess = true;\n player.loseMoney(getStockMarketTixApiCost(), \"stock\");\n ctx.log(() => \"Purchased TIX API\");\n return true;\n },\n };\n}\n","import { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\nimport { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { hasAugmentationPrereqs } from \"../Faction/FactionHelpers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { GraftableAugmentation } from \"../PersonObjects/Grafting/GraftableAugmentation\";\nimport { getGraftingAvailableAugs, calculateGraftingTimeWithBonus } from \"../PersonObjects/Grafting/GraftingHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Grafting as IGrafting } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Router } from \"../ui/GameRoot\";\nimport { GraftingWork } from \"../Work/GraftingWork\";\n\nexport function NetscriptGrafting(player: IPlayer): InternalAPI {\n const checkGraftingAPIAccess = (ctx: NetscriptContext): void => {\n if (!player.canAccessGrafting()) {\n throw ctx.makeRuntimeErrorMsg(\n \"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10\",\n );\n }\n };\n\n return {\n getAugmentationGraftPrice:\n (ctx: NetscriptContext) =>\n (_augName: unknown): number => {\n const augName = ctx.helper.string(\"augName\", _augName);\n checkGraftingAPIAccess(ctx);\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid aug: ${augName}`);\n }\n const graftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n return graftableAug.cost;\n },\n\n getAugmentationGraftTime:\n (ctx: NetscriptContext) =>\n (_augName: string): number => {\n const augName = ctx.helper.string(\"augName\", _augName);\n checkGraftingAPIAccess(ctx);\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n throw ctx.makeRuntimeErrorMsg(`Invalid aug: ${augName}`);\n }\n const graftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n return calculateGraftingTimeWithBonus(player, graftableAug);\n },\n\n getGraftableAugmentations: (ctx: NetscriptContext) => (): string[] => {\n checkGraftingAPIAccess(ctx);\n const graftableAugs = getGraftingAvailableAugs(player);\n return graftableAugs;\n },\n\n graftAugmentation:\n (ctx: NetscriptContext) =>\n (_augName: string, _focus: unknown = true): boolean => {\n const augName = ctx.helper.string(\"augName\", _augName);\n const focus = ctx.helper.boolean(_focus);\n checkGraftingAPIAccess(ctx);\n if (player.city !== CityName.NewTokyo) {\n throw ctx.makeRuntimeErrorMsg(\"You must be in New Tokyo to begin grafting an Augmentation.\");\n }\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n ctx.log(() => `Invalid aug: ${augName}`);\n return false;\n }\n\n const wasFocusing = player.focus;\n\n const craftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n if (player.money < craftableAug.cost) {\n ctx.log(() => `You don't have enough money to craft ${augName}`);\n return false;\n }\n\n if (!hasAugmentationPrereqs(craftableAug.augmentation)) {\n ctx.log(() => `You don't have the pre-requisites for ${augName}`);\n return false;\n }\n\n player.startWork(\n new GraftingWork({\n singularity: true,\n augmentation: augName,\n player: player,\n }),\n );\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n\n ctx.log(() => `Began grafting Augmentation ${augName}.`);\n return true;\n },\n };\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport ArrowForwardIos from \"@mui/icons-material/ArrowForwardIos\";\nimport ArrowBackIos from \"@mui/icons-material/ArrowBackIos\";\nimport { ITutorialEvents } from \"./ITutorialEvents\";\nimport { CopyableText } from \"../React/CopyableText\";\n\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport StorageIcon from \"@mui/icons-material/Storage\";\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport {\n iTutorialPrevStep,\n iTutorialNextStep,\n ITutorial,\n iTutorialSteps,\n iTutorialEnd,\n} from \"../../InteractiveTutorial\";\nimport { NSSelection } from \"./NSSelection\";\n\ninterface IContent {\n content: React.ReactElement;\n canNext: boolean;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n borderBottom: \"1px solid \" + theme.palette.primary.main,\n },\n code: {\n whiteSpace: \"pre\",\n backgroundColor: theme.palette.background.paper,\n },\n }),\n);\n\nenum Language {\n None,\n NS1,\n NS2,\n}\n\nexport function InteractiveTutorialRoot(): React.ReactElement {\n const [nsSelectionOpen, setNSSelectionOpen] = useState(false);\n const [language, setLanguage] = useState(Language.None);\n const classes = useStyles();\n\n const tutorialScriptExtension = {\n [Language.None]: \".script\",\n [Language.NS1]: \".script\",\n [Language.NS2]: \".js\",\n }[language];\n const tutorialScriptName = `n00dles${tutorialScriptExtension}`;\n\n const contents: { [number: string]: IContent | undefined } = {\n [iTutorialSteps.Start as number]: {\n content: (\n <>\n \n Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian\n future... The year is 2077...\n
\n
\n This tutorial will show you the basics of the game. You may skip the tutorial at any time.\n
\n
\n You can also collapse this panel to temporarily hide this tutorial.\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.NSSelection as number]: {\n content: (\n <>\n The tutorial will adjust to your programming ability.\n Bitburner has 2 types of scripts:\n \n \n NS1: Javascript from 2009, very simple. Recommended for beginners to programming.\n \n \n \n NS2: Native, modern Javascript. Recommended if you know any programming language or are serious about\n learning programming.\n \n \n \n \n Both are available at all time and interchangeably. This choice is only for the tutorial.\n \n {\n setLanguage(Language.NS1);\n iTutorialNextStep();\n }}\n >\n Use NS1\n \n {\n setLanguage(Language.NS2);\n iTutorialNextStep();\n }}\n >\n Use NS2\n \n \n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.GoToCharacterPage as number]: {\n content: (\n <>\n Let's start by heading to the Stats page. Click\n \n \n Stats\n \n\n on the main navigation menu (left-hand side of the screen)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.CharacterPage as number]: {\n content: (\n <>\n \n \n Stats\n \n \n shows a lot of important information about your progress, such as your skills, money, and bonuses.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.CharacterGoToTerminalPage as number]: {\n content: (\n <>\n Let's head to your computer's terminal by clicking\n \n \n Terminal\n \n on the main navigation menu.\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalIntro as number]: {\n content: (\n <>\n \n \n Terminal\n \n \n is used to interface with your home computer as well as all of the other machines around the world.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHelp as number]: {\n content: (\n <>\n Let's try it out. Start by entering\n {\"[home ~/]> help\"}\n (Don't forget to press Enter after typing the command)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalLs as number]: {\n content: (\n <>\n {\"[home ~/]> help\"}\n \n displays a list of all available Terminal commands, how to use them, and a description of what they do.{\" \"}\n
\n
\n Let's try another command. Enter\n
\n\n {\"[home ~/]> ls\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScan as number]: {\n content: (\n <>\n {\"[home ~/]> ls\"}\n \n {\" \"}\n is a basic command that shows files on the computer. Right now, it shows that you have a program called{\" \"}\n NUKE.exe on your computer. We'll get to what this does later.
\n
\n Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that\n now by first entering\n
\n {\"[home ~/]> scan\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze1 as number]: {\n content: (\n <>\n {\"[home ~/]> scan\"}\n \n shows all available network connections. In other words, it displays a list of all servers that can be\n connected to from your current machine. A server is identified by its hostname.
\n
\n That's great and all, but there's so many servers. Which one should you go to?{\" \"}\n
\n\n {\"[home ~/]> scan-analyze\"}\n gives some more detailed information about servers on the network. Try it now!\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze2 as number]: {\n content: (\n <>\n {\"[home ~/]> scan-analyze\"}\n \n shows more detailed information about each server that you can connect to (servers that are a distance of\n one node away).
\n
It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the\n following command:{\" \"}\n
\n\n {\"[home ~/]> scan-analyze 2\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalConnect as number]: {\n content: (\n <>\n \n Now you can see information about all servers that are up to two nodes away, as well as figure out how to\n navigate to those servers through the network. You can only connect to a server that is one node away. To\n connect to a machine, use\n \n {\"[home ~/]> connect hostname\"}\n\n From the results of \n {\"[home ~/]> scan-analyze 2\"}\n\n \n {\" \"}\n we can see that the n00dles server is only one node away. Let's connect to it now using:\n \n\n {\"[home ~/]> connect n00dles\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalAnalyze as number]: {\n content: (\n <>\n \n You are now connected to another machine! What can you do now? You can hack it!\n
\n
In the year 2077, currency has become digital and decentralized. People and corporations store their\n money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain\n experience.
\n
\n Before you try to hack a server, you should run diagnostics using{\" \"}\n
\n {\"[n00dles ~/]> analyze\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalNuke as number]: {\n content: (\n <>\n When \n {\"[n00dles ~/]> analyze\"}\n\n \n finishes running it will show useful information about hacking the server.
\n
For this server, the required hacking skill is only 1, which means you can hack it right now.\n However, in order to hack a server you must first gain root access. The NUKE.exe program that we saw earlier\n on your home computer is a virus that will grant you root access to a machine if there are enough open\n ports.\n
\n {\"[n00dles ~/]> analyze\"}\n\n \n {\" \"}\n shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead\n and run the virus using{\" \"}\n \n {\"[n00dles ~/]> run NUKE.exe\"}\n\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalManualHack as number]: {\n content: (\n <>\n You now have root access! You can hack the server using \n {\"[n00dles ~/]> hack\"}\n\n Try doing that now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHackingMechanics as number]: {\n content: (\n \n You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage\n chance of success. This time and success chance is determined by a variety of factors, including your hacking\n skill and the server's security level.\n
\n
\n If your attempt to hack the server is successful, you will steal a certain percentage of the server's total\n money. This percentage is affected by your hacking skill and the server's security level.\n
\n
\n The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,\n then you will encounter diminishing returns in your hacking. You will need to use{\" \"}\n {\"[n00dles ~/]> grow\"}\n which tricks the company into adding money to their server and{\" \"}\n {\"[n00dles ~/]> weaken\"}\n which increases the speed of hack and grow.\n
\n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalGoHome as number]: {\n content: (\n <>\n From any server you can get back home using\n {\"[n00dles ~/]> home\"}\n\n Let's head home before creating our first script!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalCreateScript as number]: {\n content: (\n <>\n \n Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be\n hacking manually the entire time. You can automate your hacking by writing scripts!\n
\n
\n To create a new script or edit an existing one, you can use{\" \"}\n
\n {\"[home ~/]> nano\"}\n\n \n Scripts must end with the {tutorialScriptExtension} extension. Let's make a script now by entering{\" \"}\n \n {`[home ~/]> nano ${tutorialScriptName}`}\n\n \n after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTypeScript as number]: {\n content: (\n <>\n \n This is the script editor. You can use it to program your scripts.{\" \"}\n {language !== Language.NS2 && <>Scripts are written in a simplified version of javascript.} Copy and\n paste the following code into the script editor:
\n
\n\n \n {language !== Language.NS2 && (\n \n )}\n {language === Language.NS2 && (\n \n )}\n \n \n For anyone with basic programming experience, this code should be straightforward. This script will\n continuously hack the n00dles server.\n
\n
\n To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.\n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalFree as number]: {\n content: (\n <>\n \n Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine\n which you have root access to. Different servers have different amounts of RAM. You can also purchase more\n RAM for your home server.\n
\n
\n To check how much RAM is available on this machine, enter\n
\n {\"[home ~/]> free\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalRunScript as number]: {\n content: (\n <>\n \n We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using\n \n {`[home ~/]> run ${tutorialScriptName}`}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalGoToActiveScriptsPage as number]: {\n content: (\n <>\n \n Your script is now running! It will continuously run in the background and will automatically stop if the\n code ever completes (the {tutorialScriptName} will never complete because it runs an infinite loop).
\n
\n These scripts can passively earn you income and hacking experience. Your scripts will also earn money and\n experience while you are offline, although at a slightly slower rate.
\n
\n Let's check out some statistics for our running scripts by clicking{\" \"}\n
\n \n \n Active Scripts\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsPage as number]: {\n content: (\n <>\n \n This page displays information about all of your scripts that are running across every server. You can use\n this to gauge how well your scripts are doing. Let's go back to\n \n \n \n Terminal\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsToTerminal as number]: {\n content: (\n <>\n \n One last thing about scripts, each active script contains logs that detail what it's doing. We can check\n these logs using the tail command. Do that now for the script we just ran by typing{\" \"}\n \n {`[home ~/]> tail ${tutorialScriptName}`}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTailScript as number]: {\n content: (\n <>\n \n The log for this script won't show much right now (it might show nothing at all) because it just started\n running...but check back again in a few minutes!
\n
\n This covers the basics of hacking. To learn more about writing scripts, select\n
\n \n \n Tutorial\n \n \n in the main navigation menu to look at the documentation.\n
\n
\n For now, let's move on to something else!\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToHacknetNodesPage as number]: {\n content: (\n <>\n \n Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and\n upgrading Hacknet Nodes. Let's go to\n \n \n \n Hacknet\n \n through the main navigation menu now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesIntroduction as number]: {\n content: (\n \n Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesGoToWorldPage as number]: {\n content: (\n <>\n \n You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online\n and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.\n
\n
\n Let's go to\n
\n \n \n City\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.WorldDescription as number]: {\n content: (\n <>\n \n This page lists all of the different locations you can currently travel to. Each location has something that\n you can do. There's a lot of content out in the world, make sure you explore and discover!\n
\n
\n Lastly, click on\n
\n \n \n Tutorial\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TutorialPageInfo as number]: {\n content: (\n \n This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot,\n but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the\n tutorial. Hope you enjoy the game!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.End as number]: {\n content: ,\n canNext: true,\n },\n };\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n const step = ITutorial.currStep;\n const content = contents[step];\n if (content === undefined) throw new Error(\"error in the tutorial\");\n return (\n <>\n setNSSelectionOpen(false)} />\n \n {content.content}\n {step !== iTutorialSteps.TutorialPageInfo && (\n <>\n {step !== iTutorialSteps.Start && (\n \n \n \n )}\n {content.canNext && (\n \n \n \n )}\n \n )}\n
\n
\n \n
\n \n );\n}\n","import Editor from \"@monaco-editor/react\";\nimport { Tab, Tabs, Typography } from \"@mui/material\";\nimport React from \"react\";\n\nimport { Modal } from \"../React/Modal\";\n\nimport * as monaco from \"monaco-editor\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nconst ns1Example = `while(true) {\n hack('n00dles');\n}`;\nconst ns2Example = `/** @param {NS} ns */\nexport async function main(ns) {\n\twhile(true) {\n\t\tawait ns.hack('n00dles');\n\t}\n}`;\n\nexport function NSSelection(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n function onMount(editor: IStandaloneCodeEditor): void {\n editor.updateOptions({ readOnly: true });\n }\n\n return (\n \n \n \n \n \n\n {value === 0 && (\n <>\n \n These scripts end with '.script'. Using a very old interpreted version of javascript. It is perfect for\n beginner to programming.\n \n Example script using NS1:\n }\n defaultLanguage=\"javascript\"\n defaultValue={ns1Example}\n height={`${300}px`}\n theme={\"vs-dark\"}\n onMount={onMount}\n options={{ fontSize: 30 }}\n />\n \n )}\n {value === 1 && (\n <>\n \n These scripts end with '.js'. Scripts using ns2 are running natively along the game. If you know any\n programming language you should be using this. However if you're unfamiliar with javascript Promises you\n might want to read up on them a little bit before diving in.\n \n Example script using NS2:\n }\n defaultLanguage=\"javascript\"\n defaultValue={ns2Example}\n height={`${300}px`}\n theme={\"vs-dark\"}\n options={{ fontSize: 30 }}\n />\n \n )}\n \n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Draggable, { DraggableEventHandler } from \"react-draggable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Paper from \"@mui/material/Paper\";\nimport KeyboardArrowDownIcon from \"@mui/icons-material/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@mui/icons-material/KeyboardArrowUp\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport SchoolIcon from \"@mui/icons-material/School\";\nimport { use } from \"../Context\";\nimport { Page } from \"../Router\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { Box, Button, Typography } from \"@mui/material\";\nimport { debounce } from \"lodash\";\n\nconst useStyles = makeStyles({\n overviewContainer: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500,\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\",\n },\n\n header: {\n cursor: \"grab\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n visibilityToggle: {\n padding: \"2px\",\n minWidth: \"inherit\",\n backgroundColor: \"transparent\",\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(255, 255, 255, 0.1)\",\n },\n },\n\n collapse: {\n borderTop: `1px solid ${Settings.theme.welllight}`,\n margin: \"0 auto\",\n },\n\n icon: {\n fontSize: \"24px\",\n },\n});\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n mode: \"tutorial\" | \"overview\";\n}\n\nexport interface OverviewSettings {\n opened: boolean;\n x: number;\n y: number;\n}\n\nexport function Overview({ children, mode }: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const [open, setOpen] = useState(Settings.overview.opened);\n const [x, setX] = useState(Settings.overview.x);\n const [y, setY] = useState(Settings.overview.y);\n const classes = useStyles();\n const router = use.Router();\n\n const CurrentIcon = open ? KeyboardArrowUpIcon : KeyboardArrowDownIcon;\n const LeftIcon = mode === \"tutorial\" ? SchoolIcon : EqualizerIcon;\n const header = mode === \"tutorial\" ? \"Tutorial\" : \"Overview\";\n const handleStop: DraggableEventHandler = (e, data) => {\n setX(data.x);\n setY(data.y);\n };\n\n useEffect(() => {\n Settings.overview = { x, y, opened: open };\n }, [open, x, y]);\n\n // Trigger fakeDrag once to make sure loaded data is not outside bounds\n useEffect(() => fakeDrag(), []);\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", fakeDrag);\n return () => {\n window.removeEventListener(\"resize\", fakeDrag);\n };\n }, []);\n\n const fakeDrag = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n // No official way to trigger an onChange to recompute the bounds\n // See: https://github.com/react-grid-layout/react-draggable/issues/363#issuecomment-947751127\n triggerMouseEvent(node, \"mouseover\");\n triggerMouseEvent(node, \"mousedown\");\n triggerMouseEvent(document, \"mousemove\");\n triggerMouseEvent(node, \"mouseup\");\n triggerMouseEvent(node, \"click\");\n }, 100);\n\n const triggerMouseEvent = (node: HTMLDivElement | Document, eventType: string): void => {\n const clickEvent = document.createEvent(\"MouseEvents\");\n clickEvent.initEvent(eventType, true, true);\n node.dispatchEvent(clickEvent);\n };\n\n if (router.page() === Page.BitVerse || router.page() === Page.Loading || router.page() === Page.Recovery)\n return <>;\n return (\n \n \n setOpen((old) => !old)} ref={draggableRef}>\n \n \n \n {header}\n \n \n {\n setOpen((old) => !old)}\n onTouchEnd={() => setOpen((old) => !old)}\n />\n }\n \n \n \n \n {children}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEYCODE } from \"../../utils/helpers/keyCodes\";\nimport clsx from \"clsx\";\nimport { styled, Theme, CSSObject } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport Divider from \"@mui/material/Divider\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Typography from \"@mui/material/Typography\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Badge from \"@mui/material/Badge\";\n\nimport ComputerIcon from \"@mui/icons-material/Computer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\"; // Terminal\nimport CreateIcon from \"@mui/icons-material/Create\"; // Create Script\nimport StorageIcon from \"@mui/icons-material/Storage\"; // Active Scripts\nimport BugReportIcon from \"@mui/icons-material/BugReport\"; // Create Program\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\"; // Stats\nimport ContactsIcon from \"@mui/icons-material/Contacts\"; // Factions\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\"; // Augmentations\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\"; // Hacknet\nimport PeopleAltIcon from \"@mui/icons-material/PeopleAlt\"; // Sleeves\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\"; // City\nimport AirplanemodeActiveIcon from \"@mui/icons-material/AirplanemodeActive\"; // Travel\nimport WorkIcon from \"@mui/icons-material/Work\"; // Job\nimport TrendingUpIcon from \"@mui/icons-material/TrendingUp\"; // Stock Market\nimport FormatBoldIcon from \"@mui/icons-material/FormatBold\"; // Bladeburner\nimport BusinessIcon from \"@mui/icons-material/Business\"; // Corp\nimport SportsMmaIcon from \"@mui/icons-material/SportsMma\"; // Gang\nimport CheckIcon from \"@mui/icons-material/Check\"; // Milestones\nimport HelpIcon from \"@mui/icons-material/Help\"; // Tutorial\nimport SettingsIcon from \"@mui/icons-material/Settings\"; // options\nimport DeveloperBoardIcon from \"@mui/icons-material/DeveloperBoard\"; // Dev\nimport EmojiEventsIcon from \"@mui/icons-material/EmojiEvents\"; // Achievements\nimport AccountBoxIcon from \"@mui/icons-material/AccountBox\";\nimport PublicIcon from \"@mui/icons-material/Public\";\nimport LiveHelpIcon from \"@mui/icons-material/LiveHelp\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { IRouter, Page } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../../InteractiveTutorial\";\nimport { getAvailableCreatePrograms } from \"../../Programs/ProgramHelpers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { ProgramsSeen } from \"../../Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"../../Faction/ui/FactionsRoot\";\nimport { hash } from \"../../hash/hash\";\nimport { Locations } from \"../../Locations/Locations\";\n\nconst openedMixin = (theme: Theme): CSSObject => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nconst closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`,\n },\n});\n\nconst Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== \"open\" })(({ theme, open }) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n }),\n ...(!open && {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n }),\n}));\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main,\n },\n listitem: {},\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n page: Page;\n opened: boolean;\n onToggled: (newValue: boolean) => void;\n}\n\nexport function SidebarRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [hackingOpen, setHackingOpen] = useState(true);\n const [characterOpen, setCharacterOpen] = useState(true);\n const [worldOpen, setWorldOpen] = useState(true);\n const [helpOpen, setHelpOpen] = useState(true);\n\n const flashTerminal =\n ITutorial.currStep === iTutorialSteps.CharacterGoToTerminalPage ||\n ITutorial.currStep === iTutorialSteps.ActiveScriptsPage;\n\n const flashStats = ITutorial.currStep === iTutorialSteps.GoToCharacterPage;\n\n const flashActiveScripts = ITutorial.currStep === iTutorialSteps.TerminalGoToActiveScriptsPage;\n\n const flashHacknet = ITutorial.currStep === iTutorialSteps.GoToHacknetNodesPage;\n\n const flashCity = ITutorial.currStep === iTutorialSteps.HacknetNodesGoToWorldPage;\n\n const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;\n\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.filter((f) => !InvitationsSeen.includes(f)).length;\n const programCount = getAvailableCreatePrograms(props.player).length - ProgramsSeen.length;\n\n const canOpenFactions =\n props.player.factionInvitations.length > 0 ||\n props.player.factions.length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenAugmentations =\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenSleeves = props.player.sleeves.length > 0;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = Object.values(props.player.jobs).length > 0;\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n const canStaneksGift = props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1);\n\n function clickTerminal(): void {\n props.router.toTerminal();\n if (flashTerminal) iTutorialNextStep();\n }\n\n function clickScriptEditor(): void {\n props.router.toScriptEditor();\n }\n\n function clickStats(): void {\n props.router.toStats();\n if (flashStats) iTutorialNextStep();\n }\n\n function clickActiveScripts(): void {\n props.router.toActiveScripts();\n if (flashActiveScripts) iTutorialNextStep();\n }\n\n function clickCreateProgram(): void {\n props.router.toCreateProgram();\n }\n\n function clickStaneksGift(): void {\n props.router.toStaneksGift();\n }\n\n function clickFactions(): void {\n props.router.toFactions();\n }\n\n function clickAugmentations(): void {\n props.router.toAugmentations();\n }\n\n function clickSleeves(): void {\n props.router.toSleeves();\n }\n\n function clickHacknet(): void {\n props.router.toHacknetNodes();\n if (flashHacknet) iTutorialNextStep();\n }\n\n function clickCity(): void {\n props.router.toCity();\n if (flashCity) iTutorialNextStep();\n }\n\n function clickTravel(): void {\n props.router.toTravel();\n }\n\n function clickJob(): void {\n props.router.toJob(Locations[Object.keys(props.player.jobs)[0]]);\n }\n\n function clickStockMarket(): void {\n props.router.toStockMarket();\n }\n\n function clickBladeburner(): void {\n props.router.toBladeburner();\n }\n\n function clickCorp(): void {\n props.router.toCorporation();\n }\n\n function clickGang(): void {\n props.router.toGang();\n }\n\n function clickTutorial(): void {\n props.router.toTutorial();\n if (flashTutorial) iTutorialNextStep();\n }\n\n function clickMilestones(): void {\n props.router.toMilestones();\n }\n function clickOptions(): void {\n props.router.toGameOptions();\n }\n\n function clickDev(): void {\n props.router.toDevMenu();\n }\n\n function clickAchievements(): void {\n props.router.toAchievements();\n }\n\n useEffect(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n // Alt-b - Bladeburner\n // Alt-g - Gang\n function handleShortcuts(this: Document, event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n if ((props.player.currentWork && props.player.focus) || props.router.page() === Page.BitVerse) return;\n if (event.code === KEYCODE.T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.code === KEYCODE.C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.code === KEYCODE.E && event.altKey) {\n event.preventDefault();\n clickScriptEditor();\n } else if (event.code === KEYCODE.S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.code === KEYCODE.H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.code === KEYCODE.W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.code === KEYCODE.J && event.altKey && !event.ctrlKey && !event.metaKey && canJob) {\n // ctrl/cmd + alt + j is shortcut to open Chrome dev tools\n event.preventDefault();\n clickJob();\n } else if (event.code === KEYCODE.R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.code === KEYCODE.P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.code === KEYCODE.F && event.altKey) {\n if (props.page == Page.Terminal && Settings.EnableBashHotkeys) {\n return;\n }\n event.preventDefault();\n clickFactions();\n } else if (event.code === KEYCODE.A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.code === KEYCODE.U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.code === KEYCODE.O && event.altKey) {\n event.preventDefault();\n clickOptions();\n } else if (event.code === KEYCODE.B && event.altKey && props.player.bladeburner) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.code === KEYCODE.G && event.altKey && props.player.gang) {\n event.preventDefault();\n clickGang();\n }\n }\n\n document.addEventListener(\"keydown\", handleShortcuts);\n return () => document.removeEventListener(\"keydown\", handleShortcuts);\n }, []);\n\n const classes = useStyles();\n const [open, setOpen] = useState(props.opened);\n const toggleDrawer = (): void => setOpen((old) => !old);\n\n useEffect(() => {\n props.onToggled(open);\n }, [open]);\n\n return (\n \n \n \n {!open ? : }\n \n \n Bitburner v{CONSTANTS.VersionString}\n \n }\n />\n \n \n \n setHackingOpen((old) => !old)}>\n \n \n \n \n \n Hacking} />\n {hackingOpen ? : }\n \n \n \n \n \n \n \n \n \n \n \n Terminal\n \n \n \n \n \n \n \n \n \n \n \n Script Editor\n \n \n \n \n \n \n \n \n \n \n \n Active Scripts\n \n \n \n \n \n 0 ? programCount : undefined} color=\"error\">\n \n \n \n \n \n \n \n Create Program\n \n \n \n {canStaneksGift && (\n \n \n \n \n \n \n \n \n Stanek's Gift\n \n \n \n )}\n \n \n\n \n setCharacterOpen((old) => !old)}>\n \n \n \n \n \n Character} />\n {characterOpen ? : }\n \n \n \n \n \n \n \n \n \n \n Stats\n \n \n \n {canOpenFactions && (\n \n \n \n \n \n \n \n \n \n \n Factions\n \n \n \n )}\n {canOpenAugmentations && (\n \n \n \n \n \n \n \n \n \n \n Augmentations\n \n \n \n )}\n \n \n \n \n \n \n \n \n Hacknet\n \n \n \n {canOpenSleeves && (\n \n \n \n \n \n \n \n Sleeves\n \n \n )}\n \n\n \n setWorldOpen((old) => !old)}>\n \n \n \n \n \n World} />\n {worldOpen ? : }\n \n \n \n \n \n \n \n \n \n \n City\n \n \n \n \n \n \n \n \n \n \n Travel\n \n \n {canJob && (\n \n \n \n \n \n \n \n Job\n \n \n )}\n {canStockMarket && (\n \n \n \n \n \n \n \n Stock Market\n \n \n )}\n {canBladeburner && (\n \n \n \n \n \n \n \n Bladeburner\n \n \n )}\n {canCorporation && (\n \n \n \n \n \n \n \n Corp\n \n \n )}\n {canGang && (\n \n \n \n \n \n \n \n Gang\n \n \n )}\n \n\n \n setHelpOpen((old) => !old)}>\n \n \n \n \n \n Help} />\n {helpOpen ? : }\n \n \n \n \n \n \n \n \n \n Milestones\n \n \n \n \n \n \n \n \n \n \n Tutorial\n \n \n \n \n \n \n \n \n \n \n Achievements\n \n \n \n \n \n \n \n \n \n Options\n \n \n {process.env.NODE_ENV === \"development\" && (\n \n \n \n \n \n \n \n Dev\n \n \n )}\n \n \n \n );\n}\n","import { Programs } from \"./Programs\";\nimport { Program } from \"./Program\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\n//Returns the programs this player can create.\nexport function getAvailableCreatePrograms(player: IPlayer): Program[] {\n const programs: Program[] = [];\n for (const key of Object.keys(Programs)) {\n // Non-creatable program\n const create = Programs[key].create;\n if (create == null) continue;\n\n // Already has program\n if (player.hasProgram(Programs[key].name)) continue;\n\n // Does not meet requirements\n if (!create.req(player)) continue;\n\n programs.push(Programs[key]);\n }\n\n return programs;\n}\n","/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { InstalledAugmentations } from \"./InstalledAugmentations\";\nimport { PlayerMultipliers } from \"./PlayerMultipliers\";\nimport { PurchasedAugmentations } from \"./PurchasedAugmentations\";\nimport { SourceFilesElement } from \"./SourceFiles\";\n\nimport { canGetBonus } from \"../../ExportBonus\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Container from \"@mui/material/Container\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { Info } from \"@mui/icons-material\";\n\ninterface NFGDisplayProps {\n player: IPlayer;\n}\n\nconst NeuroFluxDisplay = ({ player }: NFGDisplayProps): React.ReactElement => {\n const level = player.augmentations.find((e) => e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0;\n\n return level > 0 ? (\n \n \n NeuroFlux Governor - Level {level}\n \n \n {StaticAugmentations[AugmentationNames.NeuroFluxGovernor].stats}\n \n \n ) : (\n <>\n );\n};\n\ninterface EntropyDisplayProps {\n player: IPlayer;\n}\n\nconst EntropyDisplay = ({ player }: EntropyDisplayProps): React.ReactElement => {\n return player.entropy > 0 ? (\n \n \n Entropy Virus - Level {player.entropy}\n \n \n All multipliers decreased by: {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}%\n (multiplicative)\n \n \n ) : (\n <>\n );\n};\n\ninterface IProps {\n exportGameFn: () => void;\n installAugmentationsFn: () => void;\n}\n\nexport function AugmentationsRoot(props: IProps): React.ReactElement {\n const [installOpen, setInstallOpen] = useState(false);\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n function doExport(): void {\n props.exportGameFn();\n rerender();\n }\n\n function exportBonusStr(): string {\n if (canGetBonus()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n function doInstall(): void {\n if (!Settings.SuppressBuyAugmentationConfirmation) {\n setInstallOpen(true);\n } else {\n props.installAugmentationsFn();\n }\n }\n\n return (\n \n Augmentations\n \n \n \n Purchased Augmentations\n \n \n Below is a list of all Augmentations you have purchased but not yet installed. Click the button\n below to install them.\n \n \n WARNING: Installing your Augmentations resets most of your progress, including:\n \n
\n - Stats/Skill levels and Experience\n - Money\n - Scripts on every computer but your home computer\n - Purchased servers\n - Hacknet Nodes\n - Faction/Company reputation\n - Stocks\n
\n \n Installing Augmentations lets you start over with the perks and benefits granted by all of the\n Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your\n home computer (but you will lose all programs besides NUKE.exe)\n \n \n }\n >\n \n \n
\n setInstallOpen(false)}\n onConfirm={props.installAugmentationsFn}\n confirmationText={\n <>\n Installing will reset\n
\n
- money\n
- skill / experience\n
- every server except home\n
- factions and reputation\n
\n
\n You will keep:\n
\n
- All scripts on home\n
- home ram and cores\n
\n
\n It is recommended to install several Augmentations at once. Preferably everything from any faction of\n your choosing.\n \n }\n />\n \n 'I never asked for this'}>\n \n \n \n \n It's always a good idea to backup/export your save!}>\n \n \n \n
\n {player.queuedAugmentations.length > 0 ? (\n \n \n \n \n ) : (\n \n No Augmentations have been purchased yet\n \n )}\n
\n\n e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0) > 0) +\n +!!(player.entropy > 0)\n }, 1fr)`,\n gap: 1,\n }}\n >\n \n \n \n\n \n \n \n \n
\n );\n}\n","/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\nimport { Box, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\nimport List from \"@mui/material/List\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport React, { useState } from \"react\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nexport function InstalledAugmentations(): React.ReactElement {\n const setRerender = useState(true)[1];\n const player = use.Player();\n const sourceAugs = player.augmentations.slice().filter((aug) => aug.name !== AugmentationNames.NeuroFluxGovernor);\n\n const [selectedAug, setSelectedAug] = useState(sourceAugs[0]);\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name.localeCompare(aug2.name);\n });\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function sortByAcquirementTime(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.AcquirementTime;\n rerender();\n }\n\n function sortInOrder(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.Alphabetically;\n rerender();\n }\n\n return (\n \n \n Installed Augmentations\n \n \n \n \n \n \n \n \n \n {sourceAugs.length > 0 ? (\n \n \n \n {sourceAugs.map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n {k.name}\n \n ))}\n \n \n \n \n {selectedAug.name}\n \n \n {(() => {\n const aug = StaticAugmentations[selectedAug.name];\n\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n return tooltip;\n })()}\n
\n
\n
\n ) : (\n \n No Augmentations have been installed yet\n \n )}\n
\n );\n}\n","/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\nimport { DoubleArrow } from \"@mui/icons-material\";\nimport { List, ListItem, ListItemText, Paper, Typography } from \"@mui/material\";\nimport * as React from \"react\";\nimport { Multipliers, defaultMultipliers, mergeMultipliers } from \"../../PersonObjects/Multipliers\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\n\nfunction calculateAugmentedStats(): Multipliers {\n let augP: Multipliers = defaultMultipliers();\n for (const aug of Player.queuedAugmentations) {\n const augObj = StaticAugmentations[aug.name];\n augP = mergeMultipliers(augP, augObj.mults);\n }\n return augP;\n}\n\ninterface IBitNodeModifiedStatsProps {\n base: number;\n mult: number;\n color: string;\n}\n\nfunction BitNodeModifiedStats(props: IBitNodeModifiedStatsProps): React.ReactElement {\n // If player doesn't have SF5 or if the property isn't affected by BitNode mults\n if (props.mult === 1 || Player.sourceFileLvl(5) === 0)\n return {numeralWrapper.formatPercentage(props.base)};\n\n return (\n \n {numeralWrapper.formatPercentage(props.base)}{\" \"}\n {numeralWrapper.formatPercentage(props.base * props.mult)}\n \n );\n}\n\ninterface MultiplierListItemData {\n mult: string;\n current: number;\n augmented: number;\n bnMult?: number;\n color?: string;\n}\n\ninterface IMultiplierListProps {\n rows: MultiplierListItemData[];\n}\n\nfunction MultiplierList(props: IMultiplierListProps): React.ReactElement {\n const listItems = props.rows\n .map((data) => {\n const { mult, current, augmented, bnMult = 1, color = Settings.theme.primary } = data;\n\n if (!isNaN(augmented)) {\n return (\n \n \n {mult}\n \n }\n secondary={\n \n \n \n \n \n }\n disableTypography\n />\n \n );\n }\n return;\n })\n .filter((i) => i !== undefined);\n\n return listItems.length > 0 ? {listItems} : <>;\n}\n\nexport function PlayerMultipliers(): React.ReactElement {\n const mults = calculateAugmentedStats();\n\n const leftColData: MultiplierListItemData[] = [\n ...[\n {\n mult: \"Hacking Chance\",\n current: Player.mults.hacking_chance,\n augmented: Player.mults.hacking_chance * mults.hacking_chance,\n },\n {\n mult: \"Hacking Speed\",\n current: Player.mults.hacking_speed,\n augmented: Player.mults.hacking_speed * mults.hacking_speed,\n },\n {\n mult: \"Hacking Money\",\n current: Player.mults.hacking_money,\n augmented: Player.mults.hacking_money * mults.hacking_money,\n bnMult: BitNodeMultipliers.ScriptHackMoney,\n },\n {\n mult: \"Hacking Growth\",\n current: Player.mults.hacking_grow,\n augmented: Player.mults.hacking_grow * mults.hacking_grow,\n },\n {\n mult: \"Hacking Level\",\n current: Player.mults.hacking,\n augmented: Player.mults.hacking * mults.hacking,\n bnMult: BitNodeMultipliers.HackingLevelMultiplier,\n },\n {\n mult: \"Hacking Experience\",\n current: Player.mults.hacking_exp,\n augmented: Player.mults.hacking_exp * mults.hacking_exp,\n bnMult: BitNodeMultipliers.HackExpGain,\n },\n ].map((data: MultiplierListItemData) =>\n Object.defineProperty(data, \"color\", {\n value: Settings.theme.hack,\n }),\n ),\n ...[\n {\n mult: \"Strength Level\",\n current: Player.mults.strength,\n augmented: Player.mults.strength * mults.strength,\n bnMult: BitNodeMultipliers.StrengthLevelMultiplier,\n },\n {\n mult: \"Strength Experience\",\n current: Player.mults.strength_exp,\n augmented: Player.mults.strength_exp * mults.strength_exp,\n },\n {\n mult: \"Defense Level\",\n current: Player.mults.defense,\n augmented: Player.mults.defense * mults.defense,\n bnMult: BitNodeMultipliers.DefenseLevelMultiplier,\n },\n {\n mult: \"Defense Experience\",\n current: Player.mults.defense_exp,\n augmented: Player.mults.defense_exp * mults.defense_exp,\n },\n {\n mult: \"Dexterity Level\",\n current: Player.mults.dexterity,\n augmented: Player.mults.dexterity * mults.dexterity,\n bnMult: BitNodeMultipliers.DexterityLevelMultiplier,\n },\n {\n mult: \"Dexterity Experience\",\n current: Player.mults.dexterity_exp,\n augmented: Player.mults.dexterity_exp * mults.dexterity_exp,\n },\n {\n mult: \"Agility Level\",\n current: Player.mults.agility,\n augmented: Player.mults.agility * mults.agility,\n bnMult: BitNodeMultipliers.AgilityLevelMultiplier,\n },\n {\n mult: \"Agility Experience\",\n current: Player.mults.agility_exp,\n augmented: Player.mults.agility_exp * mults.agility_exp,\n },\n ].map((data: MultiplierListItemData) =>\n Object.defineProperty(data, \"color\", {\n value: Settings.theme.combat,\n }),\n ),\n {\n mult: \"Charisma Level\",\n current: Player.mults.charisma,\n augmented: Player.mults.charisma * mults.charisma,\n bnMult: BitNodeMultipliers.CharismaLevelMultiplier,\n color: Settings.theme.cha,\n },\n {\n mult: \"Charisma Experience\",\n current: Player.mults.charisma_exp,\n augmented: Player.mults.charisma_exp * mults.charisma_exp,\n color: Settings.theme.cha,\n },\n ];\n const rightColData: MultiplierListItemData[] = [\n {\n mult: \"Hacknet Node Production\",\n current: Player.mults.hacknet_node_money,\n augmented: Player.mults.hacknet_node_money * mults.hacknet_node_money,\n bnMult: BitNodeMultipliers.HacknetNodeMoney,\n },\n {\n mult: \"Hacknet Node Purchase Cost\",\n current: Player.mults.hacknet_node_purchase_cost,\n augmented: Player.mults.hacknet_node_purchase_cost * mults.hacknet_node_purchase_cost,\n },\n {\n mult: \"Hacknet Node RAM Upgrade Cost\",\n current: Player.mults.hacknet_node_ram_cost,\n augmented: Player.mults.hacknet_node_ram_cost * mults.hacknet_node_ram_cost,\n },\n {\n mult: \"Hacknet Node Core Purchase Cost\",\n current: Player.mults.hacknet_node_core_cost,\n augmented: Player.mults.hacknet_node_core_cost * mults.hacknet_node_core_cost,\n },\n {\n mult: \"Hacknet Node Level Upgrade Cost\",\n current: Player.mults.hacknet_node_level_cost,\n augmented: Player.mults.hacknet_node_level_cost * mults.hacknet_node_level_cost,\n },\n {\n mult: \"Company Reputation Gain\",\n current: Player.mults.company_rep,\n augmented: Player.mults.company_rep * mults.company_rep,\n },\n {\n mult: \"Faction Reputation Gain\",\n current: Player.mults.faction_rep,\n augmented: Player.mults.faction_rep * mults.faction_rep,\n bnMult: BitNodeMultipliers.FactionWorkRepGain,\n },\n {\n mult: \"Salary\",\n current: Player.mults.work_money,\n augmented: Player.mults.work_money * mults.work_money,\n bnMult: BitNodeMultipliers.CompanyWorkMoney,\n color: Settings.theme.money,\n },\n {\n mult: \"Crime Success Chance\",\n current: Player.mults.crime_success,\n augmented: Player.mults.crime_success * mults.crime_success,\n color: Settings.theme.combat,\n },\n {\n mult: \"Crime Money\",\n current: Player.mults.crime_money,\n augmented: Player.mults.crime_money * mults.crime_money,\n bnMult: BitNodeMultipliers.CrimeMoney,\n color: Settings.theme.money,\n },\n ];\n\n if (Player.canAccessBladeburner()) {\n rightColData.push(\n {\n mult: \"Bladeburner Success Chance\",\n current: Player.mults.bladeburner_success_chance,\n augmented: Player.mults.bladeburner_success_chance * mults.bladeburner_success_chance,\n },\n {\n mult: \"Bladeburner Max Stamina\",\n current: Player.mults.bladeburner_max_stamina,\n augmented: Player.mults.bladeburner_max_stamina * mults.bladeburner_max_stamina,\n },\n {\n mult: \"Bladeburner Stamina Gain\",\n current: Player.mults.bladeburner_stamina_gain,\n augmented: Player.mults.bladeburner_stamina_gain * mults.bladeburner_stamina_gain,\n },\n {\n mult: \"Bladeburner Field Analysis\",\n current: Player.mults.bladeburner_analysis,\n augmented: Player.mults.bladeburner_analysis * mults.bladeburner_analysis,\n },\n );\n }\n\n return (\n \n \n \n \n );\n}\n","/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\nimport { List, ListItemText, Paper, Tooltip, Typography } from \"@mui/material\";\nimport * as React from \"react\";\nimport { Player } from \"../../Player\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nexport function PurchasedAugmentations(): React.ReactElement {\n const augs: React.ReactElement[] = [];\n // Only render the last NeuroFlux (there are no findLastIndex btw)\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; i++) {\n const ownedAug = Player.queuedAugmentations[i];\n let displayName = ownedAug.name;\n\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = StaticAugmentations[ownedAug.name];\n\n let level = null;\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ownedAug.level;\n displayName += ` - Level ${level}`;\n }\n\n augs.push(\n \n {(() => {\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n return tooltip;\n })()}\n \n }\n enterNextDelay={500}\n key={displayName}\n >\n \n ,\n );\n }\n\n return (\n \n \n {augs}\n \n \n );\n}\n","import { ListItemButton, ListItemText, Paper } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\nimport List from \"@mui/material/List\";\nimport Typography from \"@mui/material/Typography\";\nimport React, { useState } from \"react\";\nimport { Exploit, ExploitName } from \"../../Exploits/Exploit\";\nimport { Player } from \"../../Player\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { SourceFile } from \"../../SourceFile/SourceFile\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\n\ninterface SfMinus1 {\n info: React.ReactElement;\n n: number;\n name: string;\n lvl: number;\n}\n\nconst safeGetSf = (sfNum: number): SourceFile | SfMinus1 | null => {\n if (sfNum === -1) {\n const sfMinus1: SfMinus1 = {\n info: (\n <>\n This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\n
\n
\n It increases all of the player's multipliers by 0.1%\n
\n
\n You have found the following exploits:\n
\n
\n {Player.exploits.map((c: Exploit) => (\n \n * {ExploitName(c)}\n
\n
\n ))}\n \n ),\n lvl: Player.exploits.length,\n n: -1,\n name: \"Source-File -1: Exploits in the BitNodes\",\n };\n return sfMinus1;\n }\n\n const srcFileKey = \"SourceFile\" + sfNum;\n const sfObj = SourceFiles[srcFileKey];\n if (sfObj == null) {\n console.error(`Invalid source file number: ${sfNum}`);\n return null;\n }\n return sfObj;\n};\n\nconst getMaxLevel = (sfObj: SourceFile | SfMinus1): string | number => {\n let maxLevel;\n switch (sfObj.n) {\n case 12:\n maxLevel = \"∞\";\n break;\n case -1:\n maxLevel = Object.keys(Exploit).length;\n break;\n default:\n maxLevel = \"3\";\n }\n return maxLevel;\n};\n\nexport function SourceFilesElement(): React.ReactElement {\n const sourceSfs = Player.sourceFiles.slice();\n const exploits = Player.exploits;\n // Create a fake SF for -1, if \"owned\"\n if (exploits.length > 0) {\n sourceSfs.unshift({\n n: -1,\n lvl: exploits.length,\n });\n }\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n if (sourceSfs.length === 0) {\n return <>;\n }\n\n const [selectedSf, setSelectedSf] = useState(sourceSfs[0]);\n\n return (\n \n \n Source Files\n \n \n \n \n {sourceSfs.map((e, i) => {\n const sfObj = safeGetSf(e.n);\n if (!sfObj) return;\n\n const maxLevel = getMaxLevel(sfObj);\n\n return (\n setSelectedSf(e)}\n selected={selectedSf.n === e.n}\n sx={{ py: 0 }}\n >\n {sfObj.name}}\n secondary={\n \n Level {e.lvl} / {maxLevel}\n \n }\n />\n \n );\n })}\n \n \n \n \n {safeGetSf(selectedSf.n)?.name}\n \n \n {(() => {\n const sfObj = safeGetSf(selectedSf.n);\n if (!sfObj) return;\n\n const maxLevel = getMaxLevel(sfObj);\n\n return (\n <>\n Level {selectedSf.lvl} / {maxLevel}\n
\n
\n {sfObj.info}\n \n );\n })()}\n
\n
\n
\n
\n );\n}\n","import { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { IEngine } from \"./IEngine\";\nimport { IRouter } from \"./ui/Router\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\n\nimport React, { useEffect } from \"react\";\n\nimport { General } from \"./DevMenu/ui/General\";\nimport { Stats } from \"./DevMenu/ui/Stats\";\nimport { Factions } from \"./DevMenu/ui/Factions\";\nimport { Augmentations } from \"./DevMenu/ui/Augmentations\";\nimport { SourceFiles } from \"./DevMenu/ui/SourceFiles\";\nimport { Programs } from \"./DevMenu/ui/Programs\";\nimport { Servers } from \"./DevMenu/ui/Servers\";\nimport { Companies } from \"./DevMenu/ui/Companies\";\nimport { Bladeburner as BladeburnerElem } from \"./DevMenu/ui/Bladeburner\";\nimport { Gang } from \"./DevMenu/ui/Gang\";\nimport { Corporation } from \"./DevMenu/ui/Corporation\";\nimport { CodingContracts } from \"./DevMenu/ui/CodingContracts\";\nimport { StockMarket } from \"./DevMenu/ui/StockMarket\";\nimport { Sleeves } from \"./DevMenu/ui/Sleeves\";\nimport { Stanek } from \"./DevMenu/ui/Stanek\";\nimport { TimeSkip } from \"./DevMenu/ui/TimeSkip\";\nimport { SaveFile } from \"./DevMenu/ui/SaveFile\";\nimport { Achievements } from \"./DevMenu/ui/Achievements\";\nimport { Entropy } from \"./DevMenu/ui/Entropy\";\nimport Typography from \"@mui/material/Typography\";\nimport { Exploit } from \"./Exploits/Exploit\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n router: IRouter;\n}\n\nexport function DevMenuRoot(props: IProps): React.ReactElement {\n useEffect(() => {\n props.player.giveExploit(Exploit.YoureNotMeantToAccessThis);\n }, []);\n return (\n <>\n Development Menu - Only meant to be used for testing/debugging\n \n \n \n \n \n \n \n \n\n {props.player.bladeburner instanceof Bladeburner && }\n\n {props.player.inGang() && }\n\n {props.player.hasCorporation() && }\n\n \n\n {props.player.hasWseAccount && }\n\n {props.player.sleeves.length > 0 && }\n {props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && }\n\n \n \n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MenuItem, SelectChangeEvent, TextField, Select } from \"@mui/material\";\nimport { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { GangConstants } from \"../../Gang/data/Constants\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { checkForMessagesToSend } from \"../../Message/MessageHelpers\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function General(props: IProps): React.ReactElement {\n const [error, setError] = useState(false);\n const [corporationName, setCorporationName] = useState(\"\");\n const [gangFaction, setGangFaction] = useState(\"\");\n\n function addMoney(n: number) {\n return function () {\n props.player.gainMoney(n, \"other\");\n };\n }\n\n function upgradeRam(): void {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3(): void {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3(): void {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, false);\n }\n\n function createCorporation(): void {\n props.player.startCorporation(corporationName);\n }\n\n function joinBladeburner(): void {\n props.player.bladeburner = new Bladeburner(props.player);\n }\n\n function startGang(): void {\n const isHacking = gangFaction === FactionNames.NiteSec || gangFaction === FactionNames.TheBlackHand;\n props.player.startGang(gangFaction, isHacking);\n }\n\n function setGangFactionDropdown(event: SelectChangeEvent): void {\n setGangFaction(event.target.value);\n }\n\n function checkMessages(): void {\n checkForMessagesToSend();\n }\n\n useEffect(() => {\n if (error) throw new ReferenceError(\"Manually thrown error\");\n }, [error]);\n\n return (\n \n }>\n General\n \n \n \n \n \n \n \n \n
\n Corporation Name:\n setCorporationName(x.target.value)} />\n \n
\n Gang Faction:\n \n \n
\n \n
\n\n \n \n \n \n \n \n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n function modifyExp(stat: string, modifier: number) {\n return function (exp: number) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n break;\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n break;\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n break;\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n break;\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n break;\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n break;\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier: number) {\n return function (amt: number) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp(): void {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp(): void {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat: string): () => void {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma(): () => void {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence(): void {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence(): void {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return (\n \n }>\n Experience / Stats\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n All:\n \n \n \n
\n Hacking:\n \n modifyExp(\"hacking\", 1)(bigNumber)}\n add={modifyExp(\"hacking\", 1)}\n subtract={modifyExp(\"hacking\", -1)}\n reset={resetExperience(\"hacking\")}\n />\n
\n Strength:\n \n modifyExp(\"strength\", 1)(bigNumber)}\n add={modifyExp(\"strength\", 1)}\n subtract={modifyExp(\"strength\", -1)}\n reset={resetExperience(\"strength\")}\n />\n
\n Defense:\n \n modifyExp(\"defense\", 1)(bigNumber)}\n add={modifyExp(\"defense\", 1)}\n subtract={modifyExp(\"defense\", -1)}\n reset={resetExperience(\"defense\")}\n />\n
\n Dexterity:\n \n modifyExp(\"dexterity\", 1)(bigNumber)}\n add={modifyExp(\"dexterity\", 1)}\n subtract={modifyExp(\"dexterity\", -1)}\n reset={resetExperience(\"dexterity\")}\n />\n
\n Agility:\n \n modifyExp(\"agility\", 1)(bigNumber)}\n add={modifyExp(\"agility\", 1)}\n subtract={modifyExp(\"agility\", -1)}\n reset={resetExperience(\"agility\")}\n />\n
\n Charisma:\n \n modifyExp(\"charisma\", 1)(bigNumber)}\n add={modifyExp(\"charisma\", 1)}\n subtract={modifyExp(\"charisma\", -1)}\n reset={resetExperience(\"charisma\")}\n />\n
\n Intelligence:\n \n modifyExp(\"intelligence\", 1)(bigNumber)}\n add={modifyExp(\"intelligence\", 1)}\n subtract={modifyExp(\"intelligence\", -1)}\n reset={resetExperience(\"intelligence\")}\n />\n \n \n \n \n
\n Karma:\n \n modifyExp(\"intelligence\", 1)(100000)}\n add={modifyKarma(1)}\n subtract={modifyKarma(-1)}\n reset={resetKarma()}\n />\n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Factions as AllFaction } from \"../../Faction/Factions\";\nimport FormControl from \"@mui/material/FormControl\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Factions(props: IProps): React.ReactElement {\n const [faction, setFaction] = useState(FactionNames.Illuminati as string);\n\n function setFactionDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n function receiveInvite(): void {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites(): void {\n Object.values(FactionNames).forEach((faction) => props.player.receiveInvite(faction));\n }\n\n function modifyFactionRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = 0;\n }\n }\n\n return (\n \n }>\n Factions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Faction:\n \n \n Faction\n \n \n \n \n \n \n \n \n }\n >\n {Object.values(AllFaction).map((faction) => (\n \n {faction.name}\n \n ))}\n \n \n
\n Reputation:\n \n modifyFactionRep(1)(bigNumber)}\n add={modifyFactionRep(1)}\n subtract={modifyFactionRep(-1)}\n reset={resetFactionRep}\n />\n
\n Favor:\n \n modifyFactionFavor(1)(2000)}\n add={modifyFactionFavor(1)}\n subtract={modifyFactionFavor(-1)}\n reset={resetFactionFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import { Clear, ExpandMore, Reply, ReplyAll } from \"@mui/icons-material\";\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Button,\n IconButton,\n MenuItem,\n Select,\n SelectChangeEvent,\n Typography,\n} from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Augmentations(props: IProps): React.ReactElement {\n const [augmentation, setAugmentation] = useState(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event: SelectChangeEvent): void {\n setAugmentation(event.target.value);\n }\n function queueAug(): void {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs(): void {\n for (const augName of Object.values(AugmentationNames)) {\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs(): void {\n props.player.augmentations = [];\n }\n\n function clearQueuedAugs(): void {\n props.player.queuedAugmentations = [];\n }\n\n return (\n \n }>\n Augmentations\n \n \n \n \n \n \n \n \n \n \n }\n endAdornment={\n <>\n \n \n \n \n }\n >\n {Object.values(AugmentationNames).map((aug) => (\n \n {aug}\n \n ))}\n \n \n \n \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { PlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\n\n// Update as additional BitNodes get implemented\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function SourceFiles(props: IProps): React.ReactElement {\n function setSF(sfN: number, sfLvl: number) {\n return function () {\n if (sfN === 9) {\n props.player.hacknetNodes = [];\n }\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter((sf) => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some((sf) => sf.n === sfN)) {\n props.player.sourceFiles.push(new PlayerOwnedSourceFile(sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl: number) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits(): void {\n props.player.exploits = [];\n }\n\n return (\n \n }>\n Source-Files\n \n \n \n \n \n \n \n \n \n \n \n \n {validSFN.map((i) => (\n \n \n \n \n ))}\n \n
\n Exploits:\n \n \n
\n All:\n \n \n \n \n \n \n \n
\n SF-{i}:\n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Programs as AllPrograms } from \"../../Programs/Programs\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Programs(props: IProps): React.ReactElement {\n const [program, setProgram] = useState(\"NUKE.exe\");\n function setProgramDropdown(event: SelectChangeEvent): void {\n setProgram(event.target.value);\n }\n function addProgram(): void {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms(): void {\n for (const i of Object.keys(AllPrograms)) {\n if (!props.player.hasProgram(AllPrograms[i].name)) {\n props.player.getHomeComputer().programs.push(AllPrograms[i].name);\n }\n }\n }\n\n return (\n \n }>\n Programs\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Program:\n \n \n
\n Add:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { GetServer, GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nexport function Servers(): React.ReactElement {\n const [server, setServer] = useState(\"home\");\n function setServerDropdown(event: SelectChangeEvent): void {\n setServer(event.target.value);\n }\n function rootServer(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n }\n\n function maxMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n }\n\n function minMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n\n function minAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n }\n\n return (\n \n }>\n Servers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Server:\n \n \n
\n Root:\n \n \n \n \n
\n Security:\n \n \n \n \n
\n Money:\n \n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Companies as AllCompanies } from \"../../Company/Companies\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { Adjuster } from \"./Adjuster\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\nexport function Companies(): React.ReactElement {\n const [company, setCompany] = useState(FactionNames.ECorp as string);\n function setCompanyDropdown(event: SelectChangeEvent): void {\n setCompany(event.target.value);\n }\n function resetCompanyRep(): void {\n AllCompanies[company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor(): void {\n AllCompanies[company].favor = 0;\n }\n\n function tonsOfRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = 0;\n }\n }\n\n return (\n \n }>\n Companies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Company:\n \n \n
\n Reputation:\n \n modifyCompanyRep(1)(bigNumber)}\n add={modifyCompanyRep(1)}\n subtract={modifyCompanyRep(-1)}\n reset={resetCompanyRep}\n />\n
\n Favor:\n \n modifyCompanyFavor(1)(2000)}\n add={modifyCompanyFavor(1)}\n subtract={modifyCompanyFavor(-1)}\n reset={resetCompanyFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Bladeburner(props: IProps): React.ReactElement {\n const bladeburner = props.player.bladeburner;\n if (bladeburner === null) return <>;\n function modifyBladeburnerRank(modify: number): (x: number) => void {\n return function (rank: number): void {\n if (!bladeburner) return;\n bladeburner.changeRank(props.player, rank * modify);\n };\n }\n\n function resetBladeburnerRank(): void {\n if (!bladeburner) return;\n bladeburner.rank = 0;\n bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank(): void {\n if (!bladeburner) return;\n\n bladeburner.changeRank(props.player, bigNumber);\n }\n\n function modifyBladeburnerCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += cycles * modify;\n };\n }\n\n function resetBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles = 0;\n }\n\n function addTonsBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += bigNumber;\n }\n\n return (\n \n }>\n Bladeburner\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Rank:\n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Gang(props: IProps): React.ReactElement {\n function addTonsGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return (\n \n }>\n Gang\n \n \n \n \n \n \n \n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Corporation(props: IProps): React.ReactElement {\n function addTonsCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds + bigNumber;\n }\n }\n\n function modifyCorporationFunds(modify: number): (x: number) => void {\n return function (funds: number): void {\n if (props.player.corporation) {\n props.player.corporation.funds += funds * modify;\n }\n };\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds - props.player.corporation.funds;\n }\n }\n\n function addTonsCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n Object.keys(div.products).forEach((prod) => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return (\n \n }>\n Corporation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Funds:\n \n \n
\n Cycles:\n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { generateContract, generateRandomContract, generateRandomContractOnHome } from \"../../CodingContractGenerator\";\nimport { CodingContractTypes } from \"../../CodingContracts\";\n\nexport function CodingContracts(): React.ReactElement {\n const [codingcontract, setCodingcontract] = useState(\"Find Largest Prime Factor\");\n function setCodingcontractDropdown(event: SelectChangeEvent): void {\n setCodingcontract(event.target.value);\n }\n\n function specificContract(): void {\n generateContract({\n problemType: codingcontract,\n server: \"home\",\n });\n }\n\n return (\n \n }>\n Coding Contracts\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { Money } from \"../../ui/React/Money\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { StockMarket as SM } from \"../../StockMarket/StockMarket\";\nimport { Stock } from \"../../StockMarket/Stock\";\n\nexport function StockMarket(): React.ReactElement {\n const [stockPrice, setStockPrice] = useState(0);\n const [stockSymbol, setStockSymbol] = useState(\"\");\n\n function setStockPriceField(event: React.ChangeEvent): void {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event: React.ChangeEvent): void {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub: (arg0: Stock) => void): void {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match: (symbol: string) => boolean = (): boolean => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol: string): boolean {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name of Object.keys(SM)) {\n if (SM.hasOwnProperty(name)) {\n const stock = SM[name];\n if (stock instanceof Stock && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice(): void {\n if (!isNaN(stockPrice)) {\n processStocks((stock: Stock) => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps(): void {\n const stocks: JSX.Element[] = [];\n processStocks((stock: Stock) => {\n stocks.push(\n \n {stock.symbol}\n \n \n \n ,\n );\n });\n dialogBoxCreate(\n \n \n \n \n \n \n {stocks}\n \n
StockPrice cap
,\n );\n }\n return (\n \n }>\n Stock Market\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Symbol:\n \n \n
\n Price:\n \n \n \n
\n Caps:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Sleeves(props: IProps): React.ReactElement {\n function sleeveMaxAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n function sleeveSetStoredCycles(cycles: number): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].storedCycles = cycles;\n }\n }\n\n return (\n \n }>\n Sleeves\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Shock:\n \n \n \n \n
\n Sync:\n \n \n \n \n
\n sleeveSetStoredCycles(10000000)}\n add={sleeveSetStoredCycles}\n subtract={sleeveSetStoredCycles}\n reset={() => sleeveSetStoredCycles(0)}\n />\n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport { staneksGift } from \"../../CotMG/Helper\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { Adjuster } from \"./Adjuster\";\n\nexport function Stanek(): React.ReactElement {\n function addCycles(): void {\n staneksGift.storedCycles = 1e6;\n }\n\n function modCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.storedCycles += cycles * modify;\n };\n }\n\n function resetCycles(): void {\n staneksGift.storedCycles = 0;\n }\n\n function addCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 1e21;\n f.numCharge = 1e21;\n });\n }\n\n function modCharge(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.fragments.forEach((f) => (f.highestCharge += cycles * modify));\n };\n }\n\n function resetCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n return (\n \n }>\n Stanek's Gift\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { saveObject } from \"../../SaveObject\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function TimeSkip(props: IProps): React.ReactElement {\n function timeskip(time: number) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n saveObject.saveGame();\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return (\n \n }>\n Time skip\n \n \n \n \n \n \n \n );\n}\n","import React, { useState, useRef } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { saveObject } from \"../../SaveObject\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { Upload } from \"@mui/icons-material\";\nimport { Button } from \"@mui/material\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\n\nexport function SaveFile(): React.ReactElement {\n const importInput = useRef(null);\n const [saveFile, setSaveFile] = useState(\"\");\n const [restoreScripts, setRestoreScripts] = useState(true);\n const [restoreAugs, setRestoreAugs] = useState(true);\n const [restoreSFs, setRestoreSFs] = useState(true);\n\n async function onImport(event: React.ChangeEvent): Promise {\n try {\n const base64Save = await saveObject.getImportStringFromFile(event.target.files);\n const save = atob(base64Save);\n setSaveFile(save);\n } catch (e: unknown) {\n SnackbarEvents.emit(String(e), ToastVariant.ERROR, 5000);\n }\n }\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n function doRestore(): void {\n const save = JSON.parse(saveFile);\n // TODO: Continue here.\n console.error(save);\n }\n\n return (\n \n }>\n Save file\n \n \n \n
\n {saveFile !== \"\" && (\n <>\n setRestoreScripts(v)}\n text=\"Restore scripts\"\n tooltip={<>Restore the save file home computer scripts.}\n />\n
\n setRestoreAugs(v)}\n text=\"Restore Augmentations\"\n tooltip={<>Restore the save file installed augmentations.}\n />\n
\n setRestoreSFs(v)}\n text=\"Restore Source Files\"\n tooltip={<>Restore the save file acquired source files.}\n />\n
\n \n \n )}\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport { Tooltip } from \"@mui/material\";\nimport LockIcon from \"@mui/icons-material/Lock\";\nimport LockOpenIcon from \"@mui/icons-material/LockOpen\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { IEngine } from \"../../IEngine\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Achievements(props: IProps): React.ReactElement {\n const [playerAchievement, setPlayerAchievements] = useState(props.player.achievements.map((m) => m.ID));\n\n function grantAchievement(id: string): void {\n props.player.giveAchievement(id);\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function grantAllAchievements(): void {\n Object.values(achievements).forEach((a) => props.player.giveAchievement(a.ID));\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function removeAchievement(id: string): void {\n props.player.achievements = props.player.achievements.filter((a) => a.ID !== id);\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function clearAchievements(): void {\n props.player.achievements = [];\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function disableEngine(): void {\n props.engine.Counters.achievementsCounter = Number.MAX_VALUE;\n }\n\n function enableEngine(): void {\n props.engine.Counters.achievementsCounter = 0;\n }\n\n return (\n \n }>\n Achievements\n \n \n \n \n \n \n \n \n \n {Object.values(achievements).map((i) => {\n const achieved = playerAchievement.includes(i.ID);\n return (\n \n \n \n \n \n );\n })}\n \n
\n Achievements:\n \n \n \n \n \n \n \n
\n {achieved ? (\n \n \n \n ) : (\n \n \n \n )}\n \n \n {i.ID}\n
\n {i.Description}\n \n }\n >\n {i.Name}:\n \n
\n \n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Entropy(props: IProps): React.ReactElement {\n return (\n \n }>\n Entropy\n \n \n {\n props.player.entropy += num;\n props.player.applyEntropy(props.player.entropy);\n }}\n subtract={(num) => {\n props.player.entropy -= num;\n props.player.applyEntropy(props.player.entropy);\n }}\n tons={() => {\n props.player.entropy += 1e12;\n props.player.applyEntropy(props.player.entropy);\n }}\n reset={() => {\n props.player.entropy = 0;\n props.player.applyEntropy(props.player.entropy);\n }}\n />\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Stats } from \"./Stats\";\nimport { Console } from \"./Console\";\nimport { AllPages } from \"./AllPages\";\n\nimport { use } from \"../../ui/Context\";\nimport Box from \"@mui/material/Box\";\n\nexport function BladeburnerRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n return (\n \n \n \n \n \n\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { TravelModal } from \"./TravelModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n const [travelOpen, setTravelOpen] = useState(false);\n const setRerender = useState(false)[1];\n\n const inFaction = props.bladeburner.rank >= BladeburnerConstants.RankNeededForFaction;\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openFaction(): void {\n if (!inFaction) return;\n const faction = Factions[FactionNames.Bladeburners];\n if (!faction.isMember) {\n joinFaction(faction);\n }\n\n props.router.toFaction(faction);\n }\n\n return (\n \n \n \n \n Rank 25 required. : \"\"}>\n \n \n \n \n setTravelOpen(false)} bladeburner={props.bladeburner} />\n \n \n Your rank within the Bladeburner division.}>\n Rank: {formatNumber(props.bladeburner.rank, 2)}\n \n \n
\n \n \n Performing actions will use up your stamina.\n
\n
\n Your max stamina is determined primarily by your agility stat.\n
\n
\n Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads\n to a higher gain rate.\n
\n
\n Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of\n your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this\n means your success rate would be multipled by 85% (100 - 15).\n
\n
\n Your max stamina and stamina gain rate can also be increased by training, or through skills and\n Augmentation upgrades.\n \n }\n >\n \n Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)}\n \n \n
\n
\n \n Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}%\n \n
\n Team Size: {formatNumber(props.bladeburner.teamSize, 0)}\n Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}\n
\n Num Times Hospitalized: {props.bladeburner.numHosp}\n \n Money Lost From Hospitalizations: \n \n
\n Current City: {props.bladeburner.city}\n \n \n This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An\n accurate population count increases success rate estimates.\n \n }\n >\n \n Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)}\n \n \n \n
\n \n \n This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\n \n }\n >\n Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \n \n
\n \n \n The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a\n chaos level can make contracts and operations harder.\n \n }\n >\n City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)}\n \n \n
\n {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && (\n <>\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by\n browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n \n Bonus time:{\" \"}\n {convertTimeMsToTimeElapsedString(\n (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000,\n )}\n \n \n \n
\n \n )}\n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n
\n \n Aug. Success Chance mult: {formatNumber(props.player.mults.bladeburner_success_chance * 100, 1)}%\n
\n Aug. Max Stamina mult: {formatNumber(props.player.mults.bladeburner_max_stamina * 100, 1)}%\n
\n Aug. Stamina Gain mult: {formatNumber(props.player.mults.bladeburner_stamina_gain * 100, 1)}%\n
\n Aug. Field Analysis mult: {formatNumber(props.player.mults.bladeburner_analysis * 100, 1)}%\n
\n
\n
\n );\n}\n","import React from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { Settings } from \"../../Settings/Settings\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n function travel(city: string): void {\n props.bladeburner.city = city;\n props.onClose();\n }\n\n return (\n \n <>\n \n Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in\n for your Bladeburner duties does not affect your location in the game otherwise.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Paper from \"@mui/material/Paper\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ILineProps {\n content: React.ReactNode;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\",\n },\n input: {\n backgroundColor: theme.colors.backgroundsecondary,\n },\n nopadding: {\n padding: theme.spacing(0),\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0),\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\",\n },\n }),\n);\n\nfunction Line(props: ILineProps): React.ReactElement {\n return (\n \n {props.content}\n \n );\n}\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function Console(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [command, setCommand] = useState(\"\");\n const setRerender = useState(false)[1];\n const consoleInput = useRef(null);\n\n function handleCommandChange(event: React.ChangeEvent): void {\n setCommand(event.target.value);\n }\n\n const [consoleHistoryIndex, setConsoleHistoryIndex] = useState(props.bladeburner.consoleHistory.length);\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n function handleKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n setCommand(\"\");\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.key === KEY.UP_ARROW) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n if (len === 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n\n if (event.key === KEY.DOWN_ARROW) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n }\n }\n\n function handleClick(): void {\n if (!consoleInput.current) return;\n consoleInput.current.focus();\n }\n\n return (\n \n \n \n \n \n \n \n \n \n ),\n spellCheck: false,\n }}\n />\n \n );\n}\n\ninterface ILogProps {\n entries: string[];\n}\n\nfunction Logs({ entries }: ILogProps): React.ReactElement {\n const scrollHook = useRef(null);\n\n // TODO: Text gets shifted up as new entries appear, if the user scrolled up it should attempt to keep the text focused\n function scrollToBottom(): void {\n if (!scrollHook.current) return;\n scrollHook.current.scrollTop = scrollHook.current.scrollHeight;\n }\n\n useEffect(() => {\n scrollToBottom();\n }, [entries.length]);\n\n return (\n \n {entries && entries.map((log: string, i: number) => )}\n \n );\n}\n","import React from \"react\";\nimport { GeneralActionPage } from \"./GeneralActionPage\";\nimport { ContractPage } from \"./ContractPage\";\nimport { OperationPage } from \"./OperationPage\";\nimport { BlackOpPage } from \"./BlackOpPage\";\nimport { SkillPage } from \"./SkillPage\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function AllPages(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n {value === 3 && }\n {value === 4 && }\n \n \n );\n}\n","import * as React from \"react\";\nimport { GeneralActionList } from \"./GeneralActionList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionPage(props: IProps): React.ReactElement {\n return (\n <>\n These are generic actions that will assist you in your Bladeburner duties.\n \n \n );\n}\n","import React from \"react\";\nimport { GeneralActionElem } from \"./GeneralActionElem\";\nimport { Action } from \"../Action\";\nimport { GeneralActions } from \"../GeneralActions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionList(props: IProps): React.ReactElement {\n const actions: Action[] = [];\n for (const name of Object.keys(GeneralActions)) {\n if (GeneralActions.hasOwnProperty(name)) {\n actions.push(GeneralActions[name]);\n }\n }\n return (\n <>\n {actions.map((action: Action) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { GeneralActions } from \"../data/GeneralActions\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function GeneralActionElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = (function (): number {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n case \"Incite Violence\":\n return 60;\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n return -1; // dead code\n })();\n const successChance =\n props.action.name === \"Recruitment\"\n ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1))\n : -1;\n\n const actionData = GeneralActions[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n \n \n \n \n )}\n
\n
\n {actionData.desc}\n
\n
\n \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n {successChance !== -1 && (\n <>\n
\n Estimated success chance: {formatNumber(successChance * 100, 1)}%\n \n )}\n
\n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const GeneralActions: {\n [key: string]: IContract | undefined;\n} = {\n Training: {\n desc: (\n <>\n Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for\n all combat stats and also increases your max stamina.\n \n ),\n },\n\n \"Field Analysis\": {\n desc: (\n <>\n Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations\n and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the\n current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Recruitment: {\n desc: (\n <>\n Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Diplomacy: {\n desc: (\n <>\n Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in\n your current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n \"Hyperbolic Regeneration Chamber\": {\n desc: (\n <>\n Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your\n wounds and slightly increase your stamina.\n
\n
\n \n ),\n },\n \"Incite Violence\": {\n desc: (\n <>\n Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate\n additional contracts and operations, at the cost of increased Chaos.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { ContractList } from \"./ContractList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you\n to lose HP, which can lead to hospitalization.\n
\n
\n You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more\n difficult, but grant more rank, experience, and money.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { ContractElem } from \"./ContractElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Contracts } from \"../data/Contracts\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function ContractElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner, props.player);\n\n const actionData = Contracts[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n )}\n
\n
\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Contracts remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const Contracts: {\n [key: string]: IContract | undefined;\n} = {\n Tracking: {\n desc: (\n <>\n Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT\n engage. Stealth is of the utmost importance.\n
\n
\n Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever\n city you are currently in.\n \n ),\n },\n \"Bounty Hunter\": {\n desc: (\n <>\n Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n
\n
\n Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n Retirement: {\n desc: (\n <>\n Hunt down and retire (kill) rogue Synthoids.\n
\n
\n Successfully completing a Retirement contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n};\n","import React from \"react\";\nimport { stealthIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function StealthIcon(): React.ReactElement {\n return This action involves stealth}>{stealthIcon};\n}\n","import React from \"react\";\nimport { killIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function KillIcon(): React.ReactElement {\n return This action involves retirement}>{killIcon};\n}\n","import * as React from \"react\";\nimport { OperationList } from \"./OperationList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It\n will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more\n punishing than contracts, but are also more rewarding.\n
\n
\n Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary\n between different Operations.\n
\n
\n For operations, you can use a team. You must first recruit team members. Having a larger team will improve your\n chances of success.\n
\n
\n You can unlock higher-level operations by successfully completing them. Higher-level operations are more\n difficult, but grant more rank and experience.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { OperationElem } from \"./OperationElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Operation } from \"../Operation\";\nimport { Operations } from \"../data/Operations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: Operation;\n}\n\nexport function OperationElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner, props.player);\n\n const actionData = Operations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n \n )}\n
\n
\n\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Operations remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Action } from \"../Action\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: Action;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TeamSizeModal(props: IProps): React.ReactElement {\n const [teamSize, setTeamSize] = useState();\n\n function confirmTeamSize(): void {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n if (isNaN(num) || num < 0) {\n dialogBoxCreate(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n props.onClose();\n }\n\n function onTeamSize(event: React.ChangeEvent): void {\n const x = parseFloat(event.target.value);\n if (x > props.bladeburner.teamSize) setTeamSize(props.bladeburner.teamSize);\n else setTeamSize(x);\n }\n\n return (\n \n \n Enter the amount of team members you would like to take on this Op. If you do not have the specified number of\n team members, then as many as possible will be used. Note that team members may be lost during operations.\n \n \n \n \n );\n}\n","import React from \"react\";\n\ninterface IOperation {\n desc: JSX.Element;\n}\n\nexport const Operations: {\n [key: string]: IOperation | undefined;\n} = {\n Investigation: {\n desc: (\n <>\n As a field agent, investigate and identify Synthoid populations, movements, and operations.\n
\n
\n Successful Investigation ops will increase the accuracy of your synthoid data.\n
\n
\n You will NOT lose HP from failed Investigation ops.\n \n ),\n },\n \"Undercover Operation\": {\n desc: (\n <>\n Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n
\n
\n Successful Undercover ops will increase the accuracy of your synthoid data.\n \n ),\n },\n \"Sting Operation\": {\n desc: <>Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.,\n },\n Raid: {\n desc: (\n <>\n Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your\n current city in order for this Operation to be successful.\n \n ),\n },\n \"Stealth Retirement Operation\": {\n desc: (\n <>\n Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any\n attention. Stealth and discretion are key.\n \n ),\n },\n Assassination: {\n desc: (\n <>\n Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the\n Synthoid communities.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { BlackOpList } from \"./BlackOpList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { use } from \"../../ui/Context\";\nimport { BlackOperationNames } from \"../data/BlackOperationNames\";\nimport { Button } from \"@mui/material\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpPage(props: IProps): React.ReactElement {\n const router = use.Router();\n return (\n <>\n \n Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked\n successively by completing the one before it.\n
\n
\n \n Your ultimate goal to climb through the ranks of {FactionNames.Bladeburners} is to complete all of the Black\n Ops.\n \n
\n
\n Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank\n losses.\n
\n {props.bladeburner.blackops[BlackOperationNames.OperationDaedalus] ? (\n \n ) : (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { BlackOperations } from \"../BlackOperations\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOpElem } from \"./BlackOpElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpList(props: IProps): React.ReactElement {\n let blackops: BlackOperation[] = [];\n for (const blackopName of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(blackopName)) {\n blackops.push(BlackOperations[blackopName]);\n }\n }\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n\n blackops = blackops.filter(\n (blackop: BlackOperation, i: number) =>\n !(\n props.bladeburner.blackops[blackops[i].name] == null &&\n i !== 0 &&\n props.bladeburner.blackops[blackops[i - 1].name] == null\n ),\n );\n\n blackops = blackops.reverse();\n\n return (\n <>\n {blackops.map((blackop: BlackOperation) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOperations } from \"../data/BlackOperations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: BlackOperation;\n}\n\nexport function BlackOpElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n if (isCompleted) {\n return (\n \n {props.action.name} (COMPLETED)\n \n );\n }\n\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"BlackOperation\"] &&\n props.action.name === props.bladeburner.action.name;\n const actionTime = props.action.getActionTime(props.bladeburner, props.player);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n\n const actionData = BlackOperations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n \n ) : (\n <>\n \n\n \n \n \n )}\n\n
\n
\n {actionData.desc}\n
\n
\n \n Required Rank: {formatNumber(props.action.reqdRank, 0)}\n \n
\n \n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n
\n );\n}\n","import React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { BlackOperationNames } from \"./BlackOperationNames\";\n\ninterface IBlackOp {\n desc: JSX.Element;\n}\n\nexport const BlackOperations: {\n [key: string]: IBlackOp | undefined;\n} = {\n [BlackOperationNames.OperationTyphoon]: {\n desc: (\n <>\n Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that\n Zenyatta, along with the rest of the PMC, is a Synthoid.\n
\n
\n The goal of {BlackOperationNames.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means\n necessary. After the task is completed, the actions must be covered up from the general public.\n \n ),\n },\n\n [BlackOperationNames.OperationZero]: {\n desc: (\n <>\n AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a\n supporter of Synthoid rights. He must be removed.\n
\n
\n The goal of {BlackOperationNames.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating\n evidence or information against Watataki that will cause him to be removed from his position at AeroCorp.\n Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced\n security measures in the world.\n \n ),\n },\n [BlackOperationNames.OperationX]: {\n desc: (\n <>\n We have recently discovered an underground publication group called Samizdat. Even though most of their\n publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of\n their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and\n other Eastern countries.\n
\n
\n Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that\n their base of operations is in {CityName.Ishima}'s underground sewer systems. Your task is to investigate the\n sewer systems, and eliminate Samizdat. They must never publish anything again.\n \n ),\n },\n [BlackOperationNames.OperationTitan]: {\n desc: (\n <>\n Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we\n know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to,\n but the research that they could be conducting using Titan Laboraties' vast resources is potentially very\n dangerous.\n
\n
\n Your goal is to enter and destroy the Bioengineering department's facility in {CityName.Aevum}. The task is not\n just to retire the Synthoids there, but also to destroy any information or research at the facility that is\n relevant to the Synthoids and their goals.\n \n ),\n },\n [BlackOperationNames.OperationAres]: {\n desc: (\n <>\n One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai\n between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy\n weapons. It is critical for the safety of humanity that this deal does not happen.\n
\n
\n Your task is to intercept the deal. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationArchangel]: {\n desc: (\n <>\n Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI\n Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms\n trafficking operation.\n
\n
\n The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the\n number of other casualties, but do what you must to complete the mission.\n \n ),\n },\n [BlackOperationNames.OperationJuggernaut]: {\n desc: (\n <>\n The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls\n himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into{\" \"}\n {CityName.Sector12}. We also have reason to believe they tried to break into one of Universal Energy's\n facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented\n Synthoid, and have thus enlisted our help.\n
\n
\n Your mission is to eradicate Juggernaut and his followers.\n \n ),\n },\n [BlackOperationNames.OperationRedDragon]: {\n desc: (\n <>\n The {FactionNames.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design.\n We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in\n order to bolster their criminal activities.\n
\n
\n Your task is to infiltrate and destroy the {FactionNames.Tetrads}' base of operations in Los Angeles.\n Intelligence tells us that their base houses one of their Synthoid manufacturing units.\n \n ),\n },\n [BlackOperationNames.OperationK]: {\n desc: (\n <>\n CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.\n This technology is supposedly capable of cloning Synthoids, not only physically but also their advanced AI\n modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any\n Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would\n be catastrophic.\n
\n
\n We do not have the power or jurisdiction to shut this down through legal or political means, so we must resort\n to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its\n creation.\n \n ),\n },\n [BlackOperationNames.OperationDeckard]: {\n desc: (\n <>\n Despite your success in eliminating VitaLife's new android-replicating technology in{\" \"}\n {BlackOperationNames.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off\n with the schematics and design of the technology before the Operation. It is almost a certainty that these\n Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.\n
\n
\n The goal of {BlackOperationNames.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need\n to tell you how critical this mission is.\n \n ),\n },\n [BlackOperationNames.OperationTyrell]: {\n desc: (\n <>\n A week ago {FactionNames.BladeIndustries} reported a small break-in at one of their {CityName.Aevum}{\" \"}\n Augmentation storage facilities. We figured out that {FactionNames.TheDarkArmy} was behind the heist, and didn't\n think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that\n break-in group.\n
\n
\n We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt\n down associated {FactionNames.TheDarkArmy} members and eliminate them.\n \n ),\n },\n [BlackOperationNames.OperationWallace]: {\n desc: (\n <>\n Based on information gathered from {BlackOperationNames.OperationTyrell}, we've discovered that{\" \"}\n {FactionNames.TheDarkArmy} was well aware that there were Synthoids amongst their ranks. Even worse, we believe\n that {FactionNames.TheDarkArmy} is working together with other criminal organizations such as{\" \"}\n {FactionNames.TheSyndicate} and that they are planning some sort of large-scale takeover of multiple major\n cities, most notably {CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these criminal\n factions and are trying to stage another Synthoid uprising.\n
\n
\n The best way to deal with this is to prevent it before it even happens. The goal of{\" \"}\n {BlackOperationNames.OperationWallace} is to destroy {FactionNames.TheDarkArmy} and Syndicate factions in{\" \"}\n {CityName.Aevum} immediately. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationShoulderOfOrion]: {\n desc: (\n <>\n China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using\n Synthoids. We believe China is trying to establish the first off-world colonies.\n
\n
\n The mission is to prevent this launch without instigating an international conflict. When you accept this\n mission you will be officially disavowed by the NSA and the national government until after you successfully\n return. In the event of failure, all of the operation's team members must not let themselves be captured alive.\n \n ),\n },\n [BlackOperationNames.OperationHyron]: {\n desc: (\n <>\n Our intelligence tells us that {FactionNames.FulcrumSecretTechnologies} is developing a quantum supercomputer\n using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data\n and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of\n organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.\n
\n
\n I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.\n
\n
\n The research for this project is being conducted at one of {FactionNames.FulcrumSecretTechnologies} secret\n facilities in {CityName.Aevum}, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work,\n and then find and kill the project lead.\n \n ),\n },\n [BlackOperationNames.OperationMorpheus]: {\n desc: (\n <>\n DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the\n people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our\n agents and informants in {CityName.Chongqing}, we have reason to believe that one of the broadcast towers there\n has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n
\n
\n The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.\n \n ),\n },\n [BlackOperationNames.OperationIonStorm]: {\n desc: (\n <>\n Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the{\" \"}\n {CityName.Sector12} Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they\n have been stockpiling weapons, money, and other resources. This makes them dangerous.\n
\n
\n This is a full-scale assault operation to find and retire all of these Synthoids in the {CityName.Sector12}{\" \"}\n Slums.\n \n ),\n },\n [BlackOperationNames.OperationAnnihilus]: {\n desc: (\n <>\n Our superiors have ordered us to eradicate everything and everyone in an underground facility located in{\" \"}\n {CityName.Aevum}. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist\n organization called '{FactionNames.TheCovenant}'. We have no prior intelligence about this organization, so you\n are going in blind.\n \n ),\n },\n [BlackOperationNames.OperationUltron]: {\n desc: (\n <>\n {FactionNames.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a\n malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized\n and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue\n ones from the Uprising.\n
\n
\n {FactionNames.OmniTekIncorporated} has also told us they believe someone has triggered this malfunction in a\n large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in{\" \"}\n {CityName.Volhaven} to form a terrorist group called Ultron.\n
\n
\n Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making\n moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n
\n
\n Your task is to find and destroy Ultron.\n \n ),\n },\n [BlackOperationNames.OperationCenturion]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its\n advancement became our primary goal. And at the peak of human civilization technology turned into power. Global,\n absolute power.\n
\n
\n It seems that the universe is not without a sense of irony.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationVindictus]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n The bits are all around us. The daemons that hold the Node together can manifest themselves in many different\n ways.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationDaedalus]: {\n desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.,\n },\n};\n","import React, { useState } from \"react\";\nimport { SkillList } from \"./SkillList\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n bladeburner: IBladeburner;\n}\n\nexport function SkillPage(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult: number | undefined): boolean {\n return mult !== undefined && mult !== 1;\n }\n\n return (\n <>\n \n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n \n \n You will gain one skill point every {BladeburnerConstants.RanksPerSkillPoint} ranks.\n
\n Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different\n skills with each other is multiplicative.\n
\n {valid(mults[\"successChanceAll\"]) && (\n Total Success Chance: x{formatNumber(mults[\"successChanceAll\"], 3)}\n )}\n {valid(mults[\"successChanceStealth\"]) && (\n Stealth Success Chance: x{formatNumber(mults[\"successChanceStealth\"], 3)}\n )}\n {valid(mults[\"successChanceKill\"]) && (\n Retirement Success Chance: x{formatNumber(mults[\"successChanceKill\"], 3)}\n )}\n {valid(mults[\"successChanceContract\"]) && (\n Contract Success Chance: x{formatNumber(mults[\"successChanceContract\"], 3)}\n )}\n {valid(mults[\"successChanceOperation\"]) && (\n Operation Success Chance: x{formatNumber(mults[\"successChanceOperation\"], 3)}\n )}\n {valid(mults[\"successChanceEstimate\"]) && (\n Synthoid Data Estimate: x{formatNumber(mults[\"successChanceEstimate\"], 3)}\n )}\n {valid(mults[\"actionTime\"]) && Action Time: x{formatNumber(mults[\"actionTime\"], 3)}}\n {valid(mults[\"effHack\"]) && Hacking Skill: x{formatNumber(mults[\"effHack\"], 3)}}\n {valid(mults[\"effStr\"]) && Strength: x{formatNumber(mults[\"effStr\"], 3)}}\n {valid(mults[\"effDef\"]) && Defense: x{formatNumber(mults[\"effDef\"], 3)}}\n {valid(mults[\"effDex\"]) && Dexterity: x{formatNumber(mults[\"effDex\"], 3)}}\n {valid(mults[\"effAgi\"]) && Agility: x{formatNumber(mults[\"effAgi\"], 3)}}\n {valid(mults[\"effCha\"]) && Charisma: x{formatNumber(mults[\"effCha\"], 3)}}\n {valid(mults[\"effInt\"]) && Intelligence: x{formatNumber(mults[\"effInt\"], 3)}}\n {valid(mults[\"stamina\"]) && Stamina: x{formatNumber(mults[\"stamina\"], 3)}}\n {valid(mults[\"money\"]) && Contract Money: x{formatNumber(mults[\"money\"], 3)}}\n {valid(mults[\"expGain\"]) && Exp Gain: x{formatNumber(mults[\"expGain\"], 3)}}\n setRerender((old) => !old)} />\n \n );\n}\n\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n\n }\n }\n}\n*/\n","import * as React from \"react\";\nimport { SkillElem } from \"./SkillElem\";\nimport { Skills } from \"../Skills\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillList(props: IProps): React.ReactElement {\n return (\n <>\n {Object.keys(Skills).map((skill: string) => (\n \n ))}\n \n );\n}\n","import React from \"react\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Skill } from \"../Skill\";\n\ninterface IProps {\n skill: Skill;\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillElem(props: IProps): React.ReactElement {\n const skillName = props.skill.name;\n let currentLevel = 0;\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n const pointCost = props.skill.calculateCost(currentLevel);\n\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick(): void {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return (\n \n \n \n {!canLevel || maxLvl ? (\n \n \n \n ) : (\n \n \n \n )}\n \n Level: {currentLevel}\n {maxLvl ? (\n MAX LEVEL\n ) : (\n Skill Points required: {formatNumber(pointCost, 0)}\n )}\n {props.skill.desc}\n \n );\n}\n","/**\n * React Component for all the gang stuff.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { ManagementSubpage } from \"./ManagementSubpage\";\nimport { TerritorySubpage } from \"./TerritorySubpage\";\nimport { EquipmentsSubpage } from \"./EquipmentsSubpage\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function GangRoot(): React.ReactElement {\n const player = use.Player();\n const gang = (function () {\n if (player.gang === null) throw new Error(\"Gang should not be null\");\n return player.gang;\n })();\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n \n );\n}\n","/**\n * React Component for the subpage that manages gang members, the main page.\n */\nimport React from \"react\";\nimport { GangStats } from \"./GangStats\";\nimport { GangMemberList } from \"./GangMemberList\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\n\nexport function ManagementSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n This page is used to manage your gang members and get an overview of your gang's stats.\n
\n
\n If a gang member is not earning much money or respect, the task that you have assigned to that member might be\n too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of\n the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact\n that your wanted level is too high. Consider assigning a few members to the '\n {gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\"}' task to lower your wanted level.\n
\n
\n Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing\n Augmentations, you will automatically be a member of whatever Faction you created your gang with.\n
\n
\n You can also manage your gang programmatically through Netscript using the Gang API\n
\n
\n \n
\n \n \n );\n}\n","/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\nimport React from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { AllGangs } from \"../AllGangs\";\nimport { BonusTime } from \"./BonusTime\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nexport function GangStats(): React.ReactElement {\n const gang = useGang();\n const territoryMult = AllGangs[gang.facName].territory * 100;\n let territoryStr;\n if (territoryMult <= 0) {\n territoryStr = formatNumber(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = formatNumber(100, 2);\n } else {\n territoryStr = formatNumber(territoryMult, 2);\n }\n\n return (\n <>\n \n \n Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect\n affects the amount of money your gang members will earn, and also determines how much reputation you are\n earning with your gang's corresponding Faction.\n \n }\n >\n \n Respect: {numeralWrapper.formatRespect(gang.respect)} (\n {numeralWrapper.formatRespect(5 * gang.respectGainRate)} / sec)\n \n \n \n\n \n \n Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder\n it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\n \n }\n >\n \n Wanted Level: {numeralWrapper.formatWanted(gang.wanted)} (\n {numeralWrapper.formatWanted(5 * gang.wantedGainRate)} / sec)\n \n \n \n\n \n Penalty for respect and money gain rates due to Wanted Level}>\n Wanted Level Penalty: -{formatNumber((1 - gang.getWantedPenalty()) * 100, 2)}%\n \n \n\n \n Money gain rate: \n \n\n \n The percentage of total territory your Gang controls}>\n Territory: {territoryStr}%\n \n \n \n Faction reputation: \n \n\n \n \n );\n}\n","/**\n * React Component for displaying the bonus time remaining.\n */\nimport * as React from \"react\";\nimport { Gang } from \"../Gang\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n gang: Gang;\n}\n\nexport function BonusTime(props: IProps): React.ReactElement {\n const CyclerPerSecond = 1000 / CONSTANTS._idleSpeed;\n if ((props.gang.storedCycles / CyclerPerSecond) * 1000 <= 5000) return <>;\n const bonusMillis = (props.gang.storedCycles / CyclerPerSecond) * 1000;\n return (\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the\n browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}\n \n \n );\n}\n","/**\n * React Component for the list of gang members on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberCard } from \"./GangMemberCard\";\nimport { RecruitButton } from \"./RecruitButton\";\nimport { useGang } from \"./Context\";\n\nimport { Box, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { GangMember } from \"../GangMember\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\n\nexport function GangMemberList(): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n const [filter, setFilter] = useState(\"\");\n const [ascendOnly, setAscendOnly] = useState(false);\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n };\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter))\n .filter((member) => {\n if (ascendOnly) return member.canAscend();\n return true;\n });\n\n return (\n <>\n setRerender((old) => !old)} />\n ,\n spellCheck: false,\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: \"15%\" }}\n />\n setAscendOnly(newValue)}\n text=\"Show only ascendable\"\n tooltip={<>Filter the members list by whether or not the member can be ascended.}\n />\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","/**\n * React Component for a gang member on the management subpage.\n */\nimport React from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberCardContent } from \"./GangMemberCardContent\";\n\nimport Box from \"@mui/material/Box\";\n\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCard(props: IProps): React.ReactElement {\n return (\n \n \n {props.member.name}} />\n \n \n \n );\n}\n","/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberStats } from \"./GangMemberStats\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { AscensionModal } from \"./AscensionModal\";\n\nimport { Box } from \"@mui/system\";\nimport { Button, Typography } from \"@mui/material\";\nimport HelpIcon from \"@mui/icons-material/Help\";\n\nimport { GangMember } from \"../GangMember\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCardContent(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const [helpOpen, setHelpOpen] = useState(false);\n const [ascendOpen, setAscendOpen] = useState(false);\n\n return (\n <>\n {props.member.canAscend() && (\n \n \n setAscendOpen(false)}\n member={props.member}\n onAscend={() => setRerender((old) => !old)}\n />\n \n setHelpOpen(false)}>\n \n Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their\n stat multipliers.\n
\n
\n The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp\n they have.\n
\n
\n Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect\n equal to the total respect earned by the member.\n
\n
\n
\n )}\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n );\n}\n","/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\nimport React from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMember } from \"../GangMember\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../ui/React/CharacterOverview\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberStats(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n\n const gang = useGang();\n const data = [\n [`Money:`, ],\n [`Respect:`, `${numeralWrapper.formatRespect(5 * props.member.calculateRespectGain(gang))} / sec`],\n [`Wanted Level:`, `${numeralWrapper.formatWanted(5 * props.member.calculateWantedLevelGain(gang))} / sec`],\n [`Total Respect:`, `${numeralWrapper.formatRespect(props.member.earnedRespect)}`],\n ];\n\n return (\n <>\n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n killScripts: () => void;\n}\n\nexport function KillScriptsModal(props: IProps): React.ReactElement {\n function onClick(): void {\n props.killScripts();\n props.onClose();\n }\n\n return (\n \n Forcefully kill all running scripts? This will also save your game and reload the game.\n \n \n );\n}\n","import { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { Company } from \"../../Company/Company\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { WorkStats } from \"../WorkStats\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nexport const calculateCompanyWorkStats = (player: IPlayer, company: Company): WorkStats => {\n const companyPositionName = player.jobs[company.name];\n const companyPosition = CompanyPositions[companyPositionName];\n\n let focusBonus = 1;\n if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n\n // If player has SF-11, calculate salary multiplier from favor\n let favorMult = 1 + company.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n let bn11Mult = 1;\n if (player.sourceFileLvl(11) > 0) {\n bn11Mult = favorMult;\n }\n\n let jobPerformance = companyPosition.calculateJobPerformance(\n player.hacking,\n player.strength,\n player.defense,\n player.dexterity,\n player.agility,\n player.charisma,\n );\n\n jobPerformance += player.intelligence / CONSTANTS.MaxSkillLevel;\n\n return {\n money:\n focusBonus *\n companyPosition.baseSalary *\n company.salaryMultiplier *\n player.mults.work_money *\n BitNodeMultipliers.CompanyWorkMoney *\n bn11Mult,\n reputation: focusBonus * jobPerformance * player.mults.company_rep * favorMult,\n hackExp:\n focusBonus *\n companyPosition.hackingExpGain *\n company.expMultiplier *\n player.mults.hacking_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n strExp:\n focusBonus *\n companyPosition.strengthExpGain *\n company.expMultiplier *\n player.mults.strength_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n defExp:\n focusBonus *\n companyPosition.defenseExpGain *\n company.expMultiplier *\n player.mults.defense_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n dexExp:\n focusBonus *\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n player.mults.dexterity_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n agiExp:\n focusBonus *\n companyPosition.agilityExpGain *\n company.expMultiplier *\n player.mults.agility_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n chaExp:\n focusBonus *\n companyPosition.charismaExpGain *\n company.expMultiplier *\n player.mults.charisma_exp *\n BitNodeMultipliers.CompanyWorkExpGain,\n intExp: 0,\n };\n};\n","// Metadata used for constructing Company Positions\nimport { IConstructorParams } from \"../CompanyPosition\";\nimport * as posNames from \"./companypositionnames\";\n\nexport const companyPositionMetadata: IConstructorParams[] = [\n {\n name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern\n nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n nextPosition: posNames.SoftwareCompanyPositions[4], // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.SoftwareCompanyPositions[4], // Head of Software\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n nextPosition: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n nextPosition: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2,\n },\n {\n name: posNames.ITCompanyPositions[0], // IT Intern\n nextPosition: posNames.ITCompanyPositions[1], // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.ITCompanyPositions[1], // IT Analyst\n nextPosition: posNames.ITCompanyPositions[2], // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.ITCompanyPositions[2], // IT Manager\n nextPosition: posNames.ITCompanyPositions[3], // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.ITCompanyPositions[3], // Systems Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.SecurityEngineerCompanyPositions[0], // Security Engineer\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer\n nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[0], // Business Intern\n nextPosition: posNames.BusinessCompanyPositions[1], // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.BusinessCompanyPositions[1], // Business Analyst\n nextPosition: posNames.BusinessCompanyPositions[2], // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.BusinessCompanyPositions[2], // Business Manager\n nextPosition: posNames.BusinessCompanyPositions[3], // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[3], // Operations Manager\n nextPosition: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n nextPosition: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SecurityCompanyPositions[0], // Police Officer\n nextPosition: posNames.SecurityCompanyPositions[1], // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[1], // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[2], // Security Guard\n nextPosition: posNames.SecurityCompanyPositions[3], // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[3], // Security Officer\n nextPosition: posNames.SecurityCompanyPositions[4], // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SecurityCompanyPositions[4], // Security Supervisor\n nextPosition: posNames.SecurityCompanyPositions[5], // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[5], // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.AgentCompanyPositions[0], // Field Agent\n nextPosition: posNames.AgentCompanyPositions[1], // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.AgentCompanyPositions[1], // Secret Agent\n nextPosition: posNames.AgentCompanyPositions[2], // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.AgentCompanyPositions[2], // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.MiscCompanyPositions[0], // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1,\n },\n {\n name: posNames.MiscCompanyPositions[1], // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[0], // Software Consultant\n nextPosition: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[0], // Business Consultant\n nextPosition: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2,\n },\n {\n name: posNames.PartTimeCompanyPositions[0], // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.PartTimeCompanyPositions[1], // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1,\n },\n];\n","/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\nimport { TaskDescription } from \"./TaskDescription\";\n\nimport { Box } from \"@mui/material\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\nimport { GangMember } from \"../GangMember\";\n\ninterface IProps {\n member: GangMember;\n onTaskChange: () => void;\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const gang = useGang();\n const [currentTask, setCurrentTask] = useState(props.member.task);\n\n const contextMember = gang.members.find((member) => member.name == props.member.name);\n if (contextMember && contextMember.task != currentTask) {\n setCurrentTask(contextMember.task);\n }\n\n function onChange(event: SelectChangeEvent): void {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = gang.getAllTaskNames();\n\n return (\n \n \n \n \n );\n}\n","/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\nimport React from \"react\";\nimport { GangMemberTasks } from \"../GangMemberTasks\";\nimport { GangMember } from \"../GangMember\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function TaskDescription(props: IProps): React.ReactElement {\n const task = GangMemberTasks[props.member.task];\n const desc = task ? task.desc : GangMemberTasks[\"Unassigned\"].desc;\n\n return ;\n}\n","/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function AscensionModal(props: IProps): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm(): void {\n props.onAscend();\n const res = gang.ascendMember(props.member);\n dialogBoxCreate(\n <>\n You ascended {props.member.name}!
\n
\n Your gang lost {numeralWrapper.formatRespect(res.respect)} respect.\n
\n
\n {props.member.name} gained the following stat multipliers for ascending:\n
\n Hacking: x{numeralWrapper.format(res.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(res.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(res.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(res.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(res.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(res.cha, \"0.000\")}\n
\n ,\n );\n props.onClose();\n }\n\n // const ascendBenefits = props.member.getAscensionResults();\n const preAscend = props.member.getCurrentAscensionMults();\n const postAscend = props.member.getAscensionMultsAfterAscend();\n\n return (\n \n \n Are you sure you want to ascend this member? They will lose all of\n
\n their non-Augmentation upgrades and their stats will reset back to 1.\n
\n
\n Furthermore, your gang will lose {numeralWrapper.formatRespect(props.member.earnedRespect)} respect\n
\n
\n In return, they will gain the following permanent boost to stat multipliers:\n
\n Hacking: x{numeralWrapper.format(preAscend.hack, \"0.000\")} => x\n {numeralWrapper.format(postAscend.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(preAscend.str, \"0.000\")} => x\n {numeralWrapper.format(postAscend.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(preAscend.def, \"0.000\")} => x\n {numeralWrapper.format(postAscend.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(preAscend.dex, \"0.000\")} => x\n {numeralWrapper.format(postAscend.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(preAscend.agi, \"0.000\")} => x\n {numeralWrapper.format(postAscend.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(preAscend.cha, \"0.000\")} => x\n {numeralWrapper.format(postAscend.cha, \"0.000\")}\n
\n
\n \n
\n );\n}\n","/**\n * React Component for the recruitment button and text on the gang main page.\n */\nimport React, { useState } from \"react\";\nimport { RecruitModal } from \"./RecruitModal\";\nimport { GangConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n onRecruit: () => void;\n}\n\nexport function RecruitButton(props: IProps): React.ReactElement {\n const gang = useGang();\n const [open, setOpen] = useState(false);\n if (gang.members.length >= GangConstants.MaximumGangMembers) {\n return <>;\n }\n\n if (!gang.canRecruitMember()) {\n const respect = gang.getRespectNeededToRecruitMember();\n return (\n \n \n \n {numeralWrapper.formatRespect(respect)} respect needed to recruit next member\n \n \n );\n }\n\n return (\n <>\n \n \n \n setOpen(false)} onRecruit={props.onRecruit} />\n \n );\n}\n","/**\n * React Component for the popup used to recruit new gang members.\n */\nimport React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IRecruitPopupProps {\n open: boolean;\n onClose: () => void;\n onRecruit: () => void;\n}\n\nexport function RecruitModal(props: IRecruitPopupProps): React.ReactElement {\n const gang = useGang();\n const [name, setName] = useState(\"\");\n\n const disabled = name === \"\" || !gang.canRecruitMember();\n function recruit(): void {\n if (disabled) return;\n // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n if (!gang.recruitMember(name)) {\n dialogBoxCreate(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) recruit();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n return (\n \n Enter a name for your new Gang member:\n
\n \n Recruit\n \n ),\n }}\n />\n
\n );\n}\n","/**\n * React Component for the territory subpage.\n */\nimport React, { useState } from \"react\";\n\nimport { Container, Button, Paper, Box, Tooltip, Switch, FormControlLabel, Typography } from \"@mui/material\";\nimport { Help } from \"@mui/icons-material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nimport { AllGangs } from \"../AllGangs\";\n\nimport { useGang } from \"./Context\";\nimport { TerritoryInfoModal } from \"./TerritoryInfoModal\";\n\nexport function TerritorySubpage(): React.ReactElement {\n const gang = useGang();\n const gangNames = Object.keys(AllGangs).filter((g) => g != gang.facName);\n const [infoOpen, setInfoOpen] = useState(false);\n\n return (\n \n \n This page shows how much territory your Gang controls. This statistic is listed as a percentage, which\n represents how much of the total territory you control.\n \n\n \n\n \n \n {gang.facName} (Your gang)\n \n\n (gang.territoryWarfareEngaged = event.target.checked)}\n />\n }\n label={\n \n Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance\n to gradually decrease until it reaches 0%.\n
\n }\n >\n Engage in Territory Warfare\n \n }\n />\n
\n (gang.notifyMemberDeath = event.target.checked)}\n />\n }\n label={\n \n If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members\n dies in a territory clash.\n \n }\n >\n Notify about Gang Member Deaths\n \n }\n />\n\n \n Territory Clash Chance: {numeralWrapper.formatPercentage(gang.territoryClashChance, 3)}
\n Power: {formatNumber(AllGangs[gang.facName].power, 3)}
\n Territory: {formatTerritory(AllGangs[gang.facName].territory)}%
\n
\n \n \n {gangNames\n .sort((a, b) => {\n if (AllGangs[a].territory <= 0 && AllGangs[b].territory > 0) return 1;\n if (AllGangs[a].territory > 0 && AllGangs[b].territory <= 0) return -1;\n return 0;\n })\n .map((name) => (\n \n ))}\n \n setInfoOpen(false)} />\n \n );\n}\nfunction formatTerritory(n: number): string {\n const v = n * 100;\n const precision = 3;\n if (v <= 0) {\n return formatNumber(0, precision);\n } else if (v >= 100) {\n return formatNumber(100, precision);\n } else {\n return formatNumber(v, precision);\n }\n}\n\ninterface ITerritoryProps {\n name: string;\n}\n\nfunction OtherGangTerritory(props: ITerritoryProps): React.ReactElement {\n const gang = useGang();\n const playerPower = AllGangs[gang.facName].power;\n const power = AllGangs[props.name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n const territory = AllGangs[props.name].territory;\n const opacity = territory ? 1 : 0.75;\n return (\n \n \n {props.name}\n \n \n Power: {formatNumber(power, 3)}
\n Territory: {formatTerritory(territory)}%
\n Clash Win Chance: {numeralWrapper.formatPercentage(clashVictoryChance, 3)}\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { Modal } from \"../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport const TerritoryInfoModal = ({ open, onClose }: IProps): React.ReactElement => {\n return (\n \n <>\n Clashing\n \n Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on\n your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The\n accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare'\n task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also\n loses a small amount of power whenever you lose a clash.\n
\n
\n NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of\n whether you win or lose the clash. A gang member being killed results in both respect and power loss for your\n gang.\n
\n
\n Territory\n \n The amount of territory you have affects all aspects of your Gang members' production, including money,\n respect, and wanted level. It is very beneficial to have high territory control.\n
\n
\n To increase your chances of winning territory, assign gang members to \"Territory Warfare\". This will build\n your gang power. Then, enable \"Engage in Territory Warfare\" to start fighting over territory.\n
\n
\n Territory Clash Chance\n \n This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to\n gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.\n \n \n
\n );\n};\n","/**\n * React Component for the popup that manages gang members upgrades\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { MenuItem, Table, TableBody, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMemberUpgrades } from \"../GangMemberUpgrades\";\nimport { GangMemberUpgrade } from \"../GangMemberUpgrade\";\nimport { Money } from \"../../ui/React/Money\";\nimport { GangMember } from \"../GangMember\";\nimport { UpgradeType } from \"../data/upgrades\";\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\n\ninterface INextRevealProps {\n upgrades: string[];\n type: UpgradeType;\n}\n\nfunction NextReveal(props: INextRevealProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const upgrades = Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money > gang.getUpgradeCost(upg)) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n\n if (upgrades.length === 0) return <>;\n return (\n \n Next at \n \n );\n}\n\nfunction PurchasedUpgrade({ upgName }: { upgName: string }): React.ReactElement {\n const upg = GangMemberUpgrades[upgName];\n return (\n \n }>\n {upg.name}\n \n \n );\n}\n\ninterface IUpgradeButtonProps {\n upg: GangMemberUpgrade;\n rerender: () => void;\n member: GangMember;\n}\n\nfunction UpgradeButton(props: IUpgradeButtonProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n function onClick(): void {\n props.member.buyUpgrade(props.upg, player, gang);\n props.rerender();\n }\n return (\n }>\n \n \n \n \n );\n}\n\ninterface IPanelProps {\n member: GangMember;\n}\n\nfunction GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const setRerender = useState(false)[1];\n const [currentCategory, setCurrentCategory] = useState(\"Weapons\");\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function filterUpgrades(list: string[], type: UpgradeType): GangMemberUpgrade[] {\n return Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money < gang.getUpgradeCost(upg)) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n }\n\n const onChange = (event: SelectChangeEvent): void => {\n setCurrentCategory(event.target.value);\n rerender();\n };\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);\n\n const categories: { [key: string]: (GangMemberUpgrade[] | UpgradeType)[] } = {\n Weapons: [weaponUpgrades, UpgradeType.Weapon],\n Armor: [armorUpgrades, UpgradeType.Armor],\n Vehicles: [vehicleUpgrades, UpgradeType.Vehicle],\n Rootkits: [rootkitUpgrades, UpgradeType.Rootkit],\n Augmentations: [augUpgrades, UpgradeType.Augmentation],\n };\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n return (\n \n \n \n \n {props.member.name} ({props.member.task})\n \n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.hack)} Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.str)} Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.def)} Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.dex)} Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.agi)} Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.cha)} Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n
\n \n
\n\n \n \n\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).length === 0 && (\n All upgrades owned!\n )}\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).map((upg) => (\n \n ))}\n \n \n \n \n
\n\n Purchased Upgrades: \n \n {props.member.upgrades.map((upg: string) => (\n \n ))}\n {props.member.augmentations.map((upg: string) => (\n \n ))}\n \n
\n );\n}\n\nexport function EquipmentsSubpage(): React.ReactElement {\n const gang = useGang();\n const [filter, setFilter] = useState(\"\");\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n };\n\n const members = gang.members.filter((member) => member && member.name.toLowerCase().includes(filter));\n\n return (\n <>\n \n You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power\n leads to more discounts.\n \n }\n >\n Discount: -{numeralWrapper.formatPercentage(1 - 1 / gang.getDiscount())}\n \n\n ,\n spellCheck: false,\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: \"15%\" }}\n />\n\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\nimport React, { useState, useEffect } from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MainPanel } from \"./MainPanel\";\nimport { Industries } from \"../IndustryData\";\nimport { ExpandIndustryTab } from \"./ExpandIndustryTab\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\nimport { Overview } from \"./Overview\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function CorporationRoot(): React.ReactElement {\n const player = use.Player();\n const corporation = player.corporation;\n if (corporation === null) return <>;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [divisionName, setDivisionName] = useState(\"Overview\");\n function handleChange(event: React.SyntheticEvent, tab: string | number): void {\n setDivisionName(tab);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const canExpand =\n Object.keys(Industries).filter(\n (industryType: string) =>\n corporation.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n ).length > 0;\n\n return (\n \n \n \n {corporation.divisions.map((div) => (\n \n ))}\n {canExpand && }\n \n {divisionName === \"Overview\" && }\n {divisionName === -1 && }\n {typeof divisionName === \"string\" && divisionName !== \"Overview\" && (\n \n )}\n \n );\n}\n","// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\nimport React from \"react\";\n\nimport { CityTabs } from \"./CityTabs\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Context, useCorporation } from \"./Context\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\n\ninterface IProps {\n divisionName: string;\n rerender: () => void;\n}\n\nexport function MainPanel(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division =\n props.divisionName !== \"Overview\"\n ? corp.divisions.find((division: IIndustry) => division.name === props.divisionName)\n : undefined; // use undefined because find returns undefined\n\n if (division === undefined) throw new Error(\"Cannot find division\");\n return (\n \n \n \n );\n}\n","// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\nimport React, { useState } from \"react\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industry } from \"./Industry\";\nimport { ExpandNewCity } from \"./ExpandNewCity\";\nimport { useDivision } from \"./Context\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\ninterface IProps {\n city: string;\n rerender: () => void;\n}\n\nexport function CityTabs(props: IProps): React.ReactElement {\n const division = useDivision();\n const [city, setCity] = useState(props.city);\n\n const office = division.offices[city];\n if (office === 0) {\n setCity(\"Sector-12\");\n return <>;\n }\n\n const canExpand =\n Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0).length > 0;\n function handleChange(event: React.SyntheticEvent, tab: string): void {\n setCity(tab);\n }\n return (\n <>\n \n {Object.values(division.offices).map(\n (office: OfficeSpace | 0) => office !== 0 && ,\n )}\n {canExpand && }\n \n\n {city !== \"Expand\" ? (\n \n ) : (\n \n )}\n \n );\n}\n","// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\nimport React from \"react\";\n\nimport { IndustryOffice } from \"./IndustryOffice\";\nimport { IndustryOverview } from \"./IndustryOverview\";\nimport { IndustryWarehouse } from \"./IndustryWarehouse\";\nimport { Warehouse } from \"../Warehouse\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n city: string;\n warehouse: Warehouse | 0;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function Industry(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const division = useDivision();\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Employee } from \"../Employee\";\nimport { EmployeePositions } from \"../EmployeePositions\";\nimport { BuyCoffee } from \"../Actions\";\n\nimport { MoneyCost } from \"./MoneyCost\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { UpgradeOfficeSizeModal } from \"./modals/UpgradeOfficeSizeModal\";\nimport { ThrowPartyModal } from \"./modals/ThrowPartyModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport ArrowForwardIcon from \"@mui/icons-material/ArrowForward\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n office: OfficeSpace;\n rerender: () => void;\n}\n\ninterface ISwitchProps {\n manualMode: boolean;\n switchMode: (f: (b: boolean) => boolean) => void;\n}\n\nfunction SwitchButton(props: ISwitchProps): React.ReactElement {\n if (props.manualMode) {\n return (\n \n Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You\n simply have to select the number of assignments for each job\n \n }\n >\n \n \n );\n } else {\n return (\n \n Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\n \n }\n >\n \n \n );\n }\n}\n\nfunction ManualManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [employee, setEmployee] = useState(\n props.office.employees.length > 0 ? props.office.employees[0] : null,\n );\n\n // Employee Selector\n const employees = [];\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(\n \n {props.office.employees[i].name}\n ,\n );\n }\n\n function employeeSelectorOnChange(e: SelectChangeEvent): void {\n const name = e.target.value;\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n }\n\n // Employee Positions Selector\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(EmployeePositions);\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(\n \n {positionNames[i]}\n ,\n );\n if (emp != null && emp.nextPos === positionNames[i]) {\n employeePositionSelectorInitialValue = emp.nextPos;\n }\n }\n\n function employeePositionSelectorOnChange(e: SelectChangeEvent): void {\n if (employee === null) return;\n props.office.assignSingleJob(employee, e.target.value);\n props.rerender();\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n\n // Employee stats (after applying multipliers)\n const effCre = emp ? emp.cre * corp.getEmployeeCreMultiplier() * division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * corp.getEmployeeChaMultiplier() * division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * corp.getEmployeeIntMultiplier() * division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * corp.getEmployeeEffMultiplier() * division.getEmployeeEffMultiplier() : 0;\n\n return (\n <>\n
\n \n {employee != null && (\n \n Morale: {numeralWrapper.format(employee.mor, nf)}\n
\n Happiness: {numeralWrapper.format(employee.hap, nf)}\n
\n Energy: {numeralWrapper.format(employee.ene, nf)}\n
\n Intelligence: {numeralWrapper.format(effInt, nf)}\n
\n Charisma: {numeralWrapper.format(effCha, nf)}\n
\n Experience: {numeralWrapper.format(employee.exp, nf)}\n
\n Creativity: {numeralWrapper.format(effCre, nf)}\n
\n Efficiency: {numeralWrapper.format(effEff, nf)}\n
\n Salary: \n
\n )}\n {employee != null && (\n \n )}\n \n );\n}\n\ninterface IAutoAssignProps {\n office: OfficeSpace;\n job: string;\n desc: string;\n rerender: () => void;\n}\n\nfunction EmployeeCount(props: { num: number; next: number }): React.ReactElement {\n return (\n \n {props.num === props.next ? null : props.num}\n {props.num === props.next ? null : }\n {props.next}\n \n );\n}\n\nfunction AutoAssignJob(props: IAutoAssignProps): React.ReactElement {\n const currJob = props.office.employeeJobs[props.job];\n const nextJob = props.office.employeeNextJobs[props.job];\n const nextUna = props.office.employeeNextJobs[EmployeePositions.Unassigned];\n\n function assignEmployee(): void {\n if (nextUna <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.autoAssignJob(props.job, nextJob + 1);\n props.rerender();\n }\n\n function unassignEmployee(): void {\n props.office.autoAssignJob(props.job, nextJob - 1);\n props.rerender();\n }\n\n return (\n \n \n \n {props.job}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nfunction AutoManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const vechain = corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n\n // Calculate average morale, happiness, energy, and salary.\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n const currUna = props.office.employeeJobs[EmployeePositions.Unassigned];\n const nextUna = props.office.employeeNextJobs[EmployeePositions.Unassigned];\n\n return (\n \n \n \n \n Unassigned Employees:\n \n \n \n \n \n \n \n Avg Employee Morale:\n \n \n {numeralWrapper.format(avgMorale, \"0.000\")}\n \n \n \n \n Avg Employee Happiness:\n \n \n {numeralWrapper.format(avgHappiness, \"0.000\")}\n \n \n \n \n Avg Employee Energy:\n \n \n {numeralWrapper.format(avgEnergy, \"0.000\")}\n \n \n \n \n Total Employee Salary:\n \n \n \n \n \n \n \n {vechain && (\n <>\n \n \n \n The base amount of material this office can produce. Does not include production multipliers from\n upgrades and materials. This value is based off the productivity of your Operations, Engineering,\n and Management employees\n \n }\n >\n Material Production:\n \n \n \n \n {numeralWrapper.format(division.getOfficeProductivity(props.office), \"0.000\")}\n \n \n \n \n \n \n The base amount of any given Product this office can produce. Does not include production\n multipliers from upgrades and materials. This value is based off the productivity of your\n Operations, Engineering, and Management employees\n \n }\n >\n Product Production:\n \n \n \n \n {numeralWrapper.format(\n division.getOfficeProductivity(props.office, {\n forProduct: true,\n }),\n \"0.000\",\n )}\n \n \n \n \n \n The effect this office's 'Business' employees has on boosting sales}\n >\n Business Multiplier:\n \n \n \n x{numeralWrapper.format(division.getBusinessFactor(props.office), \"0.000\")}\n \n \n \n )}\n \n\n \n\n \n\n \n\n \n\n \n \n
\n );\n}\n\nexport function IndustryOffice(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [upgradeOfficeSizeOpen, setUpgradeOfficeSizeOpen] = useState(false);\n const [throwPartyOpen, setThrowPartyOpen] = useState(false);\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = useState(false);\n\n function autohireEmployeeButtonOnClick(): void {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n return (\n \n Office Space\n \n Size: {props.office.employees.length} / {props.office.size} employees\n \n \n \n Automatically hires an employee and gives him/her a random name}>\n \n \n \n \n Upgrade the office's size so that it can hold more employees!}>\n \n \n \n \n setUpgradeOfficeSizeOpen(false)}\n />\n\n {!division.hasResearch(\"AutoBrew\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n 0}\n onClick={() => BuyCoffee(corp, props.office)}\n >\n {props.office.coffeeMult > 0 ? (\n \"Buying coffee...\"\n ) : (\n \n Buy Coffee - \n \n )}\n \n \n \n \n )}\n\n {!division.hasResearch(\"AutoPartyManager\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n 0}\n onClick={() => setThrowPartyOpen(true)}\n >\n {props.office.partyMult > 0 ? \"Throwing Party...\" : \"Throw Party\"}\n \n \n \n setThrowPartyOpen(false)}\n />\n \n )}\n \n \n \n {employeeManualAssignMode ? (\n \n ) : (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { OfficeSpace } from \"../../OfficeSpace\";\nimport { ICorporation } from \"../../ICorporation\";\nimport { UpgradeOfficeSize } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IUpgradeButton {\n cost: number;\n size: number;\n corp: ICorporation;\n office: OfficeSpace;\n onClose: () => void;\n rerender: () => void;\n}\n\nfunction UpgradeSizeButton(props: IUpgradeButton): React.ReactElement {\n const corp = useCorporation();\n function upgradeSize(cost: number, size: number): void {\n if (corp.funds < cost) {\n return;\n }\n\n UpgradeOfficeSize(corp, props.office, size);\n props.rerender();\n props.onClose();\n }\n return (\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function UpgradeOfficeSizeModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const initialPriceMult = Math.round(props.office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = CorporationConstants.OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult);\n\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const upgradeCost15 = CorporationConstants.OfficeInitialCost * mult;\n\n //Calculate max upgrade size and cost\n const maxMult = corp.funds / CorporationConstants.OfficeInitialCost;\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n ++maxNum;\n }\n const upgradeCostMax = CorporationConstants.OfficeInitialCost * mult;\n\n return (\n \n Increase the size of your office space to fit additional employees!\n \n Upgrade size: \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { OfficeSpace } from \"../../OfficeSpace\";\nimport { ThrowParty } from \"../../Actions\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function ThrowPartyModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [cost, setCost] = useState(0);\n\n const totalCost = cost * props.office.employees.length;\n const canParty = corp.funds >= totalCost;\n function changeCost(event: React.ChangeEvent): void {\n let x = parseFloat(event.target.value);\n if (isNaN(x)) x = 0;\n setCost(x);\n }\n\n function throwParty(): void {\n if (cost === null || isNaN(cost) || cost < 0) {\n dialogBoxCreate(\"Invalid value entered\");\n } else if (!canParty) {\n dialogBoxCreate(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = ThrowParty(corp, props.office, cost);\n\n if (mult > 0) {\n dialogBoxCreate(\n \"You threw a party for the office! The morale and happiness \" +\n \"of each employee increased by \" +\n numeralWrapper.formatPercentage(mult - 1),\n );\n }\n\n props.rerender();\n props.onClose();\n }\n }\n\n function EffectText(): React.ReactElement {\n if (isNaN(cost) || cost < 0) return Invalid value entered!;\n return (\n \n Throwing this party will cost a total of \n \n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) throwParty();\n }\n\n return (\n \n Enter the amount of money you would like to spend PER EMPLOYEE on this office party\n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { Industries } from \"../IndustryData\";\nimport { HireAdVert } from \"../Actions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { MakeProductModal } from \"./modals/MakeProductModal\";\nimport { ResearchModal } from \"./modals/ResearchModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport Box from \"@mui/material/Box\";\n\nfunction MakeProductButton(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [makeOpen, setMakeOpen] = useState(false);\n\n const hasMaxProducts = division.hasMaximumNumberProducts();\n\n function shouldFlash(): boolean {\n return Object.keys(division.products).length === 0;\n }\n\n let createProductButtonText = \"\";\n switch (division.type) {\n case Industries.Food:\n createProductButtonText = \"Build Restaurant\";\n break;\n case Industries.Tobacco:\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Robotics:\n createProductButtonText = \"Design Robot\";\n break;\n case Industries.Software:\n createProductButtonText = \"Develop Software\";\n break;\n case Industries.Healthcare:\n createProductButtonText = \"Build Hospital\";\n break;\n case Industries.RealEstate:\n createProductButtonText = \"Develop Property\";\n break;\n default:\n createProductButtonText = \"Create Product\";\n return <>;\n }\n\n return (\n <>\n \n You have reached the maximum number of products: {division.getMaximumNumberProducts()}\n \n ) : (\n \"\"\n )\n }\n >\n \n \n setMakeOpen(false)} />\n \n );\n}\n\ninterface IProps {\n rerender: () => void;\n}\n\nexport function IndustryOverview(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [helpOpen, setHelpOpen] = useState(false);\n const [researchOpen, setResearchOpen] = useState(false);\n const vechain = corp.unlockUpgrades[4] === 1;\n const profit = division.lastCycleRevenue - division.lastCycleExpenses;\n\n let advertisingInfo = false;\n const advertisingFactors = division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n if (vechain) {\n advertisingInfo = true;\n }\n\n function convertEffectFacToGraphic(fac: number): string {\n return createProgressBarText({\n progress: fac,\n totalTicks: 20,\n });\n }\n\n return (\n \n \n Industry: {division.type} (Corp Funds: )\n \n
\n \n {advertisingInfo !== false && (\n \n Total multiplier for this industrys sales due to its awareness and popularity\n \n \n }\n >\n Advertising Multiplier: x{numeralWrapper.format(totalAdvertisingFac, \"0.000\")}\n \n )}\n
\n ],\n [\"Expenses:\", ],\n [\"Profit:\", ],\n ]}\n />\n
\n \n \n Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real\n Estate.\n \n }\n >\n Production Multiplier: {numeralWrapper.format(division.prodMult, \"0.00\")}\n \n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these\n materials have on your production varies between Industries. For example, Real Estate may be very effective\n for some Industries, but ineffective for others.\n
\n
\n This division's production multiplier is calculated by summing the individual production multiplier of each\n of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial\n to expand into new cities as this can greatly increase the production multiplier of your entire Division.\n
\n
\n Below are approximations for how effective each material is at boosting this industry's production\n multiplier (Bigger bars = more effective):\n
\n
\n Hardware:    {convertEffectFacToGraphic(division.hwFac)}\n
\n Robots:      {convertEffectFacToGraphic(division.robFac)}\n
\n AI Cores:    {convertEffectFacToGraphic(division.aiFac)}\n
\n Real Estate: {convertEffectFacToGraphic(division.reFac)}\n
\n
\n
\n \n \n Scientific Research increases the quality of the materials and products that you produce.\n \n }\n >\n Scientific Research: {numeralWrapper.format(division.sciResearch.qty, \"0.000a\")}\n \n \n setResearchOpen(false)} industry={division} />\n \n
\n \n \n Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static\n increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's\n awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased\n by other upgrades that increase the power of your advertising.\n \n }\n >\n corp.funds}\n onClick={function () {\n HireAdVert(corp, division);\n props.rerender();\n }}\n >\n Hire AdVert -  \n \n \n {division.makesProducts && }\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { Industries } from \"../../IndustryData\";\nimport { MakeProduct } from \"../../Actions\";\nimport { useCorporation, useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nfunction productPlaceholder(tpe: string): string {\n if (tpe === Industries.Food) {\n return \"Restaurant Name\";\n } else if (tpe === Industries.Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === Industries.RealEstate) {\n return \"Property Name\";\n }\n return \"Product Name\";\n}\n\n// Create a popup that lets the player create a product for their current industry\nexport function MakeProductModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const allCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] !== 0);\n const [city, setCity] = useState(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = useState(\"\");\n const [design, setDesign] = useState(null);\n const [marketing, setMarketing] = useState(null);\n if (division.hasMaximumNumberProducts()) return <>;\n\n let createProductPopupText = <>;\n switch (division.type) {\n case Industries.Food:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new restaurant!\n \n );\n break;\n case Industries.Tobacco:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new tobacco product!\n \n );\n break;\n case Industries.Pharmaceutical:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and develop a new pharmaceutical drug!\n \n );\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and manufacture a new computer hardware product!\n \n );\n break;\n case Industries.Robotics:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and create a new robot or robotic system!\n \n );\n break;\n case Industries.Software:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of software!\n \n );\n break;\n case Industries.Healthcare:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new hospital!\n \n );\n break;\n case Industries.RealEstate:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of real estate property!\n \n );\n break;\n default:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new product!\n \n );\n return <>;\n }\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n
\n To begin developing a product, first choose the city in which it will be designed. The stats of your employees in\n the selected city affect the properties of the finished product, such as its quality, performance, and durability.\n
\n
\n You can also choose to invest money in the design and marketing of the product. Investing money in its design will\n result in a superior product. Investing money in marketing the product will help the product's sales.\n \n );\n\n function makeProduct(): void {\n if (design === null || marketing === null) return;\n try {\n MakeProduct(corp, division, city, name, design, marketing);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function onDesignChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setDesign(null);\n else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setMarketing(null);\n else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) makeProduct();\n }\n\n return (\n \n {createProductPopupText}\n \n \n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { IndustryResearchTrees } from \"../../IndustryData\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { IIndustry } from \"../../IIndustry\";\nimport { Research } from \"../../Actions\";\nimport { Node } from \"../../ResearchTree\";\nimport { ResearchMap } from \"../../ResearchMap\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport CheckIcon from \"@mui/icons-material/Check\";\n\ninterface INodeProps {\n n: Node | null;\n division: IIndustry;\n}\nfunction Upgrade({ n, division }: INodeProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (n === null) return <>;\n const r = ResearchMap[n.text];\n let disabled = division.sciResearch.qty < r.cost || n.researched;\n const parent = n.parent;\n if (parent !== null) {\n disabled = disabled || !parent.researched;\n }\n\n function research(): void {\n if (n === null || disabled) return;\n try {\n Research(division, n.text);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(\n `Researched ${n.text}. It may take a market cycle ` +\n `(~${CorporationConstants.SecsPerMarketCycle} seconds) before the effects of ` +\n `the Research apply.`,\n );\n }\n\n let color: \"primary\" | \"info\" = \"primary\";\n if (n.researched) {\n color = \"info\";\n }\n\n const wrapInTooltip = (ele: React.ReactElement): React.ReactElement => {\n return (\n \n Research points: {r.cost}\n
\n {r.desc}\n \n }\n >\n {ele}\n \n );\n };\n\n const but = (\n \n {wrapInTooltip(\n \n \n {n.researched && }\n {n.text}\n \n ,\n )}\n \n );\n\n if (n.children.length === 0) return but;\n\n return (\n \n \n {wrapInTooltip(\n \n \n {n.researched && }\n {n.text}\n \n ,\n )}\n setOpen((old) => !old)}\n sx={{ borderColor: Settings.theme.button, minWidth: \"fit-content\" }}\n >\n {open ? : }\n \n \n \n \n {n.children.map((m) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n industry: IIndustry;\n}\n\n// Create the Research Tree UI for this Industry\nexport function ResearchModal(props: IProps): React.ReactElement {\n const researchTree = IndustryResearchTrees[props.industry.type];\n if (researchTree === undefined) return <>;\n\n return (\n \n \n \n Research points: {props.industry.sciResearch.qty.toFixed(3)}\n
\n Multipliers from research:\n
* Advertising Multiplier: x{researchTree.getAdvertisingMultiplier()}\n
* Employee Charisma Multiplier: x{researchTree.getEmployeeChaMultiplier()}\n
* Employee Creativity Multiplier: x{researchTree.getEmployeeCreMultiplier()}\n
* Employee Efficiency Multiplier: x{researchTree.getEmployeeEffMultiplier()}\n
* Employee Intelligence Multiplier: x{researchTree.getEmployeeIntMultiplier()}\n
* Production Multiplier: x{researchTree.getProductionMultiplier()}\n
* Sales Multiplier: x{researchTree.getSalesMultiplier()}\n
* Scientific Research Multiplier: x{researchTree.getScientificResearchMultiplier()}\n
* Storage Multiplier: x{researchTree.getStorageMultiplier()}\n
\n
\n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Material } from \"../Material\";\nimport { Product } from \"../Product\";\nimport { Warehouse } from \"../Warehouse\";\nimport { SmartSupplyModal } from \"./modals/SmartSupplyModal\";\nimport { ProductElem } from \"./ProductElem\";\nimport { MaterialElem } from \"./MaterialElem\";\nimport { MaterialSizes } from \"../MaterialSizes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport { IndustryProductEquation } from \"./IndustryProductEquation\";\nimport { PurchaseWarehouse } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface IProps {\n corp: ICorporation;\n division: IIndustry;\n warehouse: Warehouse | 0;\n currentCity: string;\n player: IPlayer;\n rerender: () => void;\n}\n\nconst useStyles = makeStyles(() =>\n createStyles({\n retainHeight: {\n minHeight: \"3em\",\n },\n }),\n);\n\nfunction WarehouseRoot(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [smartSupplyOpen, setSmartSupplyOpen] = useState(false);\n if (props.warehouse === 0) return <>;\n\n // Upgrade Warehouse size button\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = corp.funds > sizeUpgradeCost;\n function upgradeWarehouseOnClick(): void {\n if (division === null) return;\n if (props.warehouse === 0) return;\n if (!canAffordUpgrade) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n props.rerender();\n }\n\n const classes = useStyles();\n\n // Current State:\n let stateText;\n switch (division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n default:\n console.error(`Invalid state: ${division.state}`);\n break;\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n // Only create UI for materials that are relevant for the industry or in stock\n const isInStock = props.warehouse.materials[matName].qty > 0;\n const isRelevant = isRelevantMaterial(matName, division);\n if (!isInStock && !isRelevant) continue;\n mats.push(\n ,\n );\n }\n\n // Create React components for products\n const products = [];\n if (division.makesProducts && Object.keys(division.products).length > 0) {\n for (const productName of Object.keys(division.products)) {\n const product = division.products[productName];\n if (!(product instanceof Product)) continue;\n products.push(\n ,\n );\n }\n }\n\n const breakdownItems: JSX.Element[] = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n const mat = props.warehouse.materials[matName];\n if (!MaterialSizes.hasOwnProperty(matName)) continue;\n if (mat.qty === 0) continue;\n breakdownItems.push(\n <>\n {matName}: {numeralWrapper.format(mat.qty * MaterialSizes[matName], \"0,0.0\")}\n ,\n );\n }\n\n for (const prodName of Object.keys(division.products)) {\n const prod = division.products[prodName];\n if (prod === undefined) continue;\n breakdownItems.push(\n <>\n {prodName}: {numeralWrapper.format(prod.data[props.warehouse.loc][0] * prod.siz, \"0,0.0\")}\n ,\n );\n }\n\n let breakdown;\n if (breakdownItems && breakdownItems.length > 0) {\n breakdown = breakdownItems.reduce(\n (previous: JSX.Element, current: JSX.Element): JSX.Element =>\n (previous && (\n <>\n {previous}\n
\n {current}\n \n )) || <>{current},\n );\n } else {\n breakdown = <>No items in storage.;\n }\n\n return (\n \n \n \n <>{breakdown}\n \n ) : (\n \"\"\n )\n }\n >\n = props.warehouse.size ? \"error\" : \"primary\"}>\n Storage: {numeralWrapper.formatBigNumber(props.warehouse.sizeUsed)} /{\" \"}\n {numeralWrapper.formatBigNumber(props.warehouse.size)}\n \n \n \n\n \n\n This industry uses the following equation for its production: \n
\n \n \n \n
\n \n To get started with production, purchase your required materials or import them from another of your company's\n divisions.\n \n
\n\n {stateText}\n\n {corp.unlockUpgrades[1] && (\n <>\n \n setSmartSupplyOpen(false)}\n warehouse={props.warehouse}\n />\n \n )}\n\n {mats}\n\n {products}\n
\n );\n}\n\nexport function IndustryWarehouse(props: IProps): React.ReactElement {\n if (props.warehouse instanceof Warehouse) {\n return ;\n } else {\n return ;\n }\n}\n\ninterface IEmptyProps {\n city: string;\n rerender: () => void;\n}\n\nfunction EmptyWarehouse(props: IEmptyProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const disabled = corp.funds < CorporationConstants.WarehouseInitialCost;\n function purchaseWarehouse(): void {\n if (disabled) return;\n PurchaseWarehouse(corp, division, props.city);\n props.rerender();\n }\n return (\n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Warehouse } from \"../../Warehouse\";\nimport { SetSmartSupply, SetSmartSupplyUseLeftovers } from \"../../Actions\";\nimport { Material } from \"../../Material\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface ILeftoverProps {\n matName: string;\n warehouse: Warehouse;\n}\n\nfunction Leftover(props: ILeftoverProps): React.ReactElement {\n const [checked, setChecked] = useState(!!props.warehouse.smartSupplyUseLeftovers[props.matName.replace(/ /g, \"\")]);\n\n function onChange(event: React.ChangeEvent): void {\n try {\n const matName = props.matName.replace(/ /g, \"\");\n const material = props.warehouse.materials[matName];\n SetSmartSupplyUseLeftovers(props.warehouse, material, event.target.checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n setChecked(event.target.checked);\n }\n\n return (\n <>\n }\n label={{props.warehouse.materials[props.matName.replace(/ /g, \"\")].name}}\n />\n
\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n warehouse: Warehouse;\n}\n\nexport function SmartSupplyModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // Smart Supply Checkbox\n function smartSupplyOnChange(e: React.ChangeEvent): void {\n SetSmartSupply(props.warehouse, e.target.checked);\n rerender();\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n if (!Object.keys(division.reqMats).includes(matName)) continue;\n mats.push();\n }\n\n return (\n \n <>\n }\n label={Enable Smart Supply}\n />\n
\n Use materials already in the warehouse instead of buying new ones, if available:\n {mats}\n \n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Product } from \"../Product\";\nimport { DiscontinueProductModal } from \"./modals/DiscontinueProductModal\";\nimport { LimitProductProductionModal } from \"./modals/LimitProductProductionModal\";\nimport { SellProductModal } from \"./modals/SellProductModal\";\nimport { ProductMarketTaModal } from \"./modals/ProductMarketTaModal\";\nimport { CancelProductModal } from \"./modals/CancelProductModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProductProps {\n city: string;\n product: Product;\n rerender: () => void;\n}\n\n// Creates the UI for a single Product type\nexport function ProductElem(props: IProductProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [sellOpen, setSellOpen] = useState(false);\n const [limitOpen, setLimitOpen] = useState(false);\n const [discontinueOpen, setDiscontinueOpen] = useState(false);\n const [cancelOpen, setCancelOpen] = useState(false);\n const [marketTaOpen, setMarketTaOpen] = useState(false);\n const city = props.city;\n const product = props.product;\n\n // Numeraljs formatters\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\");\n\n // Total product gain = production - sale\n const totalGain = product.data[city][1] - product.data[city][2];\n\n // Sell button\n let sellButtonText: JSX.Element;\n if (product.sllman[city][0]) {\n if (isString(product.sllman[city][1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/{product.sllman[city][1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/\n {numeralWrapper.format(product.sllman[city][1], nfB)})\n \n );\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n if (product.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.sCost) {\n if (isString(product.sCost)) {\n const sCost = (product.sCost as string).replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n\n // Limit Production button\n let limitProductionButtonText = \"Limit Production\";\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + numeralWrapper.format(product.prdman[city][1], nf) + \")\";\n }\n\n return (\n \n {!product.fin ? (\n <>\n \n Designing {product.name} (req. Operations/Engineers in {product.createCity})...\n \n
\n {numeralWrapper.format(product.prog, \"0.00\")}% complete\n \n setCancelOpen(false)}\n />\n \n ) : (\n <>\n \n \n Prod: {numeralWrapper.format(product.data[city][1], nfB)}/s\n
\n Sell: {numeralWrapper.format(product.data[city][2], nfB)} /s\n \n }\n >\n \n {product.name}: {numeralWrapper.format(product.data[city][0], nfB)} (\n {numeralWrapper.format(totalGain, nfB)}\n /s)\n \n \n
\n \n \n Quality: {numeralWrapper.format(product.qlt, nf)}
\n Performance: {numeralWrapper.format(product.per, nf)}
\n Durability: {numeralWrapper.format(product.dur, nf)}
\n Reliability: {numeralWrapper.format(product.rel, nf)}
\n Aesthetics: {numeralWrapper.format(product.aes, nf)}
\n Features: {numeralWrapper.format(product.fea, nf)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(product.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(product.cmp, nf)}\n \n }\n >\n Rating: {numeralWrapper.format(product.rat, nf)}\n \n
\n \n An estimate of the material cost it takes to create this Product.}>\n \n Est. Production Cost:{\" \"}\n {numeralWrapper.formatMoney(product.pCost / CorporationConstants.ProductProductionCostRatio)}\n \n \n \n \n \n An estimate of how much consumers are willing to pay for this product. Setting the sale price above\n this may result in less sales. Setting the sale price below this may result in more sales.\n \n }\n >\n Est. Market Price: {numeralWrapper.formatMoney(product.pCost)}\n \n \n \n setDiscontinueOpen(false)}\n />\n \n )}\n\n {(hasUpgradeDashboard || product.fin) && (\n <>\n \n setSellOpen(false)} />\n
\n \n setLimitOpen(false)}\n />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n setMarketTaOpen(false)} />\n \n )}\n \n )}\n
\n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player discontinue a product\nexport function DiscontinueProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function discontinue(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no\n longer produce this product and all of its existing stock will be removed and left unsold\n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Product } from \"../../Product\";\nimport { LimitProductProduction } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitProductProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n // reset modal internal state on modal close\n useEffect(() => {\n if (!props.open) {\n setLimit(null);\n }\n }, [props.open]);\n\n function limitProductProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitProductProduction(props.product, props.city, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitProductProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Product } from \"../../Product\";\nimport { SellProduct } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\nfunction initialPrice(product: Product): string {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellProductModal(props: IProps): React.ReactElement {\n const [checked, setChecked] = useState(true);\n const [iQty, setQty] = useState(\n props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\",\n );\n const [px, setPx] = useState(initialPrice(props.product));\n\n function onCheckedChange(event: React.ChangeEvent): void {\n setChecked(event.target.checked);\n }\n\n function sellProduct(): void {\n try {\n SellProduct(props.product, props.city, iQty, px, checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setQty(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPx(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellProduct();\n }\n\n return (\n \n \n Enter the maximum amount of {props.product.name} you would like to sell per second, as well as the price at\n which you would like to sell it at.\n
\n
\n If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the\n product will be discarded.\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on\n the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five\n times the estimated market price.\n
\n
\n \n \n \n }\n label={Use same 'Sell Amount' for all cities}\n />\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ITa2Props {\n product: Product;\n}\n\nfunction MarketTA2(props: ITa2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = useState(props.product.pCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event: React.ChangeEvent): void {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n}\n\n// Create a popup that lets the player use the Market TA research for Products\nexport function ProductMarketTaModal(props: IProps): React.ReactElement {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is{\" \"}\n {numeralWrapper.formatMoney(props.product.pCost + markupLimit)}. This means that if you set the sale price\n higher than this, you will begin to experience a loss in number of sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player cancel a product\nexport function CancelProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function cancel(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Canceling a product removes it completely and permanently. You will receive no\n money back by doing so\n \n \n \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Material } from \"../Material\";\nimport { Warehouse } from \"../Warehouse\";\nimport { ExportModal } from \"./modals/ExportModal\";\nimport { MaterialMarketTaModal } from \"./modals/MaterialMarketTaModal\";\nimport { SellMaterialModal } from \"./modals/SellMaterialModal\";\nimport { PurchaseMaterialModal } from \"./modals/PurchaseMaterialModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport { LimitMaterialProductionModal } from \"./modals/LimitMaterialProductionModal\";\n\ninterface IMaterialProps {\n warehouse: Warehouse;\n city: string;\n mat: Material;\n rerender: () => void;\n}\n\n// Creates the UI for a single Material type\nexport function MaterialElem(props: IMaterialProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [purchaseMaterialOpen, setPurchaseMaterialOpen] = useState(false);\n const [exportOpen, setExportOpen] = useState(false);\n const [sellMaterialOpen, setSellMaterialOpen] = useState(false);\n const [materialMarketTaOpen, setMaterialMarketTaOpen] = useState(false);\n const [limitProductionOpen, setLimitProductionOpen] = useState(false);\n\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n if (!(office instanceof OfficeSpace)) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n\n // Total gain or loss of this material (per second)\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp;\n\n // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n const tutorial =\n division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0;\n\n // Purchase material button\n const purchaseButtonText = `Buy (${numeralWrapper.format(mat.buy, nfB)})`;\n\n // Sell material button\n let sellButtonText: JSX.Element;\n if (mat.sllman[0]) {\n if (isString(mat.sllman[1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{mat.sllman[1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{numeralWrapper.format(mat.sllman[1] as number, nfB)})\n \n );\n }\n\n if (mat.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.marketTa1) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.sCost) {\n if (isString(mat.sCost)) {\n const sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n // Limit Production button\n let limitMaterialButtonText = \"Limit Material\";\n if (mat.prdman[0]) {\n limitMaterialButtonText += \" (\" + numeralWrapper.format(mat.prdman[1], nf) + \")\";\n }\n\n return (\n \n \n \n \n Buy: {numeralWrapper.format(mat.buy, nfB)}
\n Prod: {numeralWrapper.format(mat.prd, nfB)}
\n Sell: {numeralWrapper.format(mat.sll, nfB)}
\n Export: {numeralWrapper.format(mat.totalExp, nfB)}
\n Import: {numeralWrapper.format(mat.imp, nfB)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(mat.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(mat.cmp, nf)}\n \n }\n >\n \n {mat.name}: {numeralWrapper.format(mat.qty, nfB)} ({numeralWrapper.format(totalGain, nfB)}/s)\n \n \n \n Market Price: The price you would pay if you were to buy this material on the market\n \n }\n >\n MP: {numeralWrapper.formatMoney(mat.bCost)}\n \n The quality of your material. Higher quality will lead to more sales}\n >\n Quality: {numeralWrapper.format(mat.qlt, \"0.00a\")}\n \n
\n\n \n Purchase your required materials to get production started! : \"\"}\n >\n \n \n setPurchaseMaterialOpen(false)}\n />\n\n {corp.unlockUpgrades[0] === 1 && (\n <>\n \n\n setExportOpen(false)} />\n \n )}\n\n setSellMaterialOpen(true)}\n >\n {sellButtonText}\n \n setSellMaterialOpen(false)} />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n\n setMaterialMarketTaOpen(false)}\n />\n \n )}\n \n setLimitProductionOpen(false)}\n />\n \n
\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Material } from \"../../Material\";\nimport { Export } from \"../../Export\";\nimport { IIndustry } from \"../../IIndustry\";\nimport { ExportMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport { isRelevantMaterial } from \"../Helpers\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player manage exports\nexport function ExportModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const possibleDivisions = corp.divisions.filter((division: IIndustry) =>\n isRelevantMaterial(props.mat.name, division),\n );\n if (possibleDivisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n const defaultDivision = possibleDivisions[0];\n if (Object.keys(defaultDivision.warehouses).length === 0)\n throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = useState(defaultDivision.name);\n const [city, setCity] = useState(Object.keys(defaultDivision.warehouses)[0]);\n const [amt, setAmt] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n const div = event.target.value;\n setIndustry(div);\n setCity(Object.keys(corp.divisions[0].warehouses)[0]);\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function exportMaterial(): void {\n try {\n ExportMaterial(industry, city, props.mat, amt, currentDivision);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function removeExport(exp: Export): void {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt)\n continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n rerender();\n }\n\n const currentDivision = corp.divisions.find((division: IIndustry) => division.name === industry);\n if (currentDivision === undefined)\n throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(\n (city) => currentDivision.warehouses[city] !== 0,\n );\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return (\n \n \n Select the industry and city to export this material to, as well as how much of this material to export per\n second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\n \n \n \n \n \n \n Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports\n below will REMOVE that export.\n \n {props.mat.exp.map((exp: Export, index: number) => (\n \n \n \n Industry: {exp.ind}\n
\n City: {exp.city}\n
\n Amount/s: {exp.amt}\n
\n
\n ))}\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Material } from \"../../Material\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IMarketTA2Props {\n mat: Material;\n}\n\nfunction MarketTA2(props: IMarketTA2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const [newCost, setNewCost] = useState(props.mat.bCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setNewCost(0);\n else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event: React.ChangeEvent): void {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nexport function MaterialMarketTaModal(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event: React.ChangeEvent): void {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is {numeralWrapper.formatMoney(props.mat.bCost + markupLimit)}.\n This means that if you set the sale price higher than this, you will begin to experience a loss in number of\n sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Material } from \"../../Material\";\nimport { SellMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\nfunction initialPrice(mat: Material): string {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellMaterialModal(props: IProps): React.ReactElement {\n const [amt, setAmt] = useState(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = useState(initialPrice(props.mat));\n\n function sellMaterial(): void {\n try {\n SellMaterial(props.mat, amt, price);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellMaterial();\n }\n\n return (\n \n \n Enter the maximum amount of {props.mat.name} you would like to sell per second, as well as the price at which\n you would like to sell at.\n
\n
\n If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the\n material will be discarded\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that\n depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at\n $10 above the market price.\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { MaterialSizes } from \"../../MaterialSizes\";\nimport { Warehouse } from \"../../Warehouse\";\nimport { Material } from \"../../Material\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { BulkPurchase, BuyMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation, useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IBulkPurchaseTextProps {\n warehouse: Warehouse;\n mat: Material;\n amount: string;\n}\n\ninterface IBPProps {\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\nfunction BulkPurchaseSection(props: IBPProps): React.ReactElement {\n const corp = useCorporation();\n const [buyAmt, setBuyAmt] = useState(\"\");\n const [disabled, setDisabled] = useState(false);\n\n function BulkPurchaseText(props: IBulkPurchaseTextProps): React.ReactElement {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt > maxAmount) {\n setDisabled(true);\n return (\n <>\n Not enough warehouse space to purchase this amount\n \n );\n } else if (isNaN(cost) || parsedAmt < 0) {\n setDisabled(true);\n return (\n <>\n Invalid input for Bulk Purchase amount\n \n );\n } else {\n setDisabled(false);\n return (\n <>\n \n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\n \n \n );\n }\n }\n\n function bulkPurchase(): void {\n try {\n BulkPurchase(corp, props.warehouse, props.mat, parseFloat(buyAmt));\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) bulkPurchase();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(event.target.value);\n }\n\n return (\n <>\n \n Enter the amount of {props.mat.name} you would like to bulk purchase. This purchases the specified amount\n instantly (all at once).\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n disablePurchaseLimit: boolean;\n}\n\n// Create a popup that lets the player purchase a Material\nexport function PurchaseMaterialModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const [buyAmt, setBuyAmt] = useState(props.mat.buy ? props.mat.buy : 0);\n\n function purchaseMaterial(): void {\n if (buyAmt === null) return;\n try {\n BuyMaterial(props.mat, buyAmt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function clearPurchase(): void {\n props.mat.buy = 0;\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) purchaseMaterial();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return (\n \n <>\n \n Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes\n constantly.\n {props.disablePurchaseLimit ? \"Note: Purchase amount is disabled as smart supply is enabled\" : \"\"}\n \n \n \n \n {division.hasResearch(\"Bulk Purchasing\") && (\n \n )}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { LimitMaterialProduction } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\nimport { Material } from \"../../Material\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n material: Material;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitMaterialProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n // reset modal internal state on modal close\n useEffect(() => {\n if (!props.open) {\n setLimit(null);\n }\n }, [props.open]);\n\n function limitMaterialProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitMaterialProduction(props.material, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitMaterialProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this material you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MathJaxWrapper } from \"../../MathJaxWrapper\";\n\ninterface IProps {\n division: IIndustry;\n}\n\nexport function IndustryProductEquation(props: IProps): React.ReactElement {\n const reqs = [];\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n const prod = props.division.prodMats.map((p) => `1\\\\text{ }${p}`);\n if (props.division.makesProducts) {\n prod.push(\"Products\");\n }\n\n return {\"\\\\(\" + reqs.join(\"+\") + `\\\\Rightarrow ` + prod.join(\"+\") + \"\\\\)\"};\n}\n","import React, { useState } from \"react\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { NewCity } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n cityStateSetter: (city: string) => void;\n}\n\nexport function ExpandNewCity(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const possibleCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0);\n const [city, setCity] = useState(possibleCities[0]);\n\n const disabled = corp.funds < CorporationConstants.OfficeInitialCost;\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function expand(): void {\n try {\n NewCity(corp, division, city);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(`Opened a new office in ${city}!`);\n\n props.cityStateSetter(city);\n }\n return (\n <>\n \n Would you like to expand into a new city by opening an office? This would cost{\" \"}\n \n \n \n Confirm\n \n }\n value={city}\n onChange={onCityChange}\n >\n {possibleCities.map((cityName: string) => (\n \n {cityName}\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { IndustryStartingCosts, Industries, IndustryDescriptions } from \"../IndustryData\";\nimport { useCorporation } from \"./Context\";\nimport { IIndustry } from \"../IIndustry\";\nimport { NewIndustry } from \"../Actions\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n setDivisionName: (name: string) => void;\n}\n\nexport function ExpandIndustryTab(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const allIndustries = Object.keys(Industries).sort();\n const possibleIndustries = allIndustries\n .filter(\n (industryType: string) =>\n corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n )\n .sort();\n const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = useState(\"\");\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n const disabled = corp.funds < cost || name === \"\";\n\n function newIndustry(): void {\n if (disabled) return;\n try {\n NewIndustry(corp, industry, name);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n // Set routing to the new division so that the UI automatically switches to it\n props.setDivisionName(name);\n }\n\n function onNameChange(event: React.ChangeEvent): void {\n // [a-zA-Z0-9-_]\n setName(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) newIndustry();\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n setIndustry(event.target.value);\n }\n\n const desc = IndustryDescriptions[industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n\n return (\n <>\n Create a new division to expand into a new industry:\n \n {desc(corp)}\n
\n
\n\n Division name:\n\n \n \n Expand\n \n ),\n }}\n />\n \n \n );\n}\n","// React Component for displaying Corporation Overview info\nimport React, { useState } from \"react\";\nimport { LevelableUpgrade } from \"./LevelableUpgrade\";\nimport { UnlockUpgrade } from \"./UnlockUpgrade\";\nimport { BribeFactionModal } from \"./modals/BribeFactionModal\";\nimport { SellSharesModal } from \"./modals/SellSharesModal\";\nimport { BuybackSharesModal } from \"./modals/BuybackSharesModal\";\nimport { IssueDividendsModal } from \"./modals/IssueDividendsModal\";\nimport { IssueNewSharesModal } from \"./modals/IssueNewSharesModal\";\nimport { FindInvestorsModal } from \"./modals/FindInvestorsModal\";\nimport { GoPublicModal } from \"./modals/GoPublicModal\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"../data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgradeIndex, CorporationUpgrades } from \"../data/CorporationUpgrades\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n rerender: () => void;\n}\nexport function Overview({ rerender }: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const profit: number = corp.revenue - corp.expenses;\n\n const multRows: string[][] = [];\n function appendMult(name: string, value: number): void {\n if (value === 1) return;\n multRows.push([name, numeralWrapper.format(value, \"0.000\")]);\n }\n appendMult(\"Production Multiplier: \", corp.getProductionMultiplier());\n appendMult(\"Storage Multiplier: \", corp.getStorageMultiplier());\n appendMult(\"Advertising Multiplier: \", corp.getAdvertisingMultiplier());\n appendMult(\"Empl. Creativity Multiplier: \", corp.getEmployeeCreMultiplier());\n appendMult(\"Empl. Charisma Multiplier: \", corp.getEmployeeChaMultiplier());\n appendMult(\"Empl. Intelligence Multiplier: \", corp.getEmployeeIntMultiplier());\n appendMult(\"Empl. Efficiency Multiplier: \", corp.getEmployeeEffMultiplier());\n appendMult(\"Sales Multiplier: \", corp.getSalesMultiplier());\n appendMult(\"Scientific Research Multiplier: \", corp.getScientificResearchMultiplier());\n\n return (\n <>\n ],\n [\"Total Revenue:\", ],\n [\"Total Expenses:\", ],\n [\"Total Profit:\", ],\n [\"Publicly Traded:\", corp.public ? \"Yes\" : \"No\"],\n [\"Owned Stock Shares:\", numeralWrapper.format(corp.numShares, \"0.000a\")],\n [\"Stock Price:\", corp.public ? : \"N/A\"],\n ]}\n />\n
\n \n \n }\n >\n Total Stock Shares: {numeralWrapper.format(corp.totalShares, \"0.000a\")}\n \n \n
\n \n
\n \n
\n \n \n \n Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file\n that guides you through the beginning of setting up a Corporation and provides some tips/pointers for\n helping you get started with managing it.\n \n }\n >\n \n \n {corp.public ? : }\n \n \n
\n \n \n );\n}\n\ninterface IPrivateButtonsProps {\n rerender: () => void;\n}\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({ rerender }: IPrivateButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [findInvestorsopen, setFindInvestorsopen] = useState(false);\n const [goPublicopen, setGoPublicopen] = useState(false);\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsTooltip = fundingAvailable\n ? \"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company\"\n : \"\";\n\n return (\n <>\n {findInvestorsTooltip}}>\n \n \n \n Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a\n public company, your shares will be traded on the stock market.\n \n }\n >\n \n \n setFindInvestorsopen(false)} rerender={rerender} />\n setGoPublicopen(false)} rerender={rerender} />\n \n );\n}\n\ninterface IUpgradeProps {\n rerender: () => void;\n}\n// Render the UI for Corporation upgrades\nfunction Upgrades({ rerender }: IUpgradeProps): React.ReactElement {\n const corp = useCorporation();\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return Upgrades are unlocked once you create an industry.;\n }\n\n return (\n <>\n \n Unlocks\n \n {Object.values(CorporationUnlockUpgrades)\n .filter((upgrade: CorporationUnlockUpgrade) => !corp.unlockUpgrades[upgrade.index])\n .map((upgrade: CorporationUnlockUpgrade) => (\n \n ))}\n \n \n \n Upgrades\n \n {corp.upgrades\n .map((level: number, i: number) => CorporationUpgrades[i as CorporationUpgradeIndex])\n .map((upgrade: CorporationUpgrade) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IPublicButtonsProps {\n rerender: () => void;\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [sellSharesOpen, setSellSharesOpen] = useState(false);\n const [buybackSharesOpen, setBuybackSharesOpen] = useState(false);\n const [issueNewSharesOpen, setIssueNewSharesOpen] = useState(false);\n const [issueDividendsOpen, setIssueDividendsOpen] = useState(false);\n\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesTooltip = sellSharesOnCd\n ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown)\n : \"Sell your shares in the company. The money earned from selling your \" +\n \"shares goes into your personal account, not the Corporation's. \" +\n \"This is one of the only ways to profit from your business venture.\";\n\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesTooltip = issueNewSharesOnCd\n ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown)\n : \"Issue new equity shares to raise capital.\";\n\n return (\n <>\n {sellSharesTooltip}}>\n \n \n setSellSharesOpen(false)} rerender={rerender} />\n Buy back shares you that previously issued or sold at market price.}>\n \n \n setBuybackSharesOpen(false)} rerender={rerender} />\n {issueNewSharesTooltip}}>\n \n \n setIssueNewSharesOpen(false)} />\n Manage the dividends that are paid out to shareholders (including yourself)}\n >\n \n \n setIssueDividendsOpen(false)} />\n \n );\n}\n\nfunction BribeButton(): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [open, setOpen] = useState(false);\n const canBribe =\n corp.determineValuation() >= CorporationConstants.BribeThreshold &&\n player.factions.filter((f) => Factions[f].getInfo().offersWork()).length > 0;\n\n function openBribe(): void {\n if (!canBribe) return;\n setOpen(true);\n }\n\n return (\n <>\n \n \n \n setOpen(false)} />\n \n );\n}\n\ninterface IDividendsStatsProps {\n profit: number;\n}\nfunction DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.dividendRate <= 0 || profit <= 0) return <>;\n const totalDividends = corp.dividendRate * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n const playerEarnings = corp.getCycleDividends() / CorporationConstants.SecsPerMarketCycle;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendRate, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder:\", ],\n ]}\n />\n );\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime(): React.ReactElement {\n const corp = useCorporation();\n const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;\n if (storedTime <= 15000) return <>;\n return (\n \n Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}\n
\n
\n
\n );\n}\n","// React components for the levelable upgrade buttons on the overview panel\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUpgrade } from \"../data/CorporationUpgrades\";\nimport { LevelUpgrade } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgrade: CorporationUpgrade;\n rerender: () => void;\n}\n\nexport function LevelableUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgrade;\n const level = corp.upgrades[data.index];\n\n const baseCost = data.basePrice;\n const priceMult = data.priceMult;\n const cost = baseCost * Math.pow(priceMult, level);\n\n const tooltip = data.desc;\n function onClick(): void {\n if (corp.funds < cost) return;\n try {\n LevelUpgrade(corp, props.upgrade);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n \n {data.name} - lvl {level}\n \n \n \n \n );\n}\n","// React Components for the Unlock upgrade buttons on the overview page\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUnlockUpgrade } from \"../data/CorporationUnlockUpgrades\";\nimport { useCorporation } from \"./Context\";\nimport { UnlockUpgrade as UU } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgradeData: CorporationUnlockUpgrade;\n rerender: () => void;\n}\n\nexport function UnlockUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgradeData;\n const tooltip = data.desc;\n function onClick(): void {\n if (corp.funds < data.price) return;\n try {\n UU(corp, props.upgradeData);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n {data.name}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function BribeFactionModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const factions = player.factions.filter((name: string) => {\n const info = Factions[name].getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(name)) return false;\n return true;\n });\n const corp = useCorporation();\n const [money, setMoney] = useState(0);\n const [stock, setStock] = useState(0);\n const [selectedFaction, setSelectedFaction] = useState(factions.length > 0 ? factions[0] : \"\");\n const disabled =\n money === null ||\n stock === null ||\n (money === 0 && stock === 0) ||\n isNaN(money) ||\n isNaN(stock) ||\n money < 0 ||\n stock < 0 ||\n corp.funds < money ||\n stock > corp.numShares;\n\n function onMoneyChange(event: React.ChangeEvent): void {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event: React.ChangeEvent): void {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event: SelectChangeEvent): void {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money: number, stock: number): number {\n return (money + stock * corp.sharePrice) / CorporationConstants.BribeToRepRatio;\n }\n\n function getRepText(money: number, stock: number): string {\n if (money === 0 && stock === 0) return \"\";\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (corp.funds < money) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return (\n \"You will gain \" +\n numeralWrapper.formatReputation(repGain(money, stock)) +\n \" reputation with \" +\n selectedFaction +\n \" with this bribe\"\n );\n }\n }\n\n function bribe(money: number, stock: number): void {\n const fac = Factions[selectedFaction];\n if (disabled) return;\n const rep = repGain(money, stock);\n dialogBoxCreate(\n \"You gained \" + numeralWrapper.formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\",\n );\n fac.playerReputation += rep;\n corp.funds = corp.funds - money;\n corp.numShares -= stock;\n props.onClose();\n }\n\n return (\n \n \n You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\n \n \n Faction:\n \n \n {getRepText(money ? money : 0, stock ? stock : 0)}\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport { ICorporation } from \"../../ICorporation\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { SellShares } from \"../../Actions\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nexport function SellSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n const disabled = shares === null || isNaN(shares) || shares <= 0 || shares > corp.numShares;\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement {\n if (props.shares === null) return <>;\n let text = \"\";\n if (isNaN(props.shares) || props.shares <= 0) {\n text = `ERROR: Invalid value entered for number of shares to sell`;\n } else if (props.shares > corp.numShares) {\n text = `You don't have this many shares to sell!`;\n } else {\n const stockSaleResults = corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n text = `Sell ${props.shares} shares for a total of ${numeralWrapper.formatMoney(profit)}`;\n }\n\n return (\n \n {text}\n \n );\n }\n\n function sell(): void {\n if (disabled) return;\n try {\n const profit = SellShares(corp, player, shares);\n props.onClose();\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatMoney(shares)} shares for\n . The corporation's stock price fell to  \n as a result of dilution.\n ,\n );\n\n props.rerender();\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sell();\n }\n\n return (\n \n \n Enter the number of shares you would like to sell. The money from selling your shares will go directly to you\n (NOT your Corporation).\n
\n
\n Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a\n large number of shares all at once will have an immediate effect in reducing your stock price.\n
\n
\n The current price of your company's stock is {numeralWrapper.formatMoney(corp.sharePrice)}\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { BuyBackShares } from \"../../Actions\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nexport function BuybackSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n const disabled =\n shares === null ||\n isNaN(shares) ||\n shares <= 0 ||\n shares > corp.issuedShares ||\n shares * buybackPrice > player.money;\n\n function buy(): void {\n if (disabled) return;\n try {\n BuyBackShares(corp, player, shares);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n props.rerender();\n }\n\n function CostIndicator(): React.ReactElement {\n if (shares === null) return <>;\n if (isNaN(shares) || shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to buyback;\n } else if (shares > corp.issuedShares) {\n return (\n <>\n There are not this many shares available to buy back. There are only{\" \"}\n {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding shares.\n \n );\n } else {\n return (\n <>\n Purchase {shares} shares for a total of {numeralWrapper.formatMoney(shares * buybackPrice)}\n \n );\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) buy();\n }\n\n return (\n \n \n Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium.\n However, repurchasing shares from the market tends to lead to an increase in stock price.\n
\n
\n To purchase these shares, you must use your own money (NOT your Corporation's funds).\n
\n
\n The current buyback price of your company's stock is {numeralWrapper.formatMoney(buybackPrice)}. Your company\n currently has {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding stock shares.\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { IssueDividends } from \"../../Actions\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nexport function IssueDividendsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [percent, setPercent] = useState(0);\n\n const canIssue = !isNaN(percent) && percent >= 0 && percent <= CorporationConstants.DividendMaxRate * 100;\n function issueDividends(): void {\n if (!canIssue) return;\n if (percent === null) return;\n try {\n IssueDividends(corp, percent / 100);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueDividends();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setPercent(0);\n else {\n let p = parseFloat(event.target.value);\n if (p > 100) p = 100;\n if (p < 0) p = 0;\n setPercent(p);\n }\n }\n\n return (\n \n \n Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes\n yourself, as well.\n
\n
\n In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This\n percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)\n
\n
\n Two important things to note:\n
\n * Issuing dividends will negatively affect your corporation's stock price\n
\n
\n Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends.\n That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as\n dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share\n per second before taxes.\n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { getRandomInt } from \"../../../utils/helpers/getRandomInt\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IEffectTextProps {\n shares: number | null;\n}\n\nfunction EffectText(props: IEffectTextProps): React.ReactElement {\n const corp = useCorporation();\n if (props.shares === null) return <>;\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n let newShares = props.shares;\n if (isNaN(newShares)) {\n return Invalid input;\n }\n\n // Round to nearest ten-millionth\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return Must issue at least 10 million new shares;\n }\n\n if (newShares > maxNewShares) {\n return You cannot issue that many shares;\n }\n\n return (\n \n Issue {numeralWrapper.format(newShares, \"0.000a\")} new shares for{\" \"}\n {numeralWrapper.formatMoney(newShares * newSharePrice)}?\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nexport function IssueNewSharesModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n\n const newShares = Math.round((shares || 0) / 10e6) * 10e6;\n const disabled = shares === null || isNaN(newShares) || newShares < 10e6 || newShares > maxNewShares;\n\n function issueNewShares(): void {\n if (shares === null) return;\n if (disabled) return;\n\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n let newShares = shares;\n\n // Round to nearest ten-millionth\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n const profit = newShares * newSharePrice;\n corp.issueNewSharesCooldown = CorporationConstants.IssueNewSharesCooldown;\n corp.totalShares += newShares;\n\n // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n let privateShares = getRandomInt(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n\n corp.issuedShares += newShares - privateShares;\n corp.funds = corp.funds + profit;\n corp.immediatelyUpdateSharePrice();\n props.onClose();\n dialogBoxCreate(\n `Issued ${numeralWrapper.format(newShares, \"0.000a\")} and raised ` +\n `${numeralWrapper.formatMoney(profit)}. ${numeralWrapper.format(privateShares, \"0.000a\")} ` +\n `of these shares were bought by private investors.

` +\n `Stock price decreased to ${numeralWrapper.formatMoney(corp.sharePrice)}`,\n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueNewShares();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(parseFloat(event.target.value));\n }\n\n return (\n \n \n You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\n
\n
\n  * You can issue at most {numeralWrapper.formatMoney(maxNewShares)} new shares\n
\n  * New shares are sold at a 10% discount\n
\n  * You can only issue new shares once every 12 hours\n
\n  * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\n
\n  * Number of new shares issued must be a multiple of 10 million\n
\n
\n When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares.\n If they choose to exercise this option, these newly issued shares become private, restricted shares, which means\n you cannot buy them back.\n
\n \n \n \n
\n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function FindInvestorsModal(props: IProps): React.ReactElement {\n const corporation = useCorporation();\n const val = corporation.determineValuation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length\n )\n return <>;\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n\n function findInvestors(): void {\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n props.rerender();\n props.onClose();\n }\n return (\n \n \n An investment firm has offered you {numeralWrapper.formatMoney(funding)} in funding in exchange for a{\" \"}\n {numeralWrapper.format(percShares * 100, \"0.000a\")}% stake in the company (\n {numeralWrapper.format(investShares, \"0.000a\")} shares).\n
\n
\n Do you accept or reject this offer?\n
\n
\n Hint: Investment firms will offer more money if your corporation is turning a profit\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function GoPublicModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(\"\");\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n\n function goPublic(): void {\n const numShares = parseFloat(shares);\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n if (isNaN(numShares)) {\n dialogBoxCreate(\"Invalid value for number of issued shares\");\n return;\n }\n if (numShares > corp.numShares) {\n dialogBoxCreate(\"Error: You don't have that many shares to issue!\");\n return;\n }\n corp.public = true;\n corp.sharePrice = initialSharePrice;\n corp.issuedShares = numShares;\n corp.numShares -= numShares;\n corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n dialogBoxCreate(\n `You took your ${corp.name} public and earned ` +\n `${numeralWrapper.formatMoney(numShares * initialSharePrice)} in your IPO`,\n );\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) goPublic();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setShares(event.target.value);\n }\n\n return (\n \n \n Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will\n no longer own them. Your Corporation will receive {numeralWrapper.formatMoney(initialSharePrice)} per share (the\n IPO money will be deposited directly into your Corporation's funds).\n
\n
\n You have a total of {numeralWrapper.format(corp.numShares, \"0.000a\")} of shares that you can issue.\n
\n \n \n corp.numShares}\n sx={{ mx: 1 }}\n onClick={goPublic}\n >\n Go Public\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport { use } from \"../../ui/Context\";\nimport { calculateDifficulty, calculateReward } from \"../formulas/game\";\nimport { Game } from \"./Game\";\nimport { Intro } from \"./Intro\";\ninterface IProps {\n location: Location;\n}\n\nexport function InfiltrationRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [start, setStart] = useState(false);\n\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingSecurityLevel = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calculateDifficulty(player, startingSecurityLevel);\n const reward = calculateReward(player, startingSecurityLevel);\n\n function cancel(): void {\n router.toCity();\n }\n\n return (\n
\n {start ? (\n \n ) : (\n setStart(true)}\n cancel={cancel}\n />\n )}\n
\n );\n}\n","import { Button, Container, Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { use } from \"../../ui/Context\";\nimport { BackwardGame } from \"./BackwardGame\";\nimport { BracketGame } from \"./BracketGame\";\nimport { BribeGame } from \"./BribeGame\";\nimport { CheatCodeGame } from \"./CheatCodeGame\";\nimport { Countdown } from \"./Countdown\";\nimport { Cyberpunk2077Game } from \"./Cyberpunk2077Game\";\nimport { MinesweeperGame } from \"./MinesweeperGame\";\nimport { SlashGame } from \"./SlashGame\";\nimport { Victory } from \"./Victory\";\nimport { WireCuttingGame } from \"./WireCuttingGame\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nenum Stage {\n Countdown = 0,\n Minigame,\n Result,\n Sell,\n}\n\nconst minigames = [\n SlashGame,\n BracketGame,\n BackwardGame,\n BribeGame,\n CheatCodeGame,\n Cyberpunk2077Game,\n MinesweeperGame,\n WireCuttingGame,\n];\n\nexport function Game(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [level, setLevel] = useState(1);\n const [stage, setStage] = useState(Stage.Countdown);\n const [results, setResults] = useState(\"\");\n const [gameIds, setGameIds] = useState({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length),\n });\n\n function nextGameId(): number {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n return id;\n }\n\n function setupNextGame(): void {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId(),\n });\n }\n\n function success(): void {\n pushResult(true);\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n setupNextGame();\n }\n\n function pushResult(win: boolean): void {\n setResults((old) => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options?: { automated: boolean }): void {\n setStage(Stage.Countdown);\n pushResult(false);\n // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n const damage = options?.automated\n ? player.hp\n : props.StartingDifficulty * 3 * (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 0.5 : 1);\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n setupNextGame();\n }\n\n function cancel(): void {\n router.toCity();\n return;\n }\n\n let stageComponent: React.ReactNode;\n switch (stage) {\n case Stage.Countdown:\n stageComponent = setStage(Stage.Minigame)} />;\n break;\n case Stage.Minigame: {\n const MiniGame = minigames[gameIds.id];\n stageComponent = ;\n break;\n }\n case Stage.Sell:\n stageComponent = (\n \n );\n break;\n }\n\n function Progress(): React.ReactElement {\n return (\n \n {results.slice(0, results.length - 1)}\n {results[results.length - 1]}\n \n );\n }\n\n return (\n \n \n {stage !== Stage.Sell && (\n \n )}\n \n Level {level} / {props.MaxLevel}\n \n \n \n\n {stageComponent}\n \n );\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 16000, min: 3, max: 4 },\n Normal: { timer: 12500, min: 2, max: 3 },\n Hard: { timer: 15000, min: 3, max: 4 },\n Impossible: { timer: 8000, min: 4, max: 4 },\n};\n\nexport function BackwardGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = useState(makeAnswer(difficulty));\n const [guess, setGuess] = useState(\"\");\n const hasAugment = Player.hasAugmentation(AugmentationNames.ChaosOfDionysus, true);\n\n function ignorableKeyboardEvent(event: KeyboardEvent): boolean {\n return event.key === KEY.BACKSPACE || (event.shiftKey && event.key === \"Shift\") || event.ctrlKey || event.altKey;\n }\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (ignorableKeyboardEvent(event)) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();\n else if (answer === nextGuess) props.onSuccess();\n else setGuess(nextGuess);\n }\n\n return (\n <>\n \n \n Type it{!hasAugment ? \" backward\" : \"\"}\n \n {answer}\n \n {guess}\n \n \n \n \n );\n}\n\nfunction makeAnswer(difficulty: Difficulty): string {\n const length = random(difficulty.min, difficulty.max);\n let answer = \"\";\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\n \"ALGORITHM\",\n \"ANALOG\",\n \"APP\",\n \"APPLICATION\",\n \"ARRAY\",\n \"BACKUP\",\n \"BANDWIDTH\",\n \"BINARY\",\n \"BIT\",\n \"BITE\",\n \"BITMAP\",\n \"BLOG\",\n \"BLOGGER\",\n \"BOOKMARK\",\n \"BOOT\",\n \"BROADBAND\",\n \"BROWSER\",\n \"BUFFER\",\n \"BUG\",\n \"BUS\",\n \"BYTE\",\n \"CACHE\",\n \"CAPS LOCK\",\n \"CAPTCHA\",\n \"CD\",\n \"CD-ROM\",\n \"CLIENT\",\n \"CLIPBOARD\",\n \"CLOUD\",\n \"COMPUTING\",\n \"COMMAND\",\n \"COMPILE\",\n \"COMPRESS\",\n \"COMPUTER\",\n \"CONFIGURE\",\n \"COOKIE\",\n \"COPY\",\n \"CPU\",\n \"CYBERCRIME\",\n \"CYBERSPACE\",\n \"DASHBOARD\",\n \"DATA\",\n \"MINING\",\n \"DATABASE\",\n \"DEBUG\",\n \"DECOMPRESS\",\n \"DELETE\",\n \"DESKTOP\",\n \"DEVELOPMENT\",\n \"DIGITAL\",\n \"DISK\",\n \"DNS\",\n \"DOCUMENT\",\n \"DOMAIN\",\n \"DOMAIN NAME\",\n \"DOT\",\n \"DOT MATRIX\",\n \"DOWNLOAD\",\n \"DRAG\",\n \"DVD\",\n \"DYNAMIC\",\n \"EMAIL\",\n \"EMOTICON\",\n \"ENCRYPT\",\n \"ENCRYPTION\",\n \"ENTER\",\n \"EXABYTE\",\n \"FAQ\",\n \"FILE\",\n \"FINDER\",\n \"FIREWALL\",\n \"FIRMWARE\",\n \"FLAMING\",\n \"FLASH\",\n \"FLASH DRIVE\",\n \"FLOPPY DISK\",\n \"FLOWCHART\",\n \"FOLDER\",\n \"FONT\",\n \"FORMAT\",\n \"FRAME\",\n \"FREEWARE\",\n \"GIGABYTE\",\n \"GRAPHICS\",\n \"HACK\",\n \"HACKER\",\n \"HARDWARE\",\n \"HOME PAGE\",\n \"HOST\",\n \"HTML\",\n \"HYPERLINK\",\n \"HYPERTEXT\",\n \"ICON\",\n \"INBOX\",\n \"INTEGER\",\n \"INTERFACE\",\n \"INTERNET\",\n \"IP ADDRESS\",\n \"ITERATION\",\n \"JAVA\",\n \"JOYSTICK\",\n \"JUNKMAIL\",\n \"KERNEL\",\n \"KEY\",\n \"KEYBOARD\",\n \"KEYWORD\",\n \"LAPTOP\",\n \"LASER PRINTER\",\n \"LINK\",\n \"LINUX\",\n \"LOG OUT\",\n \"LOGIC\",\n \"LOGIN\",\n \"LURKING\",\n \"MACINTOSH\",\n \"MACRO\",\n \"MAINFRAME\",\n \"MALWARE\",\n \"MEDIA\",\n \"MEMORY\",\n \"MIRROR\",\n \"MODEM\",\n \"MONITOR\",\n \"MOTHERBOARD\",\n \"MOUSE\",\n \"MULTIMEDIA\",\n \"NET\",\n \"NETWORK\",\n \"NODE\",\n \"NOTEBOOK\",\n \"COMPUTER\",\n \"OFFLINE\",\n \"ONLINE\",\n \"OPENSOURCE\",\n \"OPERATING\",\n \"SYSTEM\",\n \"OPTION\",\n \"OUTPUT\",\n \"PAGE\",\n \"PASSWORD\",\n \"PASTE\",\n \"PATH\",\n \"PHISHING\",\n \"PIRACY\",\n \"PIRATE\",\n \"PLATFORM\",\n \"PLUGIN\",\n \"PODCAST\",\n \"POPUP\",\n \"PORTAL\",\n \"PRINT\",\n \"PRINTER\",\n \"PRIVACY\",\n \"PROCESS\",\n \"PROGRAM\",\n \"PROGRAMMER\",\n \"PROTOCOL\",\n \"QUEUE\",\n \"QWERTY\",\n \"RAM\",\n \"REALTIME\",\n \"REBOOT\",\n \"RESOLUTION\",\n \"RESTORE\",\n \"ROM\",\n \"ROOT\",\n \"ROUTER\",\n \"RUNTIME\",\n \"SAVE\",\n \"SCAN\",\n \"SCANNER\",\n \"SCREEN\",\n \"SCREENSHOT\",\n \"SCRIPT\",\n \"SCROLL\",\n \"SCROLL\",\n \"SEARCH\",\n \"ENGINE\",\n \"SECURITY\",\n \"SERVER\",\n \"SHAREWARE\",\n \"SHELL\",\n \"SHIFT\",\n \"SHIFT KEY\",\n \"SNAPSHOT\",\n \"SOCIAL NETWORKING\",\n \"SOFTWARE\",\n \"SPAM\",\n \"SPAMMER\",\n \"SPREADSHEET\",\n \"SPYWARE\",\n \"STATUS\",\n \"STORAGE\",\n \"SUPERCOMPUTER\",\n \"SURF\",\n \"SYNTAX\",\n \"TABLE\",\n \"TAG\",\n \"TERMINAL\",\n \"TEMPLATE\",\n \"TERABYTE\",\n \"TEXT EDITOR\",\n \"THREAD\",\n \"TOOLBAR\",\n \"TRASH\",\n \"TROJAN HORSE\",\n \"TYPEFACE\",\n \"UNDO\",\n \"UNIX\",\n \"UPLOAD\",\n \"URL\",\n \"USER\",\n \"USER INTERFACE\",\n \"USERNAME\",\n \"UTILITY\",\n \"VERSION\",\n \"VIRTUAL\",\n \"VIRTUAL MEMORY\",\n \"VIRUS\",\n \"WEB\",\n \"WEBMASTER\",\n \"WEBSITE\",\n \"WIDGET\",\n \"WIKI\",\n \"WINDOW\",\n \"WINDOWS\",\n \"WIRELESS\",\n \"PROCESSOR\",\n \"WORKSTATION\",\n \"WEB\",\n \"WORM\",\n \"WWW\",\n \"XML\",\n \"ZIP\",\n];\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 8000, min: 2, max: 3 },\n Normal: { timer: 6000, min: 4, max: 5 },\n Hard: { timer: 4000, min: 4, max: 6 },\n Impossible: { timer: 2500, min: 7, max: 7 },\n};\n\nfunction generateLeftSide(difficulty: Difficulty): string {\n let str = \"\";\n const options = [KEY.OPEN_BRACKET, KEY.LESS_THAN, KEY.OPEN_PARENTHESIS, KEY.OPEN_BRACE];\n if (Player.hasAugmentation(AugmentationNames.WisdomOfAthena, true)) {\n options.splice(0, 1);\n }\n const length = random(difficulty.min, difficulty.max);\n for (let i = 0; i < length; i++) {\n str += options[Math.floor(Math.random() * options.length)];\n }\n\n return str;\n}\n\nfunction getChar(event: KeyboardEvent): string {\n if (event.key === KEY.CLOSE_PARENTHESIS) return KEY.CLOSE_PARENTHESIS;\n if (event.key === KEY.CLOSE_BRACKET) return KEY.CLOSE_BRACKET;\n if (event.key === KEY.CLOSE_BRACE) return KEY.CLOSE_BRACE;\n if (event.key === KEY.GREATER_THAN) return KEY.GREATER_THAN;\n return \"\";\n}\n\nfunction match(left: string, right: string): boolean {\n return (\n (left === KEY.OPEN_BRACKET && right === KEY.CLOSE_BRACKET) ||\n (left === KEY.LESS_THAN && right === KEY.GREATER_THAN) ||\n (left === KEY.OPEN_PARENTHESIS && right === KEY.CLOSE_PARENTHESIS) ||\n (left === KEY.OPEN_BRACE && right === KEY.CLOSE_BRACE)\n );\n}\n\nexport function BracketGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = useState(\"\");\n const [left] = useState(generateLeftSide(difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n setRight(right + char);\n }\n\n return (\n <>\n \n \n Close the brackets\n \n {`${left}${right}`}\n \n \n \n \n \n );\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n size: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12000, size: 6 },\n Normal: { timer: 9000, size: 8 },\n Hard: { timer: 5000, size: 9 },\n Impossible: { timer: 2500, size: 12 },\n};\n\nexport function BribeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, size: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = useState(makeChoices(difficulty));\n const [correctIndex, setCorrectIndex] = useState(0);\n const [index, setIndex] = useState(0);\n const currentChoice = choices[index];\n\n useEffect(() => {\n setCorrectIndex(choices.findIndex((choice) => positive.includes(choice)));\n }, [choices]);\n\n const defaultColor = Settings.theme.primary;\n const disabledColor = Settings.theme.disabled;\n let upColor = defaultColor;\n let downColor = defaultColor;\n let choiceColor = defaultColor;\n const hasAugment = Player.hasAugmentation(AugmentationNames.BeautyOfAphrodite, true);\n\n if (hasAugment) {\n const upIndex = index + 1 >= choices.length ? 0 : index + 1;\n let upDistance = correctIndex - upIndex;\n if (upIndex > correctIndex) {\n upDistance = choices.length - 1 - upIndex + correctIndex;\n }\n\n const downIndex = index - 1 < 0 ? choices.length - 1 : index - 1;\n let downDistance = downIndex - correctIndex;\n if (downIndex < correctIndex) {\n downDistance = downIndex + choices.length - 1 - correctIndex;\n }\n\n const onCorrectIndex = correctIndex == index;\n\n upColor = upDistance <= downDistance && !onCorrectIndex ? upColor : disabledColor;\n downColor = upDistance >= downDistance && !onCorrectIndex ? downColor : disabledColor;\n choiceColor = onCorrectIndex ? defaultColor : disabledColor;\n }\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n\n const k = event.key;\n if (k === KEY.SPACE) {\n if (positive.includes(currentChoice)) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([KEY.UP_ARROW, KEY.W, KEY.RIGHT_ARROW, KEY.D].map((k) => k as string).includes(k)) newIndex++;\n if ([KEY.DOWN_ARROW, KEY.S, KEY.LEFT_ARROW, KEY.A].map((k) => k as string).includes(k)) newIndex--;\n while (newIndex < 0) newIndex += choices.length;\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n setIndex(newIndex);\n }\n\n return (\n <>\n \n \n Say something nice about the guard\n \n \n {upArrowSymbol}\n \n \n {currentChoice}\n \n \n {downArrowSymbol}\n \n \n \n );\n}\n\nfunction shuffleArray(array: string[]): void {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty: Difficulty): string[] {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n if (choices.includes(option)) {\n i--;\n continue;\n }\n choices.push(option);\n }\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\n \"affectionate\",\n \"agreeable\",\n \"bright\",\n \"charming\",\n \"creative\",\n \"determined\",\n \"energetic\",\n \"friendly\",\n \"funny\",\n \"generous\",\n \"polite\",\n \"likable\",\n \"diplomatic\",\n \"helpful\",\n \"giving\",\n \"kind\",\n \"hardworking\",\n \"patient\",\n \"dynamic\",\n \"loyal\",\n \"based\",\n];\n\nconst negative = [\n \"aggressive\",\n \"aloof\",\n \"arrogant\",\n \"big-headed\",\n \"boastful\",\n \"boring\",\n \"bossy\",\n \"careless\",\n \"clingy\",\n \"couch potato\",\n \"cruel\",\n \"cynical\",\n \"grumpy\",\n \"hot air\",\n \"know it all\",\n \"obnoxious\",\n \"pain in the neck\",\n \"picky\",\n \"tactless\",\n \"thoughtless\",\n \"cringe\",\n];\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport {\n downArrowSymbol,\n getArrow,\n getInverseArrow,\n leftArrowSymbol,\n random,\n rightArrowSymbol,\n upArrowSymbol,\n} from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 13000, min: 6, max: 8 },\n Normal: { timer: 7000, min: 7, max: 8 },\n Hard: { timer: 5000, min: 8, max: 9 },\n Impossible: { timer: 3000, min: 9, max: 10 },\n};\n\nexport function CheatCodeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = useState(generateCode(difficulty));\n const [index, setIndex] = useState(0);\n const hasAugment = Player.hasAugmentation(AugmentationNames.TrickeryOfHermes, true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (code[index] !== getArrow(event) && (!hasAugment || code[index] !== getInverseArrow(event))) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return (\n <>\n \n \n Enter the Code!\n {code[index]}\n \n \n \n );\n}\n\nfunction generateCode(difficulty: Difficulty): string {\n const arrows = [leftArrowSymbol, rightArrowSymbol, upArrowSymbol, downArrowSymbol];\n let code = \"\";\n for (let i = 0; i < random(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n code += arrow;\n }\n\n return code;\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n onFinish: () => void;\n}\n\nexport function Countdown(props: IProps): React.ReactElement {\n const [x, setX] = useState(3);\n useEffect(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n setTimeout(() => setX(x - 1), 300);\n });\n\n return (\n \n Get Ready!\n {x}\n \n );\n}\n","import { Paper, Typography, Box } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n symbols: number;\n}\n\ninterface GridItem {\n content: string;\n color: string;\n selected?: boolean;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12500, width: 3, height: 3, symbols: 6 },\n Normal: { timer: 15000, width: 4, height: 4, symbols: 7 },\n Hard: { timer: 12500, width: 5, height: 5, symbols: 8 },\n Impossible: { timer: 10000, width: 6, height: 6, symbols: 9 },\n};\n\nexport function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, symbols: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = useState(generatePuzzle(difficulty));\n const [answers] = useState(generateAnswers(grid, difficulty));\n const [currentAnswerIndex, setCurrentAnswerIndex] = useState(0);\n const [pos, setPos] = useState([0, 0]);\n\n const hasAugment = Player.hasAugmentation(AugmentationNames.FloodOfPoseidon, true);\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.key === KEY.SPACE) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answers[currentAnswerIndex];\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n setCurrentAnswerIndex(currentAnswerIndex + 1);\n if (answers.length === currentAnswerIndex + 1) props.onSuccess();\n }\n }\n\n const flatGrid: GridItem[] = [];\n grid.map((line, y) =>\n line.map((cell, x) => {\n const isCorrectAnswer = cell === answers[currentAnswerIndex];\n const optionColor = hasAugment && !isCorrectAnswer ? Settings.theme.disabled : Settings.theme.primary;\n\n if (x === pos[0] && y === pos[1]) {\n flatGrid.push({ color: optionColor, content: cell, selected: true });\n return;\n }\n\n flatGrid.push({ color: optionColor, content: cell });\n }),\n );\n\n const fontSize = \"2em\";\n return (\n <>\n \n \n Match the symbols!\n \n Targets:{\" \"}\n {answers.map((a, i) => {\n if (i == currentAnswerIndex)\n return (\n \n {a} \n \n );\n return (\n \n {a} \n \n );\n })}\n \n
\n \n {flatGrid.map((item) => (\n \n {item.content}\n \n ))}\n \n \n
\n \n );\n}\n\nfunction generateAnswers(grid: string[][], difficulty: Difficulty): string[] {\n const answers = [];\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answers.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n return answers;\n}\n\nfunction randChar(): string {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty: Difficulty): string[][] {\n const puzzle = [];\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n puzzle.push(line);\n }\n return puzzle;\n}\n","import { Close, Flag, Report } from \"@mui/icons-material\";\nimport { Box, Paper, Typography } from \"@mui/material\";\nimport { uniqueId } from \"lodash\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n mines: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 15000, width: 3, height: 3, mines: 4 },\n Normal: { timer: 15000, width: 4, height: 4, mines: 7 },\n Hard: { timer: 15000, width: 5, height: 5, mines: 11 },\n Impossible: { timer: 15000, width: 6, height: 6, mines: 15 },\n};\n\nexport function MinesweeperGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, mines: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = useState(generateMinefield(difficulty));\n const [answer, setAnswer] = useState(generateEmptyField(difficulty));\n const [pos, setPos] = useState([0, 0]);\n const [memoryPhase, setMemoryPhase] = useState(true);\n const hasAugment = Player.hasAugmentation(AugmentationNames.HuntOfArtemis, true);\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.key == KEY.SPACE) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n setAnswer((old) => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n useEffect(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n\n const flatGrid: { flagged?: boolean; current?: boolean; marked?: boolean }[] = [];\n\n minefield.map((line, y) =>\n line.map((cell, x) => {\n if (memoryPhase) {\n flatGrid.push({ flagged: Boolean(minefield[y][x]) });\n return;\n } else if (x === pos[0] && y === pos[1]) {\n flatGrid.push({ current: true });\n } else if (answer[y][x]) {\n flatGrid.push({ marked: true });\n } else if (hasAugment && minefield[y][x]) {\n flatGrid.push({ flagged: true });\n } else {\n flatGrid.push({});\n }\n }),\n );\n\n return (\n <>\n \n \n {memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"}\n \n {flatGrid.map((item) => {\n let color: string;\n let icon: React.ReactElement;\n\n if (item.marked) {\n color = Settings.theme.warning;\n icon = ;\n } else if (item.current) {\n color = Settings.theme.infolight;\n icon = ;\n } else if (item.flagged) {\n color = Settings.theme.error;\n icon = ;\n } else {\n color = Settings.theme.primary;\n icon = <>;\n }\n\n return (\n \n {icon}\n \n );\n })}\n \n \n \n \n );\n}\n\nfunction fieldEquals(a: boolean[][], b: boolean[][]): boolean {\n function count(field: boolean[][]): number {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty: Difficulty): boolean[][] {\n const field = [];\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n return field;\n}\n\nfunction generateMinefield(difficulty: Difficulty): boolean[][] {\n const field = generateEmptyField(difficulty);\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n if (field[x][y]) {\n i--;\n continue;\n }\n field[x][y] = true;\n }\n return field;\n}\n","import { Box, Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n window: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { window: 600 },\n Normal: { window: 325 },\n Hard: { window: 250 },\n Impossible: { window: 150 },\n};\n\nexport function SlashGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { window: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const [phase, setPhase] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key !== KEY.SPACE) return;\n if (phase !== 2) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n const hasAugment = Player.hasAugmentation(AugmentationNames.MightOfAres, true);\n const phaseZeroTime = Math.random() * 3250 + 1500 - (250 + difficulty.window);\n const phaseOneTime = 250;\n const timeUntilAttacking = phaseZeroTime + phaseOneTime;\n\n useEffect(() => {\n let id = window.setTimeout(() => {\n setPhase(1);\n id = window.setTimeout(() => {\n setPhase(2);\n id = window.setTimeout(() => setPhase(0), difficulty.window);\n }, phaseOneTime);\n }, phaseZeroTime);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return (\n <>\n \n \n Slash when his guard is down!\n\n {hasAugment ? (\n \n Guard will drop in...\n null} noPaper />\n \n ) : (\n <>\n )}\n\n {phase === 0 && Guarding ...}\n {phase === 1 && Preparing?}\n {phase === 2 && ATTACKING!}\n \n \n \n );\n}\n","import { Box, Button, MenuItem, Paper, Select, SelectChangeEvent, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { inviteToFaction } from \"../../Faction/FactionHelpers\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport {\n calculateInfiltratorsRepReward,\n calculateSellInformationCashReward,\n calculateTradeInformationRepReward,\n} from \"../formulas/victory\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nexport function Victory(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [faction, setFaction] = useState(\"none\");\n\n function quitInfiltration(): void {\n handleInfiltrators();\n router.toCity();\n }\n\n const soa = Factions[FactionNames.ShadowsOfAnarchy];\n const repGain = calculateTradeInformationRepReward(player, props.Reward, props.MaxLevel, props.StartingDifficulty);\n const moneyGain = calculateSellInformationCashReward(player, props.Reward, props.MaxLevel, props.StartingDifficulty);\n const infiltrationRepGain = calculateInfiltratorsRepReward(player, soa, props.StartingDifficulty);\n\n const isMemberOfInfiltrators = player.factions.includes(FactionNames.ShadowsOfAnarchy);\n\n function sell(): void {\n handleInfiltrators();\n player.gainMoney(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade(): void {\n if (faction === \"none\") return;\n handleInfiltrators();\n Factions[faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n function handleInfiltrators(): void {\n inviteToFaction(Factions[FactionNames.ShadowsOfAnarchy]);\n if (isMemberOfInfiltrators) {\n soa.playerReputation += infiltrationRepGain;\n }\n }\n\n return (\n \n Infiltration successful!\n \n You{\" \"}\n {isMemberOfInfiltrators ? (\n <>\n have gained {formatNumber(infiltrationRepGain, 2)} rep for {FactionNames.ShadowsOfAnarchy} and{\" \"}\n \n ) : (\n <>\n )}\n can trade the confidential information you found for money or reputation.\n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { Box, Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n wiresmin: number;\n wiresmax: number;\n rules: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 9000, wiresmin: 4, wiresmax: 4, rules: 2 },\n Normal: { timer: 7000, wiresmin: 6, wiresmax: 6, rules: 2 },\n Hard: { timer: 5000, wiresmin: 8, wiresmax: 8, rules: 3 },\n Impossible: { timer: 4000, wiresmin: 9, wiresmax: 9, rules: 4 },\n};\n\nconst types = [KEY.PIPE, KEY.DOT, KEY.FORWARD_SLASH, KEY.HYPHEN, \"█\", KEY.HASH];\n\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\n\nconst colorNames: Record = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\",\n};\n\ninterface Wire {\n tpe: string;\n colors: string[];\n}\n\ninterface Question {\n toString: () => string;\n shouldCut: (wire: Wire, index: number) => boolean;\n}\n\nexport function WireCuttingGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0,\n };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = useState(generateWires(difficulty));\n const [cutWires, setCutWires] = useState(new Array(wires.length).fill(false));\n const [questions] = useState(generateQuestion(wires, difficulty));\n const hasAugment = Player.hasAugmentation(AugmentationNames.KnowledgeOfApollo, true);\n\n function checkWire(wireNum: number): boolean {\n return questions.some((q) => q.shouldCut(wires[wireNum - 1], wireNum - 1));\n }\n\n useEffect(() => {\n // check if we won\n const wiresToBeCut = [];\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n wiresToBeCut.push(shouldBeCut);\n }\n if (wiresToBeCut.every((b, i) => b === cutWires[i])) {\n props.onSuccess();\n }\n }, [cutWires]);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires((old) => {\n const next = [...old];\n next[wireNum - 1] = true;\n if (!checkWire(wireNum)) {\n props.onFailure();\n }\n\n return next;\n });\n }\n\n return (\n <>\n \n \n \n Cut the wires with the following properties! (keyboard 1 to 9)\n \n {questions.map((question, i) => (\n {question.toString()}\n ))}\n \n {new Array(wires.length).fill(0).map((_, i) => {\n const isCorrectWire = checkWire(i + 1);\n const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary;\n return (\n \n {i + 1}\n \n );\n })}\n {new Array(8).fill(0).map((_, i) => (\n \n {wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) {\n return ;\n }\n const isCorrectWire = checkWire(j + 1);\n const wireColor =\n hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length];\n return (\n \n |{wire.tpe}|\n \n );\n })}\n \n ))}\n \n \n \n \n );\n}\n\nfunction randomPositionQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: (): string => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire: Wire, i: number): boolean => {\n return index === i;\n },\n };\n}\n\nfunction randomColorQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: (): string => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: (wire: Wire): boolean => {\n return wire.colors.includes(cutColor);\n },\n };\n}\n\nfunction generateQuestion(wires: Wire[], difficulty: Difficulty): Question[] {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n return questions;\n}\n\nfunction generateWires(difficulty: Difficulty): Wire[] {\n const wires = [];\n const numWires = random(difficulty.wiresmin, difficulty.wiresmax);\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors,\n });\n }\n return wires;\n}\n","import { Report } from \"@mui/icons-material\";\nimport { Box, Button, Container, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IProps {\n Location: Location;\n Difficulty: number;\n MaxLevel: number;\n start: () => void;\n cancel: () => void;\n}\n\nfunction arrowPart(color: string, length: number): JSX.Element {\n let arrow = \"\";\n if (length <= 0) length = 0;\n else if (length > 13) length = 13;\n else {\n length--;\n arrow = \">\";\n }\n return (\n \n {\"=\".repeat(length)}\n {arrow}\n {\" \".repeat(13 - arrow.length - length)}\n \n );\n}\n\nfunction coloredArrow(difficulty: number): JSX.Element {\n if (difficulty === 0) {\n return (\n \n {\">\"}\n {\" \".repeat(38)}\n \n );\n } else {\n return (\n <>\n {arrowPart(Settings.theme.primary, difficulty * 13)}\n {arrowPart(Settings.theme.warning, (difficulty - 1) * 13)}\n {arrowPart(Settings.theme.error, (difficulty - 2) * 13)}\n \n );\n }\n}\n\nexport function Intro(props: IProps): React.ReactElement {\n return (\n \n \n \n Infiltrating {props.Location.name}\n \n \n Maximum Level: \n {props.MaxLevel}\n \n 2\n ? Settings.theme.error\n : props.Difficulty > 1\n ? Settings.theme.warning\n : Settings.theme.primary,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n Difficulty: \n {numeralWrapper.format(props.Difficulty * 33.3333, \"0\")} / 100\n {props.Difficulty > 1.5 && (\n \n This location is too heavily guarded for your current stats. It is recommended that you try training,\n or finding an easier location.\n \n }\n >\n \n \n )}\n \n\n [{coloredArrow(props.Difficulty)}]\n {`▲ ▲ ▲ ▲`}\n {` Trivial Normal Hard Impossible`}\n \n\n \n \n Infiltration is a series of short minigames that get progressively harder. You take damage for failing\n them. Reaching the maximum level rewards you with intel that you can trade for money or reputation.\n
\n
\n Gameplay:\n
\n
    \n \n
  • \n The minigames you play are randomly selected.\n
    \n It might take you a few tries to get used to them.\n
  • \n
  • No game requires use of the mouse.
  • \n
  • \n Spacebar is the default action/confirm button.\n
  • \n
  • \n The arrow keys and WASD can be used interchangeably.\n
  • \n
  • Sometimes the rest of the keyboard is used.
  • \n
    \n
\n\n \n \n \n \n
\n
\n );\n}\n","import { Box, Container, Paper, Table, TableBody, Tooltip } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { uniqueId } from \"lodash\";\nimport React, { useEffect, useState } from \"react\";\nimport { Companies } from \"../Company/Companies\";\nimport { Company } from \"../Company/Company\";\nimport { CONSTANTS } from \"../Constants\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Locations } from \"../Locations/Locations\";\nimport { Settings } from \"../Settings/Settings\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { use } from \"./Context\";\nimport { numeralWrapper } from \"./numeralFormat\";\nimport { Money } from \"./React/Money\";\nimport { MoneyRate } from \"./React/MoneyRate\";\nimport { ProgressBar } from \"./React/Progress\";\nimport { Reputation } from \"./React/Reputation\";\nimport { ReputationRate } from \"./React/ReputationRate\";\nimport { StatsRow } from \"./React/StatsRow\";\nimport { isCrimeWork } from \"../Work/CrimeWork\";\nimport { isClassWork } from \"../Work/ClassWork\";\nimport { WorkStats } from \"../Work/WorkStats\";\nimport { isCreateProgramWork } from \"../Work/CreateProgramWork\";\nimport { isGraftingWork } from \"../Work/GraftingWork\";\nimport { isFactionWork } from \"../Work/FactionWork\";\nimport { FactionWorkType } from \"../Work/data/FactionWorkType\";\nimport { isCompanyWork } from \"../Work/CompanyWork\";\n\nconst CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle;\n\ninterface IWorkInfo {\n buttons: {\n cancel: () => void;\n unfocus?: () => void;\n };\n title: string | React.ReactElement;\n\n description?: string | React.ReactElement;\n gains?: (string | React.ReactElement)[];\n progress?: {\n elapsed?: number;\n remaining?: number;\n percentage?: number;\n };\n\n stopText: string;\n stopTooltip?: string | React.ReactElement;\n}\n\nexport function ExpRows(rate: WorkStats): React.ReactElement[] {\n return [\n rate.hackExp > 0 ? (\n \n ) : (\n <>\n ),\n rate.strExp > 0 ? (\n \n ) : (\n <>\n ),\n rate.defExp > 0 ? (\n \n ) : (\n <>\n ),\n rate.dexExp > 0 ? (\n \n ) : (\n <>\n ),\n rate.agiExp > 0 ? (\n \n ) : (\n <>\n ),\n rate.chaExp > 0 ? (\n \n ) : (\n <>\n ),\n ];\n}\n\nexport function WorkInProgressRoot(): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, CONSTANTS.MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n\n const player = use.Player();\n const router = use.Router();\n\n let workInfo: IWorkInfo = {\n buttons: {\n cancel: () => undefined,\n },\n title: \"\",\n stopText: \"\",\n };\n\n if (player.currentWork === null) {\n setTimeout(() => router.toTerminal());\n return <>;\n }\n\n if (isCrimeWork(player.currentWork)) {\n const crime = player.currentWork.getCrime();\n const completion = (player.currentWork.unitCompleted / crime.time) * 100;\n\n workInfo = {\n buttons: {\n cancel: () => {\n router.toLocation(Locations[LocationName.Slums]);\n player.finishWork(true);\n },\n unfocus: () => {\n router.toCity();\n player.stopFocusing();\n },\n },\n title: `You are attempting to ${crime.type}`,\n\n progress: {\n remaining: crime.time - player.currentWork.unitCompleted,\n percentage: completion,\n },\n\n stopText: \"Stop commiting crime\",\n };\n }\n\n if (isClassWork(player.currentWork)) {\n const classWork = player.currentWork;\n function cancel(): void {\n player.finishWork(true);\n router.toCity();\n }\n\n function unfocus(): void {\n router.toCity();\n player.stopFocusing();\n }\n\n let stopText = \"\";\n if (classWork.isGym()) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n const rates = classWork.calculateRates(player);\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently {classWork.getClass().youAreCurrently}\n \n ),\n\n gains: [\n \n \n ()\n \n ,\n ...ExpRows(rates),\n ],\n progress: {\n elapsed: classWork.cyclesWorked * CONSTANTS._idleSpeed,\n },\n\n stopText: stopText,\n };\n }\n\n if (isCreateProgramWork(player.currentWork)) {\n const create = player.currentWork;\n function cancel(): void {\n player.finishWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n\n const completion = (create.unitCompleted / create.unitNeeded()) * 100;\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working on coding {create.programName}\n \n ),\n\n progress: {\n elapsed: create.cyclesWorked * CONSTANTS._idleSpeed,\n percentage: completion,\n },\n\n stopText: \"Stop creating program\",\n stopTooltip: \"Your work will be saved and you can return to complete the program later.\",\n };\n }\n\n if (isGraftingWork(player.currentWork)) {\n const graft = player.currentWork;\n function cancel(): void {\n player.finishWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working on grafting {graft.augmentation}\n \n ),\n\n progress: {\n elapsed: graft.cyclesWorked * CONSTANTS._idleSpeed,\n percentage: (graft.unitCompleted / graft.unitNeeded()) * 100,\n },\n\n stopText: \"Stop grafting\",\n stopTooltip: (\n <>\n If you cancel, your work will not be saved, and the money you spent will not be returned\n \n ),\n };\n }\n\n if (isFactionWork(player.currentWork)) {\n const faction = player.currentWork.getFaction();\n if (!faction) {\n workInfo = {\n buttons: {\n cancel: () => router.toFactions(),\n },\n title:\n `You have not joined ${player.currentWork.factionName || \"(Faction not found)\"} at this time,` +\n \" please try again if you think this should have worked\",\n\n stopText: \"Back to Factions\",\n };\n }\n\n function cancel(): void {\n router.toFaction(faction);\n player.finishWork(true);\n }\n function unfocus(): void {\n router.toFaction(faction);\n player.stopFocusing();\n }\n\n const description = {\n [FactionWorkType.HACKING]: \"carrying out hacking contracts\",\n [FactionWorkType.FIELD]: \"carrying out field missions\",\n [FactionWorkType.SECURITY]: \"performing security detail\",\n };\n\n const exp = player.currentWork.getExpRates(player);\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently {description[player.currentWork.factionWorkType]} for {faction.name}\n \n ),\n\n description: (\n <>\n Current Faction Reputation: (\n )\n \n ),\n gains: ExpRows(exp),\n progress: {\n elapsed: player.currentWork.cyclesWorked * CONSTANTS._idleSpeed,\n },\n\n stopText: \"Stop Faction work\",\n };\n }\n\n if (isCompanyWork(player.currentWork)) {\n const comp = Companies[player.currentWork.companyName];\n if (comp == null || !(comp instanceof Company)) {\n workInfo = {\n buttons: {\n cancel: () => router.toTerminal(),\n },\n title:\n `You cannot work for ${player.currentWork.companyName || \"(Company not found)\"} at this time,` +\n \" please try again if you think this should have worked\",\n\n stopText: \"Back to Terminal\",\n };\n }\n\n const companyRep = comp.playerReputation;\n\n function cancel(): void {\n player.finishWork(true);\n router.toJob(Locations[comp.name]);\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob(Locations[comp.name]);\n }\n\n const position = player.jobs[player.currentWork.companyName];\n const gains = player.currentWork.getGainRates(player);\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working as a {position} at {player.currentWork.companyName}\n \n ),\n\n description: (\n <>\n Current Company Reputation: \n \n ),\n gains: [\n \n \n \n \n ,\n \n \n \n \n ,\n ...ExpRows(gains),\n ],\n progress: {\n elapsed: player.currentWork.cyclesWorked * CONSTANTS._idleSpeed,\n },\n\n stopText: \"Stop working\",\n };\n }\n\n if (workInfo.title === \"\") {\n return <>;\n }\n\n const tooltipInfo =\n typeof workInfo?.stopTooltip === \"string\" ? (\n {workInfo.stopTooltip}\n ) : (\n workInfo.stopTooltip || <>\n );\n\n return (\n \n \n {workInfo.title}\n {workInfo.description}\n {workInfo.gains && (\n \n \n {workInfo.gains.map((row) => (\n {row}\n ))}\n \n
\n )}\n
\n \n {workInfo.progress !== undefined && (\n \n \n {workInfo.progress.elapsed !== undefined && (\n {convertTimeMsToTimeElapsedString(workInfo.progress.elapsed)} elapsed\n )}\n {workInfo.progress.remaining !== undefined && (\n {convertTimeMsToTimeElapsedString(workInfo.progress.remaining)} remaining\n )}\n {workInfo.progress.percentage !== undefined && (\n {workInfo.progress.percentage.toFixed(2)}% done\n )}\n \n {workInfo.progress.percentage !== undefined && (\n \n )}\n \n )}\n\n \n {workInfo.stopTooltip ? (\n \n \n \n ) : (\n \n )}\n {workInfo.buttons.unfocus && (\n \n )}\n \n \n \n );\n}\n","import { Box, Container, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\nimport { CurrentOptionsPage } from \"./CurrentOptionsPage\";\nimport { GameOptionsSidebar } from \"./GameOptionsSidebar\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\nexport function GameOptionsRoot(props: IProps): React.ReactElement {\n const [currentTab, setCurrentTab] = useState(GameOptionsTab.SYSTEM);\n\n return (\n \n Options\n \n setCurrentTab(tab)}\n player={props.player}\n router={props.router}\n save={props.save}\n export={props.export}\n forceKill={props.forceKill}\n softReset={props.softReset}\n />\n \n \n \n );\n}\n","import { MenuItem, Select, SelectChangeEvent, TextField, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\nimport { formatTime } from \"../../utils/helpers/formatTime\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\nimport { GameOptionsPage } from \"./GameOptionsPage\";\nimport { OptionsSlider } from \"./OptionsSlider\";\n\ninterface IProps {\n currentTab: GameOptionsTab;\n player: IPlayer;\n}\n\nexport const CurrentOptionsPage = (props: IProps): React.ReactElement => {\n const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);\n const [recentScriptsSize, setRecentScriptsSize] = useState(Settings.MaxRecentScriptsCapacity);\n const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);\n const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);\n const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);\n const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);\n const [locale, setLocale] = useState(Settings.Locale);\n\n function handleExecTimeChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setExecTime(newValue as number);\n Settings.CodeInstructionRunTime = newValue as number;\n }\n\n function handleRecentScriptsSizeChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setRecentScriptsSize(newValue as number);\n Settings.MaxRecentScriptsCapacity = newValue as number;\n }\n\n function handleLogSizeChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setLogSize(newValue as number);\n Settings.MaxLogCapacity = newValue as number;\n }\n\n function handlePortSizeChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setPortSize(newValue as number);\n Settings.MaxPortCapacity = newValue as number;\n }\n\n function handleTerminalSizeChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setTerminalSize(newValue as number);\n Settings.MaxTerminalCapacity = newValue as number;\n }\n\n function handleAutosaveIntervalChange(\n _event: Event | React.SyntheticEvent,\n newValue: number | number[],\n ): void {\n setAutosaveInterval(newValue as number);\n Settings.AutosaveInterval = newValue as number;\n }\n\n function handleLocaleChange(event: SelectChangeEvent): void {\n setLocale(event.target.value);\n Settings.Locale = event.target.value;\n }\n\n function handleTimestampFormatChange(event: React.ChangeEvent): void {\n setTimestampFormat(event.target.value);\n Settings.TimestampsFormat = event.target.value;\n }\n\n const pages = {\n [GameOptionsTab.SYSTEM]: (\n \n {/* Wrap in a React fragment to prevent the sliders from breaking as list items */}\n <>\n \n The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low\n can result in poor performance if you have many scripts running.\n \n }\n />\n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a\n lot of memory if you have many scripts running.\n \n }\n />\n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a\n lot of memory if you have many scripts running.\n \n }\n />\n \n The maximum number of entries that can be written to a port using Netscript's write() function. Setting\n this too high can cause the game to use a lot of memory.\n \n }\n />\n \n The maximum number of entries that can be written to the terminal. Setting this too high can cause the\n game to use a lot of memory.\n \n }\n marks\n />\n The time (in seconds) between each autosave. Set to 0 to disable autosave.}\n marks\n />\n \n (Settings.SuppressSavedGameToast = newValue)}\n text=\"Suppress Auto-Save Game Toast\"\n tooltip={<>If this is set, there will be no \"Game Saved!\" toast appearing after an auto-save.}\n />\n (Settings.SuppressAutosaveDisabledWarnings = newValue)}\n text=\"Suppress Auto-Save Disabled Warning\"\n tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).}\n />\n (Settings.SaveGameOnFileSave = newValue)}\n text=\"Save game on file save\"\n tooltip={<>Save your game any time a file is saved in the script editor.}\n />\n (Settings.ExcludeRunningScriptsFromSave = newValue)}\n text=\"Exclude Running Scripts from Save\"\n tooltip={\n <>\n If this is set, the save file will exclude all running scripts. This is only useful if your save is\n lagging a lot. You'll have to restart your script every time you launch the game.\n \n }\n />\n \n ),\n [GameOptionsTab.INTERFACE]: (\n \n (Settings.DisableASCIIArt = newValue)}\n text=\"Disable ascii art\"\n tooltip={<>If this is set all ASCII art will be disabled.}\n />\n (Settings.DisableTextEffects = newValue)}\n text=\"Disable text effects\"\n tooltip={\n <>\n If this is set, text effects will not be displayed. This can help if text is difficult to read in certain\n areas.\n \n }\n />\n (Settings.DisableOverviewProgressBars = newValue)}\n text=\"Disable Overview Progress Bars\"\n tooltip={<>If this is set, the progress bars in the character overview will be hidden.}\n />\n (Settings.UseIEC60027_2 = newValue)}\n text=\"Use GiB instead of GB\"\n tooltip={\n <>If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.\n }\n />\n \n Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/\n \n }\n >\n \n Timestamp format:\n \n ),\n }}\n value={timestampFormat}\n onChange={handleTimestampFormatChange}\n placeholder=\"yyyy-MM-dd hh:mm:ss\"\n />\n \n <>\n Sets the locale for displaying numbers.}>\n Locale\n \n \n \n \n ),\n [GameOptionsTab.GAMEPLAY]: (\n \n (Settings.SuppressMessages = newValue)}\n text=\"Suppress story messages\"\n tooltip={\n <>\n If this is set, then any messages you receive will not appear as popups on the screen. They will still get\n sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\n \n }\n />\n (Settings.SuppressFactionInvites = newValue)}\n text=\"Suppress faction invites\"\n tooltip={\n <>\n If this is set, then any faction invites you receive will not appear as popups on the screen. Your\n outstanding faction invites can be viewed in the 'Factions' page.\n \n }\n />\n (Settings.SuppressTravelConfirmation = newValue)}\n text=\"Suppress travel confirmations\"\n tooltip={\n <>\n If this is set, the confirmation message before traveling will not show up. You will automatically be\n deducted the travel cost as soon as you click.\n \n }\n />\n (Settings.SuppressBuyAugmentationConfirmation = newValue)}\n text=\"Suppress augmentations confirmation\"\n tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.}\n />\n (Settings.SuppressTIXPopup = newValue)}\n text=\"Suppress TIX messages\"\n tooltip={<>If this is set, the stock market will never create any popup.}\n />\n {props.player.bladeburner && (\n (Settings.SuppressBladeburnerPopup = newValue)}\n text=\"Suppress bladeburner popup\"\n tooltip={\n <>\n If this is set, then having your Bladeburner actions interrupted by being busy with something else will\n not display a popup message.\n \n }\n />\n )}\n \n ),\n [GameOptionsTab.MISC]: (\n \n (Settings.DisableHotkeys = newValue)}\n text=\"Disable hotkeys\"\n tooltip={\n <>\n If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal\n commands, hotkeys to navigate between different parts of the game, and the \"Save and Close (Ctrl + b)\"\n hotkey in the Text Editor.\n \n }\n />\n (Settings.EnableBashHotkeys = newValue)}\n text=\"Enable bash hotkeys\"\n tooltip={\n <>\n Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that\n more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser\n shortcuts are overriden by the new Bash shortcuts.\n \n }\n />\n \n ),\n };\n\n return pages[props.currentTab];\n};\n","import {\n BugReport,\n Chat,\n Download,\n LibraryBooks,\n Palette,\n Reddit,\n Save,\n SystemUpdateAlt,\n Upload,\n Bloodtype,\n} from \"@mui/icons-material\";\nimport { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from \"@mui/material\";\nimport { default as React, useRef, useState } from \"react\";\nimport { FileDiagnosticModal } from \"../../Diagnostic/FileDiagnosticModal\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { ImportData, saveObject } from \"../../SaveObject\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StyleEditorButton } from \"../../Themes/ui/StyleEditorButton\";\nimport { ThemeEditorButton } from \"../../Themes/ui/ThemeEditorButton\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\nimport { DeleteGameButton } from \"../../ui/React/DeleteGameButton\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { SoftResetButton } from \"../../ui/React/SoftResetButton\";\nimport { IRouter } from \"../../ui/Router\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\n\ninterface IProps {\n tab: GameOptionsTab;\n setTab: (tab: GameOptionsTab) => void;\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\ninterface ITabProps {\n sideBarProps: IProps;\n tab: GameOptionsTab;\n tabName: string;\n}\n\nconst SideBarTab = (props: ITabProps): React.ReactElement => {\n return (\n props.sideBarProps.setTab(props.tab)}\n >\n {props.tabName}\n \n );\n};\n\nexport const GameOptionsSidebar = (props: IProps): React.ReactElement => {\n const importInput = useRef(null);\n\n const [diagnosticOpen, setDiagnosticOpen] = useState(false);\n const [importSaveOpen, setImportSaveOpen] = useState(false);\n const [importData, setImportData] = useState(null);\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n async function onImport(event: React.ChangeEvent): Promise {\n try {\n const base64Save = await saveObject.getImportStringFromFile(event.target.files);\n const data = await saveObject.getImportDataFromString(base64Save);\n setImportData(data);\n setImportSaveOpen(true);\n } catch (e: unknown) {\n SnackbarEvents.emit(String(e), ToastVariant.ERROR, 5000);\n }\n }\n\n async function confirmedImportGame(): Promise {\n if (!importData) return;\n\n try {\n await saveObject.importGame(importData.base64);\n } catch (e: unknown) {\n SnackbarEvents.emit(String(e), ToastVariant.ERROR, 5000);\n }\n\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n function compareSaveGame(): void {\n if (!importData) return;\n props.router.toImportSave(importData.base64);\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Export your game to a text file.}>\n \n \n \n Import your game from a text file.\n
\n This will overwrite your current game. Back it up first!\n \n }\n >\n \n \n setImportSaveOpen(false)}\n onConfirm={() => confirmedImportGame()}\n additionalButton={}\n confirmationText={\n <>\n Importing a new game will completely wipe the current data!\n
\n
\n Make sure to have a backup of your current save file before importing.\n
\n The file you are attempting to import seems valid.\n {(importData?.playerData?.lastSave ?? 0) > 0 && (\n <>\n
\n
\n The export date of the save file is{\" \"}\n {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()}\n \n )}\n {(importData?.playerData?.totalPlaytime ?? 0) > 0 && (\n <>\n
\n
\n Total play time of imported game:{\" \"}\n {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)}\n \n )}\n
\n
\n \n }\n />\n \n Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game.\n After using this, save the game and then reload the page. This is different than normal kill in that\n normal kill will tell the script to shut down while force kill just removes the references to it (and it\n should crash on its own). This will not remove the files on your computer, just forcefully kill all\n running instances of all scripts.\n \n }\n >\n \n \n \n \n \n \n If your save file is extremely big you can use this button to view a map of all the files on every server.\n Be careful: there might be spoilers.\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n\n \n }\n href=\"https://github.com/danielyxie/bitburner/issues/new\"\n target=\"_blank\"\n sx={{ gridArea: \"bug\" }}\n >\n Report Bug\n \n }\n href=\"https://bitburner.readthedocs.io/en/latest/changelog.html\"\n target=\"_blank\"\n sx={{ gridArea: \" changelog\" }}\n >\n Changelog\n \n }\n href=\"https://bitburner.readthedocs.io/en/latest/index.html\"\n target=\"_blank\"\n sx={{ gridArea: \"docs\" }}\n >\n Documentation\n \n \n }\n href=\"https://www.reddit.com/r/bitburner\"\n target=\"_blank\"\n sx={{ gridArea: \"reddit\" }}\n >\n Reddit\n \n
\n\n {!location.href.startsWith(\"file://\") && (\n \n \n \n \n \n hydroflame (Current Maintainer)\n \n \n Donate blood!\n \n \n \n )}\n \n setDiagnosticOpen(false)} />\n \n );\n};\n","import React from \"react\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { Modal } from \"../ui/React/Modal\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\ninterface IServerProps {\n hostname: string;\n}\n\nfunction ServerAccordion(props: IServerProps): React.ReactElement {\n const server = GetServer(props.hostname);\n if (server === null) throw new Error(`server '${props.hostname}' should not be null`);\n let totalSize = 0;\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return <>;\n }\n\n interface File {\n name: string;\n size: number;\n }\n\n const files: File[] = [];\n\n for (const f of server.scripts) {\n files.push({ name: f.filename, size: f.code.length });\n }\n\n for (const f of server.textFiles) {\n files.push({ name: f.fn, size: f.text.length });\n }\n\n files.sort((a: File, b: File): number => b.size - a.size);\n\n return (\n \n }>\n \n {server.hostname} ({numeralWrapper.formatBigNumber(totalSize)}b)\n \n \n \n \n \n \n \n \n Filename\n \n \n Size\n \n \n \n \n {files.map((file: File) => (\n \n \n {file.name}\n \n \n {numeralWrapper.formatBigNumber(file.size)}b\n \n \n ))}\n \n
\n
\n
    \n
    \n
    \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FileDiagnosticModal(props: IProps): React.ReactElement {\n const keys: string[] = [];\n for (const key of GetAllServers()) {\n keys.push(key.hostname);\n }\n\n return (\n \n <>\n \n Welcome to the file diagnostic! If your save file is really big it's likely because you have too many\n text/scripts. This tool can help you narrow down where they are.\n \n {keys.map((hostname: string) => (\n \n ))}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport SaveIcon from \"@mui/icons-material/Save\";\n\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { defaultStyles } from \"../Styles\";\nimport { Tooltip } from \"@mui/material\";\nimport { IStyleSettings } from \"../../ScriptEditor/NetscriptDefinitions\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\ninterface FontFamilyProps {\n value: React.CSSProperties[\"fontFamily\"];\n onChange: (newValue: React.CSSProperties[\"fontFamily\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction FontFamilyField({ value, onChange, refreshId }: FontFamilyProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [fontFamily, setFontFamily] = useState(value);\n\n function update(newValue: React.CSSProperties[\"fontFamily\"]): void {\n setFontFamily(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(fontFamily, errorText), [fontFamily]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\ninterface LineHeightProps {\n value: React.CSSProperties[\"lineHeight\"];\n onChange: (newValue: React.CSSProperties[\"lineHeight\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction LineHeightField({ value, onChange, refreshId }: LineHeightProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [lineHeight, setLineHeight] = useState(value);\n\n function update(newValue: React.CSSProperties[\"lineHeight\"]): void {\n setLineHeight(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else if (isNaN(Number(newValue))) {\n setErrorText(\"Must be a number\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(lineHeight, errorText), [lineHeight]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\nexport function StyleEditorModal(props: IProps): React.ReactElement {\n const [refreshId, setRefreshId] = useState(0);\n const [error, setError] = useState();\n const [customStyle, setCustomStyle] = useState({\n ...Settings.styles,\n });\n\n function persistToSettings(styles: IStyleSettings): void {\n Object.assign(Settings.styles, styles);\n ThemeEvents.emit();\n }\n\n function saveStyles(): void {\n persistToSettings(customStyle);\n }\n\n function setDefaults(): void {\n const styles = { ...defaultStyles };\n setCustomStyle(styles);\n persistToSettings(styles);\n setRefreshId(refreshId + 1);\n }\n\n function update(styles: IStyleSettings, errorMessage?: string): void {\n setError(errorMessage);\n if (!errorMessage) {\n setCustomStyle(styles);\n }\n }\n\n return (\n \n Styles Editor\n \n WARNING: Changing styles may mess up the interface. Drastic changes are{\" \"}\n NOT recommended.\n \n \n update({ ...customStyle, fontFamily: value ?? \"\" }, error)}\n />\n
    \n update({ ...customStyle, lineHeight: Number(value) ?? 0 }, error)}\n />\n
    \n \n \n \n \n \n \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport PaletteSharpIcon from \"@mui/icons-material/PaletteSharp\";\nimport HistoryIcon from \"@mui/icons-material/History\";\nimport { Color, ColorPicker } from \"material-ui-color\";\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings, defaultSettings } from \"../../Settings/Settings\";\nimport { defaultTheme } from \"../Themes\";\nimport { UserInterfaceTheme } from \"../../ScriptEditor/NetscriptDefinitions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ThemeCollaborate } from \"./ThemeCollaborate\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n router: IRouter;\n}\n\ninterface IColorEditorProps {\n name: string;\n color: string | undefined;\n onColorChange: (name: string, value: string) => void;\n defaultColor: string;\n}\n\nfunction ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {\n if (color === undefined) {\n console.error(`color ${name} was undefined, reverting to default`);\n color = defaultColor;\n }\n\n return (\n <>\n \n onColorChange(name, \"#\" + newColor.hex)}\n disableAlpha\n />\n \n ),\n endAdornment: (\n <>\n onColorChange(name, defaultColor)}>\n \n \n \n ),\n }}\n />\n \n );\n}\n\nexport function ThemeEditorModal(props: IProps): React.ReactElement {\n const [customTheme, setCustomTheme] = useState<{ [key: string]: string | undefined }>({\n ...Settings.theme,\n });\n\n function setTheme(theme: UserInterfaceTheme): void {\n setCustomTheme(theme);\n Object.assign(Settings.theme, theme);\n ThemeEvents.emit();\n }\n\n function onThemeChange(event: React.ChangeEvent): void {\n try {\n const importedTheme = JSON.parse(event.target.value);\n if (typeof importedTheme !== \"object\") return;\n setCustomTheme(importedTheme);\n for (const key of Object.keys(importedTheme)) {\n Settings.theme[key] = importedTheme[key];\n }\n ThemeEvents.emit();\n } catch (err) {\n // ignore\n }\n }\n\n function onColorChange(name: string, value: string): void {\n setCustomTheme((old: { [key: string]: string | undefined }) => {\n old[name] = value;\n return old;\n });\n\n Settings.theme[name] = value;\n ThemeEvents.emit();\n }\n\n function setTemplateTheme(theme: UserInterfaceTheme): void {\n setTheme(theme);\n }\n\n return (\n \n \n Example tooltip}>\n \n \n \n \n \n \n \n
    \n \n text with primary color\n \n  \n \n text with secondary color\n \n  \n \n text with error color\n \n
    \n \n
    \n\n \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n \n \n \n \n\n
    \n \n \n \n \n \n \n \n \n
    \n\n \n \n <>\n Backup your theme or share it with others by copying the string above.\n \n \n \n \n \n \n \n \n \n \n \n
    \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { Box, Typography, Button, Container } from \"@mui/material\";\n\nimport { use } from \"../../../ui/Context\";\n\nimport { SleeveElem } from \"./SleeveElem\";\nimport { FAQModal } from \"./FAQModal\";\n\nexport function SleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [FAQOpen, setFAQOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n \n Sleeves\n \n Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In\n other words, these Synthoids contain a perfect duplicate of your mind.\n
    \n
    \n Sleeves can be used to perform different tasks synchronously.\n
    \n
    \n
    \n
    \n\n \n \n Wiki Documentation\n \n \n {player.sleeves.map((sleeve, i) => (\n \n ))}\n \n setFAQOpen(false)} />\n \n );\n}\n","import { Box, Button, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { FactionWorkType } from \"../../../Work/data/FactionWorkType\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { use } from \"../../../ui/Context\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { ProgressBar } from \"../../../ui/React/Progress\";\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { MoreEarningsModal } from \"./MoreEarningsModal\";\nimport { MoreStatsModal } from \"./MoreStatsModal\";\nimport { SleeveAugmentationsModal } from \"./SleeveAugmentationsModal\";\nimport { EarningsElement, StatsElement } from \"./StatsElement\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { TravelModal } from \"./TravelModal\";\n\ninterface IProps {\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function SleeveElem(props: IProps): React.ReactElement {\n const player = use.Player();\n const [statsOpen, setStatsOpen] = useState(false);\n const [earningsOpen, setEarningsOpen] = useState(false);\n const [travelOpen, setTravelOpen] = useState(false);\n const [augmentationsOpen, setAugmentationsOpen] = useState(false);\n\n const [abc, setABC] = useState([\"------\", \"------\", \"------\"]);\n\n function setTask(): void {\n props.sleeve.resetTaskStatus(player); // sets to idle\n switch (abc[0]) {\n case \"------\":\n break;\n case \"Work for Company\":\n props.sleeve.workForCompany(player, abc[1]);\n break;\n case \"Work for Faction\":\n props.sleeve.workForFaction(player, abc[1], abc[2]);\n break;\n case \"Commit Crime\":\n props.sleeve.commitCrime(player, abc[1]);\n break;\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(player, abc[2], abc[1]);\n break;\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(player, abc[2], abc[1]);\n break;\n case \"Perform Bladeburner Actions\":\n props.sleeve.bladeburner(player, abc[1], abc[2]);\n break;\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(player);\n break;\n case \"Synchronize\":\n props.sleeve.synchronize(player);\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n props.rerender();\n }\n\n let desc = <>;\n switch (props.sleeve.currentTask) {\n case SleeveTaskType.Idle:\n desc = <>This sleeve is currently idle;\n break;\n case SleeveTaskType.Company:\n desc = <>This sleeve is currently working your job at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Faction: {\n let doing = \"nothing\";\n switch (props.sleeve.factionWorkType) {\n case FactionWorkType.FIELD:\n doing = \"Field work\";\n break;\n case FactionWorkType.HACKING:\n doing = \"Hacking contracts\";\n break;\n case FactionWorkType.SECURITY:\n doing = \"Security work\";\n break;\n }\n desc = (\n <>\n This sleeve is currently doing {doing} for {props.sleeve.currentTaskLocation}.\n \n );\n break;\n }\n case SleeveTaskType.Crime: {\n const crime = Object.values(Crimes).find((crime) => crime.name === props.sleeve.crimeType);\n if (!crime) throw new Error(\"crime should not be undefined\");\n desc = (\n <>\n This sleeve is currently attempting to {crime.type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(crime.successRate(props.sleeve))}).\n \n );\n break;\n }\n case SleeveTaskType.Class:\n desc = <>This sleeve is currently studying/taking a course at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Gym:\n desc = <>This sleeve is currently working out at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Bladeburner: {\n let message = \"\";\n if (props.sleeve.bbContract !== \"------\") {\n message = ` - ${props.sleeve.bbContract} (Success Rate: ${props.sleeve.currentTaskLocation})`;\n } else if (props.sleeve.currentTaskLocation !== \"\") {\n message = props.sleeve.currentTaskLocation;\n }\n desc = (\n <>\n This sleeve is currently attempting to {props.sleeve.bbAction}. {message}\n \n );\n break;\n }\n case SleeveTaskType.Recovery:\n desc = (\n <>\n This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a\n faster rate.\n \n );\n break;\n case SleeveTaskType.Synchro:\n desc = (\n <>\n This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's\n synchronization to increase.\n \n );\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n return (\n <>\n \n \n \n \n \n \n Insufficient funds : \"\"}>\n \n setTravelOpen(true)}\n disabled={player.money < CONSTANTS.TravelCost}\n sx={{ width: \"100%\", height: \"100%\" }}\n >\n Travel\n \n \n \n Unlocked when sleeve has fully recovered : \"\"}\n >\n \n setAugmentationsOpen(true)}\n disabled={props.sleeve.shock < 100}\n sx={{ width: \"100%\", height: \"100%\" }}\n >\n Manage Augmentations\n \n \n \n \n \n \n \n \n \n {desc}\n \n {(props.sleeve.currentTask === SleeveTaskType.Crime ||\n props.sleeve.currentTask === SleeveTaskType.Bladeburner) &&\n props.sleeve.currentTaskMaxTime > 0 && (\n \n )}\n \n \n \n setStatsOpen(false)} sleeve={props.sleeve} />\n setEarningsOpen(false)} sleeve={props.sleeve} />\n setTravelOpen(false)}\n sleeve={props.sleeve}\n rerender={props.rerender}\n />\n setAugmentationsOpen(false)}\n sleeve={props.sleeve}\n />\n \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Money } from \"../../../ui/React/Money\";\nimport * as React from \"react\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreEarningsModal(props: IProps): React.ReactElement {\n return (\n \n ],\n [\"Hacking Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.hack)],\n [\"Strength Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.str)],\n [\"Defense Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.def)],\n [\"Dexterity Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.dex)],\n [\"Agility Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.agi)],\n [\"Charisma Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.cha)],\n ]}\n title=\"Earnings for Current Task:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.cha)],\n ]}\n title=\"Total Earnings for Host Consciousness:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.cha)],\n ]}\n title=\"Total Earnings for Other Sleeves:\"\n />\n
    \n
    \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../../utils/StringHelperFunctions\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Typography } from \"@mui/material\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport React from \"react\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreStatsModal(props: IProps): React.ReactElement {\n return (\n \n Hacking: ,\n props.sleeve.hacking,\n <> ({numeralWrapper.formatExp(props.sleeve.hacking_exp)} exp),\n ],\n [\n <>Strength: ,\n props.sleeve.strength,\n <> ({numeralWrapper.formatExp(props.sleeve.strength_exp)} exp),\n ],\n [\n <>Defense: ,\n props.sleeve.defense,\n <> ({numeralWrapper.formatExp(props.sleeve.defense_exp)} exp),\n ],\n [\n <>Dexterity: ,\n props.sleeve.dexterity,\n <> ({numeralWrapper.formatExp(props.sleeve.dexterity_exp)} exp),\n ],\n [\n <>Agility: ,\n props.sleeve.agility,\n <> ({numeralWrapper.formatExp(props.sleeve.agility_exp)} exp),\n ],\n [\n <>Charisma: ,\n props.sleeve.charisma,\n <> ({numeralWrapper.formatExp(props.sleeve.charisma_exp)} exp),\n ],\n ]}\n title=\"Stats:\"\n />\n
    \n Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.hacking)],\n [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.hacking_exp)],\n [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.strength)],\n [\n <>Strength Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.mults.strength_exp),\n ],\n [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.defense)],\n [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.defense_exp)],\n [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.dexterity)],\n [\n <>Dexterity Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.mults.dexterity_exp),\n ],\n [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.agility)],\n [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.agility_exp)],\n [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.charisma)],\n [\n <>Charisma Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.mults.charisma_exp),\n ],\n [\n <>Faction Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.mults.faction_rep),\n ],\n [\n <>Company Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.mults.company_rep),\n ],\n [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.work_money)],\n [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.crime_money)],\n [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.crime_success)],\n ]}\n title=\"Multipliers:\"\n />\n\n {/* Check for storedCycles to be a bit over 0 to prevent jittering */}\n {props.sleeve.storedCycles > 10 && (\n \n Bonus Time: {convertTimeMsToTimeElapsedString(props.sleeve.storedCycles * CONSTANTS.MilliPerCycle)}\n \n )}\n
    \n );\n}\n","import { Container, Typography, Paper } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { PurchasableAugmentations } from \"../../../Augmentation/ui/PurchasableAugmentations\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { Sleeve } from \"../Sleeve\";\nimport { findSleevePurchasableAugs } from \"../SleeveHelpers\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function SleeveAugmentationsModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n\n // Array of all owned Augmentations. Names only\n const ownedAugNames = props.sleeve.augmentations.map((e) => e.name);\n\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n const availableAugs = findSleevePurchasableAugs(props.sleeve, player);\n\n return (\n \n \n \n You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they\n would for you. You can only purchase Augmentations that you have unlocked through Factions.\n
    \n
    \n When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the\n Duplicate Sleeve will immediately lose all of its stat experience.\n
    \n
    \n Augmentations will appear below as they become available.\n
    \n
    \n aug.name)}\n ownedAugNames={ownedAugNames}\n player={player}\n canPurchase={(player, aug) => {\n return player.money > aug.baseCost;\n }}\n purchaseAugmentation={(player, aug) => {\n props.sleeve.tryBuyAugmentation(player, aug);\n rerender();\n }}\n sleeveAugs\n />\n
    \n );\n}\n","import React from \"react\";\n\nimport { Augmentation } from \"../Augmentation\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { purchaseAugmentation } from \"../../Faction/FactionHelpers\";\nimport { isRepeatableAug } from \"../AugmentationHelpers\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n faction?: Faction;\n aug?: Augmentation;\n}\n\nexport function PurchaseAugmentationModal(props: IProps): React.ReactElement {\n if (typeof props.aug === \"undefined\" || typeof props.faction === \"undefined\") {\n return <>;\n }\n\n const player = use.Player();\n\n function buy(): void {\n if (!isRepeatableAug(props.aug as Augmentation) && player.hasAugmentation(props.aug as Augmentation)) {\n return;\n }\n\n purchaseAugmentation(props.aug as Augmentation, props.faction as Faction);\n props.onClose();\n }\n\n return (\n \n {props.aug.name}\n \n {props.aug.info}\n
    \n
    \n {props.aug.stats}\n
    \n
    \n Would you like to purchase the {props.aug.name} Augmentation for \n ?\n
    \n
    \n
    \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\nimport { FactionWorkType } from \"../../../Work/data/FactionWorkType\";\n\nconst universitySelectorOptions: string[] = [\n \"Study Computer Science\",\n \"Data Structures\",\n \"Networks\",\n \"Algorithms\",\n \"Management\",\n \"Leadership\",\n];\n\nconst gymSelectorOptions: string[] = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nconst bladeburnerSelectorOptions: string[] = [\n \"Field analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Infiltrate synthoids\",\n \"Support main sleeve\",\n \"Take on contracts\",\n];\n\ninterface IProps {\n sleeve: Sleeve;\n player: IPlayer;\n setABC: (abc: string[]) => void;\n}\n\ninterface ITaskDetails {\n first: string[];\n second: (s1: string) => string[];\n}\n\nfunction possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n const allJobs: string[] = Object.keys(player.jobs);\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [FactionNames.Bladeburners as string, FactionNames.ShadowsOfAnarchy as string];\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions.filter((faction) => {\n const factionObj = Factions[faction];\n if (!factionObj) return false;\n const facInfo = factionObj.getInfo();\n return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork;\n });\n}\n\nfunction possibleContracts(player: IPlayer, sleeve: Sleeve): string[] {\n const bb = player.bladeburner;\n if (bb === null) {\n return [\"------\"];\n }\n let contracts = bb.getContractNamesNetscriptFn();\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Bladeburner && otherSleeve.bbAction == \"Take on contracts\") {\n contracts = contracts.filter((x) => x != otherSleeve.bbContract);\n }\n }\n if (contracts.length === 0) {\n return [\"------\"];\n }\n return contracts;\n}\n\nconst tasks: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => ITaskDetails);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Perform Bladeburner Actions\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n} = {\n \"------\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let jobs = possibleJobs(player, sleeve);\n\n if (jobs.length === 0) jobs = [\"------\"];\n return { first: jobs, second: () => [\"------\"] };\n },\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n\n return {\n first: factions,\n second: (s1: string) => {\n const faction = Factions[s1];\n if (!faction) return [\"------\"];\n\n const facInfo = faction.getInfo();\n const options: string[] = [];\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n return options;\n },\n };\n },\n \"Commit Crime\": (): ITaskDetails => {\n return { first: Object.values(Crimes).map((crime) => crime.name), second: () => [\"------\"] };\n },\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let universities: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n universities = [LocationName.AevumSummitUniversity];\n break;\n case CityName.Sector12:\n universities = [LocationName.Sector12RothmanUniversity];\n break;\n case CityName.Volhaven:\n universities = [LocationName.VolhavenZBInstituteOfTechnology];\n break;\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return { first: universitySelectorOptions, second: () => universities };\n },\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let gyms: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n gyms = [LocationName.AevumCrushFitnessGym, LocationName.AevumSnapFitnessGym];\n break;\n case CityName.Sector12:\n gyms = [LocationName.Sector12IronGym, LocationName.Sector12PowerhouseGym];\n break;\n case CityName.Volhaven:\n gyms = [LocationName.VolhavenMilleniumFitnessGym];\n break;\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return { first: gymSelectorOptions, second: () => gyms };\n },\n \"Perform Bladeburner Actions\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n return {\n first: bladeburnerSelectorOptions,\n second: (s1: string) => {\n if (s1 === \"Take on contracts\") {\n return possibleContracts(player, sleeve);\n } else {\n return [\"------\"];\n }\n },\n };\n },\n \"Shock Recovery\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n Synchronize: (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n};\n\nconst canDo: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => boolean);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Perform Bladeburner Actions\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n} = {\n \"------\": () => true,\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Perform Bladeburner Actions\": (player: IPlayer) => player.inBladeburner(),\n \"Shock Recovery\": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,\n Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,\n};\n\nfunction getABC(sleeve: Sleeve): [string, string, string] {\n switch (sleeve.currentTask) {\n case SleeveTaskType.Idle:\n return [\"------\", \"------\", \"------\"];\n case SleeveTaskType.Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n case SleeveTaskType.Faction: {\n let workType = \"\";\n switch (sleeve.factionWorkType) {\n case FactionWorkType.HACKING:\n workType = \"Hacking Contracts\";\n break;\n case FactionWorkType.FIELD:\n workType = \"Field Work\";\n break;\n case FactionWorkType.SECURITY:\n workType = \"Security Work\";\n break;\n }\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n case SleeveTaskType.Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n case SleeveTaskType.Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n case SleeveTaskType.Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n case SleeveTaskType.Bladeburner:\n return [\"Perform Bladeburner Actions\", sleeve.bbAction, sleeve.bbContract];\n case SleeveTaskType.Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n case SleeveTaskType.Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = useState(abc[0]);\n const [s1, setS1] = useState(abc[1]);\n const [s2, setS2] = useState(abc[2]);\n\n const validActions = Object.keys(canDo).filter((k) =>\n (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),\n );\n\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event: SelectChangeEvent): void {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]) ?? [\"------\"];\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event: SelectChangeEvent): void {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event: SelectChangeEvent): void {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return (\n <>\n \n {!(details.first.length === 1 && details.first[0] === \"------\") && (\n <>\n \n \n )}\n {!(details2.length === 1 && details2[0] === \"------\") && (\n <>\n \n \n )}\n \n );\n}\n","import React from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { WorldMap } from \"../../../ui/React/WorldMap\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function travel(city: string): void {\n if (!player.canAfford(CONSTANTS.TravelCost)) {\n dialogBoxCreate(\"You cannot afford to have this sleeve travel to another city\");\n }\n props.sleeve.city = city as CityName;\n player.loseMoney(CONSTANTS.TravelCost, \"sleeve\");\n props.sleeve.resetTaskStatus(player);\n props.rerender();\n props.onClose();\n }\n\n return (\n \n <>\n \n Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can\n study. Traveling to a different city costs . It will\n also set your current sleeve task to idle.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React from \"react\";\n\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FAQModal({ open, onClose }: IProps): React.ReactElement {\n return (\n \n <>\n How do Duplicate Sleeves work?\n
    \n \n Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working\n for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience,\n and reputation.\n \n
    \n
    \n \n Sleeves are their own individuals, which means they each have their own experience and stats.\n \n
    \n
    \n \n When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well\n as all of the player's other sleeves.\n \n
    \n
    \n What is Synchronization (Sync)?\n
    \n \n Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a\n numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing\n a task.\n \n
    \n
    \n \n Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve\n and the player's original host consciousness earn N% of the amount of experience normally earned by the task.\n All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.\n \n
    \n
    \n Synchronization can be increased by assigning sleeves to the 'Synchronize' task.\n
    \n
    \n What is Shock?\n
    \n \n Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a\n numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the\n amount of experience earned by the sleeve.\n \n
    \n
    \n \n Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning\n sleeves to the 'Shock Recovery' task.\n \n
    \n
    \n Why can't I work for this company or faction?\n
    \n \n Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two\n sleeves they can work for two different companies, but they cannot both work for the same company.\n \n
    \n
    \n Why did my Sleeve stop working?\n
    \n \n Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a\n company after 8 hours, and stop working for a faction after 20 hours.\n \n
    \n
    \n How do I buy Augmentations for my Sleeves?\n
    \n Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.\n
    \n
    \n Why can't I buy the X Augmentation for my sleeve?\n
    \n \n Certain Augmentations, like {FactionNames.Bladeburners}-specific ones and NeuroFlux Governor, are not\n available for sleeves.\n \n
    \n
    \n Do sleeves get reset when installing Augmentations or switching BitNodes?\n
    \n Sleeves are reset when switching BitNodes, but not when installing Augmentations.\n
    \n
    \n What is Memory?\n
    \n \n Sleeve memory dictates what a sleeve's synchronization will be when it's reset by switching BitNodes. For\n example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be\n set to 25, rather than 1.\n \n
    \n
    \n \n Memory can only be increased by purchasing upgrades from {FactionNames.TheCovenant}. It is a persistent stat,\n meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.\n \n \n
    \n );\n}\n","/**\n * Root React Component for the Hacknet Node UI\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { GeneralInfo } from \"./GeneralInfo\";\nimport { HacknetNodeElem } from \"./HacknetNodeElem\";\nimport { HacknetServerElem } from \"./HacknetServerElem\";\nimport { HacknetNode } from \"../HacknetNode\";\nimport { HacknetServer } from \"../HacknetServer\";\nimport { HashUpgradeModal } from \"./HashUpgradeModal\";\nimport { MultiplierButtons } from \"./MultiplierButtons\";\nimport { PlayerInfo } from \"./PlayerInfo\";\nimport { PurchaseButton } from \"./PurchaseButton\";\nimport { PurchaseMultipliers } from \"../data/Constants\";\n\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function HacknetRoot(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [purchaseMultiplier, setPurchaseMultiplier] = useState(PurchaseMultipliers.x1);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n let totalProduction = 0;\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick(): void {\n purchaseHacknet(props.player);\n rerender();\n }\n\n // Cost to purchase a new Hacknet Node\n let purchaseCost;\n if (hasHacknetServers(props.player)) {\n purchaseCost = getCostOfNextHacknetServer(props.player);\n } else {\n purchaseCost = getCostOfNextHacknetNode(props.player);\n }\n\n // onClick event handlers for purchase multiplier buttons\n const purchaseMultiplierOnClicks = [\n () => setPurchaseMultiplier(PurchaseMultipliers.x1),\n () => setPurchaseMultiplier(PurchaseMultipliers.x5),\n () => setPurchaseMultiplier(PurchaseMultipliers.x10),\n () => setPurchaseMultiplier(PurchaseMultipliers.MAX),\n ];\n\n // HacknetNode components\n const nodes = props.player.hacknetNodes.map((node: string | HacknetNode) => {\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n return (\n \n );\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n return (\n \n );\n }\n });\n\n return (\n <>\n Hacknet {hasHacknetServers(props.player) ? \"Servers\" : \"Nodes\"}\n \n\n \n\n
    \n\n \n \n \n \n \n \n \n \n\n {hasHacknetServers(props.player) && }\n\n {nodes}\n setOpen(false)} />\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n hasHacknetServers: boolean;\n}\n\nexport function GeneralInfo(props: IProps): React.ReactElement {\n return (\n <>\n \n The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to\n anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\n \n {!props.hasHacknetServers ? (\n <>\n \n {`Here, you can purchase a Hacknet Node, a specialized machine that can connect ` +\n `and contribute its resources to the Hacknet network. This allows you to take ` +\n `a small percentage of profits from hacks performed on the network. Essentially, ` +\n `you are renting out your Node's computing power.`}\n \n \n {`Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` +\n `can be upgraded in order to increase its computing power and thereby increase ` +\n `the profit you earn from it.`}\n \n \n ) : (\n <>\n \n {`Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` +\n `Hacknet Servers will perform computations and operations on the network, earning ` +\n `you hashes. Hashes can be spent on a variety of different upgrades.`}\n \n \n {`Hacknet Servers can also be used as servers to run scripts. However, running scripts ` +\n `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` +\n `rate will be reduced by the percentage of RAM that is being used by that Server to run ` +\n `scripts.`}\n \n \n )}\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetNodeConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetNode } from \"../HacknetNode\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateMoneyGainRate } from \"../formulas/HacknetNodes\";\n\ninterface IProps {\n node: HacknetNode;\n purchaseMultiplier: number | \"MAX\";\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetNodeElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const increase =\n calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.mults.hacknet_node_money) -\n node.moneyGainRatePerSecond;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.mults.hacknet_node_level_cost);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel)\n : purchaseMult;\n purchaseLevelUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRAMButton;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRAMButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const increase =\n calculateMoneyGainRate(\n node.level,\n node.ram * Math.pow(2, multiplier),\n node.cores,\n props.player.mults.hacknet_node_money,\n ) - node.moneyGainRatePerSecond;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.mults.hacknet_node_ram_cost);\n upgradeRAMButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeRamOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\" ? getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam) : purchaseMult;\n purchaseRamUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n function upgradeCoresOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores)\n : purchaseMult;\n purchaseCoreUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n let upgradeCoresButton;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const increase =\n calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.mults.hacknet_node_money) -\n node.moneyGainRatePerSecond;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.mults.hacknet_node_core_cost);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n return (\n \n \n \n \n \n {node.name}\n \n \n \n \n Production:\n \n \n \n (\n )\n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.ram)}\n \n {upgradeRAMButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n
    \n
    \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetServerConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n getMaxNumberCacheUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n updateHashManagerCapacity,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../HacknetServer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateHashGainRate } from \"../formulas/HacknetServers\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n node: HacknetServer;\n purchaseMultiplier: number | string;\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetServerElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetServerConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(\n node.level + multiplier,\n 0,\n node.maxRam,\n node.cores,\n props.player.mults.hacknet_node_money,\n ) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);\n const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.mults.hacknet_node_level_cost);\n upgradeLevelButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n }\n purchaseLevelUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n\n function upgradeRamOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n }\n purchaseRamUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade RAM Button\n let upgradeRamButton;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetServerConstants.MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.mults.hacknet_node_money,\n ) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);\n\n const modded_increase =\n calculateHashGainRate(\n node.level,\n node.ramUsed,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.mults.hacknet_node_money,\n ) -\n calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.mults.hacknet_node_money);\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.mults.hacknet_node_ram_cost);\n upgradeRamButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n\n function upgradeCoresOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n }\n purchaseCoreUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade Cores Button\n let upgradeCoresButton;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam,\n node.cores + multiplier,\n props.player.mults.hacknet_node_money,\n ) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);\n const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.mults.hacknet_node_core_cost);\n upgradeCoresButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n\n // Upgrade Cache button\n let upgradeCacheButton;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase = 32 * Math.pow(2, node.cache + multiplier) - node.hashCapacity;\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheButton = (\n \n + hashes\n \n }\n >\n \n \n );\n if (props.player.money < upgradeCacheCost) {\n } else {\n }\n }\n function upgradeCacheOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n }\n purchaseCacheUpgrade(props.player, node, numUpgrades as number);\n rerender();\n updateHashManagerCapacity(props.player);\n }\n\n return (\n \n \n \n \n \n {node.hostname}\n \n \n \n \n Production:\n \n \n \n hashes produced by this server since last augment\n installation.\n
    \n current production rate.\n
    \n \n \n {\" \"}\n max production rate. (achieved when 100% RAM is allocated to it)\n
    \n {numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (\n {Math.round((100 * node.ramUsed) / node.maxRam)}%) RAM allocated to script.\n
    \n {numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (\n {Math.round((100 * (node.maxRam - node.ramUsed)) / node.maxRam)}%) RAM allocated to hash production.\n \n }\n >\n \n ()\n \n \n
    \n
    \n \n \n Hash Capacity:\n \n \n \n \n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.maxRam)}\n \n {upgradeRamButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n \n Cache Level:\n \n \n {node.cache}\n \n {upgradeCacheButton}\n \n
    \n
    \n
    \n );\n}\n","/**\n * Create the pop-up for purchasing upgrades with hashes\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrades } from \"../HashUpgrades\";\n\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HacknetUpgradeElem } from \"./HacknetUpgradeElem\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function HashUpgradeModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n const hashManager = player.hashManager;\n if (!(hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n return (\n \n <>\n Spend your hashes on a variety of different upgrades\n \n Hashes: \n \n {Object.keys(HashUpgrades).map((upgName) => {\n const upg = HashUpgrades[upgName];\n return (\n \n );\n })}\n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { purchaseHashUpgrade } from \"../HacknetHelpers\";\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrade } from \"../HashUpgrade\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { ServerDropdown, ServerType } from \"../../ui/React/ServerDropdown\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n player: IPlayer;\n hashManager: HashManager;\n upg: HashUpgrade;\n rerender: () => void;\n}\n\nconst serversMap: { [key: string]: string } = {};\n\nexport function HacknetUpgradeElem(props: IProps): React.ReactElement {\n const [selectedServer, setSelectedServer] = useState(\n serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),\n );\n function changeTargetServer(event: SelectChangeEvent): void {\n setSelectedServer(event.target.value);\n serversMap[props.upg.name] = event.target.value;\n }\n\n function purchase(): void {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n if (canPurchase) {\n const res = purchaseHashUpgrade(props.player, props.upg.name, selectedServer);\n if (!res) {\n dialogBoxCreate(\n \"Failed to purchase upgrade. This may be because you do not have enough hashes, \" +\n \"or because you do not have access to the feature upgrade affects.\",\n );\n }\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level);\n\n // Purchase button\n const canPurchase = hashManager.hashes >= cost;\n\n // We'll reuse a Bladeburner css class\n return (\n \n \n \n \n \n Cost: , Bought: {level} times\n \n\n {upg.desc}\n {!upg.hasTargetServer && (\n \n )}\n {upg.hasTargetServer && (\n \n )}\n {level > 0 && effect && {effect}}\n \n );\n}\n","/**\n * React Component for the Multiplier buttons on the Hacknet page.\n * These buttons let the player control how many Nodes/Upgrades they're\n * purchasing when using the UI (x1, x5, x10, MAX)\n */\nimport React from \"react\";\n\nimport { PurchaseMultipliers } from \"../data/Constants\";\nimport Button from \"@mui/material/Button\";\n\ninterface IMultiplierProps {\n disabled: boolean;\n onClick: () => void;\n text: string;\n}\n\nfunction MultiplierButton(props: IMultiplierProps): React.ReactElement {\n return (\n \n );\n}\n\ninterface IProps {\n purchaseMultiplier: number | string;\n onClicks: (() => void)[];\n}\n\nexport function MultiplierButtons(props: IProps): React.ReactElement {\n if (props.purchaseMultiplier == null) {\n throw new Error(`MultiplierButtons constructed without required props`);\n }\n\n const mults = [\"x1\", \"x5\", \"x10\", \"MAX\"];\n const onClicks = props.onClicks;\n const buttons = [];\n for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n disabled: props.purchaseMultiplier === PurchaseMultipliers[mult],\n onClick: onClicks[i],\n text: mult,\n };\n\n buttons.push();\n }\n\n return <>{buttons};\n}\n","/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers } from \"../HacknetHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n totalProduction: number;\n player: IPlayer;\n}\n\nexport function PlayerInfo(props: IProps): React.ReactElement {\n const hasServers = hasHacknetServers(props.player);\n\n let prod;\n if (hasServers) {\n prod = ;\n } else {\n prod = ;\n }\n\n return (\n <>\n \n Money:\n \n \n\n {hasServers && (\n <>\n \n Hashes: /{\" \"}\n \n \n \n )}\n\n \n Total Hacknet {hasServers ? \"Server\" : \"Node\"} Production: {prod}\n \n \n );\n}\n","/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers, hasMaxNumberHacknetServers } from \"../HacknetHelpers\";\nimport { Player } from \"../../Player\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n multiplier: number | string;\n onClick: () => void;\n cost: number;\n}\n\nexport function PurchaseButton(props: IProps): React.ReactElement {\n const cost = props.cost;\n let text;\n if (hasHacknetServers(Player)) {\n if (hasMaxNumberHacknetServers(Player)) {\n text = <>Hacknet Server limit reached;\n } else {\n text = (\n <>\n Purchase Hacknet Server - \n \n \n );\n }\n } else {\n text = (\n <>\n Purchase Hacknet Node - \n \n \n );\n }\n\n return (\n \n );\n}\n","/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { CompanyLocation } from \"./CompanyLocation\";\nimport { GymLocation } from \"./GymLocation\";\nimport { HospitalLocation } from \"./HospitalLocation\";\nimport { SlumsLocation } from \"./SlumsLocation\";\nimport { SpecialLocation } from \"./SpecialLocation\";\nimport { TechVendorLocation } from \"./TechVendorLocation\";\nimport { TravelAgencyRoot } from \"./TravelAgencyRoot\";\nimport { UniversityLocation } from \"./UniversityLocation\";\nimport { CasinoLocation } from \"./CasinoLocation\";\n\nimport { Location } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { isBackdoorInstalled } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { use } from \"../../ui/Context\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Tooltip } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function GenericLocation({ loc }: IProps): React.ReactElement {\n const router = use.Router();\n const player = use.Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n function getLocationSpecificContent(): React.ReactNode[] {\n const content: React.ReactNode[] = [];\n\n if (loc.types.includes(LocationType.Company)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Gym)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Hospital)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Slums)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Special)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TechVendor)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TravelAgency)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.University)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Casino)) {\n content.push();\n }\n\n return content;\n }\n\n const locContent: React.ReactNode[] = getLocationSpecificContent();\n const serverMeta = serverMetadata.find((s) => s.specialName === loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n\n const backdoorInstalled = server !== null && isBackdoorInstalled(server);\n\n return (\n <>\n \n \n {backdoorInstalled && !Settings.DisableTextEffects ? (\n \n \n \n \n \n ) : (\n loc.name\n )}\n \n {locContent}\n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\nimport React, { useState, useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nimport { ApplyToJobButton } from \"./ApplyToJobButton\";\n\nimport { Locations } from \"../Locations\";\nimport { LocationName } from \"../data/LocationNames\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Favor } from \"../../ui/React/Favor\";\nimport { use } from \"../../ui/Context\";\nimport { QuitJobModal } from \"../../Company/ui/QuitJobModal\";\nimport { CompanyWork } from \"../../Work/CompanyWork\";\n\ntype IProps = {\n locName: LocationName;\n};\n\nexport function CompanyLocation(props: IProps): React.ReactElement {\n const p = use.Player();\n const router = use.Router();\n const [quitOpen, setQuitOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n const company = Companies[props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n\n /**\n * Reference to the Location that this component is being rendered for\n */\n const location = Locations[props.locName];\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n\n /**\n * Name of company position that player holds, if applicable\n */\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n const companyPosition = jobTitle ? CompanyPositions[jobTitle] : null;\n\n p.location = props.locName;\n\n function applyForAgentJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n const loc = location;\n if (!loc.infiltrationData)\n throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n\n router.toInfiltration(loc);\n }\n\n function work(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n if (pos instanceof CompanyPosition) {\n p.startWork(\n new CompanyWork({\n singularity: false,\n companyName: props.locName,\n }),\n );\n p.startFocusing();\n router.toWork();\n }\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n\n return (\n <>\n {isEmployedHere && (\n <>\n Job Title: {jobTitle}\n -------------------------\n \n \n You will have company favor upon resetting after\n installing Augmentations\n \n }\n >\n \n Company reputation: \n \n \n \n -------------------------\n \n \n Company favor increases the rate at which you earn reputation for this company by 1% per favor.\n Company favor is gained whenever you reset after installing Augmentations. The amount of favor you\n gain depends on how much reputation you have with the company.\n \n }\n >\n \n Company Favor: \n \n \n \n -------------------------\n
    \n \n )}\n \n {isEmployedHere && (\n \n \n \n setQuitOpen(false)}\n />\n \n )}\n {company.hasAgentPositions() && (\n \n )}\n {company.hasBusinessConsultantPositions() && (\n \n )}\n {company.hasBusinessPositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasITPositions() && (\n \n )}\n {company.hasSecurityPositions() && (\n \n )}\n {company.hasSoftwareConsultantPositions() && (\n \n )}\n {company.hasSoftwarePositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {location.infiltrationData != null && }\n \n \n );\n}\n","import React from \"react\";\nimport { Company } from \"../Company\";\nimport { use } from \"../../ui/Context\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n locName: string;\n company: Company;\n onQuit: () => void;\n}\n\nexport function QuitJobModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function quit(): void {\n player.quitJob(props.locName);\n props.onQuit();\n props.onClose();\n }\n\n return (\n \n Would you like to quit your job at {props.company.name}?\n
    \n
    \n \n
    \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Box } from \"@mui/material\";\nimport { ClassWork, ClassType, Classes } from \"../../Work/ClassWork\";\nimport { calculateCost } from \"../../Work/formulas/Class\";\n\ntype IProps = {\n loc: Location;\n p: IPlayer;\n router: IRouter;\n};\n\nexport function GymLocation(props: IProps): React.ReactElement {\n function train(stat: ClassType): void {\n props.p.startWork(\n new ClassWork({\n classType: stat,\n location: props.loc.name,\n singularity: false,\n }),\n );\n props.p.startFocusing();\n props.router.toWork();\n }\n\n const cost = calculateCost(Classes[ClassType.GymStrength], props.loc);\n\n return (\n \n \n \n \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\n\nimport { Money } from \"../../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ntype IProps = {\n p: IPlayer;\n};\n\ntype IState = {\n currHp: number;\n};\n\nexport class HospitalLocation extends React.Component {\n /**\n * Stores button styling that sets them all to block display\n */\n btnStyle = { display: \"block\" };\n\n constructor(props: IProps) {\n super(props);\n\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n\n this.state = {\n currHp: this.props.p.hp,\n };\n }\n\n getCost(): number {\n return getHospitalizationCost(this.props.p);\n }\n\n getHealed(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost, \"hospitalization\");\n this.props.p.hp = this.props.p.max_hp;\n\n // This just forces a re-render to update the cost\n this.setState({\n currHp: this.props.p.hp,\n });\n\n dialogBoxCreate(\n <>\n You were healed to full health! The hospital billed you for \n ,\n );\n }\n\n render(): React.ReactNode {\n const cost = this.getCost();\n\n return (\n \n );\n }\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { Box } from \"@mui/material\";\n\nexport function SlumsLocation(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n function shoplift(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Shoplift.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function robStore(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.RobStore.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function mug(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Mug.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function larceny(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Larceny.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function dealDrugs(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.DealDrugs.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function bondForgery(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.BondForgery.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function traffickArms(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.TraffickArms.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function homicide(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Homicide.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function grandTheftAuto(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.GrandTheftAuto.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function kidnap(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Kidnap.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function assassinate(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Assassination.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n function heist(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Heist.commit(player);\n router.toWork();\n player.focus = true;\n }\n\n const shopliftChance = Crimes.Shoplift.successRate(player);\n const robStoreChance = Crimes.RobStore.successRate(player);\n const mugChance = Crimes.Mug.successRate(player);\n const larcenyChance = Crimes.Larceny.successRate(player);\n const drugsChance = Crimes.DealDrugs.successRate(player);\n const bondChance = Crimes.BondForgery.successRate(player);\n const armsChance = Crimes.TraffickArms.successRate(player);\n const homicideChance = Crimes.Homicide.successRate(player);\n const gtaChance = Crimes.GrandTheftAuto.successRate(player);\n const kidnapChance = Crimes.Kidnap.successRate(player);\n const assassinateChance = Crimes.Assassination.successRate(player);\n const heistChance = Crimes.Heist.successRate(player);\n\n return (\n \n Attempt to shoplift from a low-end retailer}>\n \n \n Attempt to commit armed robbery on a high-end store}>\n \n \n Attempt to mug a random person on the street}>\n \n \n Attempt to rob property from someone's house}>\n \n \n Attempt to deal drugs}>\n \n \n Attempt to forge corporate bonds}>\n \n \n Attempt to smuggle illegal arms into the city}>\n \n \n Attempt to murder a random person on the street}>\n \n \n Attempt to commit grand theft auto}>\n \n \n Attempt to kidnap and ransom a high-profile-target}>\n \n \n Attempt to assassinate a high-profile target}>\n \n \n Attempt to pull off the ultimate heist}>\n \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { CreateCorporationModal } from \"../../Corporation/ui/modals/CreateCorporationModal\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { N00dles } from \"../../utils/helpers/N00dles\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { ArcadeRoot } from \"../../Arcade/ui/ArcadeRoot\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function SpecialLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const inBladeburner = player.inBladeburner();\n\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n function handleBladeburner(): void {\n const p = player;\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n // Apply for Bladeburner division\n p.startBladeburner();\n dialogBoxCreate(\"You have been accepted into the Bladeburner division!\");\n setRerender((old) => !old);\n\n const worldHeader = document.getElementById(\"world-menu-header\");\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n dialogBoxCreate(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n function handleGrafting(): void {\n router.toGrafting();\n }\n\n function renderBladeburner(): React.ReactElement {\n if (!player.canAccessBladeburner()) {\n return <>;\n }\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return (\n <>\n
    \n \n \n );\n }\n\n function renderNoodleBar(): React.ReactElement {\n function EatNoodles(): void {\n SnackbarEvents.emit(\"You ate some delicious noodles and feel refreshed\", ToastVariant.SUCCESS, 2000);\n N00dles(); // This is the true power of the noodles.\n if (player.sourceFiles.length > 0) player.giveExploit(Exploit.N00dles);\n if (player.sourceFileLvl(5) > 0 || player.bitNodeN === 5) {\n player.intelligence_exp *= 1.0000000000000002;\n }\n player.hacking_exp *= 1.0000000000000002;\n player.strength_exp *= 1.0000000000000002;\n player.defense_exp *= 1.0000000000000002;\n player.agility_exp *= 1.0000000000000002;\n player.dexterity_exp *= 1.0000000000000002;\n player.charisma_exp *= 1.0000000000000002;\n for (const node of player.hacknetNodes) {\n if (node instanceof HacknetNode) {\n player.gainMoney(node.moneyGainRatePerSecond * 0.001, \"other\");\n } else {\n const server = GetServer(node);\n if (!(server instanceof HacknetServer)) throw new Error(`Server ${node} is not a hacknet server.`);\n player.hashManager.storeHashes(server.hashRate * 0.001);\n }\n }\n\n if (player.bladeburner) {\n player.bladeburner.rank += 0.00001;\n }\n\n if (player.corporation) {\n player.corporation.funds += player.corporation.revenue * 0.01;\n }\n }\n\n return (\n <>\n
    \n \n \n );\n }\n\n function CreateCorporation(): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (!player.canAccessCorporation()) {\n return (\n <>\n \n A businessman is yelling at a clerk. You should come back later.\n \n \n );\n }\n return (\n <>\n \n setOpen(false)} />\n \n );\n }\n\n function renderGrafting(): React.ReactElement {\n if (!player.canAccessGrafting()) {\n return <>;\n }\n return (\n \n );\n }\n\n function handleCotMG(): void {\n const faction = Factions[FactionNames.ChurchOfTheMachineGod];\n if (!player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n joinFaction(faction);\n }\n if (\n !player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n\n router.toStaneksGift();\n }\n\n function renderCotMG(): React.ReactElement {\n const toStanek = ;\n // prettier-ignore\n const symbol = \n {\" `` \"}
    \n {\" -odmmNmds: \"}
    \n {\" `hNmo:..-omNh. \"}
    \n {\" yMd` `hNh \"}
    \n {\" mMd oNm \"}
    \n {\" oMNo .mM/ \"}
    \n {\" `dMN+ -mM+ \"}
    \n {\" -mMNo -mN+ \"}
    \n {\" .+- :mMNo/mN/ \"}
    \n {\":yNMd. :NMNNN/ \"}
    \n {\"-mMMMh. /NMMh` \"}
    \n {\" .dMMMd. /NMMMy` \"}
    \n {\" `yMMMd. /NNyNMMh` \"}
    \n {\" `sMMMd. +Nm: +NMMh. \"}
    \n {\" oMMMm- oNm: /NMMd. \"}
    \n {\" +NMMmsMm- :mMMd. \"}
    \n {\" /NMMMm- -mMMd. \"}
    \n {\" /MMMm- -mMMd. \"}
    \n {\" `sMNMMm- .mMmo \"}
    \n {\" `sMd:hMMm. ./. \"}
    \n {\" `yMy` `yNMd` \"}
    \n {\" `hMs` oMMy \"}
    \n {\" `hMh sMN- \"}
    \n {\" /MM- .NMo \"}
    \n {\" +MM: :MM+ \"}
    \n {\" sNNo-.`.-omNy` \"}
    \n {\" -smNNNNmdo- \"}
    \n {\" `..` \"}
    \n if (player.hasAugmentation(AugmentationNames.StaneksGift3, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer\n look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it\n seems. Curious, Just how much of a machine's soul do you house in that body?\n \n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n if (player.hasAugmentation(AugmentationNames.StaneksGift2, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: I see you've taken to my creation. So much that it could hardly be recognized as\n one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your\n mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.\n \n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n if (player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n return (\n <>\n \n Allison \"Mother\" Stanek: Welcome back my child!\n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n\n if (!player.canAccessCotMG()) {\n return (\n <>\n \n A decrepit altar stands in the middle of a dilapidated church.\n
    \n
    A symbol is carved in the altar.\n
    \n
    \n {symbol}\n \n );\n }\n\n if (\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0 ||\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0\n ) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Begone you filth! My gift must be the first modification that your body should\n have!\n \n \n \n );\n }\n\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human\n form? If you are, accept my gift.\n \n \n \n {symbol}\n \n );\n }\n\n function renderGlitch(): React.ReactElement {\n return (\n <>\n \n \n \n \n );\n }\n\n switch (props.loc.name) {\n case LocationName.NewTokyoVitaLife: {\n return renderGrafting();\n }\n case LocationName.Sector12CityHall: {\n return (BitNodeMultipliers.CorporationSoftcap < 0.15 && <>) || ;\n }\n case LocationName.Sector12NSA: {\n return renderBladeburner();\n }\n case LocationName.NewTokyoNoodleBar: {\n return renderNoodleBar();\n }\n case LocationName.ChongqingChurchOfTheMachineGod: {\n return renderCotMG();\n }\n case LocationName.IshimaGlitch: {\n return renderGlitch();\n }\n case LocationName.NewTokyoArcade: {\n return ;\n }\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return <>;\n }\n}\n","import React, { useState } from \"react\";\n\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function CreateCorporationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const canSelfFund = player.canAfford(150e9);\n if (!player.canAccessCorporation() || player.hasCorporation()) {\n props.onClose();\n return <>;\n }\n\n const [name, setName] = useState(\"\");\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function selfFund(): void {\n if (!canSelfFund) {\n return;\n }\n\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name);\n player.loseMoney(150e9, \"corporation\");\n\n props.onClose();\n router.toCorporation();\n }\n\n function seed(): void {\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name, 500e6);\n\n props.onClose();\n router.toCorporation();\n }\n\n return (\n \n \n Would you like to start a corporation? This will require $150b for registration and initial funding.{\" \"}\n {player.bitNodeN === 3 &&\n `This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares`}\n
    \n
    \n If you would like to start one, please enter a name for your corporation below:\n
    \n \n {player.bitNodeN === 3 && (\n \n )}\n \n
    \n );\n}\n","const n00dlePower =\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(\" +\n \"!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]\" +\n \"+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+\" +\n \"[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[\" +\n \"])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!\" +\n \"+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+\" +\n \"[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[\" +\n \"])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+\" +\n \"(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+\" +\n \"[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+\" +\n \"!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]\" +\n \"]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]\" +\n \"]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[\" +\n \"+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(\" +\n \"![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[]\" +\n \")[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+\" +\n \"[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!\" +\n \"![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(\" +\n \"![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[\" +\n \"])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[]\" +\n \")[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[\" +\n \"]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[]\" +\n \")[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]\" +\n \"]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]\" +\n \"]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+(\" +\n \"[][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[\" +\n \"+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+\" +\n \"[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[\" +\n \"]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+\" +\n \"(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[]\" +\n \")[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]]\" +\n \"(!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]\" +\n \"((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[\" +\n \"]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]\" +\n \"+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]\" +\n \"+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+\" +\n \"[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]\" +\n \"+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([\" +\n \"![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(\" +\n \"!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]\" +\n \"+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][\" +\n \"[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[\" +\n \"]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+\" +\n \"!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]\" +\n \"+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])\" +\n \"[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+\" +\n \"[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[\" +\n \"]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!\" +\n \"+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]\" +\n \"+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(!\" +\n \"[]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!\" +\n \"![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]]\" +\n \")+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[\" +\n \"+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![\" +\n \"]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[\" +\n \"])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+\" +\n \"[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[\" +\n \"+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!\" +\n \"+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![\" +\n \"]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!\" +\n \"[]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!!\" +\n \"[]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]\" +\n \"]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![\" +\n \"]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[\" +\n \"]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]\" +\n \"+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+\" +\n \"[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]\" +\n \"+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+\" +\n \"[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])\" +\n \"[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[\" +\n \"])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()\" +\n \"+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[\" +\n \"+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[]\" +\n \"[(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()\";\n\nexport function N00dles(): void {\n // TODO: Too powerful, needs a nerf.\n eval(n00dlePower);\n}\n","import React, { useState } from \"react\";\nimport { BBCabinetRoot } from \"./BBCabinet\";\n\nimport Button from \"@mui/material/Button\";\nimport { use } from \"../../ui/Context\";\nimport { AlertEvents } from \"../../ui/React/AlertManager\";\n\nenum Page {\n None,\n Megabyteburner2000,\n}\n\nexport function ArcadeRoot(): React.ReactElement {\n const player = use.Player();\n const [page, setPage] = useState(Page.None);\n\n function mbBurner2000(): void {\n if (player.sourceFileLvl(1) === 0) {\n AlertEvents.emit(\"This machine is broken.\");\n } else {\n setPage(Page.Megabyteburner2000);\n }\n }\n\n if (page === Page.None) {\n return (\n <>\n \n \n );\n }\n let currentGame = <>;\n switch (page) {\n case Page.Megabyteburner2000:\n currentGame = ;\n }\n return (\n <>\n \n {currentGame}\n \n );\n}\n","import React, { useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { use } from \"../../ui/Context\";\nimport { Exploit } from \"../../Exploits/Exploit\";\n\nconst metaBB = \"https://bitburner-official.github.io/bitburner-legacy/\";\n\nconst style = {\n width: \"1060px\",\n height: \"800px\",\n border: \"0px\",\n};\n\nexport function BBCabinetRoot(): React.ReactElement {\n const player = use.Player();\n useEffect(() => {\n window.addEventListener(\"message\", function (this: Window, ev: MessageEvent) {\n if (ev.isTrusted && ev.origin == \"https://bitburner-official.github.io\" && ev.data) {\n player.giveExploit(Exploit.TrueRecursion);\n }\n });\n });\n // prettier-ignore\n const joystick =\n <>\n \n ,'\" \"', .-. \n / \\ ( ) \n | | .-. '-' .-. \n \\ / ( ) ( )\n '.___.' '-' .-. '-'\n ||| ( ) \n ||| '-' \n ;\n return (\n <>\n \n