From e906a6331f3f565b1657263e937d6615db66a10c Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 10 Sep 2021 00:53:39 -0400 Subject: [PATCH] change modals so they close on mouse down outside the box --- dist/engine.bundle.js | 4 +- dist/vendor.bundle.js | 26 ++--- src/Corporation/Actions.ts | 70 ++++++++++++ src/Corporation/ui/MakeProductPopup.tsx | 37 ++---- src/NetscriptFunctions.js | 143 ++++++++++++++---------- src/ui/React/createPopup.tsx | 2 +- utils/uiHelpers/createElement.ts | 4 + 7 files changed, 182 insertions(+), 104 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index dc59daf2f..4c25dfeee 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var n,o,s=t[0],l=t[1],c=t[2],m=0,h=[];m
In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

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

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

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

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

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

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

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

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

There are six different types of Nodes:

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

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

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

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

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

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

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

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

Other Notes:

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

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

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.53.0 - 2021-09-09 Way too many things. (hydroflame & community)\n -------------------------------------------\n\n ** Dev? **\n\n * The entire codebase has been run through a code prettifier, hurray for consistency. (@threehams)\n * Lots of test. (@threehams)\n * Massive improvements to build speed. (@threehams)\n * Dev notes: This won't affect any players but is immensely useful for me.\n\n ** Hacknet **\n\n * Converted to ts/react\n\n ** Resleeving **\n\n * Converted to ts/react\n\n ** Sleeves **\n\n * Converted to ts/react. The ui should also have a better feel.\n * Fixed a bug that allowed players to recover shock much faster than intended.\n\n ** BN10 **\n\n * You have access to Sleeves right away\n * In BN10 Sleeves start with 75 shock and 25 sync.\n\n ** MathJax **\n\n * Several tooltips have been updated to display the relevant formula in Mathjax, e.g. Favor and reputation\n\n ** Corporation ** \n\n * Completely rewritten in React. Paving the way for bigger change.\n * Smart Supply is now smarter and won't deadlock the warehouse. It is also more configurable.\n * Several UI fixes.\n\n ** Bladeburner ** \n\n * Action count is no longer decided when joining the Bladeburners. Experiences for all players should be more similar.\n\n ** Factions ** \n\n * No factions have home computer ram requirement. This caused some confusion for new players.\n\n ** Gang ** \n\n * Made it clear when there's a new equipment coming up.\n\n ** Netscript **\n\n * getActionCountRemaining now returns Infinity for bladeburner general actions. (@brubsy)\n * getActionEstimatedSuccessChance now returns 100% for Diplomacy and Hyperbolic Regeneration Chamber. (@brubsy)\n * disableLog('ALL') now disables all logs individually, meaning you can re-enable the ones you want after. (@Cass)\n * getPlayer returns numPeopleKilled.\n * Dynamic RAM calculation errors have a better error message.\n * Hide some functions from autocomplete.\n * Added getAugmentationPrice, getAugmentationRepReq, deprecated getAugmentationCost. (@TempFound)\n * Fixed bug where some crime API would return \"assassinate\" when that's not accepted in other functions.\n\n ** Coding Contract **\n\n * Spiralize Matrix is easier to read.\n\n ** Misc. **\n\n * The world map is now used in sleeve travel and bladeburner travel.\n * noselect a bunch of stuff.\n * Ascii maps letters are more contrasting\n * Updated documentation for infiltration.\n * Most money costs in the game will turn grey/cyan when you don't have enough money.\n * Donation textbox has better look & feel.\n * Tech vendors ram & cores buttons have better look and feels.\n * cores cost modified to be a formula instead of a semi-random array of numbers.\n * Tech vendors now give a hint about where to get bigger servers.\n * logboxes now displays whitespaces exactly. (@Cass)\n * nerf noodle bar\n"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={HackingLevelMultiplier:1,StrengthLevelMultiplier:1,DefenseLevelMultiplier:1,DexterityLevelMultiplier:1,AgilityLevelMultiplier:1,CharismaLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,HomeComputerRamCost:1,PurchasedServerCost:1,PurchasedServerLimit:1,PurchasedServerMaxRam:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,ScriptHackMoneyGain:1,CodingContractMoney:1,ClassGymExpGain:1,CompanyWorkExpGain:1,CrimeExpGain:1,FactionWorkExpGain:1,HackExpGain:1,FactionPassiveRepGain:1,FactionWorkRepGain:1,RepToDonateToFaction:1,AugmentationMoneyCost:1,AugmentationRepCost:1,InfiltrationMoney:1,InfiltrationRep:1,FourSigmaMarketDataCost:1,FourSigmaMarketDataApiCost:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1,DaedalusAugsRequirement:1,GangKarmaRequirement:1}},function(e,t,a){"use strict";let n;a.d(t,"a",(function(){return n})),function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven",e.AevumAeroCorp="AeroCorp",e.AevumBachmanAndAssociates="Bachman & Associates",e.AevumClarkeIncorporated="Clarke Incorporated",e.AevumCrushFitnessGym="Crush Fitness Gym",e.AevumECorp="ECorp",e.AevumFulcrumTechnologies="Fulcrum Technologies",e.AevumGalacticCybersystems="Galactic Cybersystems",e.AevumNetLinkTechnologies="NetLink Technologies",e.AevumPolice="Aevum Police Headquarters",e.AevumRhoConstruction="Rho Construction",e.AevumSnapFitnessGym="Snap Fitness Gym",e.AevumSummitUniversity="Summit University",e.AevumWatchdogSecurity="Watchdog Security",e.AevumCasino="Iker Molina Casino",e.ChongqingKuaiGongInternational="KuaiGong International",e.ChongqingSolarisSpaceSystems="Solaris Space Systems",e.Sector12AlphaEnterprises="Alpha Enterprises",e.Sector12BladeIndustries="Blade Industries",e.Sector12CIA="Central Intelligence Agency",e.Sector12CarmichaelSecurity="Carmichael Security",e.Sector12CityHall="Sector-12 City Hall",e.Sector12DeltaOne="DeltaOne",e.Sector12FoodNStuff="FoodNStuff",e.Sector12FourSigma="Four Sigma",e.Sector12IcarusMicrosystems="Icarus Microsystems",e.Sector12IronGym="Iron Gym",e.Sector12JoesGuns="Joe's Guns",e.Sector12MegaCorp="MegaCorp",e.Sector12NSA="National Security Agency",e.Sector12PowerhouseGym="Powerhouse Gym",e.Sector12RothmanUniversity="Rothman University",e.Sector12UniversalEnergy="Universal Energy",e.NewTokyoDefComm="DefComm",e.NewTokyoGlobalPharmaceuticals="Global Pharmaceuticals",e.NewTokyoNoodleBar="Noodle Bar",e.NewTokyoVitaLife="VitaLife",e.IshimaNovaMedical="Nova Medical",e.IshimaOmegaSoftware="Omega Software",e.IshimaStormTechnologies="Storm Technologies",e.VolhavenCompuTek="CompuTek",e.VolhavenHeliosLabs="Helios Labs",e.VolhavenLexoCorp="LexoCorp",e.VolhavenMilleniumFitnessGym="Millenium Fitness Gym",e.VolhavenNWO="NWO",e.VolhavenOmniTekIncorporated="OmniTek Incorporated",e.VolhavenOmniaCybersystems="Omnia Cybersystems",e.VolhavenSysCoreSecurities="SysCore Securities",e.VolhavenZBInstituteOfTechnology="ZB Institute of Technology",e.Hospital="Hospital",e.Slums="The Slums",e.TravelAgency="Travel Agency",e.WorldStockExchange="World Stock Exchange",e.Void="The Void"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(20),r=a(14),i=a(0),o=a.n(i);function s(e){return o.a.createElement(o.a.Fragment,null,e.content)}function l(e,t=!1){const a="popup-"+Array.from(Array(16)).map(()=>""+Object(r.a)(0,9)).join("");"string"==typeof e?t?Object(n.a)(a,s,{content:o.a.createElement("pre",{dangerouslySetInnerHTML:{__html:e}})}):Object(n.a)(a,s,{content:o.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"
")}})}):Object(n.a)(a,s,{content:e})}},function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"f",(function(){return o})),a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"d",(function(){return u}));var n=a(225),r=a(120);function i(e){u(e)}function o(e){u("ERROR: "+e,{color:"#ff2929"})}function s(e){u(e,{id:"hack-progress-bar"})}function l(e){u(e,{id:"hack-progress"})}function c(e){u(Object(n.renderToStaticMarkup)(e))}function u(e,t={}){const a=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,n=`${e}`;Object(r.a)("terminal-input").insertAdjacentHTML("beforebegin",n),function(){const e=Object(r.a)("terminal-container");e.scrollTop=e.scrollHeight}()}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return i}));const n={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},r={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>n.ScriptScanRamCost,hack:()=>n.ScriptHackRamCost,hackAnalyzeThreads:()=>n.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>n.ScriptHackAnalyzeRamCost,hackChance:()=>n.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>n.ScriptGrowRamCost,growthAnalyze:()=>n.ScriptGrowthAnalyzeRamCost,weaken:()=>n.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>n.ScriptPortProgramRamCost,brutessh:()=>n.ScriptPortProgramRamCost,ftpcrack:()=>n.ScriptPortProgramRamCost,relaysmtp:()=>n.ScriptPortProgramRamCost,httpworm:()=>n.ScriptPortProgramRamCost,sqlinject:()=>n.ScriptPortProgramRamCost,run:()=>n.ScriptRunRamCost,exec:()=>n.ScriptExecRamCost,spawn:()=>n.ScriptSpawnRamCost,kill:()=>n.ScriptKillRamCost,killall:()=>n.ScriptKillRamCost,exit:()=>0,scp:()=>n.ScriptScpRamCost,ls:()=>n.ScriptScanRamCost,ps:()=>n.ScriptScanRamCost,hasRootAccess:()=>n.ScriptHasRootAccessRamCost,getIp:()=>n.ScriptGetHostnameRamCost,getHostname:()=>n.ScriptGetHostnameRamCost,getHackingLevel:()=>n.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>n.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>n.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>n.ScriptGetMultipliersRamCost,getServer:()=>n.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>n.ScriptGetServerRamCost,getServerSecurityLevel:()=>n.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>n.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>n.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>n.ScriptGetServerRamCost,getServerMaxMoney:()=>n.ScriptGetServerRamCost,getServerGrowth:()=>n.ScriptGetServerRamCost,getServerNumPortsRequired:()=>n.ScriptGetServerRamCost,getServerRam:()=>n.ScriptGetServerRamCost,getServerMaxRam:()=>n.ScriptGetServerMaxRam,getServerUsedRam:()=>n.ScriptGetServerUsedRam,serverExists:()=>n.ScriptGetServerRamCost,fileExists:()=>n.ScriptFileExistsRamCost,isRunning:()=>n.ScriptIsRunningRamCost,getStockSymbols:()=>n.ScriptGetStockRamCost,getStockPrice:()=>n.ScriptGetStockRamCost,getStockAskPrice:()=>n.ScriptGetStockRamCost,getStockBidPrice:()=>n.ScriptGetStockRamCost,getStockPosition:()=>n.ScriptGetStockRamCost,getStockMaxShares:()=>n.ScriptGetStockRamCost,getStockPurchaseCost:()=>n.ScriptGetStockRamCost,getStockSaleGain:()=>n.ScriptGetStockRamCost,buyStock:()=>n.ScriptBuySellStockRamCost,sellStock:()=>n.ScriptBuySellStockRamCost,shortStock:()=>n.ScriptBuySellStockRamCost,sellShort:()=>n.ScriptBuySellStockRamCost,placeOrder:()=>n.ScriptBuySellStockRamCost,cancelOrder:()=>n.ScriptBuySellStockRamCost,getOrders:()=>n.ScriptBuySellStockRamCost,getStockVolatility:()=>n.ScriptBuySellStockRamCost,getStockForecast:()=>n.ScriptBuySellStockRamCost,purchase4SMarketData:()=>n.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>n.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>n.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>n.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>n.ScriptGetPurchaseServerRamCost,purchaseServer:()=>n.ScriptPurchaseServerRamCost,deleteServer:()=>n.ScriptPurchaseServerRamCost,getPurchasedServers:()=>n.ScriptPurchaseServerRamCost,write:()=>n.ScriptReadWriteRamCost,tryWrite:()=>n.ScriptReadWriteRamCost,read:()=>n.ScriptReadWriteRamCost,peek:()=>n.ScriptReadWriteRamCost,clear:()=>n.ScriptReadWriteRamCost,getPortHandle:()=>10*n.ScriptReadWriteRamCost,rm:()=>n.ScriptReadWriteRamCost,scriptRunning:()=>n.ScriptArbScriptRamCost,scriptKill:()=>n.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>n.ScriptGetScriptRamCost,getHackTime:()=>n.ScriptGetHackTimeRamCost,getGrowTime:()=>n.ScriptGetHackTimeRamCost,getWeakenTime:()=>n.ScriptGetHackTimeRamCost,getScriptIncome:()=>n.ScriptGetScriptRamCost,getScriptExpGain:()=>n.ScriptGetScriptRamCost,getRunningScript:()=>n.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>n.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>n.ScriptGetFavorToDonate,universityCourse:()=>n.ScriptSingularityFn1RamCost,gymWorkout:()=>n.ScriptSingularityFn1RamCost,travelToCity:()=>n.ScriptSingularityFn1RamCost,purchaseTor:()=>n.ScriptSingularityFn1RamCost,purchaseProgram:()=>n.ScriptSingularityFn1RamCost,getCurrentServer:()=>n.ScriptSingularityFn1RamCost,connect:()=>n.ScriptSingularityFn1RamCost,manualHack:()=>n.ScriptSingularityFn1RamCost,installBackdoor:()=>n.ScriptSingularityFn1RamCost,getStats:()=>n.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>n.ScriptSingularityFn1RamCost/4,getPlayer:()=>n.ScriptSingularityFn1RamCost/4,hospitalize:()=>n.ScriptSingularityFn1RamCost/4,isBusy:()=>n.ScriptSingularityFn1RamCost/4,stopAction:()=>n.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>n.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>n.ScriptSingularityFn2RamCost/2,workForCompany:()=>n.ScriptSingularityFn2RamCost,applyToCompany:()=>n.ScriptSingularityFn2RamCost,getCompanyRep:()=>n.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>n.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>n.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>n.ScriptSingularityFn2RamCost,joinFaction:()=>n.ScriptSingularityFn2RamCost,workForFaction:()=>n.ScriptSingularityFn2RamCost,getFactionRep:()=>n.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>n.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>n.ScriptSingularityFn2RamCost/4,donateToFaction:()=>n.ScriptSingularityFn3RamCost,createProgram:()=>n.ScriptSingularityFn3RamCost,commitCrime:()=>n.ScriptSingularityFn3RamCost,getCrimeChance:()=>n.ScriptSingularityFn3RamCost,getCrimeStats:()=>n.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>n.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>n.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>n.ScriptSingularityFn3RamCost,getAugmentationCost:()=>n.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>n.ScriptSingularityFn3RamCost,getAugmentationPrice:()=>n.ScriptSingularityFn3RamCost/2,getAugmentationRepReq:()=>n.ScriptSingularityFn3RamCost/2,getAugmentationStats:()=>n.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>n.ScriptSingularityFn3RamCost,softReset:()=>n.ScriptSingularityFn3RamCost,installAugmentations:()=>n.ScriptSingularityFn3RamCost,gang:{createGang:()=>n.ScriptGangApiBaseRamCost/4,inGang:()=>n.ScriptGangApiBaseRamCost/4,getMemberNames:()=>n.ScriptGangApiBaseRamCost/4,getGangInformation:()=>n.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>n.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>n.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>n.ScriptGangApiBaseRamCost/4,recruitMember:()=>n.ScriptGangApiBaseRamCost/2,getTaskNames:()=>n.ScriptGangApiBaseRamCost/4,getTaskStats:()=>n.ScriptGangApiBaseRamCost/4,setMemberTask:()=>n.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>n.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>n.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>n.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>n.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>n.ScriptGangApiBaseRamCost,ascendMember:()=>n.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>n.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>n.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>n.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>n.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>n.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>n.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>n.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>n.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>n.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>n.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>n.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>n.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>n.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>n.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>n.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>n.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>n.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>n.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>n.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>n.ScriptBladeburnerApiBaseRamCost,getRank:()=>n.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>n.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>n.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>n.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>n.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>n.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>n.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>n.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>n.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>n.ScriptBladeburnerApiBaseRamCost,getCity:()=>n.ScriptBladeburnerApiBaseRamCost,switchCity:()=>n.ScriptBladeburnerApiBaseRamCost,getStamina:()=>n.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>n.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>n.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>n.ScriptCodingContractBaseRamCost,getContractType:()=>n.ScriptCodingContractBaseRamCost/2,getData:()=>n.ScriptCodingContractBaseRamCost/2,getDescription:()=>n.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>n.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>n.ScriptSleeveBaseRamCost,setToShockRecovery:()=>n.ScriptSleeveBaseRamCost,setToSynchronize:()=>n.ScriptSleeveBaseRamCost,setToCommitCrime:()=>n.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>n.ScriptSleeveBaseRamCost,travel:()=>n.ScriptSleeveBaseRamCost,setToCompanyWork:()=>n.ScriptSleeveBaseRamCost,setToFactionWork:()=>n.ScriptSleeveBaseRamCost,setToGymWorkout:()=>n.ScriptSleeveBaseRamCost,getSleeveStats:()=>n.ScriptSleeveBaseRamCost,getTask:()=>n.ScriptSleeveBaseRamCost,getInformation:()=>n.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>n.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>n.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>n.ScriptSleeveBaseRamCost},heart:{break:()=>0}};function i(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let t=r[e[0]];for(let a=1;a{let t=""+e%1e3;for(;t.length<3;)t="0"+t;return t})();let u="";return n>0&&(u+=n+" days "),i>0&&(u+=i+" hours "),s>0&&(u+=s+" minutes "),u+=(t?`${l}.${c}`:""+l)+" seconds",u}function o(e){if(!s(e))return"";if(0===e.length)return"";const t=e.concat().sort(),a=t[0],n=t[t.length-1],r=a.length;let i=0;for(;i{m(e),s&&s()}}),u),u}function m(e){const t=document.getElementById(""+e);null!=t&&(r.unmountComponentAtNode(t),Object(s.a)(e),Object(s.a)(e+"-close"),e===c&&(c=""))}},function(e,t,a){"use strict";a.d(t,"b",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"c",(function(){return m})),a.d(t,"a",(function(){return h})),a.d(t,"d",(function(){return p})),a.d(t,"g",(function(){return d})),a.d(t,"f",(function(){return g}));var n=a(121),r=a(44),i=a(464),o=a(169),s=a(14),l=a(12);let c={};function u(e){return null!=c[e]}function m(){const e=Object(o.a)();return u(e)?Object(o.a)():e}function h(e){const t=e.ip;if(u(t))throw console.warn("IP of server that's being added: "+t),console.warn("Hostname of the server thats being added: "+e.hostname),console.warn("The server that already has this IP is: "+c[t].hostname),new Error("Error: Trying to add a server with an existing IP");c[t]=e}function p(e){const t=[];for(let e=0;e<15;e++)t.push([]);const a=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],o=e=>{switch(typeof e){case"number":return e;case"object":return Object(s.a)(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.a){const i={hostname:e.hostname,ip:m(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of a)void 0!==e[t]&&(i[t]=o(e[t]));const s=new n.a(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&r.a.addIp(e.specialName,s.ip),h(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{for(const r of e)a=r,n=t(),a.serversOnNetwork.push(n.ip),n.serversOnNetwork.push(a.ip);var a,n};l(t[0],()=>e);for(let e=1;e{return(a=t[e-1])[Math.floor(Math.random()*a.length)];var a})}function d(){for(const e in c)delete c[e];c={}}function g(e){c=JSON.parse(e,l.c)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(5),i=a(18),o=a(2),s=a(10),l=a(12);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class u{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){c(this,"baseCost",0),c(this,"baseRepRequirement",0),c(this,"isSpecial",!1),c(this,"level",0),c(this,"name",""),c(this,"owned",!1),c(this,"prereqs",[]),c(this,"mults",{}),c(this,"startingCost",0),this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*r.a.AugmentationRepCost,this.baseCost=e.moneyCost*r.a.AugmentationMoneyCost,this.startingCost=this.baseCost,e.isSpecial&&(this.isSpecial=!0),this.level=0,e.hacking_mult&&(this.mults.hacking_mult=e.hacking_mult),e.strength_mult&&(this.mults.strength_mult=e.strength_mult),e.defense_mult&&(this.mults.defense_mult=e.defense_mult),e.dexterity_mult&&(this.mults.dexterity_mult=e.dexterity_mult),e.agility_mult&&(this.mults.agility_mult=e.agility_mult),e.charisma_mult&&(this.mults.charisma_mult=e.charisma_mult),e.hacking_exp_mult&&(this.mults.hacking_exp_mult=e.hacking_exp_mult),e.strength_exp_mult&&(this.mults.strength_exp_mult=e.strength_exp_mult),e.defense_exp_mult&&(this.mults.defense_exp_mult=e.defense_exp_mult),e.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=e.dexterity_exp_mult),e.agility_exp_mult&&(this.mults.agility_exp_mult=e.agility_exp_mult),e.charisma_exp_mult&&(this.mults.charisma_exp_mult=e.charisma_exp_mult),e.hacking_chance_mult&&(this.mults.hacking_chance_mult=e.hacking_chance_mult),e.hacking_speed_mult&&(this.mults.hacking_speed_mult=e.hacking_speed_mult),e.hacking_money_mult&&(this.mults.hacking_money_mult=e.hacking_money_mult),e.hacking_grow_mult&&(this.mults.hacking_grow_mult=e.hacking_grow_mult),e.company_rep_mult&&(this.mults.company_rep_mult=e.company_rep_mult),e.faction_rep_mult&&(this.mults.faction_rep_mult=e.faction_rep_mult),e.crime_money_mult&&(this.mults.crime_money_mult=e.crime_money_mult),e.crime_success_mult&&(this.mults.crime_success_mult=e.crime_success_mult),e.work_money_mult&&(this.mults.work_money_mult=e.work_money_mult),e.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=e.hacknet_node_money_mult),e.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=e.hacknet_node_purchase_cost_mult),e.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=e.hacknet_node_ram_cost_mult),e.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=e.hacknet_node_core_cost_mult),e.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=e.hacknet_node_level_cost_mult),e.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=e.bladeburner_max_stamina_mult),e.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=e.bladeburner_stamina_gain_mult),e.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=e.bladeburner_analysis_mult),e.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=e.bladeburner_success_chance_mult),e.stats?this.stats=e.stats:this.stats=function(e,t,a){const r=(e,t=0)=>e===1.0777-1?"7.77%":e===1.777-1?"77.7%":o.a.formatPercentage(e,t);let i=n.createElement(n.Fragment,null,"Effects:");return e.hacking_mult&&e.hacking_mult==e.strength_mult&&e.hacking_mult==e.defense_mult&&e.hacking_mult==e.dexterity_mult&&e.hacking_mult==e.agility_mult&&e.hacking_mult==e.charisma_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_mult-1)," all skills"):(e.hacking_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_mult-1)," hacking skill")),e.strength_mult&&e.strength_mult==e.defense_mult&&e.strength_mult==e.dexterity_mult&&e.strength_mult==e.agility_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.strength_mult-1)," combat skills"):(e.strength_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.strength_mult-1)," strength skill")),e.defense_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.defense_mult-1)," defense skill")),e.dexterity_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.dexterity_mult-1)," dexterity skill")),e.agility_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.agility_mult-1)," agility skill"))),e.charisma_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.charisma_mult-1)," Charisma skill"))),e.hacking_exp_mult&&e.hacking_exp_mult===e.strength_exp_mult&&e.hacking_exp_mult===e.defense_exp_mult&&e.hacking_exp_mult===e.dexterity_exp_mult&&e.hacking_exp_mult===e.agility_exp_mult&&e.hacking_exp_mult===e.charisma_exp_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_exp_mult-1)," exp for all skills"):(e.hacking_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_exp_mult-1)," hacking exp")),e.strength_exp_mult&&e.strength_exp_mult===e.defense_exp_mult&&e.strength_exp_mult===e.dexterity_exp_mult&&e.strength_exp_mult===e.agility_exp_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.strength_exp_mult-1)," combat exp"):(e.strength_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.strength_exp_mult-1)," strength exp")),e.defense_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.defense_exp_mult-1)," defense exp")),e.dexterity_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.dexterity_exp_mult-1)," dexterity exp")),e.agility_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.agility_exp_mult-1)," agility exp"))),e.charisma_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.charisma_exp_mult-1)," charisma exp"))),e.hacking_speed_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_speed_mult-1)," faster hack(), grow(), and weaken()")),e.hacking_chance_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_chance_mult-1)," hack() success chance")),e.hacking_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_money_mult-1)," hack() power")),e.hacking_grow_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacking_grow_mult-1)," grow() power")),e.faction_rep_mult&&e.faction_rep_mult===e.company_rep_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.faction_rep_mult-1)," reputation from factions and companies"):(e.faction_rep_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.faction_rep_mult-1)," reputation from factions")),e.company_rep_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.company_rep_mult-1)," reputation from companies"))),e.crime_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.crime_money_mult-1)," crime money")),e.crime_success_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.crime_success_mult-1)," crime success rate")),e.work_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.work_money_mult-1)," work money")),e.hacknet_node_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.hacknet_node_money_mult-1)," hacknet production")),e.hacknet_node_purchase_cost_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"-",r(-(e.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),e.hacknet_node_level_cost_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"-",r(-(e.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),e.bladeburner_max_stamina_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),e.bladeburner_stamina_gain_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),e.bladeburner_analysis_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),e.bladeburner_success_chance_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(e.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),a&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"Start with ",n.createElement(s.a,{money:a})," after installing Augmentations.")),t&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"Start with ",t.join(" and ")," after installing Augmentations.")),i}(this.mults,e.programs,e.startingMoney)}addToFactions(e){for(let t=0;t0&&(ye._lastUpdate=e-a,L.a.lastUpdate=e-a,ye.updateGame(t)),window.requestAnimationFrame(ye.idleTimer)},updateGame:function(e=1){const t=e*ye._idleSpeed;null==L.a.totalPlaytime&&(L.a.totalPlaytime=0),null==L.a.playtimeSinceLastAug&&(L.a.playtimeSinceLastAug=0),null==L.a.playtimeSinceLastBitnode&&(L.a.playtimeSinceLastBitnode=0),L.a.totalPlaytime+=t,L.a.playtimeSinceLastAug+=t,L.a.playtimeSinceLastBitnode+=t,!0===Y.a.actionStarted&&(ye._totalActionTime=Y.a.actionTime,ye._actionTimeLeft=Y.a.actionTime,ye._actionInProgress=!0,ye._actionProgressBarCount=1,ye._actionProgressStr="[ ]",ye._actionTimeStr="Time left: ",Y.a.actionStarted=!1),L.a.isWorking&&(L.a.workType==d.a.WorkTypeFaction?L.a.workForFaction(e):L.a.workType==d.a.WorkTypeCreateProgram?L.a.createProgramWork(e):L.a.workType==d.a.WorkTypeStudyClass?L.a.takeClass(e):L.a.workType==d.a.WorkTypeCrime?L.a.commitCrime(e):L.a.workType==d.a.WorkTypeCompanyPartTime?L.a.workPartTime(e):L.a.work(e)),L.a.hasWseAccount&&Object($.j)(e),L.a.inGang()&&L.a.gang.process(e,L.a),D.c&&D.b&&D.b.process(e),L.a.corporation instanceof p.a&&L.a.corporation.storeCycles(e),L.a.bladeburner instanceof l.a&&L.a.bladeburner.storeCycles(e);for(let t=0;t0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ye.Counters.createProgramNotifications=10}if(ye.Counters.augmentationsNotifications<=0){e=L.a.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ye.Counters.augmentationsNotifications=10}if(ye.Counters.checkFactionInvitations<=0){var a=L.a.checkForFactionInvitations();if(a.length>0){!1===L.a.firstFacInvRecvd&&(L.a.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var n=a[Math.floor(Math.random()*a.length)];Object(y.d)(n)}const e=L.a.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ye.Counters.checkFactionInvitations=100}if(ye.Counters.passiveFactionGrowth<=0){var i=Math.floor(5-ye.Counters.passiveFactionGrowth);Object(y.f)(i),ye.Counters.passiveFactionGrowth=5}if(ye.Counters.messages<=0&&(Object(R.b)(),r.a[o.a.TheRedPill].owned?ye.Counters.messages=4500:ye.Counters.messages=150),ye.Counters.mechanicProcess<=0){if(L.a.corporation instanceof p.a&&L.a.corporation.process(L.a),L.a.bladeburner instanceof l.a)try{L.a.bladeburner.process(L.a)}catch(e){Object(ue.a)("Exception caught in Bladeburner.process(): "+e)}ye.Counters.mechanicProcess=5}ye.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(m.b)(),ye.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*ye._idleSpeed;ye._actionTimeLeft-=t/1e3,ye._actionTimeLeft=Math.max(ye._actionTimeLeft,0);for(var a=Math.round(100*(1-ye._actionTimeLeft/ye._totalActionTime));2*ye._actionProgressBarCount<=a;)ye._actionProgressStr=Object(n.f)(ye._actionProgressStr,ye._actionProgressBarCount,"|"),ye._actionProgressBarCount+=1;ye._actionTimeStr="Time left: "+Math.max(0,Math.round(ye._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=ye._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=ye._actionProgressStr.replace(/ /g," "),a>=100&&(ye._actionInProgress=!1,Y.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;ts.a.ServerMaxGrowthRate&&(n=s.a.ServerMaxGrowthRate);const r=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*a.hacking_grow_mult*r*o.a.ServerGrowthRate)}function d(e,t,a,n=1){let r=Object(i.a)(e,t,a,n);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const o=e.moneyAvailable;if(e.moneyAvailable*=r,Object(u.a)(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),Object(u.a)(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),o!==e.moneyAvailable){let t=p(e,e.moneyAvailable/o,a);t=Math.max(0,t),e.fortify(2*s.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/o}function g(e){const t=e.programs.includes(l.a.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.a.NukeProgram.name),t&&e.programs.push(l.a.BitFlume.name),e.scripts.forEach((function(t){t.updateRamUsage(e.scripts)})),e.messages.length=0,e.messages.push(c.a.HackersStartingHandbook)}function f(e){for(const t in n.b)if(n.b.hasOwnProperty(t)&&n.b[t].hostname==e)return n.b[t];return null}function y(e){return Object(m.a)(e)?void 0!==n.b[e]?n.b[e]:null:f(e)}function _(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):n.b[e.serversOnNetwork[t]]}function b(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o}));var n=a(59);const r=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})(),i={Terminal:r,ScriptEditor:r,ActiveScripts:r,CreateProgram:r,Stats:r,Factions:r,Augmentations:r,HacknetNodes:r,Sleeves:r,City:r,Travel:r,Job:r,StockMarket:r,Bladeburner:r,Corporation:r,Gang:r,Milestones:r,Tutorial:r,Options:r,DevMenu:r};function o(){try{function e(e){const t=Object(n.a)(e);if(null==t)throw new Error("clearEventListeners() failed for element with id: "+e);return t}i.Terminal=e("terminal-menu-link"),i.ScriptEditor=e("create-script-menu-link"),i.ActiveScripts=e("active-scripts-menu-link"),i.CreateProgram=e("create-program-menu-link"),i.Stats=e("stats-menu-link"),i.Factions=e("factions-menu-link"),i.Augmentations=e("augmentations-menu-link"),i.HacknetNodes=e("hacknet-nodes-menu-link"),i.Sleeves=e("sleeves-menu-link"),i.City=e("city-menu-link"),i.Travel=e("travel-menu-link"),i.Job=e("job-menu-link"),i.StockMarket=e("stock-market-menu-link"),i.Bladeburner=e("bladeburner-menu-link"),i.Corporation=e("corporation-menu-link"),i.Gang=e("gang-menu-link"),i.Milestones=e("milestones-menu-link"),i.Tutorial=e("tutorial-menu-link");const t=document.getElementById("options-menu-link");if(null===t)throw new Error('Could not find element with id: "options-menu-link"');return i.Options=t,i.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error("Failed to initialize Main Menu Links: "+e),!1}}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(438),r=a(439);const i={};for(const e of r.a)i[e.key]=new n.a(e.name,e.create)},function(e,t,a){"use strict";let n;a.d(t,"a",(function(){return n})),function(e){e[e.Company=0]="Company",e[e.Gym=1]="Gym",e[e.Hospital=2]="Hospital",e[e.Slums=3]="Slums",e[e.Special=4]="Special",e[e.StockMarket=5]="StockMarket",e[e.TechVendor=6]="TechVendor",e[e.TravelAgency=7]="TravelAgency",e[e.University=8]="University",e[e.Casino=9]="Casino"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"e",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(72);const s={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},l={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},c={Energy:e=>r.a.createElement(r.a.Fragment,null,"Engage in the production and distribution of energy.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Energy,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Utilities:e=>r.a.createElement(r.a.Fragment,null,"Distribute water and provide wastewater services.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Utilities,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Agriculture:e=>r.a.createElement(r.a.Fragment,null,"Cultivate crops and breed livestock to produce food.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Agriculture,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Fishing:e=>r.a.createElement(r.a.Fragment,null,"Produce food through the breeding and processing of fish and fish products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Fishing,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Mining:e=>r.a.createElement(r.a.Fragment,null,"Extract and process metals from the earth.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Mining,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Food:e=>r.a.createElement(r.a.Fragment,null,"Create your own restaurants all around the world.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Food,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Tobacco:e=>r.a.createElement(r.a.Fragment,null,"Create and distribute tobacco and tobacco-related products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Tobacco,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Chemical:e=>r.a.createElement(r.a.Fragment,null,"Produce industrial chemicals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Chemical,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Pharmaceutical:e=>r.a.createElement(r.a.Fragment,null,"Discover, develop, and create new pharmaceutical drugs.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Pharmaceutical,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Computer:e=>r.a.createElement(r.a.Fragment,null,"Develop and manufacture new computer hardware and networking infrastructures.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Computer,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Robotics:e=>r.a.createElement(r.a.Fragment,null,"Develop and create robots.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Robotics,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Software:e=>r.a.createElement(r.a.Fragment,null,"Develop computer software and create AI Cores.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Software,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Healthcare:e=>r.a.createElement(r.a.Fragment,null,"Create and manage hospitals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Healthcare,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO"),RealEstate:e=>r.a.createElement(r.a.Fragment,null,"Develop and manage real estate properties.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.RealEstate,corp:e}),r.a.createElement("br",null),"Recommended starting Industry: NO")},u={Energy:Object(i.a)(),Utilities:Object(i.a)(),Agriculture:Object(i.a)(),Fishing:Object(i.a)(),Mining:Object(i.a)(),Food:Object(i.b)(),Tobacco:Object(i.b)(),Chemical:Object(i.a)(),Pharmaceutical:Object(i.b)(),Computer:Object(i.b)(),Robotics:Object(i.b)(),Software:Object(i.b)(),Healthcare:Object(i.b)(),RealEstate:Object(i.b)()};function m(){u.Energy=Object(i.a)(),u.Utilities=Object(i.a)(),u.Agriculture=Object(i.a)(),u.Fishing=Object(i.a)(),u.Mining=Object(i.a)(),u.Food=Object(i.a)(),u.Tobacco=Object(i.a)(),u.Chemical=Object(i.a)(),u.Pharmaceutical=Object(i.a)(),u.Computer=Object(i.a)(),u.Robotics=Object(i.a)(),u.Software=Object(i.a)(),u.Healthcare=Object(i.a)(),u.RealEstate=Object(i.a)()}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={CityNames:["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],CyclesPerSecond:5,StaminaGainPerSecond:.0085,BaseStaminaLoss:.285,MaxStaminaToGainFactor:7e4,DifficultyToTimeFactor:10,DiffMultExponentialFactor:.28,DiffMultLinearFactor:650,EffAgiLinearFactor:1e4,EffDexLinearFactor:1e4,EffAgiExponentialFactor:.04,EffDexExponentialFactor:.035,BaseRecruitmentTimeNeeded:300,PopulationThreshold:1e9,PopulationExponent:.7,ChaosThreshold:50,BaseStatGain:1,BaseIntGain:.003,ActionCountGrowthPeriod:480,RankToFactionRepFactor:2,RankNeededForFaction:25,ContractSuccessesPerLevel:3,OperationSuccessesPerLevel:2.5,RanksPerSkillPoint:3,ContractBaseMoneyGain:25e4,HrcHpGain:2,HrcStaminaGain:1}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={HackersStartingHandbook:"hackers-starting-handbook.lit",CorporationManagementHandbook:"corporation-management-handbook.lit",HistoryOfSynthoids:"history-of-synthoids.lit",AGreenTomorrow:"A-Green-Tomorrow.lit",AlphaOmega:"alpha-omega.lit",SimulatedReality:"simulated-reality.lit",BeyondMan:"beyond-man.lit",BrighterThanTheSun:"brighter-than-the-sun.lit",DemocracyIsDead:"democracy-is-dead.lit",Sector12Crime:"sector-12-crime.lit",ManAndMachine:"man-and-machine.lit",SecretSocieties:"secret-societies.lit",TheFailedFrontier:"the-failed-frontier.lit",CodedIntelligence:"coded-intelligence.lit",SyntheticMuscles:"synthetic-muscles.lit",TensionsInTechRace:"tensions-in-tech-race.lit",CostOfImmortality:"cost-of-immortality.lit",TheHiddenWorld:"the-hidden-world.lit",TheNewGod:"the-new-god.lit",NewTriads:"new-triads.lit",TheSecretWar:"the-secret-war.lit"}},function(e,t,a){"use strict";a.d(t,"g",(function(){return f})),a.d(t,"l",(function(){return y})),a.d(t,"h",(function(){return _})),a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return E})),a.d(t,"e",(function(){return v})),a.d(t,"f",(function(){return k})),a.d(t,"d",(function(){return C})),a.d(t,"c",(function(){return O})),a.d(t,"n",(function(){return w})),a.d(t,"o",(function(){return S})),a.d(t,"k",(function(){return T})),a.d(t,"j",(function(){return M})),a.d(t,"i",(function(){return x})),a.d(t,"p",(function(){return A})),a.d(t,"m",(function(){return R}));var n=a(177),r=a(145),i=a(126),o=a(25),s=a(89),l=a(202),c=a(155),u=a(203),m=a(57),h=a(21),p=a(30),d=a(121),g=a(43);function f(e){return 9===e.bitNodeN||g.a[9]>0}function y(e){if(m.a.isRunning){if(m.a.currStep!==m.d.HacknetNodesIntroduction)return-1;Object(m.b)()}const t=e.hacknetNodes.length;if(f(e)){const a=E(e);if(isNaN(a))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return e.canAfford(a)?(e.loseMoney(a),e.createHacknetServer(),A(e),t):-1}{const a=b(e);if(isNaN(a))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!e.canAfford(a))return-1;const r="hacknet-node-"+t,i=new n.a(r,e.hacknet_node_money_mult);return e.loseMoney(a),e.hacknetNodes.push(i),t}}function _(e){return f(e)&&e.hacknetNodes.length>=o.b.MaxServers}function b(e){return Object(r.d)(e.hacknetNodes.length+1,e.hacknet_node_purchase_cost_mult)}function E(e){return Object(i.f)(e.hacknetNodes.length+1,e.hacknet_node_purchase_cost_mult)}function v(e,t,a){if(null==a)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(e.money.lt(t.calculateLevelUpgradeCost(1,e.hacknet_node_level_cost_mult)))return 0;let n=1,r=a-1;const i=a-t.level;if(e.money.gt(t.calculateLevelUpgradeCost(i,e.hacknet_node_level_cost_mult)))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!==a&&e.money.gt(t.calculateLevelUpgradeCost(o,e.hacknet_node_level_cost_mult))&&e.money.lt(t.calculateLevelUpgradeCost(o+1,e.hacknet_node_level_cost_mult)))return Math.min(i,o);if(e.money.lt(t.calculateLevelUpgradeCost(o,e.hacknet_node_level_cost_mult)))r=o-1;else{if(!e.money.gt(t.calculateLevelUpgradeCost(o,e.hacknet_node_level_cost_mult)))return Math.min(i,o);n=o+1}}return 0}function k(e,t,a){if(null==a)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(e.money.lt(t.calculateRamUpgradeCost(1,e.hacknet_node_ram_cost_mult)))return 0;let n;if(n=t instanceof s.a?Math.round(Math.log2(a/t.maxRam)):Math.round(Math.log2(a/t.ram)),e.money.gt(t.calculateRamUpgradeCost(n,e.hacknet_node_ram_cost_mult)))return n;for(let a=n-1;a>=0;--a)if(e.money.gt(t.calculateRamUpgradeCost(a,e.hacknet_node_ram_cost_mult)))return a;return 0}function C(e,t,a){if(null==a)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(e.money.lt(t.calculateCoreUpgradeCost(1,e.hacknet_node_core_cost_mult)))return 0;let n=1,r=a-1;const i=a-t.cores;if(e.money.gt(t.calculateCoreUpgradeCost(i,e.hacknet_node_core_cost_mult)))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!=a&&e.money.gt(t.calculateCoreUpgradeCost(o,e.hacknet_node_core_cost_mult))&&e.money.lt(t.calculateCoreUpgradeCost(o+1,e.hacknet_node_core_cost_mult)))return Math.min(i,o);if(e.money.lt(t.calculateCoreUpgradeCost(o,e.hacknet_node_core_cost_mult)))r=o-1;else{if(!e.money.gt(t.calculateCoreUpgradeCost(o,e.hacknet_node_core_cost_mult)))return Math.min(i,o);n=o+1}}return 0}function O(e,t,a){if(null==a)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!e.canAfford(t.calculateCacheUpgradeCost(1)))return 0;let n=1,r=a-1;const i=a-t.cache;if(e.canAfford(t.calculateCacheUpgradeCost(i)))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!=a&&e.canAfford(t.calculateCacheUpgradeCost(o))&&!e.canAfford(t.calculateCacheUpgradeCost(o+1)))return Math.min(i,o);if(e.canAfford(t.calculateCacheUpgradeCost(o))){if(!e.canAfford(t.calculateCacheUpgradeCost(o)))return Math.min(i,o);n=o+1}else r=o-1}return 0}function w(e,t,a=1){const n=Math.round(a),r=t.calculateLevelUpgradeCost(n,e.hacknet_node_level_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const i=t instanceof s.a;if(t.level>=(i?o.b.MaxLevel:o.a.MaxLevel))return!1;if(t.level+n>(i?o.b.MaxLevel:o.a.MaxLevel)){return w(e,t,Math.max(0,(i?o.b.MaxLevel:o.a.MaxLevel)-t.level))}return!!e.canAfford(r)&&(e.loseMoney(r),t.upgradeLevel(n,e.hacknet_node_money_mult),!0)}function S(e,t,a=1){const r=Math.round(a),i=t.calculateRamUpgradeCost(r,e.hacknet_node_ram_cost_mult);if(isNaN(i)||i<=0||r<0)return!1;if(t instanceof s.a&&t.maxRam>=o.b.MaxRam)return!1;if(t instanceof n.a&&t.ram>=o.a.MaxRam)return!1;if(t instanceof s.a){if(t.maxRam*Math.pow(2,r)>o.b.MaxRam){return S(e,t,Math.max(0,Math.log2(Math.round(o.b.MaxRam/t.maxRam))))}}else if(t instanceof n.a&&t.ram*Math.pow(2,r)>o.a.MaxRam){return S(e,t,Math.max(0,Math.log2(Math.round(o.a.MaxRam/t.ram))))}return!!e.canAfford(i)&&(e.loseMoney(i),t.upgradeRam(r,e.hacknet_node_money_mult),!0)}function T(e,t,a=1){const n=Math.round(a),r=t.calculateCoreUpgradeCost(n,e.hacknet_node_core_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const i=t instanceof s.a;if(t.cores>=(i?o.b.MaxCores:o.a.MaxCores))return!1;if(t.cores+n>(i?o.b.MaxCores:o.a.MaxCores)){return T(e,t,Math.max(0,(i?o.b.MaxCores:o.a.MaxCores)-t.cores))}return!!e.canAfford(r)&&(e.loseMoney(r),t.upgradeCore(n,e.hacknet_node_money_mult),!0)}function M(e,t,a=1){const n=Math.round(a),r=t.calculateCacheUpgradeCost(n);if(isNaN(r)||r<=0||n<0)return!1;if(!(t instanceof s.a))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(t.cache+n>o.b.MaxCache){return M(e,t,Math.max(0,o.b.MaxCache-t.cache))}return!!e.canAfford(r)&&(e.loseMoney(r),t.upgradeCache(n),!0)}function x(e,t){return 0===e.hacknetNodes.length?0:f(e)?function(e,t){if(!(e.hashManager instanceof l.a))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let a=0;for(let r=0;r{var t;null!=o[(t=e).name]&&console.warn("Duplicate Company Position being defined: "+t.name),o[t.name]=new r.a(t)});for(const t in o){const a=o[t];e[t]instanceof r.a?(a.favor=e[t].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}}function l(e){o=JSON.parse(e,i.c)}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));var n=a(4);const r=Array(n.a.TotalNumBitNodes+1);function i(e){for(let e=0;e{var t;null!=i[(t=e).name]&&console.warn("Duplicate Company Position being defined: "+t.name),i[t.name]=new r.a(t)})},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={CTRL:17,DOWNARROW:40,ENTER:13,ESC:27,TAB:9,UPARROW:38,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(6);const r={};r[n.a.AevumECorp]="ECP",r[n.a.Sector12MegaCorp]="MGCP",r[n.a.Sector12BladeIndustries]="BLD",r[n.a.AevumClarkeIncorporated]="CLRK",r[n.a.VolhavenOmniTekIncorporated]="OMTK",r[n.a.Sector12FourSigma]="FSIG",r[n.a.ChongqingKuaiGongInternational]="KGI",r[n.a.AevumFulcrumTechnologies]="FLCM",r[n.a.IshimaStormTechnologies]="STM",r[n.a.NewTokyoDefComm]="DCOMM",r[n.a.VolhavenHeliosLabs]="HLS",r[n.a.NewTokyoVitaLife]="VITA",r[n.a.Sector12IcarusMicrosystems]="ICRS",r[n.a.Sector12UniversalEnergy]="UNV",r[n.a.AevumAeroCorp]="AERO",r[n.a.VolhavenOmniaCybersystems]="OMN",r[n.a.ChongqingSolarisSpaceSystems]="SLRS",r[n.a.NewTokyoGlobalPharmaceuticals]="GPH",r[n.a.IshimaNovaMedical]="NVMD",r[n.a.AevumWatchdogSecurity]="WDS",r[n.a.VolhavenLexoCorp]="LXO",r[n.a.AevumRhoConstruction]="RHOC",r[n.a.Sector12AlphaEnterprises]="APHE",r[n.a.VolhavenSysCoreSecurities]="SYSC",r[n.a.VolhavenCompuTek]="CTK",r[n.a.AevumNetLinkTechnologies]="NTLK",r[n.a.IshimaOmegaSoftware]="OMGA",r[n.a.Sector12FoodNStuff]="FNS",r["Sigma Cosmetics"]="SGC",r["Joes Guns"]="JGN",r["Catalyst Ventures"]="CTYS",r["Microdyne Technologies"]="MDYN",r["Titan Laboratories"]="TITN"},function(e,t,a){"use strict";a.d(t,"d",(function(){return d})),a.d(t,"c",(function(){return f})),a.d(t,"b",(function(){return _})),a.d(t,"a",(function(){return g}));var n=a(23),r=a(1),i=a(28),o=a(32),s=a(39),l=a(88),c=a(59),u=a(61),m=a(192),h=a(94);const p=["Start","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End"],d={};for(let e=0;ed.Start&&(g.currStep-=1);y()}(),!1}));Object(c.a)("interactive-tutorial-next").addEventListener("click",(function(){return _(),!1})),y()}function y(){if(!g.isRunning)return;const e=Object(c.a)("terminal-menu-link"),t=Object(c.a)("stats-menu-link"),a=Object(c.a)("active-scripts-menu-link"),r=Object(c.a)("hacknet-nodes-menu-link"),i=Object(c.a)("city-menu-link"),o=Object(c.a)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),a.removeAttribute("class"),r.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");const s=document.getElementById("interactive-tutorial-next");switch(g.currStep){case d.Start:n.Engine.loadTerminalContent(),v("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

cat "+s.a.HackersStartingHandbook}),a=Object(u.a)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(h.a)(e)}});Object(m.a)(e,[t,a]),r.a.getHomeComputer().messages.push(s.a.HackersStartingHandbook)}let E=null;function v(e){E.innerHTML=e,E.parentElement.scrollTop=0}document.addEventListener("DOMContentLoaded",(function e(){E=document.getElementById("interactive-tutorial-text"),document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return k})),a.d(t,"b",(function(){return C})),a.d(t,"i",(function(){return O})),a.d(t,"c",(function(){return w})),a.d(t,"h",(function(){return S})),a.d(t,"d",(function(){return T})),a.d(t,"f",(function(){return M})),a.d(t,"g",(function(){return x})),a.d(t,"j",(function(){return A})),a.d(t,"e",(function(){return N}));var n=a(116),r=a(355),i=a(182),o=a(78),s=a(318),l=a(479),c=a(65),u=a(45),m=a(56),h=a(480),p=a(4),d=a(1),g=a(233),f=a(27),y=a(2),_=a(7),b=a(12),E=a(0),v=a(31);let k={};const C={};function O(e,t,a,n,s,l=null){if(!(e instanceof o.a))return l?l.log("placeOrder",`Invalid stock: '${e}'`):Object(_.a)("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof t||"number"!=typeof a)return l?l.log("placeOrder",`Invalid arguments: shares='${t}' price='${a}'`):Object(_.a)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const c=new r.a(e.symbol,t,a,n,s);if(null==k.Orders){const e={};for(const t in k){const a=k[t];a instanceof o.a&&(e[a.symbol]=[])}k.Orders=e}k.Orders[e.symbol].push(c);const u={rerenderFn:N,stockMarket:k,symbolToStockMap:C};return Object(i.a)(e,c.type,c.pos,u),N(),!0}function w(e,t=null){if(null==k.Orders)return!1;if(e.order&&e.order instanceof r.a){const t=e.order,a=k.Orders[t.stockSymbol];for(let e=0;e=t.cap&&(r=.1,t.b=!1),isNaN(r)&&(r=.5);const s=Math.random(),l={rerenderFn:N,stockMarket:k,symbolToStockMap:C};s{Object(i.a)(e,o.a,{c:this,popupId:e,onClose:()=>{t(u.Cancelled),Object(i.b)(e)},onAttempt:a=>{console.error("attempting"),this.isSolution(a)?t(u.Success):t(u.Failure),Object(i.b)(e)}},()=>t(u.Cancelled))})}toJSON(){return Object(r.b)("CodingContract",this)}static fromJSON(e){return Object(r.a)(m,e.data)}}r.c.constructors.CodingContract=m},function(e,t,a){"use strict";let n;a.d(t,"a",(function(){return n})),function(e){e.LimitBuy="Limit Buy Order",e.LimitSell="Limit Sell Order",e.StopBuy="Stop Buy Order",e.StopSell="Stop Sell Order"}(n||(n={}))},function(e,t,a){"use strict";function n(e){return"string"==typeof e||e instanceof String}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return o})),a.d(t,"e",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"f",(function(){return u}));var n=a(5),r=a(216);function i(e,t){const a=(100-e.hackDifficulty)/100,n=1.75*t.hacking_skill,i=(n-e.requiredHackingSkill)/n*a*t.hacking_chance_mult*Object(r.a)(t.intelligence,1);return i>1?1:i<0?0:i}function o(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let a=3;return a+=e.baseDifficulty*t.hacking_exp_mult*.3,a*n.a.HackExpGain}function s(e,t){const a=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return a<0?0:a>1?1:a*n.a.ScriptHackMoney}function l(e,t){let a=2.5*(e.requiredHackingSkill*e.hackDifficulty)+500;a/=t.hacking_skill+50;return 5*a/(t.hacking_speed_mult*Object(r.a)(t.intelligence,1))}function c(e,t){return 3.2*l(e,t)}function u(e,t){return 4*l(e,t)}},function(e,t,a){"use strict";a.d(t,"d",(function(){return T})),a.d(t,"e",(function(){return M})),a.d(t,"a",(function(){return P})),a.d(t,"h",(function(){return A})),a.d(t,"c",(function(){return R})),a.d(t,"g",(function(){return D})),a.d(t,"b",(function(){return I})),a.d(t,"f",(function(){return N}));var n=a(0),r=a.n(n),i=a(31),o=a.n(i),s=a(440),l=a(15),c=a(96),u=a(189),m=a(3),h=a(5),p=a(4),d=a(23),g=a(103),f=a(18),y=a(97),_=a(1),b=a(28),E=a(137),v=a(43),k=a(27),C=a(7),O=a(458),w=a(10),S=a(47);function T(e){b.a.SuppressFactionInvites?(e.alreadyInvited=!0,_.a.factionInvitations.push(e.name),k.b.isOn(k.a.Factions)&&d.Engine.loadFactionsContent()):Object(O.a)(e)}function M(e){if(e.isMember)return;e.isMember=!0,_.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const a=t.enemies[e];f.a[a]instanceof g.a&&(f.a[a].isBanned=!0)}for(var a=0;a<_.a.factionInvitations.length;++a)(_.a.factionInvitations[a]==e.name||f.a[_.a.factionInvitations[a]].isBanned)&&(_.a.factionInvitations.splice(a,1),a--)}function x(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function P(e,t=!1){const a=f.a[e];if(null==a)throw new Error("Invalid factionName passed into displayFactionContent(): "+e);if(!a.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(r.a.createElement(s.a,{engine:d.Engine,initiallyOnAugmentationsPage:t,faction:a,p:_.a,startHackingMissionFn:x}),d.Engine.Display.factionContent)}function A(e,t){const a=t.getInfo(),n=Object(S.d)();n.innerHTML="Purchase",n.addEventListener("click",(function(){!Object(c.f)(e)&&_.a.hasAugmentation(e)||(D(e,t),Object(S.a)())}));const i=Object(S.c)();i.innerHTML="Cancel",i.addEventListener("click",(function(){Object(S.a)()}));let o=r.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}});"string"!=typeof e.info&&(o=r.a.createElement("div",null,e.info)),Object(S.b)(r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,e.name),r.a.createElement("br",null),o,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.name," Augmentation for ",r.a.createElement(w.a,{money:e.baseCost*a.augmentationPriceMult}),"?"))}function R(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let a=0;a0){if("unalias"===t[0]||"alias"===t[0])return t.join(" ");let e=!0,o=0;for(;e&&o<10;){var a;o++,e=!1;const s=null===(i=t[0],a=r.hasOwnProperty(i)?r[i]:null)||void 0===a?void 0:a.split(" ");null!=s&&(e=!0,t.splice(0,1,...s));for(let a=0;a100?this.otlkMagForecast=100:this.otlkMagForecast<0&&(this.otlkMagForecast=0)}changePrice(e){this.lastPrice=this.price,this.price=e}cycleForecast(e=.1){const t=this.getForecastIncreaseChance();Math.random()5&&(this.otlkMag=Math.max(5,this.otlkMag-e))}influenceForecastForecast(e){this.otlkMagForecast>50?(this.otlkMagForecast-=e,this.otlkMagForecast=Math.max(50,this.otlkMagForecast)):this.otlkMagForecast<50&&(this.otlkMagForecast+=e,this.otlkMagForecast=Math.min(50,this.otlkMagForecast))}toJSON(){return Object(n.b)("Stock",this)}static fromJSON(e){return Object(n.a)(s,e.data)}}n.c.constructors.Stock=s},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={}},function(e,t,a){"use strict";function n(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}a.d(t,"a",(function(){return n}))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(178),r=a(106),i=a(153),o=a(193),s=a(21),l=a(170),c=a(217);function u(e,t,a){if(null!=a&&"boolean"==typeof a||(a=!0),e instanceof n.a)return h(e),!0;if(e instanceof o.a&&"string"==typeof t){const n=m(e.pid,a);if(n)return n;for(const n of r.a.values())if(n.name==e.filename&&n.serverIp==t&&Object(l.a)(n.args,e.args))return h(n,a),!0;return!1}return"number"==typeof e?m(e,a):(console.error("killWorkerScript() called with invalid argument:"),console.error(e),!1)}function m(e,t=!0){const a=r.a.get(e);return a instanceof n.a&&(h(a,t),!0)}function h(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof n.a&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof n.a))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const a=e.serverIp,n=e.name,o=s.b[a];if(null==o)return void console.error("Could not find server on which this script is running: "+a);o.ramUsed=Object(c.a)(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t{t.delay=null,a()},e),t.delayResolve=a}))}function s(e,t,a=null){var n="";null!=a&&(n=" (Line "+function(e,t){var a=t.scriptRef.codeCode();try{return((a=a.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(a,e)+")");const r=i.b[e.serverIp];if(null==r)throw new Error("WorkerScript constructed with invalid server ip: "+this.serverIp);return"|"+r.hostname+"|"+e.name+"|"+t+n}function l(e,t,a){const n=e.scriptRef.threads;if(!a)return isNaN(n)||n<1?1:n;const r=0|a;if(isNaN(a)||r<1)throw s(e,`Invalid thread count passed to ${t}: ${a}. Threads must be a positive number.`);if(a>n)throw s(e,`Too many threads requested by ${t}. Requested: ${a}. Has: ${n}.`);return r}function c(e){if(!Object(r.a)(e))return!1;return 4==e.split("|").length}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t,a){this.title=e,this.fn=t,this.txt=a}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(7);function r(e){console.error(e),Object(n.a)("Caught an exception: "+e+"

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

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

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

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(4),r=a(288),i=a(25),o=a(126),s=a(169),l=a(12);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class u extends r.a{constructor(e={hostname:"",ip:Object(s.a)()}){super(e),c(this,"cache",1),c(this,"cores",1),c(this,"hashCapacity",0),c(this,"hashRate",0),c(this,"level",1),c(this,"onlineTimeSeconds",0),c(this,"totalHashesGenerated",0),this.maxRam=1,this.updateHashCapacity()}calculateCacheUpgradeCost(e){return Object(o.a)(this.cache,e)}calculateCoreUpgradeCost(e,t){return Object(o.b)(this.cores,e,t)}calculateLevelUpgradeCost(e,t){return Object(o.d)(this.level,e,t)}calculateRamUpgradeCost(e,t){return Object(o.e)(this.maxRam,e,t)}process(e=1){const t=e*n.a.MilliPerCycle/1e3;return this.hashRate*t}upgradeCache(e){this.cache=Math.min(i.b.MaxCache,Math.round(this.cache+e)),this.updateHashCapacity()}upgradeCore(e,t){this.cores=Math.min(i.b.MaxCores,Math.round(this.cores+e)),this.updateHashRate(t)}upgradeLevel(e,t){this.level=Math.min(i.b.MaxLevel,Math.round(this.level+e)),this.updateHashRate(t)}upgradeRam(e,t){for(let t=0;t["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__.a)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname+` ~${a}]> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(a<0||a>r)&&(Terminal.commandHistoryIndex=r),0!=a&&--Terminal.commandHistoryIndex;var n=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=n,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__.a)((function(){t.selectionStart=t.selectionEnd=1e4}),10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((a<0||a>r)&&(Terminal.commandHistoryIndex=r),a==r||a==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;n=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=n}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.TAB){if(e.preventDefault(),null==t)return;let a=t.value;if(""==a)return;const n=a.lastIndexOf(";");-1!==n&&(a=a.slice(n+1)),a=a.trim(),a=a.replace(/\s\s+/g," ");const r=a.split(" ");let i=r.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.a,a,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==r.length)return;1==r.length?l=r[0]:2==r.length?(l=r[0],s=r[1]):3==r.length?(l=r[0]+" "+r[1],s=r[2]):(s=r.pop(),l=r.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.a)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}}));let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready((function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal)&&$(".terminal-input").focus()})),$(document).keydown((function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}})),$(document).keyup((function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))}));let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const a=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`
[${_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname} ~${a}]$
",d.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="",d.option=!!ht.lastChild;var yt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function gt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?H.merge([t],n):n}function vt(t,e){for(var n=0,r=t.length;n",""]);var Lt=/<|&#?\w+;/;function bt(t,e,n,r,i){for(var o,a,s,u,l,Q,T=e.createDocumentFragment(),c=[],h=0,f=t.length;h-1)i&&i.push(o);else if(l=at(o),a=gt(T.appendChild(o),"script"),l&&vt(a),n)for(Q=0;o=a[Q++];)mt.test(o.type||"")&&n.push(o);return T}var Ht=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_t=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function wt(){return!1}function Ct(t,e){return t===function(){try{return g.activeElement}catch(t){}}()==("focus"===e)}function St(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)St(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=wt;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return H().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=H.guid++)),t.each((function(){H.event.add(this,e,i,r,n)}))}function Ot(t,e,n){n?($.set(t,e,!1),H.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=$.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(H.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),$.set(this,e,o),r=n(this,e),this[e](),o!==(i=$.get(this,e))||r?$.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else o.length&&($.set(this,e,{value:H.event.trigger(H.extend(o[0],H.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===$.get(t,e)&&H.event.add(t,e,Et)}H.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,Q,T,c,h,f,p,d=$.get(t);if(q(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&H.find.matchesSelector(ot,i),n.guid||(n.guid=H.guid++),(u=d.events)||(u=d.events=Object.create(null)),(a=d.handle)||(a=d.handle=function(e){return void 0!==H&&H.event.triggered!==e.type?H.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(j)||[""]).length;l--;)h=p=(s=_t.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),h&&(T=H.event.special[h]||{},h=(i?T.delegateType:T.bindType)||h,T=H.event.special[h]||{},Q=H.extend({type:h,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&H.expr.match.needsContext.test(i),namespace:f.join(".")},o),(c=u[h])||((c=u[h]=[]).delegateCount=0,T.setup&&!1!==T.setup.call(t,r,f,a)||t.addEventListener&&t.addEventListener(h,a)),T.add&&(T.add.call(t,Q),Q.handler.guid||(Q.handler.guid=n.guid)),i?c.splice(c.delegateCount++,0,Q):c.push(Q),H.event.global[h]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,Q,T,c,h,f,p,d=$.hasData(t)&&$.get(t);if(d&&(u=d.events)){for(l=(e=(e||"").match(j)||[""]).length;l--;)if(h=p=(s=_t.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),h){for(T=H.event.special[h]||{},c=u[h=(r?T.delegateType:T.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=c.length;o--;)Q=c[o],!i&&p!==Q.origType||n&&n.guid!==Q.guid||s&&!s.test(Q.namespace)||r&&r!==Q.selector&&("**"!==r||!Q.selector)||(c.splice(o,1),Q.selector&&c.delegateCount--,T.remove&&T.remove.call(t,Q));a&&!c.length&&(T.teardown&&!1!==T.teardown.call(t,f,d.handle)||H.removeEvent(t,h,d.handle),delete u[h])}else for(h in u)H.event.remove(t,h+e[l],n,r,!0);H.isEmptyObject(u)&&$.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=H.event.fix(t),l=($.get(this,"events")||Object.create(null))[u.type]||[],Q=H.event.special[u.type]||{};for(s[0]=u,e=1;e=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:H.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function kt(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&H(t).children("tbody")[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if($.hasData(t)&&(s=$.get(t).events))for(i in $.remove(e,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof f&&!d.checkClone&&Vt.test(f))return t.each((function(i){var o=t.eq(i);p&&(e[0]=f.call(this,i,o.html())),It(o,e,n,r)}));if(c&&(o=(i=bt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=H.map(gt(i,"script"),Dt)).length;T0&&vt(a,!u&>(t,"script")),s},cleanData:function(t){for(var e,n,r,i=H.event.special,o=0;void 0!==(n=t[o]);o++)if(q(n)){if(e=n[$.expando]){if(e.events)for(r in e.events)i[r]?H.event.remove(n,r):H.removeEvent(n,r,e.handle);n[$.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),H.fn.extend({detach:function(t){return Rt(this,t,!0)},remove:function(t){return Rt(this,t)},text:function(t){return z(this,(function(t){return void 0===t?H.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return It(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||kt(this,t).appendChild(t)}))},prepend:function(){return It(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=kt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return It(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return It(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(H.cleanData(gt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return H.clone(this,t,e)}))},html:function(t){return z(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Mt.test(t)&&!yt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=H.htmlPrefilter(t);try{for(;n3,ot.removeChild(t)),s}}))}();var Gt=["Webkit","Moz","ms"],Xt=g.createElement("div").style,qt={};function Kt(t){var e=H.cssProps[t]||qt[t];return e||(t in Xt?t:qt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Gt.length;n--;)if((t=Gt[n]+e)in Xt)return t}(t)||t)}var $t=/^(none|table(?!-c[ea]).+)/,Yt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=rt.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=H.css(t,n+it[a],!0,i)),r?("content"===n&&(u-=H.css(t,"padding"+it[a],!0,i)),"margin"!==n&&(u-=H.css(t,"border"+it[a]+"Width",!0,i))):(u+=H.css(t,"padding"+it[a],!0,i),"padding"!==n?u+=H.css(t,"border"+it[a]+"Width",!0,i):s+=H.css(t,"border"+it[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function re(t,e,n){var r=Ft(t),i=(!d.boxSizingReliable()||n)&&"border-box"===H.css(t,"boxSizing",!1,r),o=i,a=Wt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Bt.test(a)){if(!n)return a;a="auto"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&S(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===H.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===H.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ne(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}H.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=X(e),u=Yt.test(e),l=t.style;if(u||(e=Kt(s)),a=H.cssHooks[e]||H.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];"string"===(o=typeof n)&&(i=rt.exec(n))&&i[1]&&(n=lt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(H.cssNumber[s]?"":"px")),d.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=X(e);return Yt.test(e)||(e=Kt(s)),(a=H.cssHooks[e]||H.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),H.each(["height","width"],(function(t,e){H.cssHooks[e]={get:function(t,n,r){if(n)return!$t.test(H.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Zt(t,Jt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ft(t),a=!d.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===H.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=rt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=H.css(t,e)),ee(0,n,u)}}})),H.cssHooks.marginLeft=Ut(d.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-Zt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),H.each({margin:"",padding:"",border:"Width"},(function(t,e){H.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+it[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(H.cssHooks[t+e].set=ee)})),H.fn.extend({css:function(t,e){return z(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ft(t),i=e.length;a1)}}),H.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||H.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(H.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=H.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=H.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){H.fx.step[t.prop]?H.fx.step[t.prop](t):1!==t.elem.nodeType||!H.cssHooks[t.prop]&&null==t.elem.style[Kt(t.prop)]?t.elem[t.prop]=t.now:H.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},H.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},H.fx=ie.prototype.init,H.fx.step={};var oe,ae,se=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){ae&&(!1===g.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(le):n.setTimeout(le,H.fx.interval),H.fx.tick())}function Qe(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function Te(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=it[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ce(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each((function(){H.removeAttr(this,t)}))}}),H.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?H.prop(t,e,n):(1===o&&H.isXMLDoc(t)||(i=H.attrHooks[e.toLowerCase()]||(H.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void H.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=H.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!d.radioValue&&"radio"===e&&S(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(j);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?H.removeAttr(t,n):t.setAttribute(n,n),n}},H.each(H.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=pe[e]||H.find.attr;pe[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=pe[a],pe[a]=i,i=null!=n(t,e,r)?a:null,pe[a]=o),i}}));var de=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function ye(t){return(t.match(j)||[]).join(" ")}function ge(t){return t.getAttribute&&t.getAttribute("class")||""}function ve(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(j)||[]}H.fn.extend({prop:function(t,e){return z(this,H.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[H.propFix[t]||t]}))}}),H.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&H.isXMLDoc(t)||(e=H.propFix[e]||e,i=H.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=H.find.attr(t,"tabindex");return e?parseInt(e,10):de.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(H.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),H.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){H.propFix[this.toLowerCase()]=this})),H.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each((function(e){H(this).addClass(t.call(this,e,ge(this)))}));if((e=ve(t)).length)for(;n=this[u++];)if(i=ge(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each((function(e){H(this).removeClass(t.call(this,e,ge(this)))}));if(!arguments.length)return this.attr("class","");if((e=ve(t)).length)for(;n=this[u++];)if(i=ge(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):m(t)?this.each((function(n){H(this).toggleClass(t.call(this,n,ge(this),e),e)})):this.each((function(){var e,i,o,a;if(r)for(i=0,o=H(this),a=ve(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ge(this))&&$.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":$.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(ge(n))+" ").indexOf(e)>-1)return!0;return!1}});var Le=/\r/g;H.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=m(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,H(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=H.map(i,(function(t){return null==t?"":t+""}))),(e=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=H.valHooks[i.type]||H.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Le,""):null==n?"":n:void 0}}),H.extend({valHooks:{option:{get:function(t){var e=H.find.attr(t,"value");return null!=e?e:ye(H.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),H.each(["radio","checkbox"],(function(){H.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=H.inArray(H(t).val(),e)>-1}},d.checkOn||(H.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),d.focusin="onfocusin"in n;var be=/^(?:focusinfocus|focusoutblur)$/,He=function(t){t.stopPropagation()};H.extend(H.event,{trigger:function(t,e,r,i){var o,a,s,u,l,Q,T,c,f=[r||g],p=h.call(t,"type")?t.type:t,d=h.call(t,"namespace")?t.namespace.split("."):[];if(a=c=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!be.test(p+H.event.triggered)&&(p.indexOf(".")>-1&&(d=p.split("."),p=d.shift(),d.sort()),l=p.indexOf(":")<0&&"on"+p,(t=t[H.expando]?t:new H.Event(p,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:H.makeArray(e,[t]),T=H.event.special[p]||{},i||!T.trigger||!1!==T.trigger.apply(r,e))){if(!i&&!T.noBubble&&!y(r)){for(u=T.delegateType||p,be.test(u+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(r.ownerDocument||g)&&f.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=f[o++])&&!t.isPropagationStopped();)c=a,t.type=o>1?u:T.bindType||p,(Q=($.get(a,"events")||Object.create(null))[t.type]&&$.get(a,"handle"))&&Q.apply(a,e),(Q=l&&a[l])&&Q.apply&&q(a)&&(t.result=Q.apply(a,e),!1===t.result&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||T._default&&!1!==T._default.apply(f.pop(),e)||!q(r)||l&&m(r[p])&&!y(r)&&((s=r[l])&&(r[l]=null),H.event.triggered=p,t.isPropagationStopped()&&c.addEventListener(p,He),r[p](),t.isPropagationStopped()&&c.removeEventListener(p,He),H.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=H.extend(new H.Event,n,{type:t,isSimulated:!0});H.event.trigger(r,null,e)}}),H.fn.extend({trigger:function(t,e){return this.each((function(){H.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return H.event.trigger(t,e,n,!0)}}),d.focusin||H.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){H.event.simulate(e,t.target,H.event.fix(t))};H.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,e);i||r.addEventListener(t,n,!0),$.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,e)-1;i?$.access(r,e,i):(r.removeEventListener(t,n,!0),$.remove(r,e))}}}));var xe=n.location,_e={guid:Date.now()},Ee=/\?/;H.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||H.error("Invalid XML: "+t),e};var we=/\[\]$/,Ce=/\r?\n/g,Se=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;function Me(t,e,n,r){var i;if(Array.isArray(e))H.each(e,(function(e,i){n||we.test(t)?r(t,i):Me(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==b(e))r(t,e);else for(i in e)Me(t+"["+i+"]",e[i],n,r)}H.param=function(t,e){var n,r=[],i=function(t,e){var n=m(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!H.isPlainObject(t))H.each(t,(function(){i(this.name,this.value)}));else for(n in t)Me(n,t[n],e,i);return r.join("&")},H.fn.extend({serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=H.prop(this,"elements");return t?H.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!H(this).is(":disabled")&&Oe.test(this.nodeName)&&!Se.test(t)&&(this.checked||!pt.test(t))})).map((function(t,e){var n=H(this).val();return null==n?null:Array.isArray(n)?H.map(n,(function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}})):{name:e.name,value:n.replace(Ce,"\r\n")}})).get()}});var Ve=/%20/g,Ae=/#.*$/,ke=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,je=/^\/\//,Ne={},Ie={},Re="*/".concat("*"),Be=g.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(j)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ze(t,e,n,r){var i={},o=t===Ie;function a(s){var u;return i[s]=!0,H.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function ze(t,e){var n,r,i=H.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&H.extend(!0,t,r),t}Be.href=xe.href,H.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":H.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,H.ajaxSettings),e):ze(H.ajaxSettings,t)},ajaxPrefilter:Fe(Ne),ajaxTransport:Fe(Ie),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,l,Q,T,c,h=H.ajaxSetup({},e),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?H(f):H.event,d=H.Deferred(),m=H.Callbacks("once memory"),y=h.statusCode||{},v={},L={},b="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=De.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=L[t.toLowerCase()]=L[t.toLowerCase()]||t,v[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)x.always(t[x.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||b;return r&&r.abort(e),_(0,e),this}};if(d.promise(x),h.url=((t||h.url||xe.href)+"").replace(je,xe.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(j)||[""],null==h.crossDomain){u=g.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Be.protocol+"//"+Be.host!=u.protocol+"//"+u.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=H.param(h.data,h.traditional)),Ze(Ne,h,e,x),l)return x;for(T in(Q=H.event&&h.global)&&0==H.active++&&H.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Pe.test(h.type),i=h.url.replace(Ae,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ve,"+")):(c=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Ee.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(ke,"$1"),c=(Ee.test(i)?"&":"?")+"_="+_e.guid+++c),h.url=i+c),h.ifModified&&(H.lastModified[i]&&x.setRequestHeader("If-Modified-Since",H.lastModified[i]),H.etag[i]&&x.setRequestHeader("If-None-Match",H.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Re+"; q=0.01":""):h.accepts["*"]),h.headers)x.setRequestHeader(T,h.headers[T]);if(h.beforeSend&&(!1===h.beforeSend.call(f,x,h)||l))return x.abort();if(b="abort",m.add(h.complete),x.done(h.success),x.fail(h.error),r=Ze(Ie,h,e,x)){if(x.readyState=1,Q&&p.trigger("ajaxSend",[x,h]),l)return x;h.async&&h.timeout>0&&(s=n.setTimeout((function(){x.abort("timeout")}),h.timeout));try{l=!1,r.send(v,_)}catch(t){if(l)throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,a,u){var T,c,g,v,L,b=e;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=u||"",x.readyState=t>0?4:0,T=t>=200&&t<300||304===t,a&&(v=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,x,a)),!T&&H.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),v=function(t,e,n,r){var i,o,a,s,u,l={},Q=t.dataTypes.slice();if(Q[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=Q.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=Q.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],Q.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(h,v,x,T),T?(h.ifModified&&((L=x.getResponseHeader("Last-Modified"))&&(H.lastModified[i]=L),(L=x.getResponseHeader("etag"))&&(H.etag[i]=L)),204===t||"HEAD"===h.type?b="nocontent":304===t?b="notmodified":(b=v.state,c=v.data,T=!(g=v.error))):(g=b,!t&&b||(b="error",t<0&&(t=0))),x.status=t,x.statusText=(e||b)+"",T?d.resolveWith(f,[c,b,x]):d.rejectWith(f,[x,b,g]),x.statusCode(y),y=void 0,Q&&p.trigger(T?"ajaxSuccess":"ajaxError",[x,h,T?c:g]),m.fireWith(f,[x,b]),Q&&(p.trigger("ajaxComplete",[x,h]),--H.active||H.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,n){return H.get(t,e,n,"json")},getScript:function(t,e){return H.get(t,void 0,e,"script")}}),H.each(["get","post"],(function(t,e){H[e]=function(t,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),H.ajax(H.extend({url:t,type:e,dataType:i,data:n,success:r},H.isPlainObject(t)&&t))}})),H.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),H._evalUrl=function(t,e,n){return H.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){H.globalEval(t,e,n)}})},H.fn.extend({wrapAll:function(t){var e;return this[0]&&(m(t)&&(t=t.call(this[0])),e=H(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return m(t)?this.each((function(e){H(this).wrapInner(t.call(this,e))})):this.each((function(){var e=H(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=m(t);return this.each((function(n){H(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){H(this).replaceWith(this.childNodes)})),this}}),H.expr.pseudos.hidden=function(t){return!H.expr.pseudos.visible(t)},H.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},H.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Ue=H.ajaxSettings.xhr();d.cors=!!Ue&&"withCredentials"in Ue,d.ajax=Ue=!!Ue,H.ajaxTransport((function(t){var e,r;if(d.cors||Ue&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(We[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),H.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return H.globalEval(t),t}}}),H.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),H.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=H("