mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-25 00:53:52 +01:00
20 lines
1.6 MiB
20 lines
1.6 MiB
!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m<s.length;m++)o=s[m],r[o]&&p.push(r[o][0]),r[o]=0;for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a]);for(u&&u(t);p.length;)p.shift()();return i.push.apply(i,c||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],a=!0,s=1;s<n.length;s++){var l=n[s];0!==r[l]&&(a=!1)}a&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},r={2:0},i=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;i.push([15,0]),n()}([,function(e,t,n){"use strict";n.r(t),n.d(t,"Player",function(){return l}),n.d(t,"loadPlayer",function(){return c});var a=n(123),r=n(859),i=n(169),o=n(29),s=n(69);let l=new r.a;function c(e){if((l=JSON.parse(e,o.Reviver)).money=new s.default(l.money),l.corporation instanceof a.Corporation){l.corporation.funds=new s.default(l.corporation.funds),l.corporation.revenue=new s.default(l.corporation.revenue),l.corporation.expenses=new s.default(l.corporation.expenses);for(var t=0;t<l.corporation.divisions.length;++t){var n=l.corporation.divisions[t];n.lastCycleRevenue=new s.default(n.lastCycleRevenue),n.lastCycleExpenses=new s.default(n.lastCycleExpenses),n.thisCycleRevenue=new s.default(n.thisCycleRevenue),n.thisCycleExpenses=new s.default(n.thisCycleExpenses)}}l.exploits=Object(i.sanitizeExploits)(l.exploits)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationNames=void 0,t.AugmentationNames={Targeting1:"Augmented Targeting I",Targeting2:"Augmented Targeting II",Targeting3:"Augmented Targeting III",SyntheticHeart:"Synthetic Heart",SynfibrilMuscle:"Synfibril Muscle",CombatRib1:"Combat Rib I",CombatRib2:"Combat Rib II",CombatRib3:"Combat Rib III",NanofiberWeave:"Nanofiber Weave",SubdermalArmor:"NEMEAN Subdermal Weave",WiredReflexes:"Wired Reflexes",GrapheneBoneLacings:"Graphene Bone Lacings",BionicSpine:"Bionic Spine",GrapheneBionicSpine:"Graphene Bionic Spine Upgrade",BionicLegs:"Bionic Legs",GrapheneBionicLegs:"Graphene Bionic Legs Upgrade",SpeechProcessor:"Speech Processor Implant",TITN41Injection:"TITN-41 Gene-Modification Injection",EnhancedSocialInteractionImplant:"Enhanced Social Interaction Implant",BitWire:"BitWire",ArtificialBioNeuralNetwork:"Artificial Bio-neural Network Implant",ArtificialSynapticPotentiation:"Artificial Synaptic Potentiation",EnhancedMyelinSheathing:"Enhanced Myelin Sheathing",SynapticEnhancement:"Synaptic Enhancement Implant",NeuralRetentionEnhancement:"Neural-Retention Enhancement",DataJack:"DataJack",ENM:"Embedded Netburner Module",ENMCore:"Embedded Netburner Module Core Implant",ENMCoreV2:"Embedded Netburner Module Core V2 Upgrade",ENMCoreV3:"Embedded Netburner Module Core V3 Upgrade",ENMAnalyzeEngine:"Embedded Netburner Module Analyze Engine",ENMDMA:"Embedded Netburner Module Direct Memory Access Upgrade",Neuralstimulator:"Neuralstimulator",NeuralAccelerator:"Neural Accelerator",CranialSignalProcessorsG1:"Cranial Signal Processors - Gen I",CranialSignalProcessorsG2:"Cranial Signal Processors - Gen II",CranialSignalProcessorsG3:"Cranial Signal Processors - Gen III",CranialSignalProcessorsG4:"Cranial Signal Processors - Gen IV",CranialSignalProcessorsG5:"Cranial Signal Processors - Gen V",NeuronalDensification:"Neuronal Densification",NuoptimalInjectorImplant:"Nuoptimal Nootropic Injector Implant",SpeechEnhancement:"Speech Enhancement",FocusWire:"FocusWire",PCDNI:"PC Direct-Neural Interface",PCDNIOptimizer:"PC Direct-Neural Interface Optimization Submodule",PCDNINeuralNetwork:"PC Direct-Neural Interface NeuroNet Injector",PCMatrix:"PCMatrix",ADRPheromone1:"ADR-V1 Pheromone Gene",ADRPheromone2:"ADR-V2 Pheromone Gene",ShadowsSimulacrum:"The Shadow's Simulacrum",HacknetNodeCPUUpload:"Hacknet Node CPU Architecture Neural-Upload",HacknetNodeCacheUpload:"Hacknet Node Cache Architecture Neural-Upload",HacknetNodeNICUpload:"Hacknet Node NIC Architecture Neural-Upload",HacknetNodeKernelDNI:"Hacknet Node Kernel Direct-Neural Interface",HacknetNodeCoreDNI:"Hacknet Node Core Direct-Neural Interface",NeuroFluxGovernor:"NeuroFlux Governor",Neurotrainer1:"Neurotrainer I",Neurotrainer2:"Neurotrainer II",Neurotrainer3:"Neurotrainer III",Hypersight:"HyperSight Corneal Implant",LuminCloaking1:"LuminCloaking-V1 Skin Implant",LuminCloaking2:"LuminCloaking-V2 Skin Implant",HemoRecirculator:"HemoRecirculator",SmartSonar:"SmartSonar Implant",PowerRecirculator:"Power Recirculation Core",QLink:"QLink",TheRedPill:"The Red Pill",SPTN97:"SPTN-97 Gene Modification",HiveMind:"ECorp HVMind Implant",CordiARCReactor:"CordiARC Fusion Reactor",SmartJaw:"SmartJaw",Neotra:"Neotra",Xanipher:"Xanipher",nextSENS:"nextSENS Gene Modification",OmniTekInfoLoad:"OmniTek InfoLoad",PhotosyntheticCells:"Photosynthetic Cells",Neurolink:"BitRunners Neurolink",TheBlackHand:"The Black Hand",UnstableCircadianModulator:"Unstable Circadian Modulator",CRTX42AA:"CRTX42-AA Gene Modification",Neuregen:"Neuregen Gene Modification",CashRoot:"CashRoot Starter Kit",NutriGen:"NutriGen Implant",INFRARet:"INFRARET Enhancement",DermaForce:"DermaForce Particle Barrier",GrapheneBrachiBlades:"Graphene BranchiBlades Upgrade",GrapheneBionicArms:"Graphene Bionic Arms Upgrade",BrachiBlades:"BrachiBlades",BionicArms:"Bionic Arms",SNA:"Social Negotiation Assistant (S.N.A)",HydroflameLeftArm:"Hydroflame Left Arm",EsperEyewear:"EsperTech Bladeburner Eyewear",EMS4Recombination:"EMS-4 Recombination",OrionShoulder:"ORION-MKIV Shoulder",HyperionV1:"Hyperion Plasma Cannon V1",HyperionV2:"Hyperion Plasma Cannon V2",GolemSerum:"GOLEM Serum",VangelisVirus:"Vangelis Virus",VangelisVirus3:"Vangelis Virus 3.0",INTERLINKED:"I.N.T.E.R.L.I.N.K.E.D",BladeRunner:"Blade's Runners",BladeArmor:"BLADE-51b Tesla Armor",BladeArmorPowerCells:"BLADE-51b Tesla Armor: Power Cells Upgrade",BladeArmorEnergyShielding:"BLADE-51b Tesla Armor: Energy Shielding Upgrade",BladeArmorUnibeam:"BLADE-51b Tesla Armor: Unibeam Upgrade",BladeArmorOmnibeam:"BLADE-51b Tesla Armor: Omnibeam Upgrade",BladeArmorIPU:"BLADE-51b Tesla Armor: IPU Upgrade",BladesSimulacrum:"The Blade's Simulacrum"}},,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.numeralWrapper=void 0;const r=a(n(99));n(1369),n(1368),n(1367),n(1366),n(1365),n(1364),n(1363),n(1362),n(1361),n(1360),n(1359),n(1358),n(1357),n(1356);const i=[1e15,1e18,1e21,1e24,1e27,1e30],o=["q","Q","s","S","o","n"];t.numeralWrapper=new class{constructor(){this.defaultLocale="en",this.defaultLocale="en"}updateLocale(e){return null!=r.default.locale(e)||(console.warn(`Invalid locale for numeral: ${e}`),r.default.locale(this.defaultLocale),!1)}format(e,t){Math.abs(e)<1e-6&&(e=0);const n=r.default(e).format(t);return"NaN"===n?`${e}`:n}formatBigNumber(e){return this.format(e,"0.000a")}formatReallyBigNumber(e,t=3){if(e===1/0)return"∞";for(let n=0;n<i.length;n++)if(i[n]<e&&e<=1e3*i[n])return this.format(e/i[n],"0."+"0".repeat(t))+o[n];if(Math.abs(e)<1e3)return this.format(e,"0."+"0".repeat(t));const n=this.format(e,"0."+"0".repeat(t)+"a");return"NaNt"===n?this.format(e,"0."+" ".repeat(t)+"e+0"):n}formatHp(e){return e<1e6?this.format(e,"0,0"):this.formatReallyBigNumber(e)}formatMoney(e){return"$"+this.formatReallyBigNumber(e)}formatSkill(e){return e<1e15?this.format(e,"0,0"):this.formatReallyBigNumber(e)}formatExp(e){return this.formatReallyBigNumber(e)}formatHashes(e){return this.formatReallyBigNumber(e)}formatReputation(e){return this.formatReallyBigNumber(e)}formatFavor(e){return this.format(e,"0,0")}formatRAM(e){return this.format(e,"0.00")+"GB"}formatPercentage(e,t=2){const n="0."+"0".repeat(t)+"%";return this.format(e,n)}formatServerSecurity(e){return this.format(e,"0,0.000")}formatRespect(e){return this.formatReallyBigNumber(e,5)}formatWanted(e){return this.formatReallyBigNumber(e,5)}formatMultiplier(e){return this.format(e,"0,0.00")}formatSleeveShock(e){return this.format(e,"0,0.000")}formatSleeveSynchro(e){return this.format(e,"0,0.000")}formatSleeveMemory(e){return this.format(e,"0")}formatPopulation(e){return this.format(e,"0.000a")}formatStamina(e){return this.format(e,"0.0")}formatShares(e){return e<1e3?this.format(e,"0"):this.formatReallyBigNumber(e)}formatInfiltrationSecurity(e){return this.formatReallyBigNumber(e)}formatThreads(e){return this.format(e,"0,0")}parseMoney(e){const t=r.default(e).value(),n=parseFloat(e);return isNaN(n)&&null===t?NaN:isNaN(n)?t:null===t?n:Math.max(t,n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postContent=t.postElement=t.hackProgressPost=t.hackProgressBarPost=t.postError=t.post=void 0;const a=n(412),r=n(192);function i(e,t={}){const n=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,a=`<tr class="posted"><td ${void 0===t.id?'class="terminal-line"':`id="${t.id}"`} style="${n}">${e}</td></tr>`;r.getElementById("terminal-input").insertAdjacentHTML("beforebegin",a),function(){const e=r.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})},t.postElement=function(e){i(a.renderToStaticMarkup(e))},t.postContent=i},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamCost=t.RamCosts=t.RamCostConstants=void 0,t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServer:()=>t.RamCostConstants.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxRam:()=>t.RamCostConstants.ScriptGetServerMaxRam,getServerUsedRam:()=>t.RamCostConstants.ScriptGetServerUsedRam,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,getRunningScript:()=>t.RamCostConstants.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getCurrentServer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,connect:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,manualHack:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,installBackdoor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getPlayer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,hospitalize:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{createGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,inGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t<e.length;++t){if(null==n)return console.warn(`Invalid function passed to getRamCost: ${e}`),0;const a=typeof n;if("function"===a||"number"===a)break;n=n[e[t]]}const a=typeof n;return"function"===a?n():"number"===a?n:(console.warn(`Unexpected type (${a}) for value [${e}]`),0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS=void 0,t.CONSTANTS={Version:"0.52.9",_idleSpeed:200,MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,TravelCost:2e5,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,NumNetscriptPorts:20,HomeComputerMaxRam:1073741824,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,InfiltrationExpPow:.8,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.025,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.05,IntelligenceProgramBaseExpGain:2.5,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:1.5,IntelligenceClassBaseExpGain:.01,IntelligenceHackingMissionBaseExpGain:3,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>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.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> 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.<br><br>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.<br><br>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.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>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.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>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<br><br>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<br><br>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<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>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.<br><br>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'.<br><br>Other Notes:<br><br>-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.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.52.9 - 2021-08-27 Less lag! (hydroflame & community)\n -------------------------------------------\n\n ** Active Scripts page **\n\n * Now less laggy, has pagination.\n\n ** File diagnostic ** \n\n * Added a popup found under options that shows the files you own and how\n large they are. This help find bugs and leftover massive logs files.\n\n ** Corporation **\n\n * Added safeguard against a very specific bug that causes NaN money. I'm\n still not sure what the root cause is but it should prevent corp from\n breaking.\n\n ** Netscript ** \n\n * tprintf is a new function that doesn't print the filename.\n\n ** Misc. **\n\n * Infiltration kills you if you try to automate it. (@threehams)\n * Fix beautify button not working\n * Added bladeburner_analysis_mult to getPlayer() (@brusby)\n * Fixed joining bladeburner via netscript functions. (@omuretsu)\n * All bladeburner actions are click-to-copy\n * nerf noodle bar\n"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations=void 0,t.Augmentations={}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.dialogBoxCreate=t.MessagePopup=void 0;const r=n(40),i=n(44),o=a(n(0));function s(e){return o.default.createElement(o.default.Fragment,null,e.content)}t.MessagePopup=s,t.dialogBoxCreate=function(e,t=!1){const n="popup-"+Array.from(Array(16)).map(()=>`${i.getRandomInt(0,9)}`).join("");"string"==typeof e?t?r.createPopup(n,s,{content:o.default.createElement("pre",{dangerouslySetInnerHTML:{__html:e}})}):r.createPopup(n,s,{content:o.default.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"<br />")}})}):r.createPopup(n,s,{content:e})}},,function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return fe});var a=n(24),r=n(12),i=n(80),o=n(3),s=n(129),l=n(93),c=n(828),u=n(465),m=n(177),p=n(32),d=n(123),h=n(11),f=n(558),g=n(17),y=n(72),_=n(827),b=n(826),v=n(825),k=n(824),E=n(109),C=n(39),S=n(26),P=n(45),T=n(41),M=n(470),O=n(88),w=n(82),x=n(111),N=n(81),A=(n(23),n(1)),R=n(174),I=n(317),B=n(103),D=n(113),L=n(776),F=n(20),j=n(25),W=n(37),G=n(38),H=n(48),U=n(763),q=n(75),$=n(179),K=n(466),z=n(552),Y=n(143),V=n(762),J=n(18),X=n(761),Q=n(21),Z=n(128),ee=n(60),te=n(551),ne=n(760),ae=n(31),re=n(759),ie=n(40),oe=n(13),se=n(316),le=n(90),ce=n(550),ue=n(46),me=(n(928),n(927),n(0)),pe=n.n(me),de=n(22),he=n.n(de);e(document).keydown(function(e){if(!0!==j.Settings.DisableHotkeys){if(!(A.Player.isWorking||B.redPillFlag||w.c||u.a))if(e.keyCode==ue.KEY.T&&e.altKey)e.preventDefault(),fe.loadTerminalContent();else if(e.keyCode===ue.KEY.C&&e.altKey)e.preventDefault(),fe.loadCharacterContent();else if(e.keyCode===ue.KEY.E&&e.altKey)e.preventDefault(),fe.loadScriptEditorContent();else if(e.keyCode===ue.KEY.S&&e.altKey)e.preventDefault(),fe.loadActiveScriptsContent();else if(e.keyCode===ue.KEY.H&&e.altKey)e.preventDefault(),fe.loadHacknetNodesContent();else if(e.keyCode===ue.KEY.W&&e.altKey)e.preventDefault(),fe.loadLocationContent();else if(e.keyCode===ue.KEY.J&&e.altKey)e.preventDefault(),fe.loadJobContent();else if(e.keyCode===ue.KEY.R&&e.altKey)e.preventDefault(),fe.loadTravelContent();else if(e.keyCode===ue.KEY.P&&e.altKey)e.preventDefault(),fe.loadCreateProgramContent();else if(e.keyCode===ue.KEY.F&&e.altKey){if(J.routing.isOn(J.Page.Terminal)&&C.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),fe.loadFactionsContent()}else e.keyCode===ue.KEY.A&&e.altKey?(e.preventDefault(),fe.loadAugmentationsContent()):e.keyCode===ue.KEY.U&&e.altKey?(e.preventDefault(),fe.loadTutorialContent()):e.keyCode===ue.KEY.B&&e.altKey?(e.preventDefault(),fe.loadBladeburnerContent()):e.keyCode===ue.KEY.G&&e.altKey&&(e.preventDefault(),fe.loadGangContent());e.keyCode===ue.KEY.O&&e.altKey&&(e.preventDefault(),Object(se.b)())}});const fe={Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,createProgramContent:null,factionsContent:null,factionContent:null,augmentationsContent:null,milestonesContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,gangContent:null,bladeburnerContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){fe.hideAllContent(),fe.Display.terminalContent.style.display="block",J.routing.navigateTo(J.Page.Terminal),ae.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){fe.hideAllContent(),fe.Display.characterContent.style.display="block",fe.updateCharacterInfo(),J.routing.navigateTo(J.Page.CharacterInfo),ae.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){fe.hideAllContent(),fe.Display.scriptEditorContent.style.display="block",J.routing.navigateTo(J.Page.ScriptEditor),he.a.render(pe.a.createElement(L.Root,{filename:e,code:t,player:A.Player,engine:this}),fe.Display.scriptEditorContent),ae.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){fe.hideAllContent(),fe.Display.activeScriptsContent.style.display="block",J.routing.navigateTo(J.Page.ActiveScripts),he.a.render(pe.a.createElement(te.ActiveScriptsRoot,{p:A.Player,workerScripts:x.workerScripts}),fe.Display.activeScriptsContent),ae.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){fe.hideAllContent(),fe.Display.hacknetNodesContent.style.display="block",J.routing.navigateTo(J.Page.HacknetNodes),Object(S.q)(),ae.MainMenuLinks.HacknetNodes.classList.add("active")},loadCreateProgramContent:function(){fe.hideAllContent(),fe.Display.createProgramContent.style.display="block",Object(I.a)(),J.routing.navigateTo(J.Page.CreateProgram),ae.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){fe.hideAllContent(),fe.Display.factionsContent.style.display="block",J.routing.navigateTo(J.Page.Factions),he.a.render(pe.a.createElement(_.FactionList,{player:A.Player,engine:this}),fe.Display.factionsContent),ae.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){fe.hideAllContent(),fe.Display.factionContent.style.display="block",J.routing.navigateTo(J.Page.Faction)},loadAugmentationsContent:function(){fe.hideAllContent(),fe.Display.augmentationsContent.style.display="block",J.routing.navigateTo(J.Page.Augmentations),Object(i.c)(fe.Display.augmentationsContent),ae.MainMenuLinks.Augmentations.classList.add("active")},loadMilestonesContent:function(){fe.hideAllContent(),fe.Display.milestonesContent.style.display="block",J.routing.navigateTo(J.Page.Milestones),Object(U.displayMilestonesContent)(),ae.MainMenuLinks.Milestones.classList.add("active")},loadTutorialContent:function(){fe.hideAllContent(),fe.Display.tutorialContent.style.display="block",J.routing.navigateTo(J.Page.Tutorial),ae.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){fe.hideAllContent(),Object(f.b)(),J.routing.navigateTo(J.Page.DevMenu),ae.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(e=!0){fe.hideAllContent(),fe.Display.locationContent.style.display="block",ae.MainMenuLinks.City.classList.add("active"),J.routing.navigateTo(J.Page.Location);const t=pe.a.createElement(M.LocationRoot,{initiallyInCity:e,engine:fe,p:A.Player});he.a.render(t,fe.Display.locationContent)},loadTravelContent:function(){fe.hideAllContent(),A.Player.gotoLocation(T.LocationName.TravelAgency),fe.Display.locationContent.style.display="block",ae.MainMenuLinks.Travel.classList.add("active"),J.routing.navigateTo(J.Page.Location);const e=pe.a.createElement(M.LocationRoot,{initiallyInCity:!1,engine:fe,p:A.Player});he.a.render(e,fe.Display.locationContent)},loadJobContent:function(){if(""==A.Player.companyName)return void Object(oe.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.");fe.hideAllContent(),A.Player.gotoLocation(A.Player.companyName),fe.Display.locationContent.style.display="block",ae.MainMenuLinks.Job.classList.add("active"),J.routing.navigateTo(J.Page.Location);const e=pe.a.createElement(M.LocationRoot,{initiallyInCity:!1,engine:fe,p:A.Player});he.a.render(e,fe.Display.locationContent)},loadWorkInProgressContent:function(){fe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",fe.Display.workInProgressContent.style.display="block",J.routing.navigateTo(J.Page.WorkInProgress)},loadRedPillContent:function(){fe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",fe.Display.redPillContent.style.display="block",J.routing.navigateTo(J.Page.RedPill)},loadCinematicTextContent:function(){fe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",fe.Display.cinematicTextContent.style.display="block",J.routing.navigateTo(J.Page.CinematicText)},loadInfiltrationContent:function(e,t,n){fe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",fe.Display.infiltrationContent.style.display="block",J.routing.navigateTo(J.Page.Infiltration),Object(k.displayInfiltrationContent)(this,A.Player,e,t,n)},loadStockMarketContent:function(){fe.hideAllContent(),fe.Display.stockMarketContent.style.display="block",J.routing.navigateTo(J.Page.StockMarket),Object(H.displayStockMarketContent)()},loadGangContent:function(){fe.hideAllContent(),A.Player.inGang()?(fe.Display.gangContent.style.display="block",J.routing.navigateTo(J.Page.Gang),Object(b.displayGangContent)(this,A.Player.gang,A.Player)):(fe.loadTerminalContent(),J.routing.navigateTo(J.Page.Terminal))},loadMissionContent:function(){fe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",fe.Display.missionContent.style.display="block",J.routing.navigateTo(J.Page.Mission)},loadCorporationContent:function(){A.Player.corporation instanceof d.Corporation&&(fe.hideAllContent(),J.routing.navigateTo(J.Page.Corporation),A.Player.corporation.createUI(A.Player))},loadBladeburnerContent:function(){A.Player.bladeburner instanceof l.Bladeburner&&(fe.hideAllContent(),J.routing.navigateTo(J.Page.Bladeburner),fe.Display.bladeburnerContent.style.display="block",he.a.render(pe.a.createElement(v.Root,{bladeburner:A.Player.bladeburner,player:A.Player,engine:this}),fe.Display.bladeburnerContent),ae.MainMenuLinks.Bladeburner.classList.add("active"))},loadSleevesContent:function(){try{fe.hideAllContent(),J.routing.navigateTo(J.Page.Sleeves),Object(K.createSleevesPage)(A.Player)}catch(e){Object(le.exceptionAlert)(e)}},loadResleevingContent:function(){try{fe.hideAllContent(),J.routing.navigateTo(J.Page.Resleeves),Object(z.createResleevesPage)(A.Player)}catch(e){Object(le.exceptionAlert)(e)}},hideAllContent:function(){fe.Display.terminalContent.style.display="none",fe.Display.characterContent.style.display="none",fe.Display.scriptEditorContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.scriptEditorContent),fe.Display.activeScriptsContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.activeScriptsContent),fe.Display.infiltrationContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.infiltrationContent),Object(S.a)(),fe.Display.createProgramContent.style.display="none",fe.Display.factionsContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.factionsContent),fe.Display.factionContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.factionContent),fe.Display.augmentationsContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.augmentationsContent),fe.Display.milestonesContent.style.display="none",fe.Display.tutorialContent.style.display="none",fe.Display.locationContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.locationContent),fe.Display.gangContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.gangContent),fe.Display.bladeburnerContent.style.display="none",he.a.unmountComponentAtNode(fe.Display.bladeburnerContent),fe.Display.workInProgressContent.style.display="none",fe.Display.redPillContent.style.display="none",fe.Display.cinematicTextContent.style.display="none",fe.Display.stockMarketContent.style.display="none",fe.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),A.Player.corporation instanceof d.Corporation&&A.Player.corporation.clearUI(A.Player),Object(z.clearResleevesPage)(),Object(K.clearSleevesPage)(),fe.inactivateMainMenuLinks(),Object(f.a)()},inactivateMainMenuLinks:function(){ae.MainMenuLinks.Terminal.classList.remove("active"),ae.MainMenuLinks.ScriptEditor.classList.remove("active"),ae.MainMenuLinks.ActiveScripts.classList.remove("active"),ae.MainMenuLinks.CreateProgram.classList.remove("active"),ae.MainMenuLinks.Stats.classList.remove("active"),ae.MainMenuLinks.Factions.classList.remove("active"),ae.MainMenuLinks.Augmentations.classList.remove("active"),ae.MainMenuLinks.HacknetNodes.classList.remove("active"),ae.MainMenuLinks.Sleeves.classList.remove("active"),ae.MainMenuLinks.City.classList.remove("active"),ae.MainMenuLinks.Travel.classList.remove("active"),ae.MainMenuLinks.Job.classList.remove("active"),ae.MainMenuLinks.StockMarket.classList.remove("active"),ae.MainMenuLinks.Gang.classList.remove("active"),ae.MainMenuLinks.Bladeburner.classList.remove("active"),ae.MainMenuLinks.Corporation.classList.remove("active"),ae.MainMenuLinks.Gang.classList.remove("active"),ae.MainMenuLinks.Milestones.classList.remove("active"),ae.MainMenuLinks.Tutorial.classList.remove("active"),ae.MainMenuLinks.Options.classList.remove("active"),ae.MainMenuLinks.DevMenu.classList.remove("active")},displayCharacterOverviewInfo:function(){he.a.render(pe.a.createElement(c.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");j.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){he.a.render(Object(V.CharacterInfo)(A.Player),fe.Display.characterInfo)},idleTimer:function(){const e=(new Date).getTime();let t=e-fe._lastUpdate;const n=t%fe._idleSpeed;(t=Math.floor(t/fe._idleSpeed))>0&&(fe._lastUpdate=e-n,A.Player.lastUpdate=e-n,fe.updateGame(t)),window.requestAnimationFrame(fe.idleTimer)},updateGame:function(e=1){const t=e*fe._idleSpeed;null==A.Player.totalPlaytime&&(A.Player.totalPlaytime=0),null==A.Player.playtimeSinceLastAug&&(A.Player.playtimeSinceLastAug=0),null==A.Player.playtimeSinceLastBitnode&&(A.Player.playtimeSinceLastBitnode=0),A.Player.totalPlaytime+=t,A.Player.playtimeSinceLastAug+=t,A.Player.playtimeSinceLastBitnode+=t,!0===q.a.actionStarted&&(fe._totalActionTime=q.a.actionTime,fe._actionTimeLeft=q.a.actionTime,fe._actionInProgress=!0,fe._actionProgressBarCount=1,fe._actionProgressStr="[ ]",fe._actionTimeStr="Time left: ",q.a.actionStarted=!1),A.Player.isWorking&&(A.Player.workType==h.CONSTANTS.WorkTypeFaction?A.Player.workForFaction(e):A.Player.workType==h.CONSTANTS.WorkTypeCreateProgram?A.Player.createProgramWork(e):A.Player.workType==h.CONSTANTS.WorkTypeStudyClass?A.Player.takeClass(e):A.Player.workType==h.CONSTANTS.WorkTypeCrime?A.Player.commitCrime(e):A.Player.workType==h.CONSTANTS.WorkTypeCompanyPartTime?A.Player.workPartTime(e):A.Player.work(e)),A.Player.hasWseAccount&&Object(H.processStockPrices)(e),A.Player.inGang()&&A.Player.gang.process(e,A.Player),w.c&&w.b&&w.b.process(e),A.Player.corporation instanceof d.Corporation&&A.Player.corporation.storeCycles(e),A.Player.bladeburner instanceof l.Bladeburner&&A.Player.bladeburner.storeCycles(e);for(let t=0;t<A.Player.sleeves.length;++t)if(A.Player.sleeves[t]instanceof $.Sleeve){const n=A.Player.sleeves[t].process(A.Player,e);if(null==n)continue;for(let a=0;a<A.Player.sleeves.length;++a)a!==t&&A.Player.sleeves[a].gainExperience(A.Player,n,e,!0)}fe.decrementAllCounters(e),fe.checkCounters(),1==fe._actionInProgress&&fe.updateHackProgress(e),Object(N.f)(e),Object(S.j)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,augmentationsNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:5,messages:150,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in fe.Counters)fe.Counters.hasOwnProperty(t)&&(fe.Counters[t]=fe.Counters[t]-e)},checkCounters:function(){if(fe.Counters.autoSaveCounter<=0&&(null==j.Settings.AutosaveInterval&&(j.Settings.AutosaveInterval=60),0===j.Settings.AutosaveInterval?fe.Counters.autoSaveCounter=1/0:(fe.Counters.autoSaveCounter=5*j.Settings.AutosaveInterval,D.b.saveGame(fe.indexedDb))),fe.Counters.updateSkillLevelsCounter<=0&&(A.Player.updateSkillLevels(),fe.Counters.updateSkillLevelsCounter=10),fe.Counters.updateActiveScriptsDisplay<=0&&(J.routing.isOn(J.Page.ActiveScripts)&&he.a.render(pe.a.createElement(te.ActiveScriptsRoot,{p:A.Player,workerScripts:x.workerScripts}),fe.Display.activeScriptsContent),fe.Counters.updateActiveScriptsDisplay=5),fe.Counters.updateDisplays<=0&&(fe.displayCharacterOverviewInfo(),J.routing.isOn(J.Page.HacknetNodes)?Object(S.q)():J.routing.isOn(J.Page.CreateProgram)?Object(I.a)():J.routing.isOn(J.Page.Sleeves)&&Object(K.updateSleevesPage)(),fe.Counters.updateDisplays=3),fe.Counters.updateDisplaysMed<=0&&(J.routing.isOn(J.Page.CharacterInfo)&&fe.updateCharacterInfo(),fe.Counters.updateDisplaysMed=9),fe.Counters.createProgramNotifications<=0){var e=Object(I.b)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),fe.Counters.createProgramNotifications=10}if(fe.Counters.augmentationsNotifications<=0){e=A.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),fe.Counters.augmentationsNotifications=10}if(fe.Counters.checkFactionInvitations<=0){var n=A.Player.checkForFactionInvitations();if(n.length>0){!1===A.Player.firstFacInvRecvd&&(A.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(y.inviteToFaction)(a)}const e=A.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),fe.Counters.checkFactionInvitations=100}if(fe.Counters.passiveFactionGrowth<=0){var i=Math.floor(5-fe.Counters.passiveFactionGrowth);Object(y.processPassiveFactionRepGain)(i),fe.Counters.passiveFactionGrowth=5}if(fe.Counters.messages<=0&&(Object(O.b)(),r.Augmentations[o.AugmentationNames.TheRedPill].owned?fe.Counters.messages=4500:fe.Counters.messages=150),fe.Counters.mechanicProcess<=0){if(A.Player.corporation instanceof d.Corporation&&A.Player.corporation.process(A.Player),A.Player.bladeburner instanceof l.Bladeburner)try{A.Player.bladeburner.process(A.Player)}catch(e){Object(le.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}fe.Counters.mechanicProcess=5}fe.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(m.generateRandomContract)(),fe.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*fe._idleSpeed;fe._actionTimeLeft-=t/1e3,fe._actionTimeLeft=Math.max(fe._actionTimeLeft,0);for(var n=Math.round(100*(1-fe._actionTimeLeft/fe._totalActionTime));2*fe._actionProgressBarCount<=n;)fe._actionProgressStr=Object(a.replaceAt)(fe._actionProgressStr,fe._actionProgressBarCount,"|"),fe._actionProgressBarCount+=1;fe._actionTimeStr="Time left: "+Math.max(0,Math.round(fe._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=fe._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=fe._actionProgressStr.replace(/ /g," "),n>=100&&(fe._actionInProgress=!1,q.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=null,e[t].style.opacity=0,e[t].style.pointerEvents="none"},openMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=e[t].scrollHeight+"px",e[t].style.display="block"},toggleMainMenuHeader:function(e,t,n){for(var a=0;a<t.length;++a)e?(t[a].style.opacity=1,t[a].style.maxHeight=t[a].scrollHeight+"px"):(t[a].style.opacity=0,t[a].style.maxHeight=null);for(a=0;a<n.length;++a)e?(n[a].style.opacity=1,n[a].style.maxHeight=n[a].scrollHeight+"px",n[a].style.pointerEvents="auto"):(n[a].style.opacity=0,n[a].style.maxHeight=null,n[a].style.pointerEvents="none")},load:function(e){const t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),r=document.getElementById("active-scripts-tab"),o=document.getElementById("create-program-tab"),c=document.getElementById("stats-tab"),u=document.getElementById("factions-tab"),m=document.getElementById("augmentations-tab"),f=document.getElementById("hacknet-nodes-tab"),_=document.getElementById("city-tab"),b=document.getElementById("travel-tab"),v=document.getElementById("job-tab"),k=document.getElementById("stock-market-tab"),C=document.getElementById("bladeburner-tab"),T=document.getElementById("corporation-tab"),M=document.getElementById("gang-tab"),w=document.getElementById("milestones-tab"),x=document.getElementById("tutorial-tab"),R=document.getElementById("options-tab"),I=document.getElementById("dev-tab");if(Object(D.a)(e)){Object(s.initBitNodeMultipliers)(A.Player),fe.setDisplayElements(),fe.init(),Object(W.updateSourceFileFlags)(A.Player),Object(i.d)(),A.Player.reapplyAllSourceFiles(),A.Player.hasWseAccount&&Object(H.initSymbolToStockMap)(),fe._lastUpdate=(new Date).getTime();const e=A.Player.lastUpdate,p=fe._lastUpdate-e,P=Math.floor(p/fe._idleSpeed);let O=0;const D=A.Player.moneySourceA.hacking/A.Player.playtimeSinceLastAug*p*.75;if(A.Player.gainMoney(D),Object(N.b)(),A.Player.isWorking)A.Player.focus=!0,A.Player.workType==h.CONSTANTS.WorkTypeFaction?A.Player.workForFaction(P):A.Player.workType==h.CONSTANTS.WorkTypeCreateProgram?A.Player.createProgramWork(P):A.Player.workType==h.CONSTANTS.WorkTypeStudyClass?A.Player.takeClass(P):A.Player.workType==h.CONSTANTS.WorkTypeCrime?A.Player.commitCrime(P):A.Player.workType==h.CONSTANTS.WorkTypeCompanyPartTime?A.Player.workPartTime(P):A.Player.work(P);else for(let e=0;e<A.Player.factions.length;e++){const t=A.Player.factions[e];if(!g.Factions.hasOwnProperty(t))continue;const n=g.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(A.Player.getGangName()===t)continue;const a=Object(E.getHackingWorkRepGain)(A.Player,n),r=Object(E.getFactionSecurityWorkRepGain)(A.Player,n),i=Object(E.getFactionFieldWorkRepGain)(A.Player,n),o=Math.max(a,r,i)/A.Player.factions.length*P;n.playerReputation+=o,O+=o}var B=Object(S.j)(P);const F=Object(S.h)()?pe.a.createElement(pe.a.Fragment,null,Object(Z.Hashes)(B)," hashes"):pe.a.createElement(Q.Money,{money:B});Object(y.processPassiveFactionRepGain)(P),A.Player.hasWseAccount&&Object(H.processStockPrices)(P),A.Player.inGang()&&A.Player.gang.process(P,A.Player),A.Player.corporation instanceof d.Corporation&&A.Player.corporation.storeCycles(P),A.Player.bladeburner instanceof l.Bladeburner&&A.Player.bladeburner.storeCycles(P);for(let e=0;e<A.Player.sleeves.length;++e)if(A.Player.sleeves[e]instanceof $.Sleeve){const t=A.Player.sleeves[e].process(A.Player,P);if(null==t)continue;for(let n=0;n<A.Player.sleeves.length;++n)n!==e&&A.Player.sleeves[n].gainExperience(A.Player,t,P,!0)}var L=P*fe._idleSpeed;null==A.Player.totalPlaytime&&(A.Player.totalPlaytime=0),null==A.Player.playtimeSinceLastAug&&(A.Player.playtimeSinceLastAug=0),null==A.Player.playtimeSinceLastBitnode&&(A.Player.playtimeSinceLastBitnode=0),A.Player.totalPlaytime+=L,A.Player.playtimeSinceLastAug+=L,A.Player.playtimeSinceLastBitnode+=L,A.Player.lastUpdate=fe._lastUpdate,fe.start(),Object(ce.removeLoadingScreen)();const G=Object(a.convertTimeMsToTimeElapsedString)(L);Object(oe.dialogBoxCreate)(pe.a.createElement(pe.a.Fragment,null,"Offline for ",G,". While you were offline, your scripts generated ",pe.a.createElement(Q.Money,{money:D}),", your Hacknet Nodes generated ",F," and you gained ",Object(ee.Reputation)(O)," divided amongst your factions."));var j=[t,n,r,c,f,_,w,x,R,I];A.Player.firstFacInvRecvd?j.push(u):u.style.display="none",A.Player.firstAugPurchased?j.push(m):m.style.display="none",""!==A.Player.companyName?j.push(v):v.style.display="none",A.Player.firstTimeTraveled?j.push(b):b.style.display="none",A.Player.firstProgramAvailable?j.push(o):o.style.display="none",A.Player.hasWseAccount?j.push(k):k.style.display="none",A.Player.bladeburner instanceof l.Bladeburner?j.push(C):C.style.display="none",A.Player.corporation instanceof d.Corporation?j.push(T):T.style.display="none",A.Player.inGang()?j.push(M):M.style.display="none",fe.closeMainMenuHeader(j)}else{Object(s.initBitNodeMultipliers)(A.Player),Object(G.initSpecialServerIps)(),fe.setDisplayElements(),fe.start(),A.Player.init(),Object(F.initForeignServers)(A.Player.getHomeComputer()),Object(p.initCompanies)(),Object(g.initFactions)(),Object(i.d)(),Object(O.c)(),Object(W.updateSourceFileFlags)(A.Player),document.getElementById("hacking-menu-header").classList.toggle("opened"),document.getElementById("character-menu-header").classList.toggle("opened"),document.getElementById("world-menu-header").classList.toggle("opened"),document.getElementById("help-menu-header").classList.toggle("opened"),u.style.display="none",m.style.display="none",v.style.display="none",k.style.display="none",b.style.display="none",o.style.display="none",C.style.display="none",T.style.display="none",M.style.display="none",I.style.display="none",fe.openMainMenuHeader([t,n,r,c,f,_,w,x,R]),Object(P.iTutorialStart)(),Object(ce.removeLoadingScreen)()}Object(X.a)(),q.a.resetTerminalInput()},setDisplayElements:function(){if(fe.Display.terminalContent=document.getElementById("terminal-container"),J.routing.navigateTo(J.Page.Terminal),fe.Display.characterContent=document.getElementById("character-container"),fe.Display.characterContent.style.display="none",fe.Display.scriptEditorContent=document.getElementById("script-editor-container"),fe.Display.scriptEditorContent.style.display="none",fe.Display.activeScriptsContent=document.getElementById("active-scripts-container"),fe.Display.activeScriptsContent.style.display="none",fe.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),fe.Display.hacknetNodesContent.style.display="none",fe.Display.createProgramContent=document.getElementById("create-program-container"),fe.Display.createProgramContent.style.display="none",fe.Display.factionsContent=document.getElementById("factions-container"),fe.Display.factionsContent.style.display="none",fe.Display.factionContent=document.getElementById("faction-container"),fe.Display.factionContent.style.display="none",fe.Display.augmentationsContent=document.getElementById("augmentations-container"),fe.Display.augmentationsContent.style.display="none",fe.Display.milestonesContent=document.getElementById("milestones-container"),fe.Display.milestonesContent.style.display="none",fe.Display.tutorialContent=document.getElementById("tutorial-container"),fe.Display.tutorialContent.style.display="none",fe.Display.infiltrationContent=document.getElementById("infiltration-container"),fe.Display.infiltrationContent.style.display="none",fe.Display.stockMarketContent=document.getElementById("stock-market-container"),fe.Display.stockMarketContent.style.display="none",fe.Display.gangContent=document.getElementById("gang-container"),fe.Display.gangContent.style.display="none",fe.Display.bladeburnerContent=document.getElementById("gang-container"),fe.Display.bladeburnerContent.style.display="none",fe.Display.missionContent=document.getElementById("mission-container"),fe.Display.missionContent.style.display="none",fe.Display.characterInfo=document.getElementById("character-content"),fe.Display.locationContent=document.getElementById("location-container"),fe.Display.locationContent.style.display="none",fe.Display.workInProgressContent=document.getElementById("work-in-progress-container"),fe.Display.workInProgressContent.style.display="none",fe.Display.redPillContent=document.getElementById("red-pill-container"),fe.Display.redPillContent.style.display="none",fe.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),fe.Display.cinematicTextContent.style.display="none",!Object(ae.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(le.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){D.b.importGame()},!Object(ne.initializeMainMenuHeaders)(A.Player,!1)){const e="Failed to initialize Main Menu Headers. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(le.exceptionAlert)(new Error(e)),void console.error(e)}if(ae.MainMenuLinks.Terminal.addEventListener("click",function(){return fe.loadTerminalContent(),!1}),ae.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return fe.loadScriptEditorContent(),!1}),ae.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return fe.loadActiveScriptsContent(),!1}),ae.MainMenuLinks.CreateProgram.addEventListener("click",function(){return fe.loadCreateProgramContent(),!1}),ae.MainMenuLinks.Stats.addEventListener("click",function(){return fe.loadCharacterContent(),!1}),ae.MainMenuLinks.Factions.addEventListener("click",function(){return fe.loadFactionsContent(),!1}),ae.MainMenuLinks.Augmentations.addEventListener("click",function(){return fe.loadAugmentationsContent(),!1}),ae.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return fe.loadHacknetNodesContent(),!1}),ae.MainMenuLinks.Sleeves.addEventListener("click",function(){return fe.loadSleevesContent(),ae.MainMenuLinks.Sleeves.classList.add("active"),!1}),ae.MainMenuLinks.City.addEventListener("click",function(){return fe.loadLocationContent(),!1}),ae.MainMenuLinks.Travel.addEventListener("click",function(){return fe.loadTravelContent(),!1}),ae.MainMenuLinks.Job.addEventListener("click",function(){return fe.loadJobContent(),!1}),ae.MainMenuLinks.StockMarket.addEventListener("click",function(){return fe.loadStockMarketContent(),ae.MainMenuLinks.StockMarket.classList.add("active"),!1}),ae.MainMenuLinks.Bladeburner.addEventListener("click",function(){return fe.loadBladeburnerContent(),!1}),ae.MainMenuLinks.Corporation.addEventListener("click",function(){return fe.loadCorporationContent(),ae.MainMenuLinks.Corporation.classList.add("active"),!1}),ae.MainMenuLinks.Gang.addEventListener("click",function(){return fe.loadGangContent(),ae.MainMenuLinks.Gang.classList.add("active"),!1}),ae.MainMenuLinks.Milestones.addEventListener("click",function(){return fe.loadMilestonesContent(),!1}),ae.MainMenuLinks.Tutorial.addEventListener("click",function(){return fe.loadTutorialContent(),!1}),ae.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),fe.ActiveScriptsList=document.getElementById("active-scripts-list"),fe.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),fe.Clickables.saveMainMenuButton.addEventListener("click",function(){return D.b.saveGame(fe.indexedDb),!1}),fe.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),fe.Clickables.deleteMainMenuButton.addEventListener("click",function(){return D.b.deleteGame(fe.indexedDb),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return D.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return D.b.saveGame(fe.indexedDb),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(se.b)(),!1}),Object(I.c)(),Object(q.b)(),A.Player.isWorking){document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){A.Player.workType==h.CONSTANTS.WorkTypeFaction?A.Player.finishFactionWork(!0):A.Player.workType==h.CONSTANTS.WorkTypeCreateProgram?A.Player.finishCreateProgramWork(!0):A.Player.workType==h.CONSTANTS.WorkTypeStudyClass?A.Player.finishClass():A.Player.workType==h.CONSTANTS.WorkTypeCrime?A.Player.finishCrime(!0):A.Player.workType==h.CONSTANTS.WorkTypeCompanyPartTime?A.Player.finishWorkPartTime():A.Player.finishWork(!0)});const e=document.getElementById("work-in-progress-something-else-button");e.style.visibility="hidden",[h.CONSTANTS.WorkTypeFaction,h.CONSTANTS.WorkTypeCompanyPartTime,h.CONSTANTS.WorkTypeCompany].includes(A.Player.workType)&&(e.style.visibility="visible",e.addEventListener("click",function(){A.Player.stopFocusing()})),fe.loadWorkInProgressContent()}document.getElementById("character-overview-container").style.display="block",document.getElementById("terminal-menu-link").removeAttribute("class"),document.getElementById("stats-menu-link").removeAttribute("class"),document.getElementById("create-script-menu-link").removeAttribute("class"),document.getElementById("active-scripts-menu-link").removeAttribute("class"),document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),document.getElementById("city-menu-link").removeAttribute("class"),document.getElementById("milestones-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("copy-save-to-clipboard-link").addEventListener("click",function(){const e=D.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then(function(){Object(Y.createStatusText)("Copied save to clipboard")},function(e){console.error(e),console.error("Unable to copy save data to clipboard using Async API"),Object(Y.createStatusText)("Failed to copy save")});else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object(Y.createStatusText)("Copied save to clipboard"):Object(Y.createStatusText)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object(Y.createStatusText)("Failed to copy save")}document.body.removeChild(t)}}),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){for(const e of Object.keys(F.AllServers))F.AllServers[e].runningScripts=[];return Object(oe.dialogBoxCreate)("Forcefully deleted all running scripts. Please save and refresh page."),Object(se.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(oe.dialogBoxCreate)("Soft Reset!"),Object(R.a)(),Object(se.a)(),!1}),document.getElementById("debug-files").addEventListener("click",function(){return Object(ie.createPopup)("debug-files-diagnostic-popup",re.FileDiagnosticPopup,{}),!1})},start:function(){fe.idleTimer()}};var ge;window.onload=function(){if(!window.indexedDB)return fe.load(null);(ge=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.error("Error opening indexedDB: "),console.error(e),fe.load(null)},ge.onsuccess=function(e){fe.indexedDb=e.target.result;var t=fe.indexedDb.transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.error("Error in Database request to get savestring: "+e),fe.load(null)},t.onsuccess=function(){fe.load(t.result)}},ge.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(145))},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const o=i(n(0)),s=n(19),l=n(17),c=n(6),u=n(21),m=n(29);class p{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){this.baseCost=0,this.baseRepRequirement=0,this.isSpecial=!1,this.level=0,this.name="",this.owned=!1,this.prereqs=[],this.mults={},this.startingCost=0,this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*s.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*s.BitNodeMultipliers.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,n){const a=(e,t=0)=>e===1.0777-1?"7.77%":e===1.777-1?"77.7%":c.numeralWrapper.formatPercentage(e,t);let r=o.createElement(o.Fragment,null,"Effects:");return e.hacking_mult&&e.hacking_mult==e.strength_mult&&e.hacking_mult==e.defense_mult&&e.hacking_mult==e.dexterity_mult&&e.hacking_mult==e.agility_mult&&e.hacking_mult==e.charisma_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," all skills"):(e.hacking_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," hacking skill")),e.strength_mult&&e.strength_mult==e.defense_mult&&e.strength_mult==e.dexterity_mult&&e.strength_mult==e.agility_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," combat skills"):(e.strength_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," strength skill")),e.defense_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_mult-1)," defense skill")),e.dexterity_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_mult-1)," dexterity skill")),e.agility_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_mult-1)," agility skill"))),e.charisma_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_mult-1)," Charisma skill"))),e.hacking_exp_mult&&e.hacking_exp_mult===e.strength_exp_mult&&e.hacking_exp_mult===e.defense_exp_mult&&e.hacking_exp_mult===e.dexterity_exp_mult&&e.hacking_exp_mult===e.agility_exp_mult&&e.hacking_exp_mult===e.charisma_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," exp for all skills"):(e.hacking_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," hacking exp")),e.strength_exp_mult&&e.strength_exp_mult===e.defense_exp_mult&&e.strength_exp_mult===e.dexterity_exp_mult&&e.strength_exp_mult===e.agility_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," combat exp"):(e.strength_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," strength exp")),e.defense_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_exp_mult-1)," defense exp")),e.dexterity_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_exp_mult-1)," dexterity exp")),e.agility_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_exp_mult-1)," agility exp"))),e.charisma_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_exp_mult-1)," charisma exp"))),e.hacking_speed_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_speed_mult-1)," faster hacking")),e.hacking_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_chance_mult-1)," hack() success chance")),e.hacking_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_money_mult-1)," hack() power")),e.hacking_grow_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_grow_mult-1)," grow() power")),e.faction_rep_mult&&e.faction_rep_mult===e.company_rep_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions and companies"):(e.faction_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions")),e.company_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.company_rep_mult-1)," reputation from companies"))),e.crime_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_money_mult-1)," crime money")),e.crime_success_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_success_mult-1)," crime success rate")),e.work_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.work_money_mult-1)," work money")),e.hacknet_node_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacknet_node_money_mult-1)," hacknet production")),e.hacknet_node_purchase_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),e.hacknet_node_level_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),e.bladeburner_max_stamina_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),e.bladeburner_stamina_gain_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),e.bladeburner_analysis_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),e.bladeburner_success_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),n&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",o.createElement(u.Money,{money:n})," after installing Augmentations.")),t&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",t.join(" and ")," after installing Augmentations.")),r}(this.mults,e.programs,e.startingMoney)}addToFactions(e){for(let t=0;t<e.length;++t){const n=l.Factions[e[t]];null!=n?n.augmentations.push(this.name):console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${e[t]}`)}}addToAllFactions(){for(const e in l.Factions)if(l.Factions.hasOwnProperty(e)){const t=l.Factions[e];if(null==t){console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${e}`);continue}t.augmentations.push(this.name)}}toJSON(){return m.Generic_toJSON("Augmentation",this)}static fromJSON(e){return m.Generic_fromJSON(p,e.data)}}t.Augmentation=p,m.Reviver.constructors.Augmentation=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetFaction=t.initFactions=t.factionExists=t.AddToFactions=t.loadFactions=t.Factions=void 0;const a=n(126),r=n(758),i=n(29);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof a.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,i.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(){for(const e in r.FactionInfos)l(new a.Faction(e))},t.resetFaction=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.routing=t.Page=void 0,function(e){e.Terminal="Terminal",e.CharacterInfo="CharacterInfo",e.ScriptEditor="ScriptEditor",e.ActiveScripts="ActiveScripts",e.HacknetNodes="HacknetNodes",e.CreateProgram="CreateProgram",e.Factions="Factions",e.Faction="Faction",e.Augmentations="Augmentations",e.Milestones="Milestones",e.Tutorial="Tutorial",e.DevMenu="Dev Menu",e.Location="Location",e.workInProgress="WorkInProgress",e.RedPill="RedPill",e.CinematicText="CinematicText",e.Infiltration="Infiltration",e.StockMarket="StockMarket",e.Gang="Gang",e.Mission="Mission",e.Corporation="Corporation",e.Bladeburner="Bladeburner",e.Sleeves="Sleeves",e.Resleeves="Re-sleeving"}(t.Page||(t.Page={}));t.routing=new class{constructor(){this.currentPage=null}isOn(e){return this.currentPage===e}navigateTo(e){this.currentPage=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers=void 0,t.BitNodeMultipliers={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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadAllServers=t.prestigeAllServers=t.initForeignServers=t.AddToAllServers=t.createUniqueRandomIp=t.ipExists=t.AllServers=void 0;const a=n(501),r=n(38),i=n(1130),o=n(413),s=n(44),l=n(29);function c(e){return null!=t.AllServers[e]}function u(){const e=o.createRandomIp();return c(e)?o.createRandomIp():e}function m(e){const n=e.ip;if(c(n))throw console.warn(`IP of server that's being added: ${n}`),console.warn(`Hostname of the server thats being added: ${e.hostname}`),console.warn(`The server that already has this IP is: ${t.AllServers[n].hostname}`),new Error("Error: Trying to add a server with an existing IP");t.AllServers[n]=e}t.AllServers={},t.ipExists=c,t.createUniqueRandomIp=u,t.AddToAllServers=m,t.initForeignServers=function(e){const t=[];for(let e=0;e<15;e++)t.push([]);const n=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],o=e=>{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new a.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&r.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;e<t.length;e++)p(t[e],()=>c(t[e-1]))},t.prestigeAllServers=function(){for(const e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Money=void 0;const o=i(n(0)),s=n(6);t.Money=function(e){if(void 0!==e.player){if("number"!=typeof e.money)throw new Error("if player if provided, money should be number, contact dev");if(!e.player.canAfford(e.money))return o.createElement("span",{className:"unbuyable samefont"},s.numeralWrapper.formatMoney(e.money))}return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e.money?s.numeralWrapper.formatMoney(e.money):e.money)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBackdoorInstalled=t.getServerOnNetwork=t.getServer=t.GetServerByHostname=t.prestigeHomeComputer=t.processSingleServerGrowth=t.numCycleForGrowth=t.safetlyCreateUniqueServer=void 0;const a=n(20),r=n(501),i=n(547),o=n(19),s=n(11),l=n(30),c=n(148),u=n(1129),m=n(704);function p(e,t,n){let a=1+(s.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>s.CONSTANTS.ServerMaxGrowthRate&&(a=s.CONSTANTS.ServerMaxGrowthRate);const r=e.serverGrowth/100;return Math.log(t)/(Math.log(a)*n.hacking_grow_mult*r*o.BitNodeMultipliers.ServerGrowthRate)}function d(e){for(const t in a.AllServers)if(a.AllServers.hasOwnProperty(t)&&a.AllServers[t].hostname==e)return a.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&a.ipExists(e.ip)&&(e.ip=a.createUniqueRandomIp()),null!=d(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=d(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new r.Server(e)},t.numCycleForGrowth=p,t.processSingleServerGrowth=function(e,t,n,a=1){let r=i.calculateServerGrowth(e,t,n,a);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const o=e.moneyAvailable;if(e.moneyAvailable*=r,u.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),u.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),o!==e.moneyAvailable){let t=p(e,e.moneyAvailable/o,n);t=Math.max(0,t),e.fortify(2*s.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/o},t.prestigeHomeComputer=function(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push(c.LiteratureNames.HackersStartingHandbook)},t.GetServerByHostname=d,t.getServer=function(e){return m.isValidIPAddress(e)?void 0!==a.AllServers[e]?a.AllServers[e]:null:d(e)},t.getServerOnNetwork=function(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):a.AllServers[e.serversOnNetwork[t]]},t.isBackdoorInstalled=function(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceAt=t.generateRandomString=t.isHTML=t.formatNumber=t.containsAllStrings=t.longestCommonStart=t.convertTimeMsToTimeElapsedString=void 0;const a=n(73);function r(e){return e.every(a.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e,t=!1){e=Math.floor(e);const n=Math.floor(e/1e3),a=Math.floor(n/86400),r=n%86400,i=Math.floor(r/3600),o=r%3600,s=Math.floor(o/60),l=o%60,c=(()=>{let t=`${e%1e3}`;for(;t.length<3;)t="0"+t;return t})(),u=t?`${l}.${c}`:`${l}`;let m="";return a>0&&(m+=`${a} days `),i>0&&(m+=`${i} hours `),s>0&&(m+=`${s} minutes `),m+=`${u} seconds`},t.longestCommonStart=function(e){if(!r(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o<i&&s(n.charAt(o),a.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=r,t.formatNumber=function(e,t=0){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})},t.isHTML=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.childNodes;for(let e=n.length-1;e>=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a<e;a++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;const a=n(227),r={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1};t.Settings={AutosaveInterval:r.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:r.DisableASCIIArt,DisableHotkeys:r.DisableHotkeys,DisableTextEffects:r.DisableTextEffects,Locale:"en",MaxLogCapacity:r.MaxLogCapacity,MaxPortCapacity:r.MaxPortCapacity,OwnedAugmentationsOrder:a.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:a.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:r.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:r.SuppressFactionInvites,SuppressHospitalizationPopup:r.SuppressHospitalizationPopup,SuppressMessages:r.SuppressMessages,SuppressTravelConfirmation:r.SuppressTravelConfirmation,SuppressBladeburnerPopup:r.SuppressBladeburnerPopup,MonacoTheme:"vs-dark",MonacoInsertSpaces:!1,init(){Object.assign(t.Settings,r)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";n.d(t,"h",function(){return C}),n.d(t,"m",function(){return S}),n.d(t,"i",function(){return P}),n.d(t,"b",function(){return T}),n.d(t,"c",function(){return M}),n.d(t,"f",function(){return O}),n.d(t,"g",function(){return w}),n.d(t,"e",function(){return x}),n.d(t,"d",function(){return N}),n.d(t,"o",function(){return A}),n.d(t,"p",function(){return R}),n.d(t,"l",function(){return I}),n.d(t,"k",function(){return B}),n.d(t,"q",function(){return D}),n.d(t,"a",function(){return L}),n.d(t,"j",function(){return F}),n.d(t,"r",function(){return W}),n.d(t,"n",function(){return G});var a=n(561),r=n(157),i=n(141),o=n(33),s=n(79),l=n(178),c=n(246),u=n(177),m=n(45),p=n(1),d=n(20),h=n(23),f=n(37),g=n(18),y=n(0),_=n.n(y),b=n(22),v=n.n(b),k=n(464);let E;function C(){return 9===p.Player.bitNodeN||f.SourceFileFlags[9]>0}function S(){if(m.ITutorial.isRunning){if(m.ITutorial.currStep!==m.iTutorialSteps.HacknetNodesIntroduction)return;Object(m.iTutorialNextStep)()}const e=p.Player.hacknetNodes.length;if(C()){const t=M();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return p.Player.canAfford(t)?(p.Player.loseMoney(t),p.Player.createHacknetServer(),W(),e):-1}{const t=T();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!p.Player.canAfford(t))return-1;const n="hacknet-node-"+e,r=new a.HacknetNode(n,p.Player.hacknet_node_money_mult);return p.Player.loseMoney(t),p.Player.hacknetNodes.push(r),e}}function P(){return C()&&p.Player.hacknetNodes.length>=o.HacknetServerConstants.MaxServers}function T(){return Object(r.calculateNodeCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function M(){return Object(i.calculateServerCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function O(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateLevelUpgradeCost(1,p.Player.hacknet_node_level_cost_mult)))return 0;let n=1,a=t-1,r=t-e.level;if(p.Player.money.gt(e.calculateLevelUpgradeCost(r,p.Player.hacknet_node_level_cost_mult)))return r;for(;n<=a;){var i=(n+a)/2|0;if(i!==t&&p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult))&&p.Player.money.lt(e.calculateLevelUpgradeCost(i+1,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function w(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateRamUpgradeCost(1,p.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof s.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),p.Player.money.gt(e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(p.Player.money.gt(e.calculateRamUpgradeCost(t,p.Player.hacknet_node_ram_cost_mult)))return t;return 0}function x(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateCoreUpgradeCost(1,p.Player.hacknet_node_core_cost_mult)))return 0;let n=1,a=t-1;const r=t-e.cores;if(p.Player.money.gt(e.calculateCoreUpgradeCost(r,p.Player.hacknet_node_core_cost_mult)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult))&&p.Player.money.lt(e.calculateCoreUpgradeCost(i+1,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function N(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!p.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,a=t-1;const r=t-e.cache;if(p.Player.canAfford(e.calculateCacheUpgradeCost(r)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!p.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(r,i);if(p.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!p.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(r,i);n=i+1}else a=i-1}return 0}function A(e,t=1){const n=Math.round(t),a=e.calculateLevelUpgradeCost(n,p.Player.hacknet_node_level_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.level>=(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel))return!1;if(e.level+n>(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)){return A(e,Math.max(0,(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)-e.level))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeLevel(n,p.Player.hacknet_node_money_mult),!0)}function R(e,t=1){const n=Math.round(t),a=e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.ram>=(r?o.HacknetServerConstants.MaxRam:o.HacknetNodeConstants.MaxRam))return!1;if(r){if(e.maxRam*Math.pow(2,n)>o.HacknetServerConstants.MaxRam){return R(e,Math.max(0,Math.log2(Math.round(o.HacknetServerConstants.MaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>o.HacknetNodeConstants.MaxRam){return R(e,Math.max(0,Math.log2(Math.round(o.HacknetNodeConstants.MaxRam/e.ram))))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeRam(n,p.Player.hacknet_node_money_mult),!0)}function I(e,t=1){const n=Math.round(t),a=e.calculateCoreUpgradeCost(n,p.Player.hacknet_node_core_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.cores>=(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores))return!1;if(e.cores+n>(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)){return I(e,Math.max(0,(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)-e.cores))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCore(n,p.Player.hacknet_node_money_mult),!0)}function B(e,t=1){const n=Math.round(t),a=e.calculateCacheUpgradeCost(n);if(isNaN(a)||a<=0||n<0)return!1;if(!(e instanceof s.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.HacknetServerConstants.MaxCache){return B(e,Math.max(0,o.HacknetServerConstants.MaxCache-e.cache))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCache(n),!0)}function D(){g.routing.isOn(g.Page.HacknetNodes)&&v.a.render(_.a.createElement(k.a,null),E)}function L(){E instanceof HTMLElement&&v.a.unmountComponentAtNode(E),E.style.display="none"}function F(e){return 0===p.Player.hacknetNodes.length?0:C()?function(e){if(!(p.Player.hashManager instanceof l.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n){const a=d.AllServers[p.Player.hacknetNodes[n]];a.updateHashRate(p.Player.hacknet_node_money_mult);const r=a.process(e);a.totalHashesGenerated+=r,t+=r}return p.Player.hashManager.storeHashes(t),t}(e):p.Player.hacknetNodes[0]instanceof a.HacknetNode?function(e){let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n)t+=j(e,p.Player.hacknetNodes[n]);return t}(e):0}function j(e,t){const n=t.process(e);return p.Player.gainMoney(n),p.Player.recordMoneySource(n,"hacknetnode"),n}function W(){if(!(p.Player.hashManager instanceof l.HashManager))return void console.error("Player does not have a HashManager");const e=p.Player.hacknetNodes;if(0===e.length)return void p.Player.hashManager.updateCapacity(0);let t=0;for(let n=0;n<e.length;++n){if("string"!=typeof e[n])return void p.Player.hashManager.updateCapacity(0);const a=d.AllServers[e[n]];if(!(a instanceof s.HacknetServer))return void p.Player.hashManager.updateCapacity(0);t+=a.hashCapacity}p.Player.hashManager.updateCapacity(t)}function G(e,t){if(!(p.Player.hashManager instanceof l.HashManager))return console.error("Player does not have a HashManager"),!1;if(p.Player.hashManager.upgrade(e)){const n=c.HashUpgrades[e];switch(e){case"Sell for Money":p.Player.gainMoney(n.value),p.Player.recordMoneySource(n.value,"hacknetnode");break;case"Sell for Corporation Funds":try{p.Player.corporation.funds=p.Player.corporation.funds.plus(n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Reduce Minimum Security":try{const a=Object(h.GetServerByHostname)(t);if(null==a)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;a.changeMinimumSecurity(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Increase Maximum Money":try{const a=Object(h.GetServerByHostname)(t);if(null==a)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;a.changeMaximumMoney(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Improve Studying":case"Improve Gym Training":break;case"Exchange for Corporation Research":try{for(const e of p.Player.corporation.divisions)e.sciResearch.qty+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner Rank":try{p.Player.bladeburner.changeRank(p.Player,n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner SP":try{p.Player.bladeburner.skillPoints+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Generate Coding Contract":Object(u.generateRandomContract)();break;default:return console.warn(`Unrecognized upgrade name ${e}. Upgrade has no effect`),p.Player.hashManager.refundUpgrade(e),!1}return!0}return!1}document.addEventListener("DOMContentLoaded",function e(){E=document.getElementById("hacknet-nodes-container"),document.removeEventListener("DOMContentLoaded",e)})},,,function(e,t,n){"use strict";function a(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function r(e,t,n){var a,r;n||(n=Object.keys(t)),a={};for(let e=0;e<n.length;++e)a[r=n[e]]=t[r];return{ctor:e,data:a}}function i(e,t){var n,a;for(a in n=new e,t)n[a]=t[a];return n}n.r(t),n.d(t,"Reviver",function(){return a}),n.d(t,"Generic_toJSON",function(){return r}),n.d(t,"Generic_fromJSON",function(){return i}),a.constructors={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Programs=void 0;const a=n(1295),r=n(1294);t.Programs={};for(const e of r.programsMetadata)t.Programs[e.key]=new a.Program(e.name,e.create)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuLinks=t.MainMenuLinks=void 0;const a=n(50),r=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})();t.MainMenuLinks={Terminal:r,ScriptEditor:r,ActiveScripts:r,CreateProgram:r,Stats:r,Factions:r,Augmentations:r,HacknetNodes:r,Sleeves:r,City:r,Travel:r,Job:r,StockMarket:r,Bladeburner:r,Corporation:r,Gang:r,Milestones:r,Tutorial:r,Options:r,DevMenu:r},t.initializeMainMenuLinks=function(){try{function e(e){const t=a.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Milestones=e("milestones-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link");const n=document.getElementById("options-menu-link");if(null===n)throw new Error('Could not find element with id: "options-menu-link"');return t.MainMenuLinks.Options=n,t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.companyExists=t.loadCompanies=t.initCompanies=t.Companies=void 0;const a=n(1296),r=n(140),i=n(29);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},a.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new r.Company(e)}(e)});for(const n in t.Companies){const a=t.Companies[n];e[n]instanceof r.Company?(a.favor=e[n].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServerConstants=t.HacknetNodeConstants=void 0,t.HacknetNodeConstants={MoneyGainPerLevel:1.6,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},t.HacknetServerConstants={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSourceFileFlags=t.SourceFileFlags=void 0;const a=n(11);t.SourceFileFlags=Array(a.CONSTANTS.TotalNumBitNodes+1),t.updateSourceFileFlags=function(e){for(let e=0;e<t.SourceFileFlags.length;++e)t.SourceFileFlags[e]=0;for(let n=0;n<e.sourceFiles.length;++n){const a=e.sourceFiles[n];t.SourceFileFlags[a.n]=a.lvl}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSpecialServerIps=t.loadSpecialServerIps=t.prestigeSpecialServerIps=t.SpecialServerIps=t.SpecialServerIpsMap=t.SpecialServerNames=void 0;const a=n(29);t.SpecialServerNames={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};class r{addIp(e,t){this[e]=t}getIp(e){return this[e]}toJSON(){return a.Generic_toJSON("SpecialServerIpsMap",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.SpecialServerIpsMap=r,a.Reviver.constructors.SpecialServerIpsMap=r,t.SpecialServerIps=new r,t.prestigeSpecialServerIps=function(){for(const e in t.SpecialServerIps)delete t.SpecialServerIps[e];t.SpecialServerIps=new r},t.loadSpecialServerIps=function(e){t.SpecialServerIps=JSON.parse(e,a.Reviver)},t.initSpecialServerIps=function(){t.SpecialServerIps=new r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FconfSettings=void 0,t.FconfSettings={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1,MAIN_MENU_STYLE:"default",THEME_BACKGROUND_COLOR:"#000000",THEME_FONT_COLOR:"#66ff33",THEME_HIGHLIGHT_COLOR:"#ffffff",THEME_PROMPT_COLOR:"#f92672",WRAP_INPUT:!1}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.removePopup=t.createPopup=void 0;const o=i(n(0)),s=i(n(22)),l=n(1349),c=n(52),u=n(96);let m;!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");m=t,document.removeEventListener("DOMContentLoaded",e)})}();let p="";function d(e){const t=document.getElementById(`${e}`);null!=t&&(s.unmountComponentAtNode(t),u.removeElementById(e),u.removeElementById(`${e}-close`),e===p&&(p=""))}t.createPopup=function(e,t,n){let a=document.getElementById(e);if(null==a){const t=""===p?"rgba(0,0,0,0.5)":"rgba(0,0,0,0)";a=c.createElement("div",{class:"popup-box-container",display:"flex",id:e,backgroundColor:t,clickListener:function(t){t.srcElement&&t.srcElement instanceof HTMLElement&&t.srcElement.id===e&&d(e)}}),m.appendChild(a)}return""===p&&(p=e),s.render(o.createElement(l.Popup,{content:t,id:e,props:n,removePopup:d}),a),a},t.removePopup=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationName=void 0,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"}(t.LocationName||(t.LocationName={}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CityName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=function(e,t){const n=Math.min(e,t),a=Math.max(e,t);return Math.floor(Math.random()*(a-n+1))+n}},function(e,t,n){"use strict";n.r(t),n.d(t,"iTutorialSteps",function(){return h}),n.d(t,"iTutorialEnd",function(){return b}),n.d(t,"iTutorialStart",function(){return g}),n.d(t,"iTutorialNextStep",function(){return _}),n.d(t,"ITutorial",function(){return f});var a=n(15),r=n(1),i=n(25),o=n(31),s=n(148),l=n(90),c=n(50),u=n(52),m=n(147),p=n(96);const d=["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"],h={};for(let e=0;e<d.length;++e)h[d[e]]=e;const f={currStep:0,isRunning:!1,stepIsDone:{}};function g(){f.stepIsDone={};for(let e=0;e<d.length;++e)f.stepIsDone[e]=!1;a.Engine.loadTerminalContent(),a.Engine.Counters.autoSaveCounter=1/0,f.currStep=0,f.isRunning=!0,document.getElementById("interactive-tutorial-container").style.display="block",Object(c.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return b(),!1}),Object(c.clearEventListeners)("interactive-tutorial-back").addEventListener("click",function(){return function(){f.currStep>h.Start&&(f.currStep-=1);y()}(),!1}),Object(c.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return _(),!1}),y()}function y(){if(!f.isRunning)return;const e=Object(c.clearEventListeners)("terminal-menu-link"),t=Object(c.clearEventListeners)("stats-menu-link"),n=Object(c.clearEventListeners)("active-scripts-menu-link"),r=Object(c.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(c.clearEventListeners)("city-menu-link"),o=Object(c.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),r.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");const s=document.getElementById("interactive-tutorial-next");switch(f.currStep){case h.Start:a.Engine.loadTerminalContent(),k("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case h.GoToCharacterPage:a.Engine.loadTerminalContent(),k("Let's start by heading to the Stats page. Click the <code class='interactive-tutorial-tab flashing-button'>Stats</code> tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return a.Engine.loadCharacterContent(),_(),!1});break;case h.CharacterPage:a.Engine.loadCharacterContent(),k("The <code class='interactive-tutorial-tab'>Stats</code> page shows a lot of important information about your progress, such as your skills, money, and bonuses. "),s.style.display="inline-block";break;case h.CharacterGoToTerminalPage:a.Engine.loadCharacterContent(),k("Let's head to your computer's terminal by clicking the <code class='interactive-tutorial-tab flashing-button'>Terminal</code> tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),_(),!1});break;case h.TerminalIntro:a.Engine.loadTerminalContent(),k("The <code class='interactive-tutorial-tab'>Terminal</code> is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case h.TerminalHelp:a.Engine.loadTerminalContent(),k("Let's try it out. Start by entering the <code class='interactive-tutorial-command'>help</code> command into the <code class='interactive-tutorial-tab'>Terminal</code> (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case h.TerminalLs:a.Engine.loadTerminalContent(),k("The <code class='interactive-tutorial-command'>help</code> command displays a list of all available <code class='interactive-tutorial-tab'>Terminal</code> commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the <code class='interactive-tutorial-command'>ls</code> command."),s.style.display="none";break;case h.TerminalScan:a.Engine.loadTerminalContent(),k(" <code class='interactive-tutorial-command'>ls</code> is a basic command that shows files on the computer. Right now, it shows that you have a program called <code class='interactive-tutorial-command'>NUKE.exe</code> on your computer. We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the <code class='interactive-tutorial-command'>scan</code> command."),s.style.display="none";break;case h.TerminalScanAnalyze1:a.Engine.loadTerminalContent(),k("The <code class='interactive-tutorial-command'>scan</code> 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. <br><br> That's great and all, but there's so many servers. Which one should you go to? The <code class='interactive-tutorial-command'>scan-analyze</code> command gives some more detailed information about servers on the network. Try it now!"),s.style.display="none";break;case h.TerminalScanAnalyze2:a.Engine.loadTerminalContent(),k("You just ran <code class='interactive-tutorial-command'>scan-analyze</code> 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). <br><br> It is also possible to run <code class='interactive-tutorial-command'>scan-analyze</code> with a higher depth. Let's try a depth of two with the following command: <code class='interactive-tutorial-command'>scan-analyze 2</code>."),s.style.display="none";break;case h.TerminalConnect:a.Engine.loadTerminalContent(),k("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 <code class='interactive-tutorial-command'>connect [hostname]</code> command.<br><br>From the results of the <code class='interactive-tutorial-command'>scan-analyze</code> command, we can see that the <code class='interactive-tutorial-command'>n00dles</code> server is only one node away. Let's connect so it now using: <code class='interactive-tutorial-command'>connect n00dles</code>"),s.style.display="none";break;case h.TerminalAnalyze:a.Engine.loadTerminalContent(),k("You are now connected to another machine! What can you do now? You can hack it!<br><br> 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. <br><br> Before you try to hack a server, you should run diagnostics using the <code class='interactive-tutorial-command'>analyze</code> command."),s.style.display="none";break;case h.TerminalNuke:a.Engine.loadTerminalContent(),k("When the <code class='interactive-tutorial-command'>analyze</code> command finishes running it will show useful information about hacking the server. <br><br> For this server, the required hacking skill is only <span class='character-hack-cell'>1</span>, which means you can hack it right now. However, in order to hack a server you must first gain root access. The <code class='interactive-tutorial-command'>NUKE.exe</code> 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.<br><br> The <code class='interactive-tutorial-command'>analyze</code> 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 <code class='interactive-tutorial-command'>run NUKE.exe</code> command."),s.style.display="none";break;case h.TerminalManualHack:a.Engine.loadTerminalContent(),k("You now have root access! You can hack the server using the <code class='interactive-tutorial-command'>hack</code> command. Try doing that now."),s.style.display="none";break;case h.TerminalHackingMechanics:a.Engine.loadTerminalContent(),k("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.<br><br>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.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),s.style.display="inline-block";break;case h.TerminalCreateScript:a.Engine.loadTerminalContent(),k("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!<br><br>To create a new script or edit an existing one, you can use the <code class='interactive-tutorial-command'>nano</code> command. Scripts must end with the <code class='interactive-tutorial-command'>.script</code> extension. Let's make a script now by entering <code class='interactive-tutorial-command'>nano n00dles.script</code> after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),s.style.display="none";break;case h.TerminalTypeScript:a.Engine.loadScriptEditorContent("n00dles.script",""),k("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: <br><br><pre class='interactive-tutorial-code'>while(true) {\n hack('n00dles');\n}</pre>For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the <code class='interactive-tutorial-command'>n00dles</code> server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case h.TerminalFree:a.Engine.loadTerminalContent(),k("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.<br><br>To check how much RAM is available on this machine, enter the <code class='interactive-tutorial-command'>free</code> command."),s.style.display="none";break;case h.TerminalRunScript:a.Engine.loadTerminalContent(),k("We have 4GB of free RAM on this machine, which is enough to run our script. Let's run our script using <code class='interactive-tutorial-command'>run n00dles.script</code>."),s.style.display="none";break;case h.TerminalGoToActiveScriptsPage:a.Engine.loadTerminalContent(),k("Your script is now running! It will continuously run in the background and will automatically stop if the code ever completes (the <code class='interactive-tutorial-command'>n00dles.script</code> will never complete because it runs an infinite loop). <br><br>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. <br><br> Let's check out some statistics for our running scripts by clicking the <code class='interactive-tutorial-tab flashing-button'>Active Scripts</code> link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return a.Engine.loadActiveScriptsContent(),_(),!1});break;case h.ActiveScriptsPage:a.Engine.loadActiveScriptsContent(),k("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 <code class='interactive-tutorial-tab flashing-button'>Terminal</code>"),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),_(),!1});break;case h.ActiveScriptsToTerminal:a.Engine.loadTerminalContent(),k("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the <code class='interactive-tutorial-command'>tail</code> command. Do that now for the script we just ran by typing <code class='interactive-tutorial-command'>tail n00dles.script</code>"),s.style.display="none";break;case h.TerminalTailScript:a.Engine.loadTerminalContent(),k("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! <br><br>This covers the basics of hacking. To learn more about writing scripts, select the <code class='interactive-tutorial-tab'>Tutorial</code> link in the main navigation menu to look at the documentation. <strong style='background-color:#444;'>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.</strong><br><br>For now, let's move on to something else!"),s.style.display="inline-block";break;case h.GoToHacknetNodesPage:a.Engine.loadTerminalContent(),k("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 <code class='interactive-tutorial-tab flashing-button'>Hacknet</code> page through the main navigation menu now."),s.style.display="none",r.setAttribute("class","flashing-button"),r.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),_(),!1});break;case h.HacknetNodesIntroduction:a.Engine.loadHacknetNodesContent(),k("here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case h.HacknetNodesGoToWorldPage:a.Engine.loadHacknetNodesContent(),k("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.<br><br>Let's go to the <code class='interactive-tutorial-tab flashing-button'>City</code> page through the main navigation menu."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return a.Engine.loadLocationContent(),_(),!1});break;case h.WorldDescription:a.Engine.loadLocationContent(),k("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!<br><br>Lastly, click on the <code class='interactive-tutorial-tab flashing-button'>Tutorial</code> link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return a.Engine.loadTutorialContent(),_(),!1});break;case h.TutorialPageInfo:a.Engine.loadTutorialContent(),k("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case h.End:b();break;default:throw new Error("Invalid tutorial step")}!0===f.stepIsDone[f.currStep]&&(s.style.display="inline-block")}function _(){f.currStep===h.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),f.currStep===h.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),f.currStep===h.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),f.currStep===h.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),f.currStep===h.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),f.currStep===h.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),f.currStep===h.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),f.stepIsDone[f.currStep]=!0,f.currStep<h.End&&(f.currStep+=1),y()}function b(){if(0===i.Settings.AutosaveInterval?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*i.Settings.AutosaveInterval,!Object(o.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(l.exceptionAlert)(new Error(e)),void console.error(e)}a.Engine.init(),f.currStep=h.End,f.isRunning=!1,document.getElementById("interactive-tutorial-container").style.display="none";const e="interactive-tutorial-ending-popup",t=Object(u.createElement)("p",{innerHTML:"If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>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<br><br>cat "+s.LiteratureNames.HackersStartingHandbook}),n=Object(u.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(m.createPopup)(e,[t,n]),r.Player.getHomeComputer().messages.push(s.LiteratureNames.HackersStartingHandbook)}let v=null;function k(e){v.innerHTML=e,v.parentElement.scrollTop=0}!function(){document.addEventListener("DOMContentLoaded",function e(){v=document.getElementById("interactive-tutorial-text"),document.removeEventListener("DOMContentLoaded",e)})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY=void 0,t.KEY={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,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayStockMarketContent=t.processStockPrices=t.stockMarketCycle=t.initSymbolToStockMap=t.initStockMarket=t.deleteStockMarket=t.loadStockMarket=t.cancelOrder=t.placeOrder=t.SymbolToStockMap=t.StockMarket=void 0;const o=n(175),s=n(1066),l=n(1065),c=n(193),u=n(1064),m=n(1063),p=n(110),d=n(98),h=n(296),f=n(1062),g=n(11),y=n(1),_=n(500),b=n(18),v=n(6),k=n(13),E=n(29),C=i(n(0)),S=i(n(22));function P(e,n,a,r,i,o=null){if(!(e instanceof c.Stock))return o?o.log("placeOrder",`Invalid stock: '${e}'`):k.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof a)return o?o.log("placeOrder",`Invalid arguments: shares='${n}' price='${a}'`):k.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const u=new s.Order(e.symbol,n,a,r,i);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const a=t.StockMarket[n];a instanceof c.Stock&&(e[a.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(u);const m={rerenderFn:I,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return l.processOrders(e,u.type,u.pos,m),I(),!0}function T(e,n=null){if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof s.Order){const n=e.order,a=t.StockMarket.Orders[n.stockSymbol];for(let e=0;e<a.length;++e)if(n==a[e])return a.splice(e,1),I(),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof c.Stock){const a=t.StockMarket.Orders[e.stock.symbol],r=e.stock.symbol+" - "+e.shares+" @ "+v.numeralWrapper.formatMoney(e.price);for(let t=0;t<a.length;++t){const i=a[t];if(e.shares===i.shares&&e.price===i.price&&e.type===i.type&&e.pos===i.pos)return a.splice(t,1),I(),n&&n.scriptRef.log("Successfully cancelled order: "+r),!0}return n&&n.scriptRef.log("Failed to cancel order: "+r),!1}return!1}function M(){for(const e in t.StockMarket)t.StockMarket.hasOwnProperty(e)&&delete t.StockMarket[e];for(const e of m.InitStockMetadata){const n=e.name;t.StockMarket[n]=new c.Stock(e)}const e={};for(const n in t.StockMarket){const a=t.StockMarket[n];a instanceof c.Stock&&(e[a.symbol]=[])}t.StockMarket.Orders=e,t.StockMarket.storedCycles=0,t.StockMarket.lastUpdate=0,t.StockMarket.ticksUntilCycle=u.TicksPerCycle}function O(){for(const e in h.StockSymbols)if(h.StockSymbols.hasOwnProperty(e)){const n=t.StockMarket[e];if(null==n){console.error(`Could not find Stock for ${e}`);continue}const a=h.StockSymbols[e];t.SymbolToStockMap[a]=n}}function w(){for(const e in t.StockMarket){const n=t.StockMarket[e];n instanceof c.Stock&&(Math.random()<.45&&(n.b=!n.b,n.flipForecastForecast()),t.StockMarket.ticksUntilCycle=u.TicksPerCycle)}}t.StockMarket={},t.SymbolToStockMap={},t.placeOrder=P,t.cancelOrder=T,t.loadStockMarket=function(e){t.StockMarket=""===e?{}:JSON.parse(e,E.Reviver)},t.deleteStockMarket=function(){t.StockMarket={}},t.initStockMarket=M,t.initSymbolToStockMap=O,t.stockMarketCycle=w;const x=6e3/g.CONSTANTS.MilliPerCycle;t.processStockPrices=function(e=1){if((null==t.StockMarket.storedCycles||isNaN(t.StockMarket.storedCycles))&&(t.StockMarket.storedCycles=0),t.StockMarket.storedCycles+=e,t.StockMarket.storedCycles<x)return;const n=(new Date).getTime();if(n-t.StockMarket.lastUpdate<4e3)return;t.StockMarket.lastUpdate=n,t.StockMarket.storedCycles-=x,null!=t.StockMarket.ticksUntilCycle&&"number"==typeof t.StockMarket.ticksUntilCycle||(t.StockMarket.ticksUntilCycle=u.TicksPerCycle),--t.StockMarket.ticksUntilCycle,t.StockMarket.ticksUntilCycle<=0&&w();const a=Math.random();for(const e in t.StockMarket){const n=t.StockMarket[e];if(!(n instanceof c.Stock))continue;let r=a*n.mv/100;isNaN(r)&&(r=.02);let i=50;i=n.b?(i+n.otlkMag)/100:(i-n.otlkMag)/100,n.price>=n.cap&&(i=.1,n.b=!1),isNaN(i)&&(i=.5);const o=Math.random(),s={rerenderFn:I,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};o<i?(n.changePrice(n.price*(1+r)),l.processOrders(n,p.OrderTypes.LimitBuy,d.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.LimitSell,d.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopBuy,d.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopSell,d.PositionTypes.Short,s)):(n.changePrice(n.price/(1+r)),l.processOrders(n,p.OrderTypes.LimitBuy,d.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.LimitSell,d.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopBuy,d.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopSell,d.PositionTypes.Long,s));let u=n.otlkMag*r;n.otlkMag<5&&(n.otlkMag<=1?u=1:u*=10),n.cycleForecast(u),n.cycleForecastForecast(u/2),n.shareTxUntilMovement=Math.min(n.shareTxUntilMovement+10,n.shareTxForMovement)}I()};let N=null;function A(){M(),O()}document.addEventListener("DOMContentLoaded",function e(){N=document.getElementById("stock-market-container"),document.removeEventListener("DOMContentLoaded",e)});const R=new _.EventEmitter;function I(){if(b.routing.isOn(b.Page.StockMarket)&&(R.emitEvent(),N instanceof HTMLElement)){const e=t.StockMarket;S.render(C.createElement(f.StockMarketRoot,{buyStockLong:o.buyStock,buyStockShort:o.shortStock,cancelOrder:T,eventEmitterForReset:R,initStockMarket:A,p:y.Player,placeOrder:P,sellStockLong:o.sellStock,sellStockShort:o.sellShort,stockMarket:e}),N)}}t.displayStockMarketContent=I},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearEventListeners=void 0;const a=n(192);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?a.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateWeakenTime=t.calculateGrowTime=t.calculateHackingTime=t.calculatePercentMoneyHacked=t.calculateHackingExpGain=t.calculateHackingChance=void 0;const a=n(19),r=n(428);function i(e,t){let n=2.5*(e.requiredHackingSkill*e.hackDifficulty)+500;return 5*(n/=t.hacking_skill+50)/(t.hacking_speed_mult*r.calculateIntelligenceBonus(t.intelligence,1))}t.calculateHackingChance=function(e,t){const n=(100-e.hackDifficulty)/100,a=1.75*t.hacking_skill,i=(a-e.requiredHackingSkill)/a*n*t.hacking_chance_mult*r.calculateIntelligenceBonus(t.intelligence,1);return i>1?1:i<0?0:i},t.calculateHackingExpGain=function(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let n=3;return(n+=e.baseDifficulty*t.hacking_exp_mult*.3)*a.BitNodeMultipliers.HackExpGain},t.calculatePercentMoneyHacked=function(e,t){const n=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return n<0?0:n>1?1:n*a.BitNodeMultipliers.ScriptHackMoney},t.calculateHackingTime=i,t.calculateGrowTime=function(e,t){return 3.2*i(e,t)},t.calculateWeakenTime=function(e,t){return 4*i(e,t)}},function(e,t,n){"use strict";function a(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.height&&(e.style.height=t.height),void 0!==t.top&&(e.style.top=t.top),void 0!==t.left&&(e.style.left=t.left),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(a("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=void 0,t.createElement=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPositions=void 0;const a=n(1139),r=n(298);t.CompanyPositions={},a.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new r.CompanyPosition(e)}(e)})},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButton=void 0;const o=i(n(0));t.StdButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n,a=e.disabled?"std-button-disabled":"std-button";if(t&&(a+=" tooltip"),"string"==typeof e.addClasses&&(a+=` ${e.addClasses}`),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};n=o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else n=o.createElement("span",{className:"tooltiptext"},e.tooltip);return o.createElement("button",{className:a,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n)}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartTimeCompanyPositions=t.BusinessConsultantCompanyPositions=t.SoftwareConsultantCompanyPositions=t.MiscCompanyPositions=t.AgentCompanyPositions=t.SecurityCompanyPositions=t.BusinessCompanyPositions=t.NetworkEngineerCompanyPositions=t.SecurityEngineerCompanyPositions=t.ITCompanyPositions=t.SoftwareCompanyPositions=void 0,t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Reputation=void 0;const o=i(n(0)),s=n(6);t.Reputation=function(e){return o.createElement("span",{className:"reputation samefont"},"number"==typeof e?s.numeralWrapper.formatReputation(e):e)}},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.yesNoTxtInpBoxCreate=t.yesNoTxtInpBoxGetInput=t.yesNoTxtInpBoxGetNoButton=t.yesNoTxtInpBoxGetYesButton=t.yesNoTxtInpBoxClose=t.yesNoTxtInpBoxHotkeyHandler=t.yesNoBoxCreate=t.yesNoBoxGetNoButton=t.yesNoBoxGetYesButton=t.yesNoBoxClose=t.yesNoBoxOpen=void 0;const o=n(50),s=n(46),l=i(n(22));t.yesNoBoxOpen=!1;const c=document.getElementById("yes-no-box-container"),u=document.getElementById("yes-no-box-text");function m(e){if(e.keyCode===s.KEY.ESC)p();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-box-yes");e?e.click():console.error("Could not find YesNoBox Yes button DOM element")}}function p(){return c?c.style.display="none":console.error("Container not found for YesNoBox"),t.yesNoBoxOpen=!1,document.removeEventListener("keydown",m),!1}t.yesNoBoxClose=p,t.yesNoBoxGetYesButton=function(){return o.clearEventListeners("yes-no-box-yes")},t.yesNoBoxGetNoButton=function(){return o.clearEventListeners("yes-no-box-no")},t.yesNoBoxCreate=function(e){return!t.yesNoBoxOpen&&(t.yesNoBoxOpen=!0,u?(l.unmountComponentAtNode(u),u.innerHTML="","string"==typeof e?u.innerHTML=e:l.render(e,u)):console.error("Text element not found for YesNoBox"),c?c.style.display="flex":console.error("Container not found for YesNoBox"),document.addEventListener("keydown",m),!0)};const d=document.getElementById("yes-no-text-input-box-container"),h=document.getElementById("yes-no-text-input-box-input"),f=document.getElementById("yes-no-text-input-box-text");function g(e){if(e.keyCode===s.KEY.ESC)y();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-text-input-box-yes");e?e.click():console.error("Could not find YesNoTxtInputBox Yes button DOM element")}}function y(){if(null==d)return console.error("Container not found for YesNoTextInputBox"),!1;if(d.style.display="none",!h)throw new Error("yesNoTextInputBoxInput was not set");return t.yesNoBoxOpen=!1,h.value="",document.removeEventListener("keydown",g),!1}t.yesNoTxtInpBoxHotkeyHandler=g,t.yesNoTxtInpBoxClose=y,t.yesNoTxtInpBoxGetYesButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-yes");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-yes'");return e},t.yesNoTxtInpBoxGetNoButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-no");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-no'");return e},t.yesNoTxtInpBoxGetInput=function(){if(!h)return console.error("Could not find YesNoTextInputBox input element"),"";let e=h.value;return e=e.replace(/\s+/g,"")},t.yesNoTxtInpBoxCreate=function(e){if(t.yesNoBoxOpen=!0,f&&(l.unmountComponentAtNode(f),f.innerHTML="","string"==typeof e?f.innerHTML=e:l.render(e,f)),d?d.style.display="flex":console.error("Container not found for YesNoTextInputBox"),document.addEventListener("keydown",g),!h)throw new Error("yesNoTextInputBoxInput was not set");h.focus()}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=void 0,t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.substituteAliases=t.removeAlias=t.parseAliasDeclaration=t.printAliases=t.loadGlobalAliases=t.loadAliases=t.GlobalAliases=t.Aliases=void 0;const a=n(7);function r(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}function i(e){return t.GlobalAliases.hasOwnProperty(e)?t.GlobalAliases[e]:null}t.Aliases={},t.GlobalAliases={},t.loadAliases=function(e){t.Aliases=""===e?{}:JSON.parse(e)},t.loadGlobalAliases=function(e){t.GlobalAliases=""===e?{}:JSON.parse(e)},t.printAliases=function(){for(const e in t.Aliases)t.Aliases.hasOwnProperty(e)&&a.post("alias "+e+"="+t.Aliases[e]);for(const e in t.GlobalAliases)t.GlobalAliases.hasOwnProperty(e)&&a.post("global alias "+e+"="+t.GlobalAliases[e])},t.parseAliasDeclaration=function(e,n=!1){const a=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=a&&3==a.length&&(n?function(e,n){e in t.Aliases&&delete t.Aliases[e],t.GlobalAliases[e]=n.trim()}(a[1],a[2]):function(e,n){e in t.GlobalAliases&&delete t.GlobalAliases[e],t.Aliases[e]=n.trim()}(a[1],a[2]),!0)},t.removeAlias=function(e){return t.Aliases.hasOwnProperty(e)?(delete t.Aliases[e],!0):!!t.GlobalAliases.hasOwnProperty(e)&&(delete t.GlobalAliases[e],!0)},t.substituteAliases=function(e){var t,n;const a=e.split(" ");if(a.length>0){if("unalias"===a[0]||"alias"===a[0])return a.join(" ");let e=!0,o=0;for(;e&&o<10;){o++,e=!1;const s=null===(t=r(a[0]))||void 0===t?void 0:t.split(" ");null!=s&&(e=!0,a.splice(0,1,...s));for(let t=0;t<a.length;++t){const r=null===(n=i(a[t]))||void 0===n?void 0:n.split(" ");null!=r&&(e=!0,a.splice(t,1,...r),t+=r.length-1)}}}return a.join(" ")}},function(e,t,n){"use strict";n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c});var a=n(77),r=n(73),i=n(20);function o(e,t){return new Promise(function(n){t.delay=Object(a.setTimeoutRef)(()=>{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var a="";null!=n&&(a=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const r=i.AllServers[e.serverIp];if(null==r)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+r.hostname+"|"+e.name+"|"+t+a}function l(e,t,n){const a=e.scriptRef.threads;if(!n)return isNaN(a)||a<1?1:a;const r=0|n;if(isNaN(n)||r<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>a)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${a}.`);return r}function c(e){if(!Object(r.isString)(e))return!1;return 4==e.split("|").length}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killWorkerScript=void 0;const a=n(253),r=n(111),i=n(151),o=n(198),s=n(20),l=n(199),c=n(303);function u(e,t=!0){const n=r.workerScripts.get(e);return n instanceof a.WorkerScript&&(m(n,t),!0)}function m(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof a.WorkerScript&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof a.WorkerScript))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const n=e.serverIp,a=e.name,o=s.AllServers[n];if(null==o)return void console.error(`Could not find server on which this script is running: ${n}`);o.ramUsed=c.roundToTwo(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t<o.runningScripts.length;++t){const n=o.runningScripts[t];if(n.filename===a&&l.compareArrays(n.args,e.args)){o.runningScripts.splice(t,1);break}}const u=r.workerScripts.delete(e.pid);u||(console.warn("removeWorkerScript() called with WorkerScript that wasn't in the global map:"),console.warn(e)),t&&i.WorkerScriptStartStopEventEmitter.emitEvent()}}(e,t)}t.killWorkerScript=function(e,t,n){if(null!=n&&"boolean"==typeof n||(n=!0),e instanceof a.WorkerScript)return m(e),!0;if(e instanceof o.RunningScript&&"string"==typeof t){const a=u(e.pid,n);if(a)return a;for(const a of r.workerScripts.values())if(a.name==e.filename&&a.serverIp==t&&l.compareArrays(a.args,e.args))return m(a,n),!0;return!1}return"number"==typeof e?u(e,n):(console.error("killWorkerScript() called with invalid argument:"),console.error(e),!1)}},function(e,t,n){"use strict";n.r(t),n.d(t,"inviteToFaction",function(){return M}),n.d(t,"joinFaction",function(){return O}),n.d(t,"startHackingMission",function(){return w}),n.d(t,"displayFactionContent",function(){return x}),n.d(t,"purchaseAugmentationBoxCreate",function(){return N}),n.d(t,"hasAugmentationPrereqs",function(){return A}),n.d(t,"purchaseAugmentation",function(){return R}),n.d(t,"getNextNeurofluxLevel",function(){return I}),n.d(t,"processPassiveFactionRepGain",function(){return B});var a=n(0),r=n.n(a),i=n(22),o=n.n(i),s=n(856),l=n(12),c=n(80),u=n(200),m=n(3),p=n(19),d=n(11),h=n(15),f=n(126),g=n(17),y=n(82),_=n(1),b=n(25),v=n(109),k=n(37),E=n(18),C=n(13),S=n(851),P=n(21),T=n(63);function M(e){b.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,_.Player.factionInvitations.push(e.name),E.routing.isOn(E.Page.Factions)&&h.Engine.loadFactionsContent()):Object(S.a)(e)}function O(e){if(e.isMember)return;e.isMember=!0,_.Player.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];g.Factions[n]instanceof f.Faction&&(g.Factions[n].isBanned=!0)}for(var n=0;n<_.Player.factionInvitations.length;++n)(_.Player.factionInvitations[n]==e.name||g.Factions[_.Player.factionInvitations[n]].isBanned)&&(_.Player.factionInvitations.splice(n,1),n--)}function w(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function x(e,t=!1){const n=g.Factions[e];if(null==n)throw new Error(`Invalid factionName passed into displayFactionContent(): ${e}`);if(!n.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(r.a.createElement(s.FactionRoot,{engine:h.Engine,initiallyOnAugmentationsPage:t,faction:n,p:_.Player,startHackingMissionFn:w}),h.Engine.Display.factionContent)}function N(e,t){const n=t.getInfo(),a=Object(T.yesNoBoxGetYesButton)();a.innerHTML="Purchase",a.addEventListener("click",function(){!Object(c.f)(e)&&_.Player.hasAugmentation(e)||(R(e,t),Object(T.yesNoBoxClose)())});const i=Object(T.yesNoBoxGetNoButton)();i.innerHTML="Cancel",i.addEventListener("click",function(){Object(T.yesNoBoxClose)()});let o=r.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}});"string"!=typeof e.info&&(o=r.a.createElement("div",null,e.info)),Object(T.yesNoBoxCreate)(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(P.Money,{money:e.baseCost*n.augmentationPriceMult}),"?"))}function A(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let n=0;n<e.prereqs.length;++n){const a=l.Augmentations[e.prereqs[n]];if(null!=a){if(!1===a.owned){t=!1;for(let e=0;e<_.Player.queuedAugmentations.length;++e)if(_.Player.queuedAugmentations[e].name===a.name){t=!0;break}}}else console.error(`Invalid prereq Augmentation ${e.prereqs[n]}`)}return t}function R(e,t,n=!1){const a=t.getInfo();if(A(e))if(0!==e.baseCost&&_.Player.money.lt(e.baseCost*a.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(n)return t;Object(C.dialogBoxCreate)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(n)return t;Object(C.dialogBoxCreate)(t)}else if(0===e.baseCost||_.Player.money.gte(e.baseCost*a.augmentationPriceMult)){!1===_.Player.firstAugPurchased&&(_.Player.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var r=new u.PlayerOwnedAugmentation(e.name);if(e.name==m.AugmentationNames.NeuroFluxGovernor&&(r.level=I()),_.Player.queuedAugmentations.push(r),_.Player.loseMoney(e.baseCost*a.augmentationPriceMult),e.name==m.AugmentationNames.NeuroFluxGovernor){var i=I();--i;var o=Math.pow(d.CONSTANTS.NeuroFluxGovernorLevelMult,i);e.baseRepRequirement=500*o*p.BitNodeMultipliers.AugmentationRepCost,e.baseCost=75e4*o*p.BitNodeMultipliers.AugmentationMoneyCost;for(var s=0;s<_.Player.queuedAugmentations.length-1;++s)e.baseCost*=d.CONSTANTS.MultipleAugMultiplier*[1,.96,.94,.93][k.SourceFileFlags[11]]}for(var c in l.Augmentations)l.Augmentations.hasOwnProperty(c)&&(l.Augmentations[c].baseCost*=d.CONSTANTS.MultipleAugMultiplier*[1,.96,.94,.93][k.SourceFileFlags[11]]);if(n)return"You purchased "+e.name;b.Settings.SuppressBuyAugmentationConfirmation||Object(C.dialogBoxCreate)("You purchased "+e.name+". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive."),x(t.name,!0)}else Object(C.dialogBoxCreate)("Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.");else{var h="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(n)return h;Object(C.dialogBoxCreate)(h)}}function I(){let e=0;for(var t=0;t<_.Player.augmentations.length;++t)_.Player.augmentations[t].name===m.AugmentationNames.NeuroFluxGovernor&&(e=_.Player.augmentations[t].level);for(t=0;t<_.Player.queuedAugmentations.length;++t)_.Player.queuedAugmentations[t].name==m.AugmentationNames.NeuroFluxGovernor&&++e;return e+1}function B(e){for(const t in g.Factions){if(t===_.Player.currentWorkFactionName)continue;if(!g.Factions.hasOwnProperty(t))continue;const n=g.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(_.Player.getGangName()===t)continue;const a=Math.min(.1,n.favor/1e3+.01),r=Object(v.getHackingWorkRepGain)(_.Player,n),i=Object(v.getFactionSecurityWorkRepGain)(_.Player,n),o=Object(v.getFactionFieldWorkRepGain)(_.Player,n),s=Math.max(r*a,i*a,o*a,1/120);n.playerReputation+=s*e*_.Player.faction_rep_mult*p.BitNodeMultipliers.FactionPassiveRepGain}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const a=n(29);class r{constructor(e="",t=""){this.filename="",this.msg="",this.recvd=!1,this.filename=e,this.msg=t,this.recvd=!1}toJSON(){return a.Generic_toJSON("Message",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.Message=r,a.Reviver.constructors.Message=r},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",function(){return postNetburnerText}),__webpack_require__.d(__webpack_exports__,"a",function(){return Terminal});var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(87),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(843),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(473),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(842),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(197),_Alias__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(67),_Alias__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Alias__WEBPACK_IMPORTED_MODULE_5__),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(19),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__),_CodingContracts__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(92),_CodingContracts__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_7__),_Constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(11),_Constants__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_8__),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(30),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(559),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__),_engine__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(15),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(39),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__),_Hacking__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(51),_Hacking__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Hacking__WEBPACK_IMPORTED_MODULE_13__),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(79),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(45),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(549),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__),_Message_Message__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(74),_Message_Message__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_Message_Message__WEBPACK_IMPORTED_MODULE_17__),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(88),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(81),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(71),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(151),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__),_Player__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(1),_RedPill__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(103),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(198),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(199),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(459),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(121),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(66),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__),_Server_AllServers__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(20),_Server_AllServers__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_Server_AllServers__WEBPACK_IMPORTED_MODULE_29__),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(23),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(38),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(77),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(18),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(6),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(46),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(112),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(426),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(155),_utils_LogBox__WEBPACK_IMPORTED_MODULE_38___default=__webpack_require__.n(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(63),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(7),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(24),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__),_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(21),_ui_React_Money__WEBPACK_IMPORTED_MODULE_42___default=__webpack_require__.n(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__),autosize__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(841),autosize__WEBPACK_IMPORTED_MODULE_43___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_43__),jszip__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(840),jszip__WEBPACK_IMPORTED_MODULE_44___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_44__),file_saver__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(839),file_saver__WEBPACK_IMPORTED_MODULE_45___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_45__),arg__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__(460),arg__WEBPACK_IMPORTED_MODULE_46___default=__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_46__),react__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_47___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_47__),react_dom__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__(22),react_dom__WEBPACK_IMPORTED_MODULE_48___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_48__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function getTerminalInput(){return document.getElementById("terminal-input-text-box").value}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.ENTER){e.preventDefault();const t=getTerminalInput(),n=Terminal.currDir;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("<span class='prompt'>["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname+` ~${n}]></span> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(n<0||n>r)&&(Terminal.commandHistoryIndex=r),0!=n&&--Terminal.commandHistoryIndex;var a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((n<0||n>r)&&(Terminal.commandHistoryIndex=r),n==r||n==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const a=n.lastIndexOf(";");-1!==a&&(n=n.slice(a+1));const r=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=r.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==r.length)return;1==r.length?l=r[0]:2==r.length?(l=r[0],s=r[1]):3==r.length?(l=r[0]+" "+r[1],s=r[2]):(s=r.pop(),l=r.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const n=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,autosize__WEBPACK_IMPORTED_MODULE_43___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,document.getElementById("terminal-input-header").style.display="inline";const a=document.getElementById("terminal-input-text-box");if("number"==typeof a.selectionStart)a.selectionStart=a.selectionEnd=a.value.length;else if(void 0!==a.createTextRange){a.focus();var r=el.createTextRange();r.collapse(!1),r.select()}},modifyInput:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,a=t.selectionStart,r=t.value;switch(e.toLowerCase()){case"backspace":a>0&&a<=n+1&&(t.value=r.substr(0,a-1)+r.substr(a));break;case"deletewordbefore":for(var i=a-1;i>0;--i)if(" "===r.charAt(i))return void(t.value=r.substr(0,i)+r.substr(a));break;case"deletewordafter":for(i=a+1;i<=text.length+1;++i)if(" "===r.charAt(i))return void(t.value=r.substr(0,a)+r.substr(i))}}catch(e){console.error("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,a=t.selectionStart;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;case"prevchar":a>0&&t.setSelectionRange(a-1,a-1);break;case"prevword":for(var r=a-2;r>=0;--r)if(" "===t.value.charAt(r))return void t.setSelectionRange(r+1,r+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(a+1,a+1);break;case"nextword":for(r=a+1;r<=n;++r)if(" "===t.value.charAt(r))return void t.setSelectionRange(r,r);t.setSelectionRange(n,n);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.error("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startBackdoor:function(){Terminal.backdoorFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.hackProgressPost)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.hackProgressBarPost)("["),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',$("input[class=terminal-input]").prop("disabled",!0)},finishAction:function(e=!1){Terminal.hackFlag?Terminal.finishHack(e):Terminal.backdoorFlag?Terminal.finishBackdoor(e):Terminal.analyzeFlag&&Terminal.finishAnalyze(e),$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1)},finishHack:function(e=!1){if(!e){var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),a=Math.random(),r=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingExpGain)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),i=r/4;if(a<n){if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerNames.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.hackWorldDaemon)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.hackFlag=!1);t.backdoorInstalled=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculatePercentMoneyHacked)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.recordMoneySource(o,"hacking"),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(r),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainIntelligenceExp(r/_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postElement)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Hack successful! Gained ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.Money,{money:o})," and ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatExp(r)," hacking exp"))}else _Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(i),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Failed to hack ${t.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatExp(i)} hacking exp`)}Terminal.hackFlag=!1},finishBackdoor:function(e=!1){if(!e){const e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerNames.WorldDaemon]==e.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.hackWorldDaemon)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.backdoorFlag=!1);e.backdoorInstalled=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postElement)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Backdoor successful!"))}Terminal.backdoorFlag=!1},finishAnalyze:function(e=!1){if(!e){let e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const t=e instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(e.hostname+": ");const n=e.organizationName;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Organization name: "+(t?"Player":n));let a=!t&&e.hasAdminRights||t;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Root Access: "+(a?"YES":"NO"));const r=e.requiredHackingSkill;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Required hacking skill: "+(t?"N/A":r));const i=e.hackDifficulty;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Server security level: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatServerSecurity(i)));const o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Chance to hack: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatPercentage(o)));const s=1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Time to hack: "+(t?"N/A":Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.convertTimeMsToTimeElapsedString)(s,!0))),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postElement)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Total money available on server: ",t?"N/A":react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.Money,{money:e.moneyAvailable})));const l=e.numOpenPortsRequired;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Required number of open ports for NUKE: "+(t?"N/A":l)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SSH port: "+(e.sshPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}Terminal.analyzeFlag=!1},executeCommands:function(e){e=(e=e.trim()).replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=e&&(Terminal.commandHistory.push(e),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,e=e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g).map(_Alias__WEBPACK_IMPORTED_MODULE_5__.substituteAliases).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat();for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t].trim())},parseCommandArguments:function(e){let t="";const n=[];let a=0,r=0,i="";for(;r<e.length;){let o=!1;r>=1&&"\\"===(i=e.charAt(r-1))&&(o=!0);const s=e.charAt(r);if('"'===s)if(o||" "!==i)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',r+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(r+1,t-r-1)),a=r=t===e.length-1?t+1:t+2;continue}}else if("'"===s)if(o||" "!==i)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",r+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(r+1,t-r-1)),a=r=t===e.length-1?t+1:t+2;continue}}else if(" "===s&&""===t){let t=e.substr(a,r-a);isNumber(t)?n.push(parseFloat(t)):n.push(t),a=r+1}++r}if(a!==r){let t=e.substr(a,r-a);isNumber(t)?n.push(parseFloat(t)):n.push(t)}return n},executeCommand:function(command){if(Terminal.hackFlag||Terminal.backdoorFlag||Terminal.analyzeFlag)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`Cannot execute command (${command}) while an action is in progress`);else{command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=Terminal.parseCommandArguments(command);if(0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.ITutorial.isRunning){var n00dlesServ=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.GetServerByHostname)("n00dles");if(null==n00dlesServ)throw new Error("Could not get n00dles server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.ITutorial.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalHelp:1===commandArray.length&&"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalLs:1===commandArray.length&&"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalScan:1===commandArray.length&&"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&2===commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalConnect:if(2==commandArray.length){if("connect"!=commandArray[0]||"n00dles"!=commandArray[1]&&commandArray[1]!=n00dlesServ.ip)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=n00dlesServ.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Connected to n00dles"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalAnalyze:if(1===commandArray.length&&"analyze"===commandArray[0]){if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(n00dlesServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("NUKE successful! Gained root access to n00dles"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalCreateScript:2==commandArray.length&&"nano"==commandArray[0]&&"n00dles.script"==commandArray[1]?(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent("n00dles.script",""),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalFree:1==commandArray.length&&"free"==commandArray[0]?(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"n00dles.script"==commandArray[1]?(Terminal.runScript(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialSteps.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"n00dles.script"==commandArray[1]){var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)("n00dles.script",[],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.logBoxCreate)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.iTutorialNextStep)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();switch(commandArray[0].toLowerCase()){case"alias":if(1===commandArray.length)return void Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.printAliases)();if(2===commandArray.length&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[1]))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Set alias ${commandArray[1]}`);if(3===commandArray.length&&"-g"===commandArray[1]&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[2],!0))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Set global alias ${commandArray[2]}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"backdoor":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Incorrect usage of backdoor command. Usage: backdoor");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot use backdoor on this type of Server"):Terminal.startBackdoor():Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You do not have admin rights for this machine! Cannot backdoor");break;case"buy":_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.SpecialServerIps.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.executeDarkwebTerminalCommand)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of cat command. Usage: cat [file]");const e=Terminal.getFilepath(commandArray[1]);if(!e.endsWith(".msg")&&!e.endsWith(".lit")&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");if(e.endsWith(".msg")||e.endsWith(".lit"))for(let t=0;t<s.messages.length;++t){if(e.endsWith(".lit")&&s.messages[t]===e)return void Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__.showLiterature)(s.messages[t]);if(e.endsWith(".msg")&&s.messages[t].filename===e)return void Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__.e)(s.messages[t])}else if(e.endsWith(".txt")){const t=Terminal.getTextFile(e);if(null!=t)return void t.show()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`No such file ${e}`)}catch(e){Terminal.postThrownError(e)}break;case"cd":if(commandArray.length>2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: cd [dir]");else{let e=2===commandArray.length?commandArray[1]:"/",t;if("/"===e)t="/";else{if(e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeTrailingSlash)(e),t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e,Terminal.currDir),null==t||""===t)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid path. Failed to change directories");const n=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(!n.scripts.some(e=>e.filename.startsWith(t))&&!n.textFiles.some(e=>e.fn.startsWith(t)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid path. Failed to change directories")}Terminal.currDir=t,Terminal.resetTerminalInput()}break;case"check":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("tail can only be called on .script files (filename must end with .script)");let t=[];for(var i=2;i<commandArray.length;++i)t.push(commandArray[i]);var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)(e,t,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such script exists");runningScript.displayLog()}}catch(e){Terminal.postThrownError(e)}break;case"clear":case"cls":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of clear/cls command. Usage: clear/cls");$("#terminal tr:not(:last)").remove(),postNetburnerText();break;case"connect":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of connect command. Usage: connect [ip/hostname]");let e=commandArray[1];for(let t=0;t<s.serversOnNetwork.length;t++)if(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServerOnNetwork)(s,t).ip==e||Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServerOnNetwork)(s,t).hostname==e)return void Terminal.connectToServer(e);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Host not found");break}case"download":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of download command. Usage: download [script/text file]");const e=commandArray[1];if("*"===e||"*.script"===e||"*.txt"===e){var zip=new jszip__WEBPACK_IMPORTED_MODULE_44__;if("*"===e||"*.script"===e)for(var i=0;i<s.scripts.length;++i){var file=new Blob([s.scripts[i].code],{type:"text/plain"});zip.file(s.scripts[i].filename+".js",file)}if("*"===e||"*.txt"===e)for(var i=0;i<s.textFiles.length;++i){var file=new Blob([s.textFiles[i].text],{type:"text/plain"});zip.file(s.textFiles[i].fn,file)}let t;switch(e){case"*.script":t="bitburnerScripts.zip";break;case"*.txt":t="bitburnerTexts.zip";break;default:t="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then(function(e){file_saver__WEBPACK_IMPORTED_MODULE_45__.saveAs(e,t)})}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e)){const t=Terminal.getScript(e);if(null!=t)return t.download()}else{if(!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot download this filetype");{const t=Terminal.getTextFile(e);if(null!=t)return t.download()}}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`${e} does not exist`)}catch(e){Terminal.postThrownError(e)}break;case"expr":{if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of expr command. Usage: expr [math expression]");let expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,""),result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`Could not evaluate expression: ${sanitizedExpr}`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(result);break}case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of hack command. Usage: hack");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You do not have admin rights for this machine! Cannot hack"):s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot hack this type of Server"):Terminal.startHack();break;case"help":if(1!==commandArray.length&&2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of help command. Usage: help");if(1===commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText);else{var cmd=commandArray[1],txt=_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.HelpTexts[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(txt)}break;case"home":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Connected to home"),Terminal.currDir="/",Terminal.resetTerminalInput();break;case"hostname":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname);break;case"ifconfig":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ip);break;case"kill":Terminal.executeKillCommand(commandArray);break;case"killall":for(let e=s.runningScripts.length-1;e>=0;--e)Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(s.runningScripts[e],s.ip,!1);_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__.WorkerScriptStartStopEventEmitter.emitEvent(),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Killing all running scripts");break;case"ls":Terminal.executeListCommand(commandArray);break;case"lscpu":Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().cpuCores+" Core(s)");break;case"mem":Terminal.executeMemCommand(commandArray);break;case"mv":if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: mv [src] [dest]");try{const e=commandArray[1],t=commandArray[2];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e)&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("'mv' can only be used on scripts and text files (.txt)");const n=Terminal.getFile(e);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`Source file ${e} does not exist`);const a=Terminal.getFilepath(e),r=Terminal.getFilepath(t),i=Terminal.getFile(t);if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e)){if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(t))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Source and destination files must have the same type");if(s.isRunning(a))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Cannot use 'mv' on a script that is running");if(null!=i){const e=s.removeFile(r);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Warning: The destination file was overwritten")}n.filename=r}else if(e.endsWith(".txt")){if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Source and destination files must have the same type");if(null!=i){const e=s.removeFile(r);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Warning: The destination file was overwritten")}n.fn=r}}catch(e){Terminal.postThrownError(e)}break;case"nano":Terminal.executeNanoCommand(commandArray);break;case"ps":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of ps command. Usage: ps");for(let e=0;e<s.runningScripts.length;e++){let t=s.runningScripts[e],n=`(PID - ${t.pid}) ${t.filename}`;for(let e=0;e<t.args.length;++e)n+=" "+t.args[e].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(n)}break;case"rm":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: rm [program/script]");let e,t;try{e=Terminal.getFilepath(commandArray[1]),t=s.removeFile(e)}catch(e){t={res:!1,msg:"No such file exists"}}t.res||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(t.msg);break}case"run":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var executableName=commandArray[1];if("musicplayer"===executableName)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(executableName)?Terminal.runScript(commandArray):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(commandArray)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1===commandArray.length)Terminal.executeScanAnalyzeCommand(1);else{if(commandArray.length>3)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;3===commandArray.length&&"-a"===commandArray[2]&&(e=!0);let t=parseInt(commandArray[1]);if(isNaN(t)||t<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(t>3&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(t>5&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(t>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(t,e)}break;case"scp":Terminal.executeScpCommand(commandArray);break;case"sudov":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: sudov");s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("You do NOT have root access to this machine");break;case"tail":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else if("string"==typeof commandArray[1]){const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("tail can only be called on .script, .ns, .js files, or by pid");const t=[];for(let e=2;e<commandArray.length;++e)t.push(commandArray[e]);for(var i=0;i<s.runningScripts.length;++i)if(s.runningScripts[i].filename===e&&Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__.compareArrays)(s.runningScripts[i].args,t))return void Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.logBoxCreate)(s.runningScripts[i]);const n=[];for(var i=0;i<s.runningScripts.length;++i){if(s.runningScripts[i].args.length<t.length)continue;const a=s.runningScripts[i].args.slice(0,t.length);s.runningScripts[i].filename===e&&Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__.compareArrays)(a,t)&&n.push(s.runningScripts[i])}if(1===n.length)return void Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.logBoxCreate)(n[0]);if(n.length>1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Found several potential candidates:");for(const e of n)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`${e.filename} ${e.args.join(" ")}`);return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Script arguments need to be specified.")}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such script exists.")}else{const e=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.b)(commandArray[1],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==e)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.logBoxCreate)(e)}}catch(e){Terminal.postThrownError(e)}break;case"theme":{let e=commandArray.slice(1);if(1!==e.length&&3!==e.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===e.length){var themeName=e[0];if("default"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=themeName)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{var inputBackgroundHex=e[0],inputTextHex=e[1],inputHighlightHex=e[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",inputHighlightHex),document.body.style.setProperty("--my-font-color",inputTextHex),document.body.style.setProperty("--my-background-color",inputBackgroundHex),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}break}case"top":{if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of top command. Usage: top");const e=40,t=10,n=16,a="Script",r="PID",i="Threads",o="RAM Usage",l=" ".repeat(e-a.length),c=" ".repeat(t-r.length),u=" ".repeat(n-i.length),m=`${a}${l}${r}${c}${i}${u}${o}`;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(m);let p=s.runningScripts;for(let a=0;a<p.length;a++){let r=p[a];const i=Math.max(0,e-r.filename.length),o=" ".repeat(i),s=Math.max(0,t-(r.pid+"").length),l=" ".repeat(s),c=Math.max(0,n-(r.threads+"").length),u=" ".repeat(c),m=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.getRamUsageFromRunningScript)(r)*r.threads),d=[r.filename,o,r.pid,l,r.threads,u,m].join("");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(d)}break}case"unalias":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of unalias name. Usage: unalias [alias]");Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.removeAlias)(commandArray[1])?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Removed alias ${commandArray[1]}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`No such alias exists: ${commandArray[1]}`);break;case"wget":{if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of wget command. Usage: wget [url] [target file]");let e=commandArray[1],t=Terminal.getFilepath(commandArray[2]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(t)&&!t.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("wget failed: Invalid target file. Target file must be script or text file");$.get(e,function(e){let n;return(n=Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(t)?s.writeToScriptFile(t,e):s.writeToTextFile(t,e)).success?n.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`wget successfully retrieved content and overwrote ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`wget successfully retrieved content to new file ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("wget failed")},"text").fail(function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("wget failed: "+JSON.stringify(e))});break}default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`Command ${commandArray[0]} not found`)}}}},connectToServer:function(e){var t=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServer)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Connected to "+t.hostname),Terminal.currDir="/","darkweb"==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.checkIfConnectedToDarkweb)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Invalid server. Connection failed.")},executeFreeCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of free command. Usage: free");const t=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam),n=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),a=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),r=Math.max(t.length,Math.max(n.length,a.length)),i=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatPercentage(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed/_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Total: ${" ".repeat(r-t.length)}${t}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Used: ${" ".repeat(r-n.length)}${n} (${i})`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Available: ${" ".repeat(r-a.length)}${a}`)},executeKillCommand:function(e){try{if(e.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof e[1]){const t=e[1];return void(Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Killing script with PID ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Failed to kill script with PID ${t}. No such script exists`))}const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e[1]),a=[];for(let t=2;t<e.length;++t)a.push(e[t]);const r=t.getRunningScript(n,a);if(null==r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such script is running. Nothing to kill");Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(r,t.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Killing ${n}`)}catch(e){Terminal.postThrownError(e)}},executeListCommand:function(e){const t=e.length;function n(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(t<=0||t>5||3===t)return n();let a=null,r=Terminal.currDir;if(r.endsWith("/")||(r+="/"),t>=4){if("grep"!==e[t-2]||"|"!==e[t-3])return n();a=e[t-1]}if(t>=2&&"|"!==e[1]&&null!=(r=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e[1],Terminal.currDir))&&(r.endsWith("/")||(r+="/"),!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isValidDirectoryPath)(r)))return n();"/"===r&&(r=null);const i=[],o=[],s=[],l=[],c=[],u=[];function m(e,t){let n=e;if(r){if(!e.startsWith(r))return;n=e.slice(r.length,e.length)}if(!a||n.includes(a))if(n.includes("/")){const e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.getFirstParentDirectory)(n);if(a&&!e.includes(a))return;u.includes(e)||u.push(e)}else t.push(n)}const p=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(const e of p.programs)m(e,i);for(const e of p.scripts)m(e.filename,o);for(const e of p.textFiles)m(e.fn,s);for(const e of p.contracts)m(e.fn,l);for(const e of p.messages)e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message?m(e.filename,c):m(e,c);function d(e,t){const n=Math.max(...e.map(e=>e.length))+1,a=Math.floor(80/n);for(let r=0;r<e.length;r++){let i="";for(let t=0;t<a&&r<e.length;t++)i+=e[r],i+=" ".repeat(n*(t+1)-i.length),r++;r--,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postContent)(i,t)}}i.sort(),o.sort(),s.sort(),l.sort(),c.sort(),u.sort();const h=[{segments:u,config:{color:"#0000FF"}},{segments:c},{segments:s},{segments:i},{segments:l},{segments:o}].filter(e=>e.segments.length>0);for(let e=0;e<h.length;e++)0!==e&&Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postElement)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement("br",null)),d(h[e].segments,h[e].config)},executeMemCommand:function(e){try{if(2!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=e[1];let n=1;if(4===e.length&&"-t"===e[2]&&(n=Math.round(parseInt(e[3])),isNaN(n)||n<1))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid number of threads specified. Number of threads must be greater than 1");const a=Terminal.getScript(t);if(null==a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such script exists!");const r=a.ramUsage*n;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(r)} of RAM to run for ${n} thread(s)`)}catch(e){Terminal.postThrownError(e)}},executeNanoCommand:function(e){if(2===e.length)try{const t=e[1];if(".fconf"===t){let e=Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__.createFconf)();return void _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(t,e)}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(t)){const e=Terminal.getFilepath(t),n=Terminal.getScript(t);if(null==n){let n="";(t.endsWith(".ns")||t.endsWith(".js"))&&(n="export async function main(ns) {\n\n}"),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n)}else _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.code)}else{if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const e=Terminal.getFilepath(t),n=Terminal.getTextFile(t);null==n?_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e):_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.text)}}}catch(e){Terminal.postThrownError(e)}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of nano command. Usage: nano [scriptname]")},executeScanCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of netstat/scan command. Usage: netstat/scan");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.serversOnNetwork.map((e,n)=>{const a=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServerOnNetwork)(t,n);return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});n.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const a=Math.max(...n.map(e=>e.hostname.length)),r=Math.max(...n.map(e=>e.ip.length));for(const e of n){let t=e.hostname;t+=" ".repeat(a-e.hostname.length+1),t+=e.ip,t+=" ".repeat(r-e.ip.length+1),t+=e.hasRoot,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(t)}},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(" ");var n={};for(const e in _Server_AllServers__WEBPACK_IMPORTED_MODULE_29__.AllServers)n[e]=0;const a=[],r=[0],i=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(a.push(i);0!=a.length;){const i=a.pop(),u=r.pop(),m=i instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;if((t||!i.purchasedByPlayer||"home"==i.hostname)&&(!(n[i.ip]||u>e)&&(t||!m))){n[i.ip]=1;for(var o=i.serversOnNetwork.length-1;o>=0;--o)a.push(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServerOnNetwork)(i,o)),r.push(u+1);if(0!=u){var s=Array(4*(u-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("<strong>"+s+"> <a class='scan-analyze-link'>"+i.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("<strong>"+s+">"+i.hostname+"</strong>");var l=s+"--",c="NO";i.hasAdminRights&&(c="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${l}Root Access: ${c}${m?"":", Required hacking skill: "+i.requiredHackingSkill}`),m||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(l+"Number of open ports required to NUKE: "+i.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(l+"RAM: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.numeralWrapper.formatRAM(i.maxRam)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(" ")}}}var u=document.getElementsByClassName("scan-analyze-link");for(let e=0;e<u.length;++e)!function(){var t=u[e].innerHTML.toString();u[e].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.backdoorFlag||Terminal.connectToServer(t)}}()},executeScpCommand(e){try{if(3!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const r=Terminal.getFilepath(e[1]);if(!r.endsWith(".lit")&&!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(r)&&!r.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("scp only works for scripts, text files (.txt), and literature files (.lit)");const i=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServer)(e[2]);if(null==i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(`Invalid destination. ${e[2]} not found`);const o=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(r.endsWith(".lit")){for(var t=!1,n=0;n<o.messages.length;++n)if(!(o.messages[n]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message)&&o.messages[n]==r){t=!0;break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such file exists!");for(n=0;n<i.messages.length;++n)if(i.messages[n]===r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(r+" copied over to "+i.hostname);return i.messages.push(r),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(r+" copied over to "+i.hostname)}if(r.endsWith(".txt")){var a;for(t=!1,n=0;n<o.textFiles.length;++n)if(o.textFiles[n].fn===r){t=!0,a=o.textFiles[n];break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("No such file exists!");let e=i.writeToTextFile(a.fn,a.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`WARNING: ${r} already exists on ${i.hostname} and will be overwriten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${r} overwritten on ${i.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${r} copied over to ${i.hostname}`):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("scp failed")}let s=null;for(let e=0;e<o.scripts.length;++e)if(r==o.scripts[e].filename){s=o.scripts[e];break}if(null==s)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("scp() failed. No such script exists");let l=i.writeToScriptFile(r,s.code);if(!l.success)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("scp failed");if(l.overwritten)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`WARNING: ${r} already exists on ${i.hostname} and will be overwritten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${r} overwritten on ${i.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${r} copied over to ${i.hostname}`)}catch(e){Terminal.postThrownError(e)}},runProgram:function(e){if(e.length<2)return;const t=e[1];_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(t)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){if(e.length<2)return;var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const n=e[1],a=e.slice(1),r={};r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("You already have root access to this computer. There is no reason to run NUKE.exe")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BruteSSHProgram.name]=(e=>{e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Opened SSH Port(22)!"),e.openPortCount++)}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Opened FTP Port (21)!"),e.openPortCount++)}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Opened SMTP Port (25)!"),e.openPortCount++)}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.HTTPWormProgram.name]=(e=>{e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Opened HTTP Port (80)!"),e.openPortCount++)}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Opened SQL Port (1433)!"),e.openPortCount++)}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.getServer)(t[1]);null!=n?n instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`${_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name} cannot be run on a Hacknet Server.`):(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(n.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Server base security level: "+n.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Server current security level: "+n.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Server growth rate: "+n.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Netscript hack() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Netscript grow() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateGrowTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Netscript weaken() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateWeakenTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Invalid server IP/hostname")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("When using scan-analyze, click on a server's hostname to connect to it.")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.Flight.name]=(()=>{const e=Math.round(30*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__.BitNodeMultipliers.DaedalusAugsRequirement);if(!(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length>=e&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.gt(1e11)&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill>=2500))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Augmentations: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length} / ${e}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postElement)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Money: ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.Money,{money:_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.toNumber()})," / ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.Money,{money:1e11}))),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Hacking skill: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill} / 2500`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("-- Daedalus --")}),r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BitFlume.name]=(()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.yesNoBoxGetYesButton)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.yesNoBoxGetNoButton)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.hackWorldDaemon)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.yesNoBoxClose)()}),t.addEventListener("click",function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.yesNoBoxClose)()}),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.yesNoBoxCreate)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),r.hasOwnProperty(n)?r[n](t,a):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Invalid executable. Cannot be run")},getFilepath:function(e){const t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateFilePath)(e,Terminal.currDir);if(null==t)throw new Error(`Invalid file path specified: ${e}`);return Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isInRootDirectory)(t)?Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeLeadingSlash)(t):t},getFile:function(e){return Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.isScriptFilename)(e)?Terminal.getScript(e):e.endsWith(".lit")?Terminal.getLitFile(e):e.endsWith(".txt")?Terminal.getTextFile(e):null},getLitFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.messages)if("string"==typeof e&&n===e)return e;return null},getScript:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.scripts)if(n===e.filename)return e;return null},getTextFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.textFiles)if(n===e.fn)return e;return null},postThrownError:function(e){if(e instanceof Error){const t="Error: ",n=e.toString();n.startsWith(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(n.slice(t.length)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)(n)}},runScript:function(e){if(e.length<2)return void dialogBoxCreate(`Bug encountered with Terminal.runScript(). Command array has a length of less than 2: ${e}`);const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e[1]),a={"--tail":Boolean,"-t":Number},r=arg__WEBPACK_IMPORTED_MODULE_46__(a,{permissive:!0,argv:e.slice(2)}),i=Math.round(parseFloat(r["-t"])),o=!0===r["--tail"];if(void 0!==r["-t"]&&(i<0||isNaN(i)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Invalid number of threads specified. Number of threads must be greater than 0");const s=!isNaN(i)&&i>0?i:1,l=r._;if(null==Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)(n,l,t)){for(let e=0;e<t.scripts.length;e++){if(t.scripts[e].filename!==n)continue;const a=t.scripts[e],r=a.ramUsage*s,i=t.maxRam-t.ramUsed;if(!t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Need root access to run script");if(r>i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("This machine does not have enough RAM to run this script with "+s+" threads. Script requires "+r+"GB of RAM");const c=new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__.RunningScript(a,l);return c.threads=s,Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__.e)(c,t)?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Running script with ${s} thread(s), pid ${c.pid} and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36__.arrayToString)(l)}.`),void(o&&Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.logBoxCreate)(c))):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.postError)("Failed to start script")}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("ERROR: This script is already running. Cannot run multiple instances")},runContract:async function(e){if(Terminal.contractOpen)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.getContract(e);if(null==n)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("ERROR: No such contract");switch(Terminal.contractOpen=!0,await n.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Success:var a=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainCodingContractReward(n.reward,n.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Contract SUCCESS - ${a}`),t.removeContract(n);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(n)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)(`Contract <p style='color:red;display:inline'>FAILED</p> - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Cancelled:default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Contract cancelled")}Terminal.contractOpen=!1}}}).call(this,__webpack_require__(145))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeoutRef=void 0,t.setTimeoutRef=window.setTimeout.bind(window)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServer=void 0;const a=n(11),r=n(705),i=n(33),o=n(141),s=n(413),l=n(29);class c extends r.BaseServer{constructor(e={hostname:"",ip:s.createRandomIp()}){super(e),this.cache=1,this.cores=1,this.hashCapacity=0,this.hashRate=0,this.level=1,this.onlineTimeSeconds=0,this.totalHashesGenerated=0,this.maxRam=1,this.updateHashCapacity()}calculateCacheUpgradeCost(e){return o.calculateCacheUpgradeCost(this.cache,e)}calculateCoreUpgradeCost(e,t){return o.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e,t){return o.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e,t){return o.calculateRamUpgradeCost(this.maxRam,e,t)}process(e=1){const t=e*a.CONSTANTS.MilliPerCycle/1e3;return this.hashRate*t}upgradeCache(e){this.cache=Math.min(i.HacknetServerConstants.MaxCache,Math.round(this.cache+e)),this.updateHashCapacity()}upgradeCore(e,t){this.cores=Math.min(i.HacknetServerConstants.MaxCores,Math.round(this.cores+e)),this.updateHashRate(t)}upgradeLevel(e,t){this.level=Math.min(i.HacknetServerConstants.MaxLevel,Math.round(this.level+e)),this.updateHashRate(t)}upgradeRam(e,t){for(let t=0;t<e;++t)this.maxRam*=2;return this.maxRam=Math.min(i.HacknetServerConstants.MaxRam,Math.round(this.maxRam)),this.updateHashRate(t),!0}runScript(e,t){super.runScript(e),null!=t&&"number"==typeof t&&this.updateHashRate(t)}updateHashCapacity(){this.hashCapacity=32*Math.pow(2,this.cache)}updateHashRate(e){this.hashRate=o.calculateHashGainRate(this.level,this.ramUsed,this.maxRam,this.cores,e),isNaN(this.hashRate)&&(this.hashRate=0,console.error("Error calculating Hacknet Server hash production. This is a bug. Please report to game dev",!1))}toJSON(){return l.Generic_toJSON("HacknetServer",this)}static fromJSON(e){return l.Generic_fromJSON(c,e.data)}}t.HacknetServer=c,l.Reviver.constructors.HacknetServer=c},function(e,t,n){"use strict";n.d(t,"c",function(){return N}),n.d(t,"f",function(){return A}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return T}),n.d(t,"a",function(){return O}),n.d(t,"b",function(){return x});var a=n(16),r=n(12),i=n(200),o=n(3),s=n(860),l=n(19),c=n(11),u=n(17),m=n(1),p=n(174),d=n(113),h=n(18),f=n(154),g=n(30),y=n(37),_=n(13),b=n(829),v=n(295),k=n(0),E=n.n(k),C=n(22),S=n.n(C);function P(e){var t=e.name;r.Augmentations[t]=e}function T(){for(var e in u.Factions)u.Factions.hasOwnProperty(e)&&(u.Factions[e].augmentations=[]);Object(b.clearObject)(r.Augmentations);const t=function(){var e=[{bonuses:{hacking_chance_mult:1.25,hacking_speed_mult:1.1,hacking_money_mult:1.25,hacking_grow_mult:1.1},description:"Increases the player's hacking chance by 25%.<br>Increases the player's hacking speed by 10%.<br>Increases the amount of money the player's gains from hacking by 25%.<br>Improves grow() by 10%."},{bonuses:{hacking_mult:1.15,hacking_exp_mult:2},description:"Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 100%."},{bonuses:{strength_mult:1.25,strength_exp_mult:2,defense_mult:1.25,defense_exp_mult:2,dexterity_mult:1.25,dexterity_exp_mult:2,agility_mult:1.25,agility_exp_mult:2},description:"Increases all of the player's combat stats by 25%.<br>Increases all of the player's combat stat experience gain rate by 100%."},{bonuses:{charisma_mult:1.5,charisma_exp_mult:2},description:"This augmentation increases the player's charisma by 50%.<br>Increases the player's charisma experience gain rate by 100%."},{bonuses:{hacknet_node_money_mult:1.2,hacknet_node_purchase_cost_mult:.85,hacknet_node_ram_cost_mult:.85,hacknet_node_core_cost_mult:.85,hacknet_node_level_cost_mult:.85},description:"Increases the amount of money produced by Hacknet Nodes by 20%.<br>Decreases all costs related to Hacknet Node by 15%."},{bonuses:{company_rep_mult:1.25,faction_rep_mult:1.15,work_money_mult:1.7},description:"Increases the amount of money the player gains from working by 70%.<br>Increases the amount of reputation the player gains when working for a company by 25%.<br>Increases the amount of reputation the player gains for a faction by 15%."},{bonuses:{crime_success_mult:2,crime_money_mult:2},description:"Increases the player's crime success rate by 100%.<br>Increases the amount of money the player gains from crimes by 100%."}];const t=new v.WHRNG(Math.floor(m.Player.lastUpdate/36e5));for(let e=0;e<5;e++)t.step();return e[Math.floor(e.length*t.random())]}(),n={name:o.AugmentationNames.UnstableCircadianModulator,moneyCost:5e9,repCost:362500,info:"An experimental nanobot injection. Its unstable nature leads to unpredictable results based on your circadian rhythm."};Object.keys(t.bonuses).forEach(e=>n[e]=t.bonuses[e]);const i=new a.Augmentation(n);i.addToFactions(["Speakers for the Dead"]),x(o.AugmentationNames.UnstableCircadianModulator)&&delete r.Augmentations[o.AugmentationNames.UnstableCircadianModulator],P(i);const s=new a.Augmentation({name:o.AugmentationNames.HemoRecirculator,moneyCost:45e6,repCost:1e4,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08});s.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),x(o.AugmentationNames.HemoRecirculator)&&delete r.Augmentations[o.AugmentationNames.HemoRecirculator],P(s);const p=new a.Augmentation({name:o.AugmentationNames.Targeting1,moneyCost:15e6,repCost:5e3,info:"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates and enhances balance and hand-eye coordination.",dexterity_mult:1.1});p.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.Targeting1)&&delete r.Augmentations[o.AugmentationNames.Targeting1],P(p);const d=new a.Augmentation({name:o.AugmentationNames.Targeting2,moneyCost:425e5,repCost:8750,info:"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting reality by digitally displaying weaknesses and vital signs of threats.",prereqs:[o.AugmentationNames.Targeting1],dexterity_mult:1.2});d.addToFactions(["The Dark Army","The Syndicate","Sector-12","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.Targeting2)&&delete r.Augmentations[o.AugmentationNames.Targeting2],P(d);const h=new a.Augmentation({name:o.AugmentationNames.Targeting3,moneyCost:115e6,repCost:27500,info:"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.",prereqs:[o.AugmentationNames.Targeting2],dexterity_mult:1.3});h.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(o.AugmentationNames.Targeting3)&&delete r.Augmentations[o.AugmentationNames.Targeting3],P(h);const f=new a.Augmentation({name:o.AugmentationNames.SyntheticHeart,moneyCost:2875e6,repCost:75e4,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood more efficiently than an organic heart.",agility_mult:1.5,strength_mult:1.5});f.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),x(o.AugmentationNames.SyntheticHeart)&&delete r.Augmentations[o.AugmentationNames.SyntheticHeart],P(f);const _=new a.Augmentation({name:o.AugmentationNames.SynfibrilMuscle,repCost:437500,moneyCost:1125e6,info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.",strength_mult:1.3,defense_mult:1.3});_.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),x(o.AugmentationNames.SynfibrilMuscle)&&delete r.Augmentations[o.AugmentationNames.SynfibrilMuscle],P(_);const k=new a.Augmentation({name:o.AugmentationNames.CombatRib1,repCost:7500,moneyCost:2375e4,info:"The rib cage is augmented to continuously release boosters into the bloodstream which increase the oxygen-carrying capacity of blood.",strength_mult:1.1,defense_mult:1.1});k.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.CombatRib1)&&delete r.Augmentations[o.AugmentationNames.CombatRib1],P(k);const C=new a.Augmentation({name:o.AugmentationNames.CombatRib2,repCost:18750,moneyCost:65e6,info:"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which improve focus and endurance while decreasing reaction time and fatigue.",prereqs:[o.AugmentationNames.CombatRib1],strength_mult:1.14,defense_mult:1.14});C.addToFactions(["The Dark Army","The Syndicate","Volhaven","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.CombatRib2)&&delete r.Augmentations[o.AugmentationNames.CombatRib2],P(C);const S=new a.Augmentation({name:o.AugmentationNames.CombatRib3,repCost:35e3,moneyCost:12e7,info:"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that improve muscle mass and physical performance while being safe and free of side effects.",prereqs:[o.AugmentationNames.CombatRib2],strength_mult:1.18,defense_mult:1.18});S.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(o.AugmentationNames.CombatRib3)&&delete r.Augmentations[o.AugmentationNames.CombatRib3],P(S);const T=new a.Augmentation({name:o.AugmentationNames.NanofiberWeave,repCost:37500,moneyCost:125e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, which improves its regenerative and extracellular homeostasis abilities.",strength_mult:1.2,defense_mult:1.2});T.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),x(o.AugmentationNames.NanofiberWeave)&&delete r.Augmentations[o.AugmentationNames.NanofiberWeave],P(T);const O=new a.Augmentation({name:o.AugmentationNames.SubdermalArmor,repCost:875e3,moneyCost:325e7,info:"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire or electrical traumas.",defense_mult:2.2});O.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),x(o.AugmentationNames.SubdermalArmor)&&delete r.Augmentations[o.AugmentationNames.SubdermalArmor],P(O);const w=new a.Augmentation({name:o.AugmentationNames.WiredReflexes,repCost:1250,moneyCost:25e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the spread of neural signals and increasing reflex speed.",agility_mult:1.05,dexterity_mult:1.05});w.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),x(o.AugmentationNames.WiredReflexes)&&delete r.Augmentations[o.AugmentationNames.WiredReflexes],P(w);const N=new a.Augmentation({name:o.AugmentationNames.GrapheneBoneLacings,repCost:1125e3,moneyCost:425e7,info:"Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.",strength_mult:1.7,defense_mult:1.7});N.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),x(o.AugmentationNames.GrapheneBoneLacings)&&delete r.Augmentations[o.AugmentationNames.GrapheneBoneLacings],P(N);const A=new a.Augmentation({name:o.AugmentationNames.BionicSpine,repCost:45e3,moneyCost:125e6,info:"The spine is reconstructed using plasteel and carbon fibers. It is now capable of stimulating and regulating neural signals passing through the spinal cord, improving senses and reaction speed. The 'Bionic Spine' also interfaces with all other 'Bionic' implants.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15});A.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicSpine)&&delete r.Augmentations[o.AugmentationNames.BionicSpine],P(A);const R=new a.Augmentation({name:o.AugmentationNames.GrapheneBionicSpine,repCost:1625e3,moneyCost:6e9,info:"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene which enhances durability and supercharges all body functions.",prereqs:[o.AugmentationNames.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6});R.addToFactions(["Fulcrum Secret Technologies","ECorp"]),x(o.AugmentationNames.GrapheneBionicSpine)&&delete r.Augmentations[o.AugmentationNames.GrapheneBionicSpine],P(R);const I=new a.Augmentation({name:o.AugmentationNames.BionicLegs,repCost:15e4,moneyCost:375e6,info:"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.",agility_mult:1.6});I.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicLegs)&&delete r.Augmentations[o.AugmentationNames.BionicLegs],P(I);const B=new a.Augmentation({name:o.AugmentationNames.GrapheneBionicLegs,repCost:75e4,moneyCost:45e8,info:"An upgrade to the 'Bionic Legs' augmentation. The legs are fused with graphene, greatly enhancing jumping ability.",prereqs:[o.AugmentationNames.BionicLegs],agility_mult:2.5});B.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),x(o.AugmentationNames.GrapheneBionicLegs)&&delete r.Augmentations[o.AugmentationNames.GrapheneBionicLegs],P(B);const D=new a.Augmentation({name:o.AugmentationNames.SpeechProcessor,repCost:7500,moneyCost:5e7,info:"A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.",charisma_mult:1.2});D.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),x(o.AugmentationNames.SpeechProcessor)&&delete r.Augmentations[o.AugmentationNames.SpeechProcessor],P(D);const L=new a.Augmentation({name:o.AugmentationNames.TITN41Injection,repCost:25e3,moneyCost:19e7,info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable.",charisma_mult:1.15,charisma_exp_mult:1.15});L.addToFactions(["Silhouette"]),x(o.AugmentationNames.TITN41Injection)&&delete r.Augmentations[o.AugmentationNames.TITN41Injection],P(L);const F=new a.Augmentation({name:o.AugmentationNames.EnhancedSocialInteractionImplant,repCost:375e3,moneyCost:1375e6,info:"A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expressions, body language, and the voice tone, and inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.",charisma_mult:1.6,charisma_exp_mult:1.6});F.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),x(o.AugmentationNames.EnhancedSocialInteractionImplant)&&delete r.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],P(F);const j=new a.Augmentation({name:o.AugmentationNames.BitWire,repCost:3750,moneyCost:1e7,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.",hacking_mult:1.05});j.addToFactions(["CyberSec","NiteSec"]),x(o.AugmentationNames.BitWire)&&delete r.Augmentations[o.AugmentationNames.BitWire],P(j);const W=new a.Augmentation({name:o.AugmentationNames.ArtificialBioNeuralNetwork,repCost:275e3,moneyCost:3e9,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimic the way a biological brain solves a problem, with each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing the user to solve much more complex problems at a much faster rate.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12});W.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),x(o.AugmentationNames.ArtificialBioNeuralNetwork)&&delete r.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],P(W);const G=new a.Augmentation({name:o.AugmentationNames.ArtificialSynapticPotentiation,repCost:6250,moneyCost:8e7,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05});G.addToFactions(["The Black Hand","NiteSec"]),x(o.AugmentationNames.ArtificialSynapticPotentiation)&&delete r.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],P(G);const H=new a.Augmentation({name:o.AugmentationNames.EnhancedMyelinSheathing,repCost:1e5,moneyCost:1375e6,info:"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08});H.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),x(o.AugmentationNames.EnhancedMyelinSheathing)&&delete r.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],P(H);const U=new a.Augmentation({name:o.AugmentationNames.SynapticEnhancement,repCost:2e3,moneyCost:75e5,info:"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.",hacking_speed_mult:1.03});U.addToFactions(["CyberSec","Aevum"]),x(o.AugmentationNames.SynapticEnhancement)&&delete r.Augmentations[o.AugmentationNames.SynapticEnhancement],P(U);const q=new a.Augmentation({name:o.AugmentationNames.NeuralRetentionEnhancement,repCost:2e4,moneyCost:25e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening the ability to retain information.",hacking_exp_mult:1.25});q.addToFactions(["NiteSec"]),x(o.AugmentationNames.NeuralRetentionEnhancement)&&delete r.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],P(q);const $=new a.Augmentation({name:o.AugmentationNames.DataJack,repCost:112500,moneyCost:45e7,info:"A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.",hacking_money_mult:1.25});$.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),x(o.AugmentationNames.DataJack)&&delete r.Augmentations[o.AugmentationNames.DataJack],P($);const K=new a.Augmentation({name:o.AugmentationNames.ENM,repCost:15e3,moneyCost:25e7,info:"A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.",hacking_mult:1.08});K.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(o.AugmentationNames.ENM)&&delete r.Augmentations[o.AugmentationNames.ENM],P(K);const z=new a.Augmentation({name:o.AugmentationNames.ENMCore,repCost:25e4,moneyCost:25e8,info:"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07});z.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(o.AugmentationNames.ENMCore)&&delete r.Augmentations[o.AugmentationNames.ENMCore],P(z);const Y=new a.Augmentation({name:o.AugmentationNames.ENMCoreV2,repCost:1e6,moneyCost:45e8,info:"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control information on a network by re-routing traffic, spoofing IP addresses, and altering the data inside network packets.",prereqs:[o.AugmentationNames.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08});Y.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),x(o.AugmentationNames.ENMCoreV2)&&delete r.Augmentations[o.AugmentationNames.ENMCoreV2],P(Y);const V=new a.Augmentation({name:o.AugmentationNames.ENMCoreV3,repCost:175e4,moneyCost:75e8,info:"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.",prereqs:[o.AugmentationNames.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1});V.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMCoreV3)&&delete r.Augmentations[o.AugmentationNames.ENMCoreV3],P(V);const J=new a.Augmentation({name:o.AugmentationNames.ENMAnalyzeEngine,repCost:625e3,moneyCost:6e9,info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.1});J.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMAnalyzeEngine)&&delete r.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],P(J);const X=new a.Augmentation({name:o.AugmentationNames.ENMDMA,repCost:1e6,moneyCost:7e9,info:"This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.",prereqs:[o.AugmentationNames.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2});X.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMDMA)&&delete r.Augmentations[o.AugmentationNames.ENMDMA],P(X);const Q=new a.Augmentation({name:o.AugmentationNames.Neuralstimulator,repCost:5e4,moneyCost:3e9,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12});Q.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),x(o.AugmentationNames.Neuralstimulator)&&delete r.Augmentations[o.AugmentationNames.Neuralstimulator],P(Q);const Z=new a.Augmentation({name:o.AugmentationNames.NeuralAccelerator,repCost:2e5,moneyCost:175e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2});Z.addToFactions(["BitRunners"]),x(o.AugmentationNames.NeuralAccelerator)&&delete r.Augmentations[o.AugmentationNames.NeuralAccelerator],P(Z);const ee=new a.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG1,repCost:1e4,moneyCost:7e7,info:"The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",hacking_speed_mult:1.01,hacking_mult:1.05});ee.addToFactions(["CyberSec"]),x(o.AugmentationNames.CranialSignalProcessorsG1)&&delete r.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],P(ee);const te=new a.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG2,repCost:18750,moneyCost:125e6,info:"The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07});te.addToFactions(["CyberSec","NiteSec"]),x(o.AugmentationNames.CranialSignalProcessorsG2)&&delete r.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],P(te);const ne=new a.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG3,repCost:5e4,moneyCost:55e7,info:"The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09});ne.addToFactions(["NiteSec","The Black Hand","BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG3)&&delete r.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],P(ne);const ae=new a.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG4,repCost:125e3,moneyCost:11e8,info:"The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25});ae.addToFactions(["The Black Hand","BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG4)&&delete r.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],P(ae);const re=new a.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG5,repCost:25e4,moneyCost:225e7,info:"The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75});re.addToFactions(["BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG5)&&delete r.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],P(re);const ie=new a.Augmentation({name:o.AugmentationNames.NeuronalDensification,repCost:187500,moneyCost:1375e6,info:"The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03});ie.addToFactions(["Clarke Incorporated"]),x(o.AugmentationNames.NeuronalDensification)&&delete r.Augmentations[o.AugmentationNames.NeuronalDensification],P(ie);const oe=new a.Augmentation({name:o.AugmentationNames.NuoptimalInjectorImplant,repCost:5e3,moneyCost:2e7,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.",company_rep_mult:1.2});oe.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Clarke Incorporated","Four Sigma","Bachman & Associates"]),x(o.AugmentationNames.NuoptimalInjectorImplant)&&delete r.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],P(oe);const se=new a.Augmentation({name:o.AugmentationNames.SpeechEnhancement,repCost:2500,moneyCost:125e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.",company_rep_mult:1.1,charisma_mult:1.1});se.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),x(o.AugmentationNames.SpeechEnhancement)&&delete r.Augmentations[o.AugmentationNames.SpeechEnhancement],P(se);const le=new a.Augmentation({name:o.AugmentationNames.FocusWire,repCost:75e3,moneyCost:9e8,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2});le.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),x(o.AugmentationNames.FocusWire)&&delete r.Augmentations[o.AugmentationNames.FocusWire],P(le);const ce=new a.Augmentation({name:o.AugmentationNames.PCDNI,repCost:375e3,moneyCost:375e7,info:"Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.",company_rep_mult:1.3,hacking_mult:1.08});ce.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),x(o.AugmentationNames.PCDNI)&&delete r.Augmentations[o.AugmentationNames.PCDNI],P(ce);const ue=new a.Augmentation({name:o.AugmentationNames.PCDNIOptimizer,repCost:5e5,moneyCost:45e8,info:"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to a connected computer.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:1.75,hacking_mult:1.1});ue.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),x(o.AugmentationNames.PCDNIOptimizer)&&delete r.Augmentations[o.AugmentationNames.PCDNIOptimizer],P(ue);const me=new a.Augmentation({name:o.AugmentationNames.PCDNINeuralNetwork,repCost:15e5,moneyCost:75e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The Neural Network upgrade allows the user to use their own brain's processing power to aid the computer in computational tasks.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05});me.addToFactions(["Fulcrum Secret Technologies"]),x(o.AugmentationNames.PCDNINeuralNetwork)&&delete r.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],P(me);const pe=new a.Augmentation({name:o.AugmentationNames.ADRPheromone1,repCost:3750,moneyCost:175e5,info:"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.",company_rep_mult:1.1,faction_rep_mult:1.1});pe.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),x(o.AugmentationNames.ADRPheromone1)&&delete r.Augmentations[o.AugmentationNames.ADRPheromone1],P(pe);const de=new a.Augmentation({name:o.AugmentationNames.ADRPheromone2,repCost:62500,moneyCost:55e7,info:"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.",company_rep_mult:1.2,faction_rep_mult:1.2});de.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),x(o.AugmentationNames.ADRPheromone2)&&delete r.Augmentations[o.AugmentationNames.ADRPheromone2],P(de);const he=new a.Augmentation({name:o.AugmentationNames.ShadowsSimulacrum,repCost:37500,moneyCost:4e8,info:"A crude but functional matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation was developed by criminal organizations and allows the user to project and control holographic simulacrums within a large radius. These simulacrums are commonly used for espionage and surveillance work.",company_rep_mult:1.15,faction_rep_mult:1.15});he.addToFactions(["The Syndicate","The Dark Army","Speakers for the Dead"]),x(o.AugmentationNames.ShadowsSimulacrum)&&delete r.Augmentations[o.AugmentationNames.ShadowsSimulacrum],P(he);const fe=new a.Augmentation({name:o.AugmentationNames.HacknetNodeCPUUpload,repCost:3750,moneyCost:11e6,info:"Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85});fe.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCPUUpload)&&delete r.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],P(fe);const ge=new a.Augmentation({name:o.AugmentationNames.HacknetNodeCacheUpload,repCost:2500,moneyCost:55e5,info:"Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85});ge.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCacheUpload)&&delete r.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],P(ge);const ye=new a.Augmentation({name:o.AugmentationNames.HacknetNodeNICUpload,repCost:1875,moneyCost:45e5,info:"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9});ye.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeNICUpload)&&delete r.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],P(ye);const _e=new a.Augmentation({name:o.AugmentationNames.HacknetNodeKernelDNI,repCost:7500,moneyCost:4e7,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using electrochemical signals.",hacknet_node_money_mult:1.25});_e.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeKernelDNI)&&delete r.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],P(_e);const be=new a.Augmentation({name:o.AugmentationNames.HacknetNodeCoreDNI,repCost:12500,moneyCost:6e7,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using electrochemical signals.",hacknet_node_money_mult:1.45});be.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCoreDNI)&&delete r.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],P(be);const ve=new a.Augmentation({name:o.AugmentationNames.NeuroFluxGovernor,repCost:1250,moneyCost:375e4,info:"A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system.",stats:E.a.createElement(E.a.Fragment,null,"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively."),hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01});let ke=0;for(let e=0;e<m.Player.augmentations.length;++e)m.Player.augmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&(ke=m.Player.augmentations[e].level);ve.level=ke;let Ee=ke;for(let e=0;e<m.Player.queuedAugmentations.length;++e)m.Player.queuedAugmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&++Ee;let Ce=Math.pow(c.CONSTANTS.NeuroFluxGovernorLevelMult,Ee);ve.baseRepRequirement=500*Ce*l.BitNodeMultipliers.AugmentationRepCost,ve.baseCost=75e4*Ce*l.BitNodeMultipliers.AugmentationMoneyCost,x(o.AugmentationNames.NeuroFluxGovernor)&&delete r.Augmentations[o.AugmentationNames.NeuroFluxGovernor],ve.addToAllFactions(),P(ve);const Se=new a.Augmentation({name:o.AugmentationNames.Neurotrainer1,repCost:1e3,moneyCost:4e6,info:"A decentralized cranial implant that improves the brain's ability to learn. It is installed by releasing millions of nanobots into the human brain, each of which attaches to a different neural pathway to enhance the brain's ability to retain and retrieve information.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});Se.addToFactions(["CyberSec","Aevum"]),x(o.AugmentationNames.Neurotrainer1)&&delete r.Augmentations[o.AugmentationNames.Neurotrainer1],P(Se);const Pe=new a.Augmentation({name:o.AugmentationNames.Neurotrainer2,repCost:1e4,moneyCost:45e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});Pe.addToFactions(["BitRunners","NiteSec"]),x(o.AugmentationNames.Neurotrainer2)&&delete r.Augmentations[o.AugmentationNames.Neurotrainer2],P(Pe);const Te=new a.Augmentation({name:o.AugmentationNames.Neurotrainer3,repCost:25e3,moneyCost:13e7,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2});Te.addToFactions(["NWO","Four Sigma"]),x(o.AugmentationNames.Neurotrainer3)&&delete r.Augmentations[o.AugmentationNames.Neurotrainer3],P(Te);const Me=new a.Augmentation({name:o.AugmentationNames.Hypersight,repCost:15e4,moneyCost:275e7,info:"A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1});Me.addToFactions(["Blade Industries","KuaiGong International"]),x(o.AugmentationNames.Hypersight)&&delete r.Augmentations[o.AugmentationNames.Hypersight],P(Me);const Oe=new a.Augmentation({name:o.AugmentationNames.LuminCloaking1,repCost:1500,moneyCost:5e6,info:"A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see to the naked eye.",agility_mult:1.05,crime_money_mult:1.1});Oe.addToFactions(["Slum Snakes","Tetrads"]),x(o.AugmentationNames.LuminCloaking1)&&delete r.Augmentations[o.AugmentationNames.LuminCloaking1],P(Oe);const we=new a.Augmentation({name:o.AugmentationNames.LuminCloaking2,repCost:5e3,moneyCost:3e7,info:"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy.",prereqs:[o.AugmentationNames.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25});we.addToFactions(["Slum Snakes","Tetrads"]),x(o.AugmentationNames.LuminCloaking2)&&delete r.Augmentations[o.AugmentationNames.LuminCloaking2],P(we);const xe=new a.Augmentation({name:o.AugmentationNames.SmartSonar,repCost:22500,moneyCost:75e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25});xe.addToFactions(["Slum Snakes"]),x(o.AugmentationNames.SmartSonar)&&delete r.Augmentations[o.AugmentationNames.SmartSonar],P(xe);const Ne=new a.Augmentation({name:o.AugmentationNames.PowerRecirculator,repCost:25e3,moneyCost:18e7,info:"The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy, in the form of heat, and converting it back into usable power.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});Ne.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),x(o.AugmentationNames.PowerRecirculator)&&delete r.Augmentations[o.AugmentationNames.PowerRecirculator],P(Ne);const Ae=new a.Augmentation({name:o.AugmentationNames.QLink,repCost:1875e3,moneyCost:25e12,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.",hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4});Ae.addToFactions(["Illuminati"]),x(o.AugmentationNames.QLink)&&delete r.Augmentations[o.AugmentationNames.QLink],P(Ae);const Re=new a.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:25e5,moneyCost:0,info:"It's time to leave the cave.",stats:E.a.createElement(E.a.Fragment,null)});Re.addToFactions(["Daedalus"]),x(o.AugmentationNames.TheRedPill)&&delete r.Augmentations[o.AugmentationNames.TheRedPill],P(Re);const Ie=new a.Augmentation({name:o.AugmentationNames.SPTN97,repCost:125e4,moneyCost:4875e6,info:"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15});Ie.addToFactions(["The Covenant"]),x(o.AugmentationNames.SPTN97)&&delete r.Augmentations[o.AugmentationNames.SPTN97],P(Ie);const Be=new a.Augmentation({name:o.AugmentationNames.HiveMind,repCost:15e5,moneyCost:55e8,info:"A brain implant developed by ECorp. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities.",hacking_grow_mult:3,stats:E.a.createElement(E.a.Fragment,null)});Be.addToFactions(["ECorp"]),x(o.AugmentationNames.HiveMind)&&delete r.Augmentations[o.AugmentationNames.HiveMind],P(Be);const De=new a.Augmentation({name:o.AugmentationNames.CordiARCReactor,repCost:1125e3,moneyCost:5e9,info:"The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amounts of clean energy for the body.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35});De.addToFactions(["MegaCorp"]),x(o.AugmentationNames.CordiARCReactor)&&delete r.Augmentations[o.AugmentationNames.CordiARCReactor],P(De);const Le=new a.Augmentation({name:o.AugmentationNames.SmartJaw,repCost:375e3,moneyCost:275e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25});Le.addToFactions(["Bachman & Associates"]),x(o.AugmentationNames.SmartJaw)&&delete r.Augmentations[o.AugmentationNames.SmartJaw],P(Le);const Fe=new a.Augmentation({name:o.AugmentationNames.Neotra,repCost:562500,moneyCost:2875e6,info:"A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves.",strength_mult:1.55,defense_mult:1.55});Fe.addToFactions(["Blade Industries"]),x(o.AugmentationNames.Neotra)&&delete r.Augmentations[o.AugmentationNames.Neotra],P(Fe);const je=new a.Augmentation({name:o.AugmentationNames.Xanipher,repCost:875e3,moneyCost:425e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological changes and significantly improve the body's functioning in all aspects.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});je.addToFactions(["NWO"]),x(o.AugmentationNames.Xanipher)&&delete r.Augmentations[o.AugmentationNames.Xanipher],P(je);const We=new a.Augmentation({name:o.AugmentationNames.HydroflameLeftArm,repCost:125e4,moneyCost:25e11,info:"The left arm of a legendary BitRunner who ascended beyond this world. It projects a light blue energy shield that protects the exposed inner parts. Even though it contains no weapons, the advanced tungsten titanium alloy increases the users strength to unbelievable levels. The augmentation gets more powerful over time for seemingly no reason.",strength_mult:2.7});We.addToFactions(["NWO"]),x(o.AugmentationNames.HydroflameLeftArm)&&delete r.Augmentations[o.AugmentationNames.HydroflameLeftArm],P(We);const Ge=new a.Augmentation({name:o.AugmentationNames.nextSENS,repCost:437500,moneyCost:1925e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2});Ge.addToFactions(["Clarke Incorporated"]),x(o.AugmentationNames.nextSENS)&&delete r.Augmentations[o.AugmentationNames.nextSENS],P(Ge);const He=new a.Augmentation({name:o.AugmentationNames.OmniTekInfoLoad,repCost:625e3,moneyCost:2875e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.",hacking_mult:1.2,hacking_exp_mult:1.25});He.addToFactions(["OmniTek Incorporated"]),x(o.AugmentationNames.OmniTekInfoLoad)&&delete r.Augmentations[o.AugmentationNames.OmniTekInfoLoad],P(He);const Ue=new a.Augmentation({name:o.AugmentationNames.PhotosyntheticCells,repCost:562500,moneyCost:275e7,info:"Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4});Ue.addToFactions(["KuaiGong International"]),x(o.AugmentationNames.PhotosyntheticCells)&&delete r.Augmentations[o.AugmentationNames.PhotosyntheticCells],P(Ue);const qe=new a.Augmentation({name:o.AugmentationNames.Neurolink,repCost:875e3,moneyCost:4375e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and the BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.",hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05,programs:[g.Programs.FTPCrackProgram.name,g.Programs.RelaySMTPProgram.name]});qe.addToFactions(["BitRunners"]),x(o.AugmentationNames.Neurolink)&&delete r.Augmentations[o.AugmentationNames.Neurolink],P(qe);const $e=new a.Augmentation({name:o.AugmentationNames.TheBlackHand,repCost:1e5,moneyCost:55e7,info:"A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access, and hack devices and machines by just touching them.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1});$e.addToFactions(["The Black Hand"]),x(o.AugmentationNames.TheBlackHand)&&delete r.Augmentations[o.AugmentationNames.TheBlackHand],P($e);const Ke=new a.Augmentation({name:o.AugmentationNames.CRTX42AA,repCost:45e3,moneyCost:225e6,info:"The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities.",hacking_mult:1.08,hacking_exp_mult:1.15});Ke.addToFactions(["NiteSec"]),x(o.AugmentationNames.CRTX42AA)&&delete r.Augmentations[o.AugmentationNames.CRTX42AA],P(Ke);const ze=new a.Augmentation({name:o.AugmentationNames.Neuregen,repCost:37500,moneyCost:375e6,info:"A drug that genetically modifies the neurons in the brain resulting in neurons never die, continuously regenerate, and strengthen themselves.",hacking_exp_mult:1.4});ze.addToFactions(["Chongqing"]),x(o.AugmentationNames.Neuregen)&&delete r.Augmentations[o.AugmentationNames.Neuregen],P(ze);const Ye=new a.Augmentation({name:o.AugmentationNames.CashRoot,repCost:12500,moneyCost:125e6,info:E.a.createElement(E.a.Fragment,null,"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets."),startingMoney:1e6,programs:[g.Programs.BruteSSHProgram.name]});Ye.addToFactions(["Sector-12"]),x(o.AugmentationNames.CashRoot)&&delete r.Augmentations[o.AugmentationNames.CashRoot],P(Ye);const Ve=new a.Augmentation({name:o.AugmentationNames.NutriGen,repCost:6250,moneyCost:25e5,info:"A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2});Ve.addToFactions(["New Tokyo"]),x(o.AugmentationNames.NutriGen)&&delete r.Augmentations[o.AugmentationNames.NutriGen],P(Ve);const Je=new a.Augmentation({name:o.AugmentationNames.PCMatrix,repCost:1e5,moneyCost:2e9,info:"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant uses advanced mathematical algorithims to rapidly identify and compute statistical outcomes of nearly every situation.",charisma_mult:1.0777,charisma_exp_mult:1.0777,work_money_mult:1.777,faction_rep_mult:1.0777,company_rep_mult:1.0777,crime_success_mult:1.0777,crime_money_mult:1.0777,programs:[g.Programs.DeepscanV1.name,g.Programs.AutoLink.name]});Je.addToFactions(["Aevum"]),x(o.AugmentationNames.PCMatrix)&&delete r.Augmentations[o.AugmentationNames.PCMatrix],P(Je);const Xe=new a.Augmentation({name:o.AugmentationNames.INFRARet,repCost:7500,moneyCost:3e7,info:"A tiny chip that sits behind the retinae. This implant lets theuser visually detect infrared radiation.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1});Xe.addToFactions(["Ishima"]),x(o.AugmentationNames.INFRARet)&&delete r.Augmentations[o.AugmentationNames.INFRARet],P(Xe);const Qe=new a.Augmentation({name:o.AugmentationNames.DermaForce,repCost:15e3,moneyCost:5e7,info:"Synthetic skin that is grafted onto the body. This skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.",defense_mult:1.4});Qe.addToFactions(["Volhaven"]),x(o.AugmentationNames.DermaForce)&&delete r.Augmentations[o.AugmentationNames.DermaForce],P(Qe);const Ze=new a.Augmentation({name:o.AugmentationNames.GrapheneBrachiBlades,repCost:225e3,moneyCost:25e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material making them stronger and lighter.",prereqs:[o.AugmentationNames.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3});Ze.addToFactions(["Speakers for the Dead"]),x(o.AugmentationNames.GrapheneBrachiBlades)&&delete r.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],P(Ze);const et=new a.Augmentation({name:o.AugmentationNames.GrapheneBionicArms,repCost:5e5,moneyCost:375e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them stronger and lighter.",prereqs:[o.AugmentationNames.BionicArms],strength_mult:1.85,dexterity_mult:1.85});et.addToFactions(["The Dark Army"]),x(o.AugmentationNames.GrapheneBionicArms)&&delete r.Augmentations[o.AugmentationNames.GrapheneBionicArms],P(et);const tt=new a.Augmentation({name:o.AugmentationNames.BrachiBlades,repCost:12500,moneyCost:9e7,info:"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15});tt.addToFactions(["The Syndicate"]),x(o.AugmentationNames.BrachiBlades)&&delete r.Augmentations[o.AugmentationNames.BrachiBlades],P(tt);const nt=new a.Augmentation({name:o.AugmentationNames.BionicArms,repCost:62500,moneyCost:275e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.",strength_mult:1.3,dexterity_mult:1.3});nt.addToFactions(["Tetrads"]),x(o.AugmentationNames.BionicArms)&&delete r.Augmentations[o.AugmentationNames.BionicArms],P(nt);const at=new a.Augmentation({name:o.AugmentationNames.SNA,repCost:6250,moneyCost:3e7,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15});at.addToFactions(["Tian Di Hui"]),x(o.AugmentationNames.SNA)&&delete r.Augmentations[o.AugmentationNames.SNA],P(at);if(Object(u.factionExists)("Bladeburners")){const e=new a.Augmentation({name:o.AugmentationNames.EsperEyewear,repCost:1250,moneyCost:165e6,info:"Ballistic-grade protective and retractable eyewear that was designed specifically for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, lasers, blinding flashes, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD to assist the user in field missions.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0});e.addToFactions(["Bladeburners"]),M(e);const t=new a.Augmentation({name:o.AugmentationNames.EMS4Recombination,repCost:2500,moneyCost:275e6,info:"A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, improve reflexes, and improve memory among other things.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0});t.addToFactions(["Bladeburners"]),M(t);const n=new a.Augmentation({name:o.AugmentationNames.OrionShoulder,repCost:6250,moneyCost:55e7,info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0});n.addToFactions(["Bladeburners"]),M(n);const r=new a.Augmentation({name:o.AugmentationNames.HyperionV1,repCost:12500,moneyCost:275e7,info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.",bladeburner_success_chance_mult:1.06,isSpecial:!0});r.addToFactions(["Bladeburners"]),M(r);const i=new a.Augmentation({name:o.AugmentationNames.HyperionV2,repCost:25e3,moneyCost:55e8,info:"A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficient, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.",prereqs:[o.AugmentationNames.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0});i.addToFactions(["Bladeburners"]),M(i);const s=new a.Augmentation({name:o.AugmentationNames.GolemSerum,repCost:31250,moneyCost:11e9,info:"A serum that permanently enhances many aspects of human capabilities, including strength, speed, immune system enhancements, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});s.addToFactions(["Bladeburners"]),M(s);const l=new a.Augmentation({name:o.AugmentationNames.VangelisVirus,repCost:18750,moneyCost:275e7,info:"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0});l.addToFactions(["Bladeburners"]),M(l);const c=new a.Augmentation({name:o.AugmentationNames.VangelisVirus3,repCost:37500,moneyCost:11e9,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced reflexes.",prereqs:[o.AugmentationNames.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0});c.addToFactions(["Bladeburners"]),M(c);const u=new a.Augmentation({name:o.AugmentationNames.INTERLINKED,repCost:25e3,moneyCost:55e8,info:"The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0});u.addToFactions(["Bladeburners"]),M(u);const m=new a.Augmentation({name:o.AugmentationNames.BladeRunner,repCost:2e4,moneyCost:825e7,info:"A cybernetic foot augmentation that was specifically created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.",agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});m.addToFactions(["Bladeburners"]),M(m);const p=new a.Augmentation({name:o.AugmentationNames.BladeArmor,repCost:12500,moneyCost:1375e6,info:"A powered exoskeleton suit designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's physical abilities.",strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0});p.addToFactions(["Bladeburners"]),M(p);const d=new a.Augmentation({name:o.AugmentationNames.BladeArmorPowerCells,repCost:18750,moneyCost:275e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0});d.addToFactions(["Bladeburners"]),M(d);const h=new a.Augmentation({name:o.AugmentationNames.BladeArmorEnergyShielding,repCost:21250,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.",prereqs:[o.AugmentationNames.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0});h.addToFactions(["Bladeburners"]),M(h);const f=new a.Augmentation({name:o.AugmentationNames.BladeArmorUnibeam,repCost:31250,moneyCost:165e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision and accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0});f.addToFactions(["Bladeburners"]),M(f);const g=new a.Augmentation({name:o.AugmentationNames.BladeArmorOmnibeam,repCost:62500,moneyCost:275e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a multiple-fiber system. This upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.",prereqs:[o.AugmentationNames.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0});g.addToFactions(["Bladeburners"]),M(g);const y=new a.Augmentation({name:o.AugmentationNames.BladeArmorIPU,repCost:15e3,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0});y.addToFactions(["Bladeburners"]),M(y);const _=new a.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:1250,moneyCost:15e10,info:"A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specifically weaponized by Bladeburner units to be used against Synthoids.",stats:E.a.createElement(E.a.Fragment,null,"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."),isSpecial:!0});_.addToFactions(["Bladeburners"]),M(_)}for(var e in Ce=Math.pow(c.CONSTANTS.MultipleAugMultiplier*[1,.96,.94,.93][y.SourceFileFlags[11]],m.Player.queuedAugmentations.length),r.Augmentations)r.Augmentations.hasOwnProperty(e)&&(r.Augmentations[e].baseCost*=Ce);m.Player.reapplyAllAugmentations()}function M(e){if(!(e instanceof a.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;x(t)&&delete r.Augmentations[t],P(e)}function O(e,t=!1){r.Augmentations[e.name].owned=!0;const n=r.Augmentations[e.name];for(const e in n.mults)null==m.Player[e]?console.warn(`Augmentation has unrecognized multiplier property: ${e}`):m.Player[e]*=n.mults[e];if(e.name===o.AugmentationNames.NeuroFluxGovernor&&!t){r.Augmentations[e.name].level=e.level;for(let t=0;t<m.Player.augmentations.length;++t)if(m.Player.augmentations[t].name==o.AugmentationNames.NeuroFluxGovernor)return void(m.Player.augmentations[t].level=e.level)}if(!t){var a=new i.PlayerOwnedAugmentation(e.name);m.Player.augmentations.push(a)}}function w(){if(0==m.Player.queuedAugmentations.length)return Object(_.dialogBoxCreate)("You have not purchased any Augmentations to install!"),!1;let e="",t=-1;for(let e=m.Player.queuedAugmentations.length-1;e>=0;e--)if(m.Player.queuedAugmentations[e].name===o.AugmentationNames.NeuroFluxGovernor){t=e;break}for(let n=0;n<m.Player.queuedAugmentations.length;++n){const a=m.Player.queuedAugmentations[n],i=r.Augmentations[a.name];if(null==i){console.error(`Invalid augmentation: ${a.name}`);continue}if(O(m.Player.queuedAugmentations[n]),a.name===o.AugmentationNames.NeuroFluxGovernor&&n!==t)continue;let s="";a.name===o.AugmentationNames.NeuroFluxGovernor&&(s=` - ${a.level}`),e+=i.name+s+"<br>"}m.Player.queuedAugmentations=[],Object(_.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+e+"<br>You wake up in your home...you feel different..."),Object(p.a)()}function x(e){return r.Augmentations.hasOwnProperty(e)}function N(e){h.routing.isOn(h.Page.Augmentations)&&e instanceof HTMLElement&&S.a.render(E.a.createElement(s.AugmentationsRoot,{exportGameFn:function(){d.b.exportGame(),Object(f.onExport)(m.Player)},installAugmentationsFn:w}),e)}function A(e){return(e instanceof a.Augmentation?e.name:e)===o.AugmentationNames.NeuroFluxGovernor}},function(e,t,n){"use strict";n.d(t,"a",function(){return w}),n.d(t,"c",function(){return N}),n.d(t,"e",function(){return R}),n.d(t,"f",function(){return B}),n.d(t,"b",function(){return D}),n.d(t,"d",function(){return L});var a=n(71),r=n(253),i=n(111),o=n(151),s=n(315),l=n(11),c=n(15),u=n(462),m=n(68),p=n(461),d=n(837),h=n(158),f=n(1),g=n(198),y=n(459),_=n(121),b=n(20),v=n(25),k=n(77),E=n(472),C=n(13),S=n(112),P=n(303),T=n(24),M=n(104),O=n(207);const w=[];for(var x=0;x<l.CONSTANTS.NumNetscriptPorts;++x)w.push(new h.NetscriptPort);function N(){for(const e of i.workerScripts.values())e.env.stopFlag=!0,Object(a.killWorkerScript)(e);o.WorkerScriptStartStopEventEmitter.emitEvent(),i.workerScripts.clear()}function A(e){const t=e.code;var n,i;e.running=!0;try{let r=function(e,t){const n=Object(M.b)(e,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});var a=t.getServer();if(null==a)throw new Error("Failed to find underlying Server object for script");let r="",i=!1;if(Object(O.b)(n,{ImportDeclaration:e=>{i=!0;let t=e.source.value;t.startsWith("./")&&(t=t.slice(2));let n=function(e){for(let t=0;t<a.scripts.length;++t)if(a.scripts[t].filename===e)return a.scripts[t];return null}(t);if(null==n)throw new Error("'Import' failed due to invalid script: "+t);let o=Object(M.b)(n.code,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type){let t=e.specifiers[0].local.name,n=[],a=[];Object(O.b)(o,{FunctionDeclaration:e=>{n.push(e.id.name),a.push(e)}}),r+="var "+t+";\n(function (namespace) {\n",a.forEach(e=>{r+=Object(E.generate)(e),r+="\n"}),n.forEach(e=>{r+="namespace."+e+" = "+e,r+="\n"}),r+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];Object(O.b)(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{r+=Object(E.generate)(e),r+="\n"})}}}),!i)return{code:e,lineOffset:0};var o=0;if("Program"!==n.type||null==n.body)throw new Error("Code could not be properly parsed");for(let e=n.body.length-1;e>=0;--e)"ImportDeclaration"===n.body[e].type&&(n.body.splice(e,1),++o);var s=(r.match(/\n/g)||[]).length-o;return e=Object(E.generate)(n),{code:e=r+e,lineOffset:s}}(t,e);n=r.code,i=r.lineOffset}catch(t){return Object(C.dialogBoxCreate)("Error processing Imports in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(a.killWorkerScript)(e)}var o;try{o=new u.a(n,function(t,n){var a=Object(p.NetscriptFunctions)(e);for(let e in a){let r=a[e];if("function"==typeof r)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"manualHack"===e){let a=function(){let e=[];for(let n=0;n<arguments.length-1;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);let n=arguments[arguments.length-1];r.apply(null,e).then(function(e){n(e)}).catch(function(e){console.error(e)})};t.setProperty(n,e,t.createAsyncFunction(a))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e||"run"===e||"exec"===e){let a=function(){let e=[];for(let n=0;n<arguments.length;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);return r.apply(null,e)};t.setProperty(n,e,t.createNativeFunction(a))}else{let a=function(){let e=r.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(n,e,t.createNativeFunction(a))}else t.setProperty(n,e,t.nativeToPseudo(r))}t.setProperty(n,"args",t.nativeToPseudo(e.args))},i)}catch(t){return Object(C.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(a.killWorkerScript)(e)}return new Promise(function(t,n){try{!function a(){try{if(e.env.stopFlag)return n(e);o.step()?Object(k.setTimeoutRef)(a,v.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(m.a)(t)||(t=Object(m.b)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(T.isString)(t)?(e.errorMessage=t,n(e)):t instanceof r.WorkerScript?n(t):n(e)}})}function R(e,t,n){return I(e,t,n)?(t.runScript(e,f.Player.hacknet_node_money_mult),e.pid):0}function I(e,t,n){let l=1;e.threads&&!isNaN(e.threads)?l=e.threads:e.threads=1;const c=Object(P.roundToTwo)(Object(y.getRamUsageFromRunningScript)(e)*l);if(c>t.maxRam-t.ramUsed)return Object(C.dialogBoxCreate)(`Not enough RAM to run script ${e.filename} with args `+`${Object(S.arrayToString)(e.args)}. This likely occurred because you re-loaded `+"the game and the script's RAM usage increased (either because of an update to the game or your changes to the script.)"),!1;t.ramUsed=Object(P.roundToTwo)(t.ramUsed+c);const u=Object(s.generateNextPid)();if(-1===u)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const h=new r.WorkerScript(e,u,p.NetscriptFunctions);h.ramUsage=c,i.workerScripts.set(u,h),o.WorkerScriptStartStopEventEmitter.emitEvent();let f=null;if(h.name.endsWith(".js")||h.name.endsWith(".ns"))f=function(e){e.running=!0;let t=null;function n(n,a){return function(...r){if(e.env.stopFlag)throw e;if("sleep"===n)return a(...r);if(t)throw e.errorMessage=Object(m.b)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;let i;t=n;try{i=a(...r)}catch(e){throw t=null,e}return i&&void 0!==i.finally?i.finally(function(){t=null}):(t=null,i)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(d.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(m.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(m.a)(t))throw e.errorMessage=t,e;throw t})}(h);else if(!((f=A(h))instanceof Promise))return!1;return f.then(function(t){n&&n.running&&(n.scriptRef.onlineExpGained+=e.onlineExpGained,n.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),t.running&&(Object(a.killWorkerScript)(h),t.log("","Script finished running"))}).catch(function(e){if(e instanceof Error)return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e instanceof r.WorkerScript){if(!Object(m.a)(e.errorMessage))return void e.log("","Script killed");{const t=e.errorMessage.split("|");if(4!=t.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+errorText);const n=t[1],a=t[2],r=t[3];let i=`RUNTIME ERROR<br>${a}@${n}<br>`;e.args.length>0&&(i+=`Args: ${Object(S.arrayToString)(e.args)}<br>`),i+="<br>",i+=r,Object(C.dialogBoxCreate)(i),e.log("","Script crashed with runtime error")}e.running=!1,e.env.stopFlag=!0}else{if(Object(m.a)(e))return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(C.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(e)}Object(a.killWorkerScript)(h)}),!0}function B(e=1){var t=e*c.Engine._idleSpeed/1e3;for(const e of i.workerScripts.values())e.scriptRef.onlineRunningTime+=t}function D(){let e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&console.info("Skipping the load of any scripts during startup");for(const t in b.AllServers)if(b.AllServers.hasOwnProperty(t)){const n=b.AllServers[t];n.ramUsed=0;for(let e=0;e<n.scripts.length;++e)n.scripts[e].markUpdated();if(e)n.runningScripts.length=0;else for(let e=0;e<n.runningScripts.length;++e)I(n.runningScripts[e],n),Object(_.c)(n.runningScripts[e])}}function L(e,t,n,a,i,o=1){if(!(i instanceof r.WorkerScript))return 0;if("string"!=typeof n||!Array.isArray(a))return i.log(e,`Invalid arguments: scriptname='${n} args='${ags}'`),console.error("runScriptFromScript() failed due to invalid arguments"),0;if(null!=t.getRunningScript(n,a))return i.log(e,`'${n}' is already running on '${t.hostname}'`),0;for(let t=0;t<a.length;++t)if(null==a[t])return i.log(e,"Cannot execute a script with null/undefined as an argument"),0;for(let r=0;r<t.scripts.length;++r)if(t.scripts[r].filename===n){const s=t.scripts[r];let l=s.ramUsage;if(0===(o=Math.round(Number(o))))return 0;l*=o;const c=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return i.log(e,`You do not have root access on '${t.hostname}'`),0;if(l>c)return i.log(e,`Cannot run script '${n}' (t=${o}) on '${t.hostname}' because there is not enough available RAM!`),0;{i.log(e,`'${n}' on '${t.hostname}' with ${o} threads and args: ${Object(S.arrayToString)(a)}.`);let r=new g.RunningScript(s,a);return r.threads=o,R(r,t,i)}}return i.log(e,`Could not find script '${n}' on '${t.hostname}'`),0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return O}),n.d(t,"c",function(){return _}),n.d(t,"d",function(){return v}),n.d(t,"b",function(){return b});var a=n(11),r=n(15),i=n(72),o=n(1),s=n(13),l=n(24),c=n(60),u=n(234),m=n(44),p=n(73),d=n(50),h=(n(1137),n(0)),f=n.n(h),g=n(22),y=n.n(g);let _=!1,b=null;function v(e,t){_=e,b=e?t:null}e(document).keydown(function(e){if(_&&b&&0!=b.selectedNode.length)switch(e.keyCode){case 65:b.actionButtons[0].click();break;case 83:b.actionButtons[1].click();break;case 87:b.actionButtons[2].click();break;case 70:b.actionButtons[3].click();break;case 82:b.actionButtons[4].click();break;case 68:b.actionButtons[5].click()}});let k={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},E="Attacking",C="Scanning",S="Weakening",P="Fortifying",T="Overflowing";function M(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function O(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var r=0;r<8;++r)this.availablePositions.push([n,r]);this.map=[];for(var i=0;i<8;++i)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/a.CONSTANTS.HackingMissionRepToDiffConversion+1,this.reward=250+e/a.CONSTANTS.HackingMissionRepToRewardConversion}function w(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}M.prototype.setPosition=function(e,t){this.pos=[e,t]},M.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},M.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},M.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case k.Core:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case k.Transfer:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case k.Shield:case k.Firewall:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},M.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},M.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`)},O.prototype.init=function(){this.createPageDom();for(var e=o.Player.getHomeComputer(),t=0;t<e.cpuCores;++t){var n={atk:o.Player.hacking_skill/7.5+30,def:o.Player.hacking_skill/20,hp:o.Player.hacking_skill/4};this.playerCores.push(new M(k.Core,n)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var a=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),r=Math.min(20,Object(m.getRandomInt)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),i=Math.min(10,Object(m.getRandomInt)(1,Math.round(this.difficulty/3)+1)),s=a+r+i,l=7-Math.floor(s/8),c=Object(u.addOffset)(.8+this.difficulty/5,10);for(t=0;t<a;++t){n={atk:c*Object(m.getRandomInt)(80,86),def:c*Object(m.getRandomInt)(5,10),hp:c*Object(m.getRandomInt)(210,230)};this.enemyCores.push(new M(k.Core,n)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<r;++t){n={atk:0,def:c*Object(m.getRandomInt)(10,20),hp:c*Object(m.getRandomInt)(275,300)};this.enemyNodes.push(new M(k.Firewall,n)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<i;++t){n={atk:0,def:c*Object(m.getRandomInt)(30,55),hp:c*Object(m.getRandomInt)(210,275)};var p=new M(k.Database,n);p.setControlledByEnemy(),this.setNodeRandomPosition(p,l),this.enemyDatabases.push(p)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},O.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t,r=document.createElement("p");y.a.render(f.a.createElement(f.a.Fragment,null,"You are about to start a hacking mission! You will gain ",Object(c.Reputation)(n)," faction reputation with ",this.faction.name," if you win. Click the 'Start' button to begin."),r),r.style.display="block",r.classList.add("hack-mission-header-element"),r.style.width="80%";var i=document.createElement("a");i.innerText="How to Play",i.classList.add("a-link-button"),i.style.display="inline-block",i.classList.add("hack-mission-header-element"),i.addEventListener("click",function(){return Object(s.dialogBoxCreate)(a.CONSTANTS.HackingMissionHowToPlay),!1});var l=document.createElement("a");l.innerHTML="Start",l.setAttribute("id","hack-mission-start-btn"),l.classList.add("a-link-button"),l.classList.add("hack-mission-header-element"),l.style.display="inline-block",l.addEventListener("click",()=>(this.start(),!1));var u=document.createElement("a");u.innerHTML="Forfeit Mission (Exit)",u.classList.add("a-link-button"),u.classList.add("hack-mission-header-element"),u.style.display="inline-block",u.addEventListener("click",()=>(this.finishMission(!1),!1));var m=document.createElement("p");m.setAttribute("id","hacking-mission-timer"),m.style.display="inline-block",m.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var d=0;d<6;++d)this.actionButtons.push(document.createElement("a")),this.actionButtons[d].style.display="inline-block",this.actionButtons[d].classList.add("a-link-button-inactive"),this.actionButtons[d].classList.add("tooltip"),this.actionButtons[d].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[d]);this.actionButtons[0].innerText="Attack(a)";var h=document.createElement("span");h.classList.add("tooltiptexthigh"),h.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(h),this.actionButtons[1].innerText="Scan(s)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(g),this.actionButtons[2].innerText="Weaken(w)";var _=document.createElement("span");_.classList.add("tooltiptexthigh"),_.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(_),this.actionButtons[3].innerText="Fortify(f)";var b=document.createElement("span");b.classList.add("tooltiptexthigh"),b.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(b),this.actionButtons[4].innerText="Overflow(r)";var v=document.createElement("span");v.classList.add("tooltiptexthigh"),v.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(v),this.actionButtons[5].innerText="Drop Connection(d)";var M=document.createElement("span");M.classList.add("tooltiptexthigh"),M.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(M);var O=document.createElement("p"),w=document.createElement("p");O.style.display="inline-block",w.style.display="inline-block",O.style.color="#00ccff",w.style.color="red",O.style.margin="4px",w.style.margin="4px",O.setAttribute("id","hacking-mission-player-stats"),w.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(O),p.appendChild(w),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===k.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(E,!1),this.selectedNode.forEach(function(e){e.action=E})):console.error("Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==k.Core&&e!==k.Transfer||(this.setActionButtonsActive(e),this.setActionButton(C,!1),this.selectedNode.forEach(function(e){e.action=C}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==k.Core&&e!==k.Transfer||(this.setActionButtonsActive(e),this.setActionButton(S,!1),this.selectedNode.forEach(function(e){e.action=S}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(P,!1),this.selectedNode.forEach(function(e){e.action=P})):console.error("Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==k.Core&&e!==k.Transfer||(this.setActionButtonsActive(e),this.setActionButton(T,!1),this.selectedNode.forEach(function(e){e.action=T}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach(function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=P}):console.error("Pressing Action button without selected node")});var x=document.createElement("p");e.appendChild(r),e.appendChild(i),e.appendChild(l),e.appendChild(u),e.appendChild(m),e.appendChild(p),e.appendChild(x)},O.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},O.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case k.Firewall:case k.Shield:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case k.Transfer:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},O.prototype.setActionButton=function(e,t=!0){if(Object(p.isString)(e))switch(e){case E:e=0;break;case C:e=1;break;case S:e=2;break;case P:e=3;break;case T:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},O.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},O.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},O.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.warn(`removeAvailablePosition() did not remove ${e}, ${t}`)},O.prototype.setNodePosition=function(e,t,n){e instanceof M?isNaN(t)||isNaN(n)?console.error(`Invalid values (${t}, ${n}) passed as (x, y) for setNodePosition`):(e.pos=[t,n],this.map[t][n]=e):console.warn("Non-Node object passed into setNodePOsition")},O.prototype.setNodeRandomPosition=function(e,t=0){var n=Object(m.getRandomInt)(0,this.availablePositions.length-1);if(this.availablePositions[n][1]<t)return this.setNodeRandomPosition(e,t);var a=this.availablePositions.splice(n,1);a=a[0],this.setNodePosition(e,a[0],a[1])},O.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var a=0;a<8;++a)if(!(this.map[n][a]instanceof M)){var r,i=Object(m.getRandomInt)(0,2),o=Object(u.addOffset)(.85+this.difficulty/2,15);switch(i){case 0:var s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(200,225)};r=new M(k.Spam,s);break;case 1:s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(250,275)};r=new M(k.Transfer,s);break;case 2:default:s={atk:0,def:1.1*t+Object(m.getRandomInt)(30,70),hp:o*Object(m.getRandomInt)(300,320)};r=new M(k.Shield,s)}this.setNodePosition(r,n,a),this.removeAvailablePosition(n,a),this.miscNodes.push(r)}for(var l=0;l<8;++l)for(var c=0;c<8;++c)this.createNodeDomElement(this.map[l][c]);for(var p=0;p<this.playerCores.length;++p)this.configurePlayerNodeElement(this.playerCores[p].el)},O.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var a,r="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",r),n.setAttribute("id",r+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case k.Core:a="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case k.Firewall:a="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case k.Database:a="Database<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case k.Spam:a="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case k.Transfer:a="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case k.Shield:default:a="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}a+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),n.innerHTML=a,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},O.prototype.updateNodeDomElement=function(e){if(null==e.el)return void console.error("Calling updateNodeDomElement on a Node without an element");let t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],a=document.getElementById(n+"-txt");switch(e.type){case k.Core:t="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case k.Firewall:t="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case k.Database:t="Database<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case k.Spam:t="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case k.Transfer:t="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case k.Shield:default:t="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1)}t+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),e.action&&(t+="<br>"+e.action),a.innerHTML=t},O.prototype.getNodeFromElement=function(e){var t=(Object(p.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.error("Parsing hacking mission node id. could not find coordinates"),null;var n=t[0],a=t[1];return isNaN(n)||isNaN(a)||n>=8||a>=8||n<0||a<0?(console.error(`Unexpected values (${n}, ${a}) for (x, y)`),null):this.map[n][a]},O.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.error("Failed getting Node object");const t=()=>{!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.error("Failed getting Node object"),n.plyrCtrl&&(w(e),n.select(e.actionButtons),e.selectedNode.push(n))}(this,e)};e.addEventListener("click",t);e.addEventListener("dblclick",()=>{!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.error("Failed getting Node Object in multiselectNode()"),n.plyrCtrl){w(e);var a=n.type;a===k.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===a&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(this,e)}),e.firstChild&&e.firstChild.addEventListener("click",t)},O.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},O.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},O.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},O.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(d.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},O.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",e=>{if(!this.getNodeFromElement(e.source).enmyCtrl){var t=e.endpoints;t[0].detachFrom(t[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",e=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},O.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},O.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var x=0;O.prototype.process=function(e=1){if(this.started&&!((x+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,x)}),this.playerNodes.forEach(e=>{e.type!==k.Transfer&&e.type!==k.Shield&&e.type!==k.Firewall||(t|=this.processNode(e,x))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,x)}),this.enemyNodes.forEach(e=>{e.type!==k.Transfer&&e.type!==k.Shield&&e.type!==k.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,x))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*x,e.hp+=.1*x}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*x,e.maxhp+=.05*x,e.hp+=.1*x,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=x*r.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),x=0)):this.finishMission(!1):this.finishMission(!0)}},O.prototype.processNode=function(e,t=1){if(null!=e.action){var n,r,i=null;e.conn&&(null==(i=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(i.plyrCtrl?(n=this.playerDef,r=this.enemyAtk):i.enmyCtrl?(n=this.enemyDef,r=this.playerAtk):(n=i.def,r=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*a.CONSTANTS.HackingMissionDifficultyToHacking;switch(e.action){case E:if(null==i)break;if(null==e.conn)break;var u=this.calculateAttackDamage(r,n,l?o.Player.hacking_skill:c);i.hp-=u/5*t;break;case C:if(null==i)break;if(null==e.conn)break;var m=this.calculateScanEffect(r,n,l?o.Player.hacking_skill:c);i.def-=m/5*t,s=!0;break;case S:if(null==i)break;if(null==e.conn)break;m=this.calculateWeakenEffect(r,n,l?o.Player.hacking_skill:c);i.atk-=m/5*t,s=!0;break;case P:m=this.calculateFortifyEffect(o.Player.hacking_skill);e.def+=m/5*t,s=!0;break;case T:m=this.calculateOverflowEffect(o.Player.hacking_skill);if(e.def<m)break;e.def-=m/5*t,e.atk+=m/5*t,s=!0;break;default:console.error(`Invalid Node Action: ${e.action}`)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),i&&i.atk<0&&(i.atk=0),i&&i.def<0&&(i.def=0),i&&i.hp<=0){var p=e.plyrCtrl;i.hp=i.maxhp,i.action=null,i.conn=null,this.selectedNode==i&&i.deselect(this.actionButtons),i.atk/=2,i.def/=3.5;var d=!i.plyrCtrl&&!i.enmyCtrl;function h(e,t,n){for(var a=0;a<e.length;++a)if(e[a]==n){var r=e.splice(a,1);r=r[0],t.push(r);break}}switch(this.dropAllConnectionsToNode(i),this.dropAllConnectionsFromNode(i),p?(i.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(i.el),this.jsplumbinstance.makeSource(i.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(i.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(i.el),this.jsplumbinstance.makeTarget(i.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,i.type){case k.Core:p?(h(this.enemyCores,this.playerCores,i),this.configurePlayerNodeElement(i.el)):(h(this.playerCores,this.enemyCores,i),this.configureEnemyNodeElement(i.el));break;case k.Firewall:p?h(this.enemyNodes,this.playerNodes,i):(h(this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el));break;case k.Database:p?h(this.enemyDatabases,this.playerNodes,i):h(this.playerNodes,this.enemyDatabases,i);break;case k.Spam:p?(h(d?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.time+=a.CONSTANTS.HackingMissionSpamTimeIncrease):h(d?this.miscNodes:this.playerNodes,this.enemyNodes,i);break;case k.Transfer:p?(h(d?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.playerCores.forEach(function(e){e.atk*=a.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(i.el)):(h(d?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.enemyCores.forEach(function(e){e.atk*=a.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configureEnemyNodeElement(i.el));break;case k.Shield:p?(h(d?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.configurePlayerNodeElement(i.el)):(h(d?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el))}d&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=a.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),i&&this.updateNodeDomElement(i),s}},O.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case k.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(m.getRandomInt)(0,this.playerNodes.length-1);if(n=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(n))e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount;else{if(t=Object(m.getRandomInt)(0,this.playerCores.length-1),0===this.playerCores.length)return;n=this.playerCores[t],this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}}else{t=Object(m.getRandomInt)(0,this.miscNodes.length-1);var n=this.miscNodes[t];this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}e.action=P}else{var a;null==(a=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.error("Error getting Target node Object in enemyAISelectAction()"),a.def>this.enemyAtk+15?e.def<50?e.action=P:e.action=T:Math.abs(a.def-this.enemyAtk)<=15?e.action=C:e.action=E}break;case k.Transfer:e.def<125?e.action=P:e.action=T;break;case k.Firewall:case k.Shield:e.action=P}};O.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},O.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},O.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},O.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},O.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},O.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var a=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+a},O.prototype.finishMission=function(e){if(_=!1,b=null,e){var t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t;Object(s.dialogBoxCreate)(f.a.createElement(f.a.Fragment,null,"Mission won! You earned ",Object(c.Reputation)(n)," reputation with ",this.faction.name)),o.Player.gainIntelligenceExp(this.difficulty*a.CONSTANTS.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",r.Engine.loadFactionContent(),Object(i.displayFactionContent)(this.faction.name)}}).call(this,n(145))},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadAllGangs=t.resetGangs=t.AllGangs=void 0;const a=n(29);t.AllGangs={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}},t.resetGangs=function(){t.AllGangs={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}},t.loadAllGangs=function(e){t.AllGangs=JSON.parse(e,a.Reviver)}},function(e,t,n){"use strict";function a(e){return e.startsWith("/")?e.slice(1):e}function r(e){return e.endsWith("/")?e.slice(0,-1):e}function i(e){return null!=e.match(/^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\d+(?:\.\d*)?%-INC)?$/)}function o(e){return null!=e.match(/^.?[a-zA-Z0-9_-]+$/)}function s(e){let t=e;if(0===t.length)return!1;if(1===t.length)return"/"===t;if(!t.startsWith("/"))return!1;const n=(t=r(t=t.slice(1))).split("/");for(const e of n)if("."!==e&&".."!==e&&!o(e))return!1;return!0}function l(e){if(null==e||"string"!=typeof e)return!1;const t=e;if(t.length<3)return!1;if(t.endsWith("/"))return!1;const n=t.lastIndexOf("/");if(-1===n)return i(t);const a=t.slice(n+1);return s(t.slice(0,n+1))&&i(a)}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateFilePath=t.evaluateDirectoryPath=t.isInRootDirectory=t.getAllParentDirectories=t.getFirstParentDirectory=t.isValidFilePath=t.isValidDirectoryPath=t.isValidDirectoryName=t.isValidFilename=t.removeTrailingSlash=t.removeLeadingSlash=void 0,t.removeLeadingSlash=a,t.removeTrailingSlash=r,t.isValidFilename=i,t.isValidDirectoryName=o,t.isValidDirectoryPath=s,t.isValidFilePath=l,t.getFirstParentDirectory=function(e){let t=e;if(-1===(t=r(t=a(t))).lastIndexOf("/"))return"/";const n=t.split("/");return 0===n.length?"/":n[0]+"/"},t.getAllParentDirectories=function(e){const t=e,n=t.lastIndexOf("/");return-1===n?"":t.slice(0,n+1)},t.isInRootDirectory=function(e){return!!l(e)&&null!=e&&0!==e.length&&e.lastIndexOf("/")<=0},t.evaluateDirectoryPath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!s(n))return null;const i=(n=r(n=a(n))).split("/"),o=[];for(const e of i)if("."!==e)if(".."===e){if(null==o.pop())return null}else o.push(e);return"/"+o.join("/")},t.evaluateFilePath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!l(n))return null;const r=(n=a(n)).split("/"),i=[];for(const e of r)if("."!==e)if(".."===e){if(null==i.pop())return null}else i.push(e);return"/"+i.join("/")}},function(e,t,n){"use strict";n.d(t,"a",function(){return _}),n.d(t,"b",function(){return g}),n.d(t,"e",function(){return f}),n.d(t,"d",function(){return b}),n.d(t,"c",function(){return k});var a=n(74),r=n(12),i=n(3),o=n(30),s=n(82),l=n(1),c=n(103),u=n(23),m=n(25),p=n(13),d=n(29);function h(e,t=!1){e.recvd=!0,!t&&m.Settings.SuppressMessages||f(e),function(e,t){var n=Object(u.GetServerByHostname)(t);if(null==n)return void console.warn(`Could not find server ${t}`);for(var a=0;a<n.messages.length;++a)if(n.messages[a].filename===e.filename)return;n.messages.push(e)}(e,"home")}function f(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(p.dialogBoxCreate)(t)}function g(){var e=_[v.Jumper0],t=_[v.Jumper1],n=_[v.Jumper2],a=_[v.Jumper3],u=_[v.Jumper4],m=_[v.CyberSecTest],p=_[v.NiteSecTest],d=_[v.BitRunnersTest],f=_[v.RedPill],g=!1;if(r.Augmentations[i.AugmentationNames.TheRedPill].owned&&(g=!0),f&&g&&0===l.Player.sourceFiles.length&&!c.redPillFlag&&!s.c)h(f,!0);else if(f&&g)c.redPillFlag||s.c||h(f);else if(e&&!e.recvd&&l.Player.hacking_skill>=25){h(e);const t=o.Programs.Flight.name,n=l.Player.getHomeComputer();n.programs.includes(t)||n.programs.push(t)}else t&&!t.recvd&&l.Player.hacking_skill>=40?h(t):m&&!m.recvd&&l.Player.hacking_skill>=50?h(m):n&&!n.recvd&&l.Player.hacking_skill>=175?h(n):p&&!p.recvd&&l.Player.hacking_skill>=200?h(p):a&&!a.recvd&&l.Player.hacking_skill>=350?h(a):u&&!u.recvd&&l.Player.hacking_skill>=490?h(u):d&&!d.recvd&&l.Player.hacking_skill>=500&&h(d)}function y(e){_[e.filename]=e}let _={};function b(e){_=JSON.parse(e,d.Reviver)}let v={Jumper0:"j0.msg",Jumper1:"j1.msg",Jumper2:"j2.msg",Jumper3:"j3.msg",Jumper4:"j4.msg",CyberSecTest:"csec-test.msg",NiteSecTest:"nitesec-test.msg",BitRunnersTest:"19dfj3l1nd.msg",RedPill:"icarus.msg"};function k(){_={},y(new a.Message(v.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new a.Message(v.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),y(new a.Message(v.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(new a.Message(v.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),y(new a.Message(v.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),y(new a.Message(v.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential. <br><br>But first, you must pass our test. Find and install the backdoor on our server. <br><br>-CyberSec")),y(new a.Message(v.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets. <br><br>Join us, and people will fear you, too. <br><br>Find and install the backdoor on our server. Then, we will contact you again.<br><br>-NiteSec")),y(new a.Message(v.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new a.Message(v.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exceptionAlert=void 0;const a=n(13);t.exceptionAlert=function(e){console.error(e),a.dialogBoxCreate("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>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,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((a=a.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContract=t.CodingContractResult=t.CodingContractRewardType=t.CodingContractTypes=t.CodingContractType=void 0;const r=n(1136),i=n(29),o=n(40),s=n(1135);class l{constructor(e,t,n,a,r,i){this.name=e,this.desc=t,this.generate=n,this.solver=a,this.difficulty=r,this.numTries=i}}t.CodingContractType=l,t.CodingContractTypes={};for(const e of r.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new l(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var c;!function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(t.CodingContractRewardType||(t.CodingContractRewardType={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(c=t.CodingContractResult||(t.CodingContractResult={}));class u{constructor(e="",n="Find Largest Prime Factor",a=null){if(this.tries=0,this.fn=e,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==t.CodingContractTypes[n])throw new Error(`Error: invalid contract type: ${n} please contact developer`);this.type=n,this.data=t.CodingContractTypes[n].generate(),this.reward=a}getData(){return this.data}getDescription(){return t.CodingContractTypes[this.type].desc(this.data)}getDifficulty(){return t.CodingContractTypes[this.type].difficulty}getMaxNumTries(){return t.CodingContractTypes[this.type].numTries}getType(){return t.CodingContractTypes[this.type].name}isSolution(e){return t.CodingContractTypes[this.type].solver(this.data,e)}prompt(){return a(this,void 0,void 0,function*(){const e=`coding-contract-prompt-popup-${this.fn}`;return new Promise(t=>{o.createPopup(e,s.CodingContractPopup,{c:this,popupId:e,onClose:()=>{t(c.Cancelled),o.removePopup(e)},onAttempt:n=>{this.isSolution(n)?t(c.Success):t(c.Failure),o.removePopup(e)}})})})}toJSON(){return i.Generic_toJSON("CodingContract",this)}static fromJSON(e){return i.Generic_fromJSON(u,e.data)}}t.CodingContract=u,i.Reviver.constructors.CodingContract=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bladeburner=void 0;const a=n(29),r=n(1301),i=n(293),o=n(755),s=n(754),l=n(753),c=n(1300),u=n(752),m=n(24),p=n(751),d=n(750),h=n(1298),f=n(1297),g=n(90),y=n(44),_=n(144),b=n(6),v=n(19),k=n(234),E=n(126),C=n(17),S=n(429),P=n(103),T=n(13),M=n(25),O=n(12),w=n(3),x=n(426),N=n(72);class A{constructor(e){this.numHosp=0,this.moneyLost=0,this.rank=0,this.maxRank=0,this.skillPoints=0,this.totalSkillPoints=0,this.teamSize=0,this.teamLost=0,this.hpLost=0,this.storedCycles=0,this.randomEventCounter=y.getRandomInt(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0,this.actionTimeOverflow=0,this.action=new r.ActionIdentifier({type:i.ActionTypes.Idle}),this.cities={},this.city=_.BladeburnerConstants.CityNames[2],this.skills={},this.skillMultipliers={},this.staminaBonus=0,this.maxStamina=0,this.stamina=0,this.contracts={},this.operations={},this.blackops={},this.logging={general:!0,contracts:!0,ops:!0,blackops:!0,events:!0},this.automateEnabled=!1,this.automateActionHigh=new r.ActionIdentifier({type:i.ActionTypes.Idle}),this.automateThreshHigh=0,this.automateActionLow=new r.ActionIdentifier({type:i.ActionTypes.Idle}),this.automateThreshLow=0,this.consoleHistory=[],this.consoleLogs=["Bladeburner Console","Type 'help' to see console commands"];for(let e=0;e<_.BladeburnerConstants.CityNames.length;++e)this.cities[_.BladeburnerConstants.CityNames[e]]=new h.City(_.BladeburnerConstants.CityNames[e]);this.updateSkillMultipliers(),e&&this.calculateMaxStamina(e),this.stamina=this.maxStamina,this.create()}getCurrentCity(){const e=this.cities[this.city];if(!(e instanceof h.City))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e}calculateStaminaPenalty(){return Math.min(1,this.stamina/(.5*this.maxStamina))}startAction(e,t){if(null!=t)switch(this.action=t,this.actionTimeCurrent=0,t.type){case i.ActionTypes.Idle:this.actionTimeToComplete=0;break;case i.ActionTypes.Contract:try{const e=this.getActionObject(t);if(null==e)throw new Error("Failed to get Contract Object for: "+t.name);if(e.count<1)return this.resetAction();this.actionTimeToComplete=e.getActionTime(this)}catch(e){g.exceptionAlert(e)}break;case i.ActionTypes.Operation:try{const e=this.getActionObject(t);if(null==e)throw new Error("Failed to get Operation Object for: "+t.name);if(e.count<1)return this.resetAction();if("Raid"===t.name&&0===this.getCurrentCity().commsEst)return this.resetAction();this.actionTimeToComplete=e.getActionTime(this)}catch(e){g.exceptionAlert(e)}break;case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:try{if(null!=this.blackops[t.name]){this.resetAction(),this.log("Error: Tried to start a Black Operation that had already been completed");break}const e=this.getActionObject(t);if(null==e)throw new Error("Failed to get BlackOperation object for: "+t.name);this.actionTimeToComplete=e.getActionTime(this)}catch(e){g.exceptionAlert(e)}break;case i.ActionTypes.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime(e);break;case i.ActionTypes.Training:case i.ActionTypes.FieldAnalysis:case i.ActionTypes["Field Analysis"]:this.actionTimeToComplete=30;break;case i.ActionTypes.Diplomacy:case i.ActionTypes["Hyperbolic Regeneration Chamber"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): "+t.type)}}upgradeSkill(e){const t=e.name;if(this.skills[t]?++this.skills[t]:this.skills[t]=1,isNaN(this.skills[t])||this.skills[t]<0)throw new Error("Level of Skill "+t+" is invalid: "+this.skills[t]);this.updateSkillMultipliers()}executeConsoleCommands(e,t){try{this.consoleHistory[this.consoleHistory.length-1]!=t&&(this.consoleHistory.push(t),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1));const n=t.split(";");for(let t=0;t<n.length;++t)this.executeConsoleCommand(e,n[t])}catch(e){g.exceptionAlert(e)}}postToConsole(e,t=!0){t&&(this.consoleLogs.push(e),this.consoleLogs.length>100&&this.consoleLogs.shift())}log(e){this.postToConsole(`[${x.getTimestamp()}] ${e}`)}resetAction(){this.action=new r.ActionIdentifier({type:i.ActionTypes.Idle})}clearConsole(){this.consoleLogs.length=0}prestige(){this.resetAction();const e=C.Factions.Bladeburners;this.rank>=_.BladeburnerConstants.RankNeededForFaction&&N.joinFaction(e)}storeCycles(e=0){this.storedCycles+=e}getActionIdFromTypeAndName(e="",t=""){if(""===e||""===t)return null;const n=new r.ActionIdentifier,a=e.toLowerCase().trim(),s=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=i.ActionTypes.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=i.ActionTypes.Operation,this.operations.hasOwnProperty(t)?(n.name=t,n):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return n.type=i.ActionTypes.BlackOp,o.BlackOperations.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(a.startsWith("gen")){switch(s){case"training":n.type=i.ActionTypes.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=i.ActionTypes.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=i.ActionTypes["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=i.ActionTypes.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=i.ActionTypes["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;default:return null}return n}return null}executeStartConsoleCommand(e,t){if(3!==t.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");const n=t[2];switch(t[1].toLowerCase()){case"general":case"gen":null!=u.GeneralActions[n]?(this.action.type=i.ActionTypes[n],this.action.name=n,this.startAction(e,this.action)):this.postToConsole("Invalid action name specified: "+t[2]);break;case"contract":case"contracts":null!=this.contracts[n]?(this.action.type=i.ActionTypes.Contract,this.action.name=n,this.startAction(e,this.action)):this.postToConsole("Invalid contract name specified: "+t[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[n]?(this.action.type=i.ActionTypes.Operation,this.action.name=n,this.startAction(e,this.action)):this.postToConsole("Invalid Operation name specified: "+t[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=o.BlackOperations[n]?(this.action.type=i.ActionTypes.BlackOperation,this.action.name=n,this.startAction(e,this.action)):this.postToConsole("Invalid BlackOp name specified: "+t[2]);break;default:this.postToConsole("Invalid action/event type specified: "+t[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}}executeSkillConsoleCommand(e){switch(e.length){case 1:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 2:if("list"===e[1].toLowerCase()){this.postToConsole("Skills: ");const e=Object.keys(p.Skills);for(let t=0;t<e.length;++t){const n=p.Skills[e[t]];let a=0;null!=this.skills[n.name]&&(a=this.skills[n.name]),this.postToConsole(n.name+": Level "+m.formatNumber(a,0))}this.postToConsole(" "),this.postToConsole("Effects: ");const t=Object.keys(this.skillMultipliers);for(let e=0;e<t.length;++e){let n=this.skillMultipliers[t[e]];if(n&&1!==n)switch(n=m.formatNumber(n,3),t[e]){case"successChanceAll":this.postToConsole("Total Success Chance: x"+n);break;case"successChanceStealth":this.postToConsole("Stealth Success Chance: x"+n);break;case"successChanceKill":this.postToConsole("Retirement Success Chance: x"+n);break;case"successChanceContract":this.postToConsole("Contract Success Chance: x"+n);break;case"successChanceOperation":this.postToConsole("Operation Success Chance: x"+n);break;case"successChanceEstimate":this.postToConsole("Synthoid Data Estimate: x"+n);break;case"actionTime":this.postToConsole("Action Time: x"+n);break;case"effHack":this.postToConsole("Hacking Skill: x"+n);break;case"effStr":this.postToConsole("Strength: x"+n);break;case"effDef":this.postToConsole("Defense: x"+n);break;case"effDex":this.postToConsole("Dexterity: x"+n);break;case"effAgi":this.postToConsole("Agility: x"+n);break;case"effCha":this.postToConsole("Charisma: x"+n);break;case"effInt":this.postToConsole("Intelligence: x"+n);break;case"stamina":this.postToConsole("Stamina: x"+n);break;default:console.warn(`Unrecognized SkillMult Key: ${t[e]}`)}}}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 3:{const t=e[2],n=p.Skills[t];if(null!=n&&n instanceof d.Skill||this.postToConsole("Invalid skill name (Note that it is case-sensitive): "+t),"list"===e[1].toLowerCase()){let e=0;void 0!==this.skills[n.name]&&(e=this.skills[n.name]),this.postToConsole(n.name+": Level "+m.formatNumber(e))}else if("level"===e[1].toLowerCase()){let e=0;this.skills[t]&&!isNaN(this.skills[t])&&(e=this.skills[t]);const a=n.calculateCost(e);this.skillPoints>=a?(this.skillPoints-=a,this.upgradeSkill(n),this.log(n.name+" upgraded to Level "+this.skills[t])):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+m.formatNumber(a,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break}default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}}executeLogConsoleCommand(e){if(e.length<3)return this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),void this.postToConsole("Use 'help log' for more details and examples");let t=!0;switch(e[1].toLowerCase().includes("d")&&(t=!1),e[2].toLowerCase()){case"general":case"gen":this.logging.general=t,this.log("Logging "+(t?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=t,this.log("Logging "+(t?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=t,this.log("Logging "+(t?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=t,this.log("Logging "+(t?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for events");break;case"all":this.logging.general=t,this.logging.contracts=t,this.logging.ops=t,this.logging.blackops=t,this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+e[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}}executeHelpConsoleCommand(e){if(1===e.length)for(const e of f.ConsoleHelpText.helpList)this.postToConsole(e);else for(let t=1;t<e.length;++t){if(!(e[t]in f.ConsoleHelpText))continue;const n=f.ConsoleHelpText[e[t]];for(const e of n)this.postToConsole(e)}}executeAutomateConsoleCommand(e){if(2===e.length||4===e.length)if(2!==e.length)if(4!==e.length);else{const t=e[1],n=e[2];let a=!1;switch(e[3].toLowerCase().includes("hi")&&(a=!0),t){case"general":case"gen":if(null!=u.GeneralActions[n]){const e=new r.ActionIdentifier({type:i.ActionTypes[n],name:n});a?this.automateActionHigh=e:this.automateActionLow=e,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){const e=new r.ActionIdentifier({type:i.ActionTypes.Contract,name:n});a?this.automateActionHigh=e:this.automateActionLow=e,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid contract name specified: "+n);break;case"ops":case"op":case"operations":case"operation":if(null!=this.operations[n]){const e=new r.ActionIdentifier({type:i.ActionTypes.Operation,name:n});a?this.automateActionHigh=e:this.automateActionLow=e,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid Operation name specified: "+n);break;case"stamina":isNaN(parseFloat(n))?this.postToConsole("Invalid value specified for stamina threshold (must be numeric): "+n):(a?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(a?"HIGH":"LOW")+") stamina threshold set to "+n))}}else{const t=e[1];if("status"===t.toLowerCase())this.postToConsole("Automation: "+(this.automateEnabled?"enabled":"disabled")),this.postToConsole("When your stamina drops to "+m.formatNumber(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+m.formatNumber(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(t.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof r.ActionIdentifier&&this.automateActionHigh instanceof r.ActionIdentifier))return this.log("Failed to enable automation. Actions were not set");this.automateEnabled=!0,this.log("Bladeburner automation enabled")}else t.toLowerCase().includes("d")?(this.automateEnabled=!1,this.log("Bladeburner automation disabled")):this.log("Invalid argument for 'automate' console command: "+e[1])}else this.postToConsole("Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info")}parseCommandArguments(e){const t=[];let n=0,a=0;for(;a<e.length;){const r=e.charAt(a);if('"'===r){const r=e.indexOf('"',a+1);if(-1!==r&&(r===e.length-1||" "===e.charAt(r+1))){t.push(e.substr(a+1,r-a-1)),n=a=r===e.length-1?r+1:r+2;continue}}else if("'"===r){const r=e.indexOf("'",a+1);if(-1!==r&&(r===e.length-1||" "===e.charAt(r+1))){t.push(e.substr(a+1,r-a-1)),n=a=r===e.length-1?r+1:r+2;continue}}else" "===r&&(t.push(e.substr(n,a-n)),n=a+1);++a}return n!==a&&t.push(e.substr(n,a-n)),t}executeConsoleCommand(e,t){t=(t=t.trim()).replace(/\s\s+/g," ");const n=this.parseCommandArguments(t);if(!(n.length<=0))switch(n[0].toLowerCase()){case"automate":this.executeAutomateConsoleCommand(n);break;case"clear":case"cls":this.clearConsole();break;case"help":this.executeHelpConsoleCommand(n);break;case"log":this.executeLogConsoleCommand(n);break;case"skill":this.executeSkillConsoleCommand(n);break;case"start":this.executeStartConsoleCommand(e,n);break;case"stop":this.resetAction();break;default:this.postToConsole("Invalid console command")}}triggerMigration(e){let t=_.BladeburnerConstants.CityNames[y.getRandomInt(0,5)];for(;t===e;)t=_.BladeburnerConstants.CityNames[y.getRandomInt(0,5)];const n=this.cities[t],a=this.cities[e];if(null==n||null==a)throw new Error("Failed to find City with name: "+t);const r=Math.random();let i=y.getRandomInt(3,15)/100;r<.05&&a.comms>0&&(i*=y.getRandomInt(2,4),--a.comms,++n.comms);const o=Math.round(a.pop*i);a.pop-=o,n.pop+=o}triggerPotentialMigration(e,t){(null==t||isNaN(t))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()<t&&this.triggerMigration(e)}randomEvent(){const e=Math.random(),t=_.BladeburnerConstants.CityNames[y.getRandomInt(0,5)],n=this.cities[t];if(!(n instanceof h.City))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");let a=_.BladeburnerConstants.CityNames[y.getRandomInt(0,5)];for(;a===t;)a=_.BladeburnerConstants.CityNames[y.getRandomInt(0,5)];const r=this.cities[a];if(!(n instanceof h.City&&r instanceof h.City))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;const e=y.getRandomInt(10,20)/100,t=Math.round(n.pop*e);n.pop+=t,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else if(e<=.1)if(n.comms<=0){++n.comms;const e=y.getRandomInt(10,20)/100,t=Math.round(n.pop*e);n.pop+=t,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++r.comms;const e=y.getRandomInt(10,20)/100,a=Math.round(n.pop*e);n.pop-=a,r.pop+=a,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){const e=y.getRandomInt(8,24)/100,a=Math.round(n.pop*e);n.pop+=a,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}else if(e<=.5)this.triggerMigration(t),this.logging.events&&this.log("Intelligence indicates that a large number of Synthoids migrated from "+t+" to some other city");else if(e<=.7)n.chaos+=1,n.chaos*=1+y.getRandomInt(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){const e=y.getRandomInt(8,20)/100,a=Math.round(n.pop*e);n.pop-=a,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}}gainActionStats(e,t,n){const a=t.getDifficulty(),r=Math.pow(a,_.BladeburnerConstants.DiffMultExponentialFactor)+a/_.BladeburnerConstants.DiffMultLinearFactor,i=this.actionTimeToComplete,o=n?1:.5,s=i*_.BladeburnerConstants.BaseStatGain*o*r,l=i*_.BladeburnerConstants.BaseIntGain*o*r,c=this.skillMultipliers.expGain;e.gainHackingExp(s*t.weights.hack*e.hacking_exp_mult*c),e.gainStrengthExp(s*t.weights.str*e.strength_exp_mult*c),e.gainDefenseExp(s*t.weights.def*e.defense_exp_mult*c),e.gainDexterityExp(s*t.weights.dex*e.dexterity_exp_mult*c),e.gainAgilityExp(s*t.weights.agi*e.agility_exp_mult*c),e.gainCharismaExp(s*t.weights.cha*e.charisma_exp_mult*c);let u=l*t.weights.int*c;u>1&&(u=Math.pow(u,.8)),e.gainIntelligenceExp(u)}getDiplomacyEffectiveness(e){return(100-(Math.pow(e.charisma,.045)+e.charisma/1e3))/100}getRecruitmentSuccessChance(e){return Math.pow(e.charisma,.45)/(this.teamSize+1)}getRecruitmentTime(e){const t=e.charisma*this.skillMultipliers.effCha,n=Math.pow(t,.81)+t/90;return Math.max(10,Math.round(_.BladeburnerConstants.BaseRecruitmentTimeNeeded-n))}resetSkillMultipliers(){this.skillMultipliers={successChanceAll:1,successChanceStealth:1,successChanceKill:1,successChanceContract:1,successChanceOperation:1,successChanceEstimate:1,actionTime:1,effHack:1,effStr:1,effDef:1,effDex:1,effAgi:1,effCha:1,effInt:1,stamina:1,money:1,expGain:1}}updateSkillMultipliers(){this.resetSkillMultipliers();for(const e in this.skills)if(this.skills.hasOwnProperty(e)){const t=p.Skills[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);const n=this.skills[e];if(null==n||n<=0)continue;const a=Object.keys(this.skillMultipliers);for(let e=0;e<a.length;++e){const r=a[e];if(null!=t.getMultiplier(r)&&!isNaN(t.getMultiplier(r))){const e=t.getMultiplier(r)*n;let a=1+e/100;"actionTime"===r&&(a=1-e/100),this.skillMultipliers[r]*=a}}}}completeOperation(e){if(this.action.type!==i.ActionTypes.Operation)throw new Error("completeOperation() called even though current action is not an Operation");const t=this.getActionObject(this.action);if(null==t)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);const n=t.teamCount;if(n>=1){let a;a=e?Math.ceil(n/2):Math.floor(n);const r=y.getRandomInt(0,a);this.teamSize-=r,this.teamLost+=r,this.logging.ops&&r>0&&this.log("Lost "+m.formatNumber(r,0)+" team members during this "+t.name)}const a=this.getCurrentCity();switch(t.name){case"Investigation":e?(a.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&a.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(a.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&a.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&a.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),a.changeChaosByCount(.1);break;case"Raid":if(e)a.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--a.comms,--a.commsEst;else{const e=y.getRandomInt(-10,-5)/10;a.changePopulationByPercentage(e,{nonZero:!0,changeEstEqually:!1})}a.changeChaosByPercentage(y.getRandomInt(1,5));break;case"Stealth Retirement Operation":e&&a.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),a.changeChaosByPercentage(y.getRandomInt(-3,-1));break;case"Assassination":e&&a.changePopulationByCount(-1,{estChange:-1,estOffset:0}),a.changeChaosByPercentage(y.getRandomInt(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}}getActionObject(e){switch(e.type){case i.ActionTypes.Contract:return this.contracts[e.name];case i.ActionTypes.Operation:return this.operations[e.name];case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:return o.BlackOperations[e.name];case i.ActionTypes.Training:return u.GeneralActions.Training;case i.ActionTypes["Field Analysis"]:return u.GeneralActions["Field Analysis"];case i.ActionTypes.Recruitment:return u.GeneralActions.Recruitment;case i.ActionTypes.Diplomacy:return u.GeneralActions.Diplomacy;case i.ActionTypes["Hyperbolic Regeneration Chamber"]:return u.GeneralActions["Hyperbolic Regeneration Chamber"];default:return null}}completeContract(e){if(this.action.type!==i.ActionTypes.Contract)throw new Error("completeContract() called even though current action is not a Contract");const t=this.getCurrentCity();if(e)switch(this.action.name){case"Tracking":t.improvePopulationEstimateByCount(y.getRandomInt(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1,estOffset:0}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1,estOffset:0}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}}completeAction(e){switch(this.action.type){case i.ActionTypes.Contract:case i.ActionTypes.Operation:try{const t=this.action.type===i.ActionTypes.Operation,n=this.getActionObject(this.action);if(null==n)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);const a=n.getDifficulty(),r=Math.pow(a,_.BladeburnerConstants.DiffMultExponentialFactor)+a/_.BladeburnerConstants.DiffMultLinearFactor,o=Math.pow(n.rewardFac,n.level-1);if(this.stamina-=_.BladeburnerConstants.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0),n.attempt(this)){this.gainActionStats(e,n,!0),++n.successes,--n.count;let a=0;if(t||(a=_.BladeburnerConstants.ContractBaseMoneyGain*o*this.skillMultipliers.money,e.gainMoney(a),e.recordMoneySource(a,"bladeburner")),t?n.setMaxLevel(_.BladeburnerConstants.OperationSuccessesPerLevel):n.setMaxLevel(_.BladeburnerConstants.ContractSuccessesPerLevel),n.rankGain){const r=k.addOffset(n.rankGain*o*v.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(e,r),t&&this.logging.ops?this.log(n.name+" successfully completed! Gained "+m.formatNumber(r,3)+" rank"):!t&&this.logging.contracts&&this.log(n.name+" contract successfully completed! Gained "+m.formatNumber(r,3)+" rank and "+b.numeralWrapper.formatMoney(a))}t?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(e,n,!1),++n.failures;let a=0,i=0;if(n.rankLoss&&(a=k.addOffset(n.rankLoss*o,10),this.changeRank(e,-1*a)),n.hpLoss){i=n.hpLoss*r,i=Math.ceil(k.addOffset(i,10)),this.hpLost+=i;const t=S.calculateHospitalizationCost(e,i);e.takeDamage(i)&&(++this.numHosp,this.moneyLost+=t)}let s="";a>0&&(s+="Lost "+m.formatNumber(a,3)+" rank. "),i>0&&(s+="Took "+m.formatNumber(i,0)+" damage."),t&&this.logging.ops?this.log(n.name+" failed! "+s):!t&&this.logging.contracts&&this.log(n.name+" contract failed! "+s),t?this.completeOperation(!1):this.completeContract(!1)}n.autoLevel&&(n.level=n.maxLevel),this.startAction(e,this.action)}catch(e){g.exceptionAlert(e)}break;case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:try{const t=this.getActionObject(this.action);if(null==t||!(t instanceof s.BlackOperation))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);const n=t.getDifficulty(),a=Math.pow(n,_.BladeburnerConstants.DiffMultExponentialFactor)+n/_.BladeburnerConstants.DiffMultLinearFactor;this.stamina-=_.BladeburnerConstants.BaseStaminaLoss*a,this.stamina<0&&(this.stamina=0);const r=t.teamCount;let i;if(t.attempt(this)){this.gainActionStats(e,t,!0),t.count=0,this.blackops[t.name]=!0;let n=0;if(t.rankGain&&(n=k.addOffset(t.rankGain*v.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(e,n)),i=Math.ceil(r/2),"Operation Daedalus"===t.name)return this.resetAction(),P.hackWorldDaemon(e.bitNodeN);this.logging.blackops&&this.log(t.name+" successful! Gained "+m.formatNumber(n,1)+" rank")}else{this.gainActionStats(e,t,!1);let n=0,o=0;if(t.rankLoss&&(n=k.addOffset(t.rankLoss,10),this.changeRank(e,-1*n)),t.hpLoss){o=t.hpLoss*a,o=Math.ceil(k.addOffset(o,10));const n=S.calculateHospitalizationCost(e,o);e.takeDamage(o)&&(++this.numHosp,this.moneyLost+=n)}i=Math.floor(r),this.logging.blackops&&this.log(t.name+" failed! Lost "+m.formatNumber(n,1)+" rank and took "+m.formatNumber(o,0)+" damage")}if(this.resetAction(),r>=1){const e=y.getRandomInt(1,i);this.teamSize-=e,this.teamLost+=e,this.logging.blackops&&this.log("You lost "+m.formatNumber(e,0)+" team members during "+t.name)}}catch(e){g.exceptionAlert(e)}break;case i.ActionTypes.Training:{this.stamina-=.5*_.BladeburnerConstants.BaseStaminaLoss;const t=30*e.strength_exp_mult,n=30*e.defense_exp_mult,a=30*e.dexterity_exp_mult,r=30*e.agility_exp_mult,i=.04*this.skillMultipliers.stamina;e.gainStrengthExp(t),e.gainDefenseExp(n),e.gainDexterityExp(a),e.gainAgilityExp(r),this.staminaBonus+=i,this.logging.general&&this.log("Training completed. Gained: "+m.formatNumber(t,1)+" str exp, "+m.formatNumber(n,1)+" def exp, "+m.formatNumber(a,1)+" dex exp, "+m.formatNumber(r,1)+" agi exp, "+m.formatNumber(i,3)+" max stamina"),this.startAction(e,this.action);break}case i.ActionTypes.FieldAnalysis:case i.ActionTypes["Field Analysis"]:{let t=.04*Math.pow(e.hacking_skill,.3)+.04*Math.pow(e.intelligence,.9)+.02*Math.pow(e.charisma,.3);if(t*=e.bladeburner_analysis_mult,isNaN(t)||t<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");const n=20*e.hacking_exp_mult,a=20*e.charisma_exp_mult;e.gainHackingExp(n),e.gainIntelligenceExp(_.BladeburnerConstants.BaseIntGain),e.gainCharismaExp(a),this.changeRank(e,.1*v.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(t*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+m.formatNumber(n,1)+" hacking exp, and "+m.formatNumber(a,1)+" charisma exp"),this.startAction(e,this.action);break}case i.ActionTypes.Recruitment:{const t=this.getRecruitmentSuccessChance(e);if(Math.random()<t){const t=2*_.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;e.gainCharismaExp(t),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+m.formatNumber(t,1)+" charisma exp")}else{const t=_.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;e.gainCharismaExp(t),this.logging.general&&this.log("Failed to recruit a team member. Gained "+m.formatNumber(t,1)+" charisma exp")}this.startAction(e,this.action);break}case i.ActionTypes.Diplomacy:{const t=this.getDiplomacyEffectiveness(e);this.getCurrentCity().chaos*=t,this.getCurrentCity().chaos<0&&(this.getCurrentCity().chaos=0),this.logging.general&&this.log(`Diplomacy completed. Chaos levels in the current city fell by ${b.numeralWrapper.formatPercentage(1-t)}`),this.startAction(e,this.action);break}case i.ActionTypes["Hyperbolic Regeneration Chamber"]:{e.regenerateHp(_.BladeburnerConstants.HrcHpGain);const t=this.maxStamina*(_.BladeburnerConstants.HrcStaminaGain/100);this.stamina=Math.min(this.maxStamina,this.stamina+t),this.startAction(e,this.action),this.logging.general&&this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_.BladeburnerConstants.HrcHpGain} HP and gained ${b.numeralWrapper.formatStamina(t)} stamina`);break}default:console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`)}}changeRank(e,t){if(isNaN(t))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=t,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(C.factionExists("Bladeburners")){const n=C.Factions.Bladeburners;if(!(n instanceof E.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(n.isMember){const a=1+n.favor/100;n.playerReputation+=_.BladeburnerConstants.RankToFactionRepFactor*t*e.faction_rep_mult*a}}const n=(this.totalSkillPoints+1)*_.BladeburnerConstants.RanksPerSkillPoint;if(this.maxRank>=n){const e=Math.floor((this.maxRank-n)/_.BladeburnerConstants.RanksPerSkillPoint+1);this.skillPoints+=e,this.totalSkillPoints+=e}}processAction(e,t){if(this.action.type!==i.ActionTypes.Idle){if(this.actionTimeToComplete<=0)throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);if(!(this.action instanceof r.ActionIdentifier))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=t+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction(e)):void 0}}calculateStaminaGainPerSecond(e){const t=e.agility*this.skillMultipliers.effAgi,n=this.maxStamina/_.BladeburnerConstants.MaxStaminaToGainFactor;return(_.BladeburnerConstants.StaminaGainPerSecond+n)*Math.pow(t,.17)*(this.skillMultipliers.stamina*e.bladeburner_stamina_gain_mult)}calculateMaxStamina(e){const t=e.agility*this.skillMultipliers.effAgi,n=(Math.pow(t,.8)+this.staminaBonus)*this.skillMultipliers.stamina*e.bladeburner_max_stamina_mult;if(this.maxStamina!==n){const e=this.maxStamina;this.maxStamina=n,this.stamina=this.maxStamina*this.stamina/e}if(isNaN(n))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")}create(){this.contracts.Tracking=new c.Contract({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:y.getRandomInt(25,150),countGrowth:y.getRandomInt(5,75)/10,weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new c.Contract({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:y.getRandomInt(5,150),countGrowth:y.getRandomInt(5,75)/10,weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new c.Contract({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:y.getRandomInt(5,150),countGrowth:y.getRandomInt(5,75)/10,weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new l.Operation({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:y.getRandomInt(1,100),countGrowth:y.getRandomInt(10,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new l.Operation({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:y.getRandomInt(1,100),countGrowth:y.getRandomInt(10,40)/10,weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new l.Operation({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:y.getRandomInt(1,150),countGrowth:y.getRandomInt(3,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new l.Operation({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful.",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:y.getRandomInt(1,150),countGrowth:y.getRandomInt(2,40)/10,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new l.Operation({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:y.getRandomInt(1,150),countGrowth:y.getRandomInt(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new l.Operation({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:y.getRandomInt(1,150),countGrowth:y.getRandomInt(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})}process(e){if(!1===P.redPillFlag&&this.blackops.hasOwnProperty("Operation Daedalus"))return P.hackWorldDaemon(e.bitNodeN);if(!1===O.Augmentations[w.AugmentationNames.BladesSimulacrum].owned&&e.isWorking){if(this.action.type!==i.ActionTypes.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),M.Settings.SuppressBladeburnerPopup||T.dialogBoxCreate(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=_.BladeburnerConstants.CyclesPerSecond){let t=Math.floor(this.storedCycles/_.BladeburnerConstants.CyclesPerSecond);t=Math.min(t,5),this.storedCycles-=t*_.BladeburnerConstants.CyclesPerSecond,this.calculateMaxStamina(e),this.stamina+=this.calculateStaminaGainPerSecond(e)*t,this.stamina=Math.min(this.maxStamina,this.stamina);for(const e of Object.values(this.contracts))e.count+=t*e.countGrowth/_.BladeburnerConstants.ActionCountGrowthPeriod;for(const e of Object.values(this.operations))e.count+=t*e.countGrowth/_.BladeburnerConstants.ActionCountGrowthPeriod;for(const e of _.BladeburnerConstants.CityNames){const n=this.cities[e];if(!(n instanceof h.City))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");n.chaos-=1e-4*t,n.chaos=Math.max(0,n.chaos)}this.randomEventCounter-=t,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=y.getRandomInt(240,600)),this.processAction(e,t),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new r.ActionIdentifier({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(e,this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new r.ActionIdentifier({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(e,this.action))))}}getTypeAndNameFromActionId(e){const t={type:"",name:""},n=Object.keys(i.ActionTypes);for(let a=0;a<n.length;++a)if(e.type===i.ActionTypes[n[a]]){t.type=n[a];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t}getContractNamesNetscriptFn(){return Object.keys(this.contracts)}getOperationNamesNetscriptFn(){return Object.keys(this.operations)}getBlackOpNamesNetscriptFn(){return Object.keys(o.BlackOperations)}getGeneralActionNamesNetscriptFn(){return Object.keys(u.GeneralActions)}getSkillNamesNetscriptFn(){return Object.keys(p.Skills)}startActionNetscriptFn(e,t,n,a){const r=`Invalid action: type='${t}' name='${n}'`,l=this.getActionIdFromTypeAndName(t,n);if(null==l)return a.log("bladeburner.startAction",r),!1;if(l.type===i.ActionTypes.BlackOp){const e=this.getActionObject(l);if(null==e)throw new Error(`Action not found ${l.type}, ${l.name}`);if(!(e instanceof s.BlackOperation))throw new Error("Action should be BlackOperation but isn't");if(e.reqdRank>this.rank)return a.log("bladeburner.startAction",`Insufficient rank to start Black Op '${l.name}'.`),!1;if(null!=this.blackops[l.name])return a.log("bladeburner.startAction",`Black Op ${l.name} has already been completed.`),!1;const t=[];for(const e in o.BlackOperations)o.BlackOperations.hasOwnProperty(e)&&t.push(e);t.sort(function(e,t){return o.BlackOperations[e].reqdRank-o.BlackOperations[t].reqdRank});const r=t.indexOf(l.name);if(-1===r)return a.log("bladeburner.startAction",`Invalid Black Op: '${n}'`),!1;if(r>0&&null==this.blackops[t[r-1]])return a.log("bladeburner.startAction",`Preceding Black Op must be completed before starting '${l.name}'.`),!1}try{return this.startAction(e,l),a.log("bladeburner.startAction",`Starting bladeburner action with type '${t}' and name ${n}"`),!0}catch(e){return this.resetAction(),a.log("bladeburner.startAction",r),!1}}getActionTimeNetscriptFn(e,t,n,a){const r=`Invalid action: type='${t}' name='${n}'`,o=this.getActionIdFromTypeAndName(t,n);if(null==o)return a.log("bladeburner.getActionTime",r),-1;const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.getActionTime",r),-1;switch(o.type){case i.ActionTypes.Contract:case i.ActionTypes.Operation:case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:return s.getActionTime(this);case i.ActionTypes.Training:case i.ActionTypes["Field Analysis"]:case i.ActionTypes.FieldAnalysis:return 30;case i.ActionTypes.Recruitment:return this.getRecruitmentTime(e);case i.ActionTypes.Diplomacy:case i.ActionTypes["Hyperbolic Regeneration Chamber"]:return 60;default:return a.log("bladeburner.getActionTime",r),-1}}getActionEstimatedSuccessChanceNetscriptFn(e,t,n,a){const r=`Invalid action: type='${t}' name='${n}'`,o=this.getActionIdFromTypeAndName(t,n);if(null==o)return a.log("bladeburner.getActionEstimatedSuccessChance",r),[-1,-1];const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.getActionEstimatedSuccessChance",r),[-1,-1];switch(o.type){case i.ActionTypes.Contract:case i.ActionTypes.Operation:case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:return s.getEstSuccessChance(this);case i.ActionTypes.Training:case i.ActionTypes["Field Analysis"]:case i.ActionTypes.FieldAnalysis:case i.ActionTypes.Diplomacy:case i.ActionTypes["Hyperbolic Regeneration Chamber"]:return[1,1];case i.ActionTypes.Recruitment:const t=this.getRecruitmentSuccessChance(e);return[t,t];default:return a.log("bladeburner.getActionEstimatedSuccessChance",r),[-1,-1]}}getActionCountRemainingNetscriptFn(e,t,n){const a=`Invalid action: type='${e}' name='${t}'`,r=this.getActionIdFromTypeAndName(e,t);if(null==r)return n.log("bladeburner.getActionCountRemaining",a),-1;const o=this.getActionObject(r);if(null==o)return n.log("bladeburner.getActionCountRemaining",a),-1;switch(r.type){case i.ActionTypes.Contract:case i.ActionTypes.Operation:return Math.floor(o.count);case i.ActionTypes.BlackOp:case i.ActionTypes.BlackOperation:return null!=this.blackops[t]?0:1;case i.ActionTypes.Training:case i.ActionTypes.Recruitment:case i.ActionTypes["Field Analysis"]:case i.ActionTypes.FieldAnalysis:case i.ActionTypes.Diplomacy:case i.ActionTypes["Hyperbolic Regeneration Chamber"]:return 1/0;default:return n.log("bladeburner.getActionCountRemaining",a),-1}}getSkillLevelNetscriptFn(e,t){return""!==e&&p.Skills.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log("bladeburner.getSkillLevel",`Invalid skill: '${e}'`),-1)}getSkillUpgradeCostNetscriptFn(e,t){if(""===e||!p.Skills.hasOwnProperty(e))return t.log("bladeburner.getSkillUpgradeCost",`Invalid skill: '${e}'`),-1;const n=p.Skills[e];return null==this.skills[e]?n.calculateCost(0):n.calculateCost(this.skills[e])}upgradeSkillNetscriptFn(e,t){const n=`Invalid skill: '${e}'`;if(!p.Skills.hasOwnProperty(e))return t.log("bladeburner.upgradeSkill",n),!1;const a=p.Skills[e];let r=0;this.skills[e]&&!isNaN(this.skills[e])&&(r=this.skills[e]);const i=a.calculateCost(r);return a.maxLvl&&r>=a.maxLvl?(t.log("bladeburner.upgradeSkill",`Skill '${e}' is already maxed.`),!1):this.skillPoints<i?(t.log("bladeburner.upgradeSkill",`You do not have enough skill points to upgrade ${e} (You have ${this.skillPoints}, you need ${i})`),!1):(this.skillPoints-=i,this.upgradeSkill(a),t.log("bladeburner.upgradeSkill",`'${e}' upgraded to level ${this.skills[e]}`),!0)}getTeamSizeNetscriptFn(e,t,n){if(""===e&&""===t)return this.teamSize;const a=`Invalid action: type='${e}' name='${t}'`,r=this.getActionIdFromTypeAndName(e,t);if(null==r)return n.log("bladeburner.getTeamSize",a),-1;const o=this.getActionObject(r);return null==o?(n.log("bladeburner.getTeamSize",a),-1):r.type===i.ActionTypes.Operation||r.type===i.ActionTypes.BlackOp||r.type===i.ActionTypes.BlackOperation?o.teamCount:0}setTeamSizeNetscriptFn(e,t,n,a){const r=`Invalid action: type='${e}' name='${t}'`,o=this.getActionIdFromTypeAndName(e,t);if(null==o)return a.log("bladeburner.setTeamSize",r),-1;if(o.type!==i.ActionTypes.Operation&&o.type!==i.ActionTypes.BlackOp&&o.type!==i.ActionTypes.BlackOperation)return a.log("bladeburner.setTeamSize","Only valid for 'Operations' and 'BlackOps'"),-1;const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.setTeamSize",r),-1;let l=Math.round(n);return isNaN(l)||l<0?(a.log("bladeburner.setTeamSize",`Invalid size: ${n}`),-1):(this.teamSize<l&&(l=this.teamSize),s.teamCount=l,a.log("bladeburner.setTeamSize",`Team size for '${t}' set to ${l}.`),l)}joinBladeburnerFactionNetscriptFn(e){const t=C.Factions.Bladeburners;return!!t.isMember||(this.rank>=_.BladeburnerConstants.RankNeededForFaction?(N.joinFaction(t),e.log("bladeburner.joinBladeburnerFaction","Joined Bladeburners faction."),!0):(e.log("bladeburner.joinBladeburnerFaction",`You do not have the required rank (${this.rank}/${_.BladeburnerConstants.RankNeededForFaction}).`),!1))}toJSON(){return a.Generic_toJSON("Bladeburner",this)}static fromJSON(e){return a.Generic_fromJSON(A,e.data)}}t.Bladeburner=A,a.Reviver.constructors.Bladeburner=A},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationConstants=void 0;const a=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];t.CorporationConstants={INITIALSHARES:1e9,SHARESPERPRICEUPDATE:1e6,IssueNewSharesCooldown:216e3,SellSharesCooldown:18e3,CyclesPerMarketCycle:50,CyclesPerIndustryStateCycle:50/a.length,SecsPerMarketCycle:10,Cities:["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost:5e9,WarehouseInitialSize:100,WarehouseUpgradeBaseCost:1e9,OfficeInitialCost:4e9,OfficeInitialSize:3,OfficeUpgradeBaseCost:1e9,BribeThreshold:1e14,BribeToRepRatio:1e9,ProductProductionCostRatio:5,DividendMaxPercentage:.5,EmployeeSalaryMultiplier:3,CyclesPerEmployeeRaise:400,EmployeeRaiseAmount:50,BaseMaxProducts:3,AllCorporationStates:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementById=void 0;const a=n(192),r=n(229);t.removeElementById=function(e){try{const t=a.getElementById(e);r.removeElement(t)}catch(e){}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionTypes=void 0,function(e){e.Long="L",e.Short="S"}(t.PositionTypes||(t.PositionTypes={}))},,,,,function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"redPillFlag",function(){return g}),n.d(t,"hackWorldDaemon",function(){return y});var a=n(129),r=n(15),i=n(1),o=n(174),s=n(458),l=n(37),c=n(232),u=n(77),m=n(13),p=n(63),d=n(50),h=n(153);function f(e){return new Promise(function(t,n){var a=document.getElementById("red-pill-content"),r=document.createElement("p");a.appendChild(r),function e(t,n,a=0){return new Promise(function(r,i){Object(u.setTimeoutRef)(function(){if(a>=n.length){var o=n.substring(0,a);return t.innerHTML="> "+o,r(!0)}var o=n.substring(0,a);t.innerHTML="> "+o+"<span class='typed-cursor'> █ </span>";var s=e(t,n,a+1);s.then(function(e){r(e)},function(e){i(e)})},30)})}(r,e,0).then(function(e){t(e)},function(e){n(e)})})}let g=!1;function y(e,t=!1,n=!1){var a=document.getElementById("red-pill-content");return Object(h.removeChildrenFromElement)(a),g=!0,r.Engine.loadRedPillContent(),n?b(e,t,n):f("[ERROR] SEMPOOL INVALID").then(function(){return f("[ERROR] Segmentation Fault")}).then(function(){return f("[ERROR] SIGKILL RECVD")}).then(function(){return f("Dumping core...")}).then(function(){return f("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return f("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return f("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return f("----------------------------------------")}).then(function(){return f("Failsafe initiated...")}).then(function(){return f("Restarting BitNode-"+e+"...")}).then(function(){return f("...........")}).then(function(){return f("...........")}).then(function(){return f("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return f("..............................................")}).then(function(){return f("..............................................")}).then(function(){return b(e,t)}).catch(function(e){console.error(e.toString())})}let _=[];function b(e,t=!1,n=!1){const r=document.getElementById("red-pill-content");Object(h.removeChildrenFromElement)(r),_=l.SourceFileFlags.slice(),t||_[e]<3&&++_[e];const i=document.createElement("pre"),o=[];for(let e=1;e<=12;++e)o.push(v(e));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+o[9]+" | | / | "+o[10]+" | <br> "+o[8]+" | | | | | | | "+o[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+o[6]+" / \\ "+o[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+o[4]+"3R | | | | | | R3"+o[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+o[0]+" |/ "+o[1]+" | | "+o[2]+" \\| "+o[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",r.appendChild(i);for(let n=1;n<=12;++n)!function(n){const r="bitnode-"+n.toString(),i=Object(d.clearEventListeners)(r);null!=i&&(n>=1&&n<=12?i.addEventListener("click",function(){const r="BitNode"+n,i=a.BitNodes[r];if(null==i)return void console.error(`Could not find BitNode object for number: ${n}`);const o=12===n?"∞":"3",s=`BitNode-${n}: ${i.name}<br>`+`Source-File Level: ${_[n]} / ${o}<br><br>`+`${i.info}`;Object(p.yesNoBoxCreate)(s),k(n,e,t)}):i.addEventListener("click",function(){Object(m.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(n);return n?Promise.resolve(!0):f("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return f("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return f("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return f("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return f("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return f("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return f("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return f("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return f("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return f("Only then can we begin to fight back...")}).then(function(){return f("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return f("But there is still a long way to go...")}).then(function(){return f("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return f("There are tens if not hundreds of BitNodes out there...")}).then(function(){return f("Each with their own simulations of a reality...")}).then(function(){return f("Each creating their own universes...a universe of universes")}).then(function(){return f("And all of which must be destroyed...")}).then(function(){return f(".......................................")}).then(function(){return f("Welcome to the Bitverse...")}).then(function(){return f(" ")}).then(function(){return f("(Enter a new BitNode using the image above)")}).then(function(){return Promise.resolve(!0)}).catch(function(e){console.error(e.toString())})}function v(e){const t="BitNode"+e.toString(),n=a.BitNodes[t];if(null==n)return"O";const r=_[e];let i;return`<a class='bitnode ${i=12===e&&r>=2?"level-2":`level-${r}`} tooltip' id='bitnode-${n.number}'><strong>O</strong>`+"<span class='tooltiptext'>"+`<strong>BitNode-${n.number.toString()}<br>${n.name}</strong><br>`+`${n.desc}<br>`+"</span></a>"}function k(t,n,a=!1){const r=Object(p.yesNoBoxGetYesButton)();r.innerHTML="Enter BitNode-"+t,r.addEventListener("click",function(){a?0===l.SourceFileFlags[5]&&5!==t&&(i.Player.intelligence=0,i.Player.intelligence_exp=0):function(e){var t="SourceFile"+e.toString(),n=c.SourceFiles[t];if(null!=n){for(var a=!1,r=null,o=0;o<i.Player.sourceFiles.length;++o)if(i.Player.sourceFiles[o].n===e){a=!0,r=i.Player.sourceFiles[o];break}if(a&&r)r.lvl>=3&&12!==r.n?Object(m.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++r.lvl,Object(m.dialogBoxCreate)(n.name+" was upgraded to level "+r.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.PlayerOwnedSourceFile(e,1);i.Player.sourceFiles.push(l),5===e&&0===i.Player.intelligence&&(i.Player.intelligence=1),Object(m.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!<br><br>"+n.name+"<br><br>"+n.info)}}else console.error(`Could not find source file for Bit node: ${e}`)}(n),5===t&&0===i.Player.intelligence&&(i.Player.intelligence=1),g=!1;const r=document.getElementById("red-pill-content");Object(h.removeChildrenFromElement)(r),i.Player.bitNodeN=t,e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),Object(o.b)(a),Object(p.yesNoBoxClose)()});const u=Object(p.yesNoBoxGetNoButton)();u.innerHTML="Back",u.addEventListener("click",function(){Object(p.yesNoBoxClose)()})}}.call(this,n(145))},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFactionFieldWorkRepGain=t.getFactionSecurityWorkRepGain=t.getHackingWorkRepGain=void 0;const a=n(11),r=n(19);function i(e){let t=1+e.favor/100;return isNaN(t)&&(t=1),t*r.BitNodeMultipliers.FactionWorkRepGain}t.getHackingWorkRepGain=function(e,t){return(e.hacking_skill+e.intelligence/3)/a.CONSTANTS.MaxSkillLevel*e.faction_rep_mult*e.getIntelligenceBonus(1)*i(t)},t.getFactionSecurityWorkRepGain=function(e,t){return.9*(e.hacking_skill/a.CONSTANTS.MaxSkillLevel+e.strength/a.CONSTANTS.MaxSkillLevel+e.defense/a.CONSTANTS.MaxSkillLevel+e.dexterity/a.CONSTANTS.MaxSkillLevel+e.agility/a.CONSTANTS.MaxSkillLevel+e.intelligence/a.CONSTANTS.MaxSkillLevel)/4.5*e.faction_rep_mult*i(t)*e.getIntelligenceBonus(1)},t.getFactionFieldWorkRepGain=function(e,t){return.9*(e.hacking_skill/a.CONSTANTS.MaxSkillLevel+e.strength/a.CONSTANTS.MaxSkillLevel+e.defense/a.CONSTANTS.MaxSkillLevel+e.dexterity/a.CONSTANTS.MaxSkillLevel+e.agility/a.CONSTANTS.MaxSkillLevel+e.charisma/a.CONSTANTS.MaxSkillLevel+e.intelligence/a.CONSTANTS.MaxSkillLevel)/5.5*e.faction_rep_mult*i(t)*e.getIntelligenceBonus(1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderTypes=void 0,function(e){e.LimitBuy="Limit Buy Order",e.LimitSell="Limit Sell Order",e.StopBuy="Stop Buy Order",e.StopSell="Stop Sell Order"}(t.OrderTypes||(t.OrderTypes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.workerScripts=void 0,t.workerScripts=new Map},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=void 0,t.arrayToString=function e(t){const n=[];for(let a=0;a<t.length;++a){let r=t[a];Array.isArray(r)?r=e(r):"string"==typeof r&&(r=`"${r}"`),n.push(r)}return`[${n.join(", ")}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return P}),n.d(t,"a",function(){return O});var a=n(67),r=n(32),i=n(11),o=n(15),s=n(17),l=n(197),c=n(39),u=n(86),m=n(88),p=n(1),d=n(20),h=n(25),f=n(38),g=n(37),y=n(48),_=n(143),b=n(77),v=n(154),k=n(13),E=n(50),C=n(29),S=n(69);let P=new T;function T(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave="",this.LastExportBonus=""}function M(e){if(e<="0.41.2")for(var t in null!=p.Player.companyPosition&&"string"!=typeof p.Player.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),p.Player.companyPosition=p.Player.companyPosition.data.positionName,null==p.Player.companyPosition&&(p.Player.companyPosition="")),r.Companies){const e=r.Companies[t];if(null!=e.name&&0!==e.name&&""!==e.name||null==e.companyName||(console.log("Changed company name property to be compatible with v0.41.2"),e.name=e.companyName),e.companyPositions instanceof Array){console.log("Changed company companyPositions property to be compatible with v0.41.2");const t={};for(let n=0;n<e.companyPositions.length;++n)t[e.companyPositions[n]]=!0;e.companyPositions=t}}e<"0.43.0"&&(""!==p.Player.companyName&&null!=p.Player.companyPosition&&""!==p.Player.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),p.Player.jobs[p.Player.companyName]=p.Player.companyPosition),delete p.Player.companyPosition)}function O(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,C.Reviver);if(Object(p.loadPlayer)(t.PlayerSave),Object(d.loadAllServers)(t.AllServersSave),Object(r.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(f.loadSpecialServerIps)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.loadAliases)(t.AliasesSave)}catch(e){console.warn("Could not load Aliases from save"),Object(a.loadAliases)("")}else console.warn("Save file did not contain an Aliases property"),Object(a.loadAliases)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.loadGlobalAliases)(t.GlobalAliasesSave)}catch(e){console.warn("Could not load GlobalAliases from save"),Object(a.loadGlobalAliases)("")}else console.warn("Save file did not contain a GlobalAliases property"),Object(a.loadGlobalAliases)("");if(t.hasOwnProperty("MessagesSave"))try{Object(m.d)(t.MessagesSave)}catch(e){console.warn("Could not load Messages from save"),Object(m.c)()}else console.warn("Save file did not contain a Messages property"),Object(m.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(t.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(t.hasOwnProperty("SettingsSave"))try{h.Settings.load(t.SettingsSave)}catch(e){console.error("ERROR: Failed to parse Settings. Re-initing default values"),h.Settings.init()}else h.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.loadFconf)(t.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("LastExportBonus"))try{v.setLastExportBonus(JSON.parse(t.LastExportBonus))}catch(e){v.setLastExportBonus((new Date).getTime()),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,C.Reviver);M(n),window.location.href.toLowerCase().includes("bitburner-beta")?Object(k.dialogBoxCreate)("You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.<br>Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate):n!=i.CONSTANTS.Version&&w()}catch(e){w()}else w();if(p.Player.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.loadAllGangs)(t.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function w(){Object(k.dialogBoxCreate)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate)}function x(e){var t=e.target.files[0];if(t){var n=new FileReader;n.onload=function(e){var t=e.target.result;!function(e,t){var n=null,c=null;try{var g=decodeURIComponent(escape(atob(t)));if(n=JSON.parse(g,C.Reviver),(c=JSON.parse(n.PlayerSave,C.Reviver)).money=new S.default(c.money),JSON.parse(n.AllServersSave,C.Reviver),JSON.parse(n.CompaniesSave,C.Reviver),JSON.parse(n.FactionsSave,C.Reviver),JSON.parse(n.SpecialServerIpsSave,C.Reviver),n.hasOwnProperty("AliasesSave"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Aliases save failed: ${e}`)}if(n.hasOwnProperty("GlobalAliases"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Global Aliases save failed: ${e}`)}if(n.hasOwnProperty("MessagesSave"))try{JSON.parse(n.MessagesSave,C.Reviver)}catch(e){console.error(`Parsing Messages save failed: ${e}`),Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{JSON.parse(n.StockMarketSave,C.Reviver)}catch(e){console.error(`Parsing StockMarket save failed: ${e}`)}if(e.hasOwnProperty("LastExportBonus"))try{v.setLastExportBonus(JSON.parse(e.LastExportBonus))}catch(e){v.setLastExportBonus((new Date).getTime()),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(n.hasOwnProperty("VersionSave"))try{M(_=JSON.parse(n.VersionSave,C.Reviver))}catch(e){console.error("Parsing Version save failed: "+e)}if(c.inGang()&&n.hasOwnProperty("AllGangsSave"))try{Object(u.loadAllGangs)(n.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(k.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(t=decodeURIComponent(escape(atob(t))),e=JSON.parse(t,C.Reviver),Object(p.loadPlayer)(e.PlayerSave),Object(d.loadAllServers)(e.AllServersSave),Object(r.loadCompanies)(e.CompaniesSave),Object(s.loadFactions)(e.FactionsSave),Object(f.loadSpecialServerIps)(e.SpecialServerIpsSave),e.hasOwnProperty("AliasesSave"))try{Object(a.loadAliases)(e.AliasesSave)}catch(e){Object(a.loadAliases)("")}else Object(a.loadAliases)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(a.loadGlobalAliases)(e.GlobalAliasesSave)}catch(e){Object(a.loadGlobalAliases)("")}else Object(a.loadGlobalAliases)("");if(e.hasOwnProperty("MessagesSave"))try{Object(m.d)(e.MessagesSave)}catch(e){Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(e.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(e.hasOwnProperty("SettingsSave"))try{h.Settings.load(e.SettingsSave)}catch(e){h.Settings.init()}else h.Settings.init();if(e.hasOwnProperty("FconfSettingsSave"))try{Object(l.loadFconf)(e.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to load .fconf settings when importing")}if(e.hasOwnProperty("VersionSave"))try{var _;M(_=JSON.parse(e.VersionSave,C.Reviver)),_!=i.CONSTANTS.Version&&w()}catch(e){w()}else w();if(p.Player.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(u.loadAllGangs)(e.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}P.saveGame(o.Engine.indexedDb),location.reload()}(P,t)},n.readAsText(t)}else Object(k.dialogBoxCreate)("Invalid file selected")}T.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(p.Player);var e=JSON.parse(JSON.stringify(d.AllServers),C.Reviver);for(var t in e){var n=e[t];if(null!=n)for(var o=0;o<n.runningScripts.length;++o){var l=n.runningScripts[o];l.logs.length=0,l.logs=[]}}return this.AllServersSave=JSON.stringify(e),this.CompaniesSave=JSON.stringify(r.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(f.SpecialServerIps),this.AliasesSave=JSON.stringify(a.Aliases),this.GlobalAliasesSave=JSON.stringify(a.GlobalAliases),this.MessagesSave=JSON.stringify(m.a),this.StockMarketSave=JSON.stringify(y.StockMarket),this.SettingsSave=JSON.stringify(h.Settings),this.FconfSettingsSave=JSON.stringify(c.FconfSettings),this.VersionSave=JSON.stringify(i.CONSTANTS.Version),this.LastExportBonus=JSON.stringify(v.LastExportBonus),p.Player.inGang()&&(this.AllGangsSave=JSON.stringify(u.AllGangs)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},T.prototype.saveGame=function(e){var t=this.getSaveString();e.transaction(["savestring"],"readwrite").objectStore("savestring").put(t,"save").onerror=function(e){console.error("Error saving game to IndexedDB: "+e)};try{window.localStorage.setItem("bitburnerSave",t)}catch(e){22==e.code&&(Object(_.createStatusText)("Save failed for localStorage! Check console(F12)"),console.error("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}Object(_.createStatusText)("Game saved!")},T.prototype.exportGame=function(){const e=this.getSaveString(),t=Math.round(Date.now()/1e3),n=p.Player.bitNodeN,a=`bitburnerSave_BN${n}x${g.SourceFileFlags[n]}_${t}.json`;var r=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(r,a);else{var i=document.createElement("a"),o=URL.createObjectURL(r);i.href=o,i.download=a,document.body.appendChild(i),i.click(),Object(b.setTimeoutRef)(function(){document.body.removeChild(i),window.URL.revokeObjectURL(o)},0)}},T.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(E.clearEventListeners)("import-game-file-selector").addEventListener("change",x,!1),e("#import-game-file-selector").click()):Object(k.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},T.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.error(`Failed to delete save from indexedDb: ${e}`)},Object(_.createStatusText)("Game deleted!")},T.prototype.toJSON=function(){return Object(C.Generic_toJSON)("BitburnerSaveObject",this)},T.fromJSON=function(e){return Object(C.Generic_fromJSON)(T,e.data)},C.Reviver.constructors.BitburnerSaveObject=T}).call(this,n(145))},,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MoneyRate=void 0;const r=a(n(0)),i=n(6),o=n(21);t.MoneyRate=function(e){return r.default.createElement(o.Money,{money:`${i.numeralWrapper.formatMoney(e)} / sec`})}},,function(e,t,n){"use strict";n.d(t,"c",function(){return c}),n.d(t,"a",function(){return u}),n.d(t,"b",function(){return m});n(233),n(156),n(502),n(66);var a=n(11),r=(n(15),n(197),n(45),n(1)),i=(n(701),n(20)),o=n(23),s=(n(25),n(227),n(87),n(139),n(18),n(6)),l=(n(13),n(199));n(52);function c(e){const t=((new Date).getTime()-r.Player.lastUpdate)/1e3;let n=e.onlineRunningTime/14400;n>=1&&(n=1);for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][2]||null==e.dataMap[n][2])continue;const a=i.AllServers[n];if(null==a)continue;const l=Math.round(.5*e.dataMap[n][2]/e.onlineRunningTime*t);e.log(`Called on ${a.hostname} ${l} times while offline`);const c=i.AllServers[e.server],u=Object(o.processSingleServerGrowth)(a,l,r.Player,c.cpuCores);e.log(`'${a.hostname}' grown by ${s.numeralWrapper.format(100*u-100,"0.000000%")} while offline`)}const l=n*(e.onlineExpGained/e.onlineRunningTime)*t;r.Player.gainHackingExp(l),e.offlineRunningTime+=t,e.offlineExpGained+=l;for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][3]||null==e.dataMap[n][3])continue;const r=i.AllServers[n];if(null==r)continue;const o=i.AllServers[e.server],s=Math.round(.5*e.dataMap[n][3]/e.onlineRunningTime*t);e.log(`Called weaken() on ${r.hostname} ${s} times while offline`);const l=1+(o.cpuCores-1)/16;r.weaken(a.CONSTANTS.ServerWeakenAmount*s*l)}}function u(e,t,n){for(var a=0;a<n.runningScripts.length;++a)if(n.runningScripts[a].filename===e&&Object(l.compareArrays)(n.runningScripts[a].args,t))return n.runningScripts[a];return null}function m(e,t){for(var n=0;n<t.runningScripts.length;++n)if(t.runningScripts[n].pid===e)return t.runningScripts[n];return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateExp=t.calculateSkill=void 0,t.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},t.calculateExp=function(e,t=1){return Math.exp((e/t+200)/32)-534.6}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Corporation=void 0;const r=n(1353),i=n(518),o=n(517),s=n(516),l=n(95),c=n(19),u=n(549),m=n(148),p=n(18),d=n(13),h=n(29),f=n(52),g=n(73),y=n(96),_=a(n(0)),b=a(n(22)),v=n(1346),k=n(1302),E=a(n(69));let C,S=null;class P{constructor(e={}){this.name="The Corporation",this.divisions=[],this.funds=new E.default(15e10),this.revenue=new E.default(0),this.expenses=new E.default(0),this.fundingRound=0,this.public=!1,this.totalShares=l.CorporationConstants.INITIALSHARES,this.numShares=l.CorporationConstants.INITIALSHARES,this.shareSalesUntilPriceUpdate=l.CorporationConstants.SHARESPERPRICEUPDATE,this.shareSaleCooldown=0,this.issueNewSharesCooldown=0,this.dividendPercentage=0,this.dividendTaxPercentage=50,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0,this.state=new r.CorporationState,this.name=e.name?e.name:"The Corporation";const t=Object.keys(i.CorporationUnlockUpgrades).length,n=Object.keys(o.CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1)}addFunds(e){isFinite(e)?this.funds=this.funds.plus(e):console.error("Trying to add invalid amount of funds. Report to a developper.")}getState(){return this.state.getState()}storeCycles(e=1){this.storedCycles+=e}process(e){if(this.storedCycles>=l.CorporationConstants.CyclesPerIndustryStateCycle){const t=this.getState(),n=1,a=n*l.CorporationConstants.CyclesPerIndustryStateCycle;if(this.storedCycles-=a,this.divisions.forEach(e=>{e.process(n,t,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=a),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=a),"START"===t){this.revenue=new E.default(0),this.expenses=new E.default(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const t=this.revenue.minus(this.expenses).times(n*l.CorporationConstants.SecsPerMarketCycle);if((isNaN(this.funds)||this.funds===1/0||this.funds===-1/0)&&(d.dialogBoxCreate("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new E.default(15e10)),this.dividendPercentage>0&&t>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>100*l.CorporationConstants.DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const n=this.dividendPercentage/100*t,a=t-n,r=n/this.totalShares,i=this.numShares*r*(1-this.dividendTaxPercentage/100);e.gainMoney(i),e.recordMoneySource(i,"corporation"),this.addFunds(a)}else this.addFunds(t);this.updateSharePrice()}this.state.nextState(),p.routing.isOn(p.Page.Corporation)&&this.rerender(e)}}determineValuation(){let e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*c.BitNodeMultipliers.CorporationValuation}getTargetSharePrice(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)}updateSharePrice(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)}immediatelyUpdateSharePrice(){this.sharePrice=this.getTargetSharePrice()}calculateShareSale(e){let t=e,n=this.shareSalesUntilPriceUpdate,a=this.sharePrice,r=0,i=0;const o=Math.ceil(e/l.CorporationConstants.SHARESPERPRICEUPDATE);if(isNaN(o)||o>1e7)return console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${o}`),[0,0,0];for(let e=0;e<o;++e){if(t<n){i+=a*t,n-=t;break}i+=a*n,t-=n=l.CorporationConstants.SHARESPERPRICEUPDATE,r+=n,a=this.determineValuation()/(2*(this.totalShares+r-this.numShares))}return[i,a,n]}convertCooldownToString(e){const t=e/5;return t>3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`}unlock(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?d.dialogBoxCreate("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))}upgrade(e){const t=e[0],n=e[1],a=e[2],r=e[3];for(;this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);const i=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(i))d.dialogBoxCreate("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*r,1===t)for(let e=0;e<this.divisions.length;++e){const t=this.divisions[e];for(const e in t.warehouses){const n=t.warehouses[e];0!==n&&(t.warehouses.hasOwnProperty(e)&&n instanceof s.Warehouse&&n.updateSize(this,t))}}}getProductionMultiplier(){const e=this.upgradeMultipliers[0];return isNaN(e)||e<1?1:e}getStorageMultiplier(){const e=this.upgradeMultipliers[1];return isNaN(e)||e<1?1:e}getDreamSenseGain(){const e=this.upgradeMultipliers[2]-1;return e<=0?0:e}getAdvertisingMultiplier(){const e=this.upgradeMultipliers[3];return isNaN(e)||e<1?1:e}getEmployeeCreMultiplier(){const e=this.upgradeMultipliers[4];return isNaN(e)||e<1?1:e}getEmployeeChaMultiplier(){const e=this.upgradeMultipliers[5];return isNaN(e)||e<1?1:e}getEmployeeIntMultiplier(){const e=this.upgradeMultipliers[6];return isNaN(e)||e<1?1:e}getEmployeeEffMultiplier(){const e=this.upgradeMultipliers[7];return isNaN(e)||e<1?1:e}getSalesMultiplier(){const e=this.upgradeMultipliers[8];return isNaN(e)||e<1?1:e}getScientificResearchMultiplier(){const e=this.upgradeMultipliers[9];return isNaN(e)||e<1?1:e}getStarterGuide(e){const t=e.getHomeComputer();let n=!1;const a=m.LiteratureNames.CorporationManagementHandbook;for(let e=0;e<t.messages.length;++e)if(g.isString(t.messages[e])&&t.messages[e]===a){n=!0;break}n||t.messages.push(a),u.showLiterature(a)}createUI(e){S=f.createElement("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"});const t=document.getElementById("entire-game-container");t&&t.appendChild(S),C=new k.CorporationRouting(this),this.rerender(e)}rerender(e){null!=S&&null!=C?p.routing.isOn(p.Page.Corporation)&&b.default.render(_.default.createElement(v.CorporationRoot,{corp:this,routing:C,player:e}),S):console.warn("Corporation.rerender() called when companyManagementDiv, corpRouting, or eventHandler is null")}clearUI(){S instanceof HTMLElement&&(b.default.unmountComponentAtNode(S),y.removeElementById(S.id)),S=null;const e=document.getElementById("character-overview-wrapper");e&&(e.style.visibility="visible")}toJSON(){return h.Generic_toJSON("Corporation",this)}static fromJSON(e){return h.Generic_fromJSON(P,e.data)}}t.Corporation=P,h.Reviver.constructors.Corporation=P},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Faction=void 0;const a=n(758),r=n(1370),i=n(29);class o{constructor(e=""){this.alreadyInvited=!1,this.augmentations=[],this.favor=0,this.isBanned=!1,this.isMember=!1,this.name="",this.playerReputation=0,this.rolloverRep=0,this.name=e}getInfo(){const e=a.FactionInfos[this.name];if(null==e)throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);return e}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2===e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=r.favorToRep(this.favor-1)+this.rolloverRep+this.playerReputation,t=Math.floor(r.repToFavor(e)),n=r.favorToRep(t);return[t-this.favor+1,e-n]}toJSON(){return i.Generic_toJSON("Faction",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Faction=o,i.Reviver.constructors.Faction=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseRamForHomeComputer=t.purchaseServer=t.getPurchaseServerMaxRam=t.getPurchaseServerLimit=t.getPurchaseServerCost=void 0;const a=n(20),r=n(23),i=n(19),o=n(11),s=n(13),l=n(63),c=n(1067);function u(e){const t=Math.round(e);return isNaN(t)||!c.isPowerOfTwo(t)?1/0:t>p()?1/0:t*o.CONSTANTS.BaseCostFor1GBOfRamServer*i.BitNodeMultipliers.PurchasedServerCost}function m(){return Math.round(o.CONSTANTS.PurchasedServerLimit*i.BitNodeMultipliers.PurchasedServerLimit)}function p(){const e=Math.round(o.CONSTANTS.PurchasedServerMaxRam*i.BitNodeMultipliers.PurchasedServerMaxRam);return 1<<31-Math.clz32(e)}t.getPurchaseServerCost=u,t.getPurchaseServerLimit=m,t.getPurchaseServerMaxRam=p,t.purchaseServer=function(e,t){const n=u(e);if(!t.canAfford(n))return void s.dialogBoxCreate("You don't have enough money to purchase this server!",!1);if(t.purchasedServers.length>=m())return void s.dialogBoxCreate("You have reached the maximum limit of "+m()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");const i=l.yesNoTxtInpBoxGetInput();if(""==i)return void s.dialogBoxCreate("You must enter a hostname for your new server!");const o=r.safetlyCreateUniqueServer({adminRights:!0,hostname:i,ip:a.createUniqueRandomIp(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});a.AddToAllServers(o),t.purchasedServers.push(o.ip);const c=t.getHomeComputer();c.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(c.ip),t.loseMoney(n),s.dialogBoxCreate("Server successfully purchased with hostname "+i)},t.purchaseRamForHomeComputer=function(e){const t=e.getUpgradeHomeRamCost();if(!e.canAfford(t))return void s.dialogBoxCreate("You do not have enough money to purchase additional RAM for your home computer");const n=e.getHomeComputer();n.maxRam>=o.CONSTANTS.HomeComputerMaxRam?s.dialogBoxCreate("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(n.maxRam*=2,e.loseMoney(t))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Hashes=void 0;const o=i(n(0)),s=n(6);t.Hashes=function(e){return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e?s.numeralWrapper.formatHashes(e):e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initBitNodeMultipliers=t.BitNodes=void 0;const a=n(19);class r{constructor(e,t,n="",a=""){this.number=e,this.name=t,this.desc=n,this.info=a}}t.BitNodes={},t.BitNodes.BitNode1=new r(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.BitNodes.BitNode2=new r(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.BitNodes.BitNode3=new r(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode4=new r(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),t.BitNodes.BitNode5=new r(5,"Artificial Intelligence","Posthuman","They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() and getServer() Netscript functions, as well as the formulas API, and will also raise all of your hacking-related multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode6=new r(6,"Bladeburners","Like Tears in Rain","In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode7=new r(7,"Bladeburners 2079","More human than humans","In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode8=new r(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.BitNodes.BitNode9=new r(9,"Hacktocracy","Hacknet Unleashed","When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global, decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.<br><br>This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes, which can be spent on a variety of different upgrades.<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>You cannnot purchase additional servers<br>Hacking is significantly less profitable<br><br>Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.BitNodes.BitNode10=new r(10,"Digital Carbon","Your body is not who you are","In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.BitNodes.BitNode11=new r(11,"The Big Crash","Okay. Sell it all.","The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>Your hacking stat and experience gain are halved<br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is significantly reduced<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 90% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br><br>It also reduces the price increase for every aug bought by:<br><br>Level 1: 4%<br>Level 2: 6%<br>Level 3: 7%"),t.BitNodes.BitNode12=new r(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the level of this source file."),t.BitNodes.BitNode13=new r(13,"fOS","COMING SOON"),t.BitNodes.BitNode14=new r(14,"","COMING SOON"),t.BitNodes.BitNode15=new r(15,"","COMING SOON"),t.BitNodes.BitNode16=new r(16,"","COMING SOON"),t.BitNodes.BitNode17=new r(17,"","COMING SOON"),t.BitNodes.BitNode18=new r(18,"","COMING SOON"),t.BitNodes.BitNode19=new r(19,"","COMING SOON"),t.BitNodes.BitNode20=new r(20,"","COMING SOON"),t.BitNodes.BitNode21=new r(21,"","COMING SOON"),t.BitNodes.BitNode22=new r(22,"","COMING SOON"),t.BitNodes.BitNode23=new r(23,"","COMING SOON"),t.BitNodes.BitNode24=new r(24,"","COMING SOON"),t.initBitNodeMultipliers=function(e){null==e.bitNodeN&&(e.bitNodeN=1);for(const e in a.BitNodeMultipliers)a.BitNodeMultipliers.hasOwnProperty(e)&&(a.BitNodeMultipliers[e]=1);switch(e.bitNodeN){case 1:break;case 2:a.BitNodeMultipliers.HackingLevelMultiplier=.8,a.BitNodeMultipliers.ServerGrowthRate=.8,a.BitNodeMultipliers.ServerMaxMoney=.2,a.BitNodeMultipliers.ServerStartingMoney=.4,a.BitNodeMultipliers.CrimeMoney=3,a.BitNodeMultipliers.InfiltrationMoney=3,a.BitNodeMultipliers.FactionWorkRepGain=.5,a.BitNodeMultipliers.FactionPassiveRepGain=0,a.BitNodeMultipliers.GangKarmaRequirement=0;break;case 3:a.BitNodeMultipliers.HackingLevelMultiplier=.8,a.BitNodeMultipliers.RepToDonateToFaction=.5,a.BitNodeMultipliers.AugmentationRepCost=3,a.BitNodeMultipliers.AugmentationMoneyCost=3,a.BitNodeMultipliers.ServerMaxMoney=.2,a.BitNodeMultipliers.ServerStartingMoney=.2,a.BitNodeMultipliers.ServerGrowthRate=.2,a.BitNodeMultipliers.ScriptHackMoney=.2,a.BitNodeMultipliers.CompanyWorkMoney=.25,a.BitNodeMultipliers.CrimeMoney=.25,a.BitNodeMultipliers.HacknetNodeMoney=.25,a.BitNodeMultipliers.HomeComputerRamCost=1.5,a.BitNodeMultipliers.PurchasedServerCost=2,a.BitNodeMultipliers.GangKarmaRequirement=3;break;case 4:a.BitNodeMultipliers.ServerMaxMoney=.15,a.BitNodeMultipliers.ServerStartingMoney=.75,a.BitNodeMultipliers.ScriptHackMoney=.2,a.BitNodeMultipliers.CompanyWorkMoney=.1,a.BitNodeMultipliers.CrimeMoney=.2,a.BitNodeMultipliers.HacknetNodeMoney=.05,a.BitNodeMultipliers.CompanyWorkExpGain=.5,a.BitNodeMultipliers.ClassGymExpGain=.5,a.BitNodeMultipliers.FactionWorkExpGain=.5,a.BitNodeMultipliers.HackExpGain=.4,a.BitNodeMultipliers.CrimeExpGain=.5,a.BitNodeMultipliers.FactionWorkRepGain=.75;break;case 5:a.BitNodeMultipliers.ServerMaxMoney=2,a.BitNodeMultipliers.ServerStartingSecurity=2,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ScriptHackMoney=.15,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.CrimeMoney=.5,a.BitNodeMultipliers.InfiltrationRep=1.5,a.BitNodeMultipliers.InfiltrationMoney=1.5,a.BitNodeMultipliers.AugmentationMoneyCost=2,a.BitNodeMultipliers.HackExpGain=.5,a.BitNodeMultipliers.CorporationValuation=.5;break;case 6:a.BitNodeMultipliers.HackingLevelMultiplier=.35,a.BitNodeMultipliers.ServerMaxMoney=.4,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.ScriptHackMoney=.75,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.75,a.BitNodeMultipliers.InfiltrationMoney=.75,a.BitNodeMultipliers.CorporationValuation=.2,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.FactionPassiveRepGain=0,a.BitNodeMultipliers.HackExpGain=.25,a.BitNodeMultipliers.DaedalusAugsRequirement=1.166,a.BitNodeMultipliers.GangKarmaRequirement=5;break;case 7:a.BitNodeMultipliers.BladeburnerRank=.6,a.BitNodeMultipliers.BladeburnerSkillCost=2,a.BitNodeMultipliers.AugmentationMoneyCost=3,a.BitNodeMultipliers.HackingLevelMultiplier=.35,a.BitNodeMultipliers.ServerMaxMoney=.4,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.ScriptHackMoney=.5,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.75,a.BitNodeMultipliers.InfiltrationMoney=.75,a.BitNodeMultipliers.CorporationValuation=.2,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.FactionPassiveRepGain=0,a.BitNodeMultipliers.HackExpGain=.25,a.BitNodeMultipliers.FourSigmaMarketDataCost=2,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=2,a.BitNodeMultipliers.DaedalusAugsRequirement=1.166,a.BitNodeMultipliers.GangKarmaRequirement=5;break;case 8:a.BitNodeMultipliers.ScriptHackMoney=.3,a.BitNodeMultipliers.ScriptHackMoneyGain=0,a.BitNodeMultipliers.ManualHackMoney=0,a.BitNodeMultipliers.CompanyWorkMoney=0,a.BitNodeMultipliers.CrimeMoney=0,a.BitNodeMultipliers.HacknetNodeMoney=0,a.BitNodeMultipliers.InfiltrationMoney=0,a.BitNodeMultipliers.RepToDonateToFaction=0,a.BitNodeMultipliers.CorporationValuation=0,a.BitNodeMultipliers.CodingContractMoney=0,a.BitNodeMultipliers.GangKarmaRequirement=10;break;case 9:a.BitNodeMultipliers.HackingLevelMultiplier=.4,a.BitNodeMultipliers.StrengthLevelMultiplier=.45,a.BitNodeMultipliers.DefenseLevelMultiplier=.45,a.BitNodeMultipliers.DexterityLevelMultiplier=.45,a.BitNodeMultipliers.AgilityLevelMultiplier=.45,a.BitNodeMultipliers.CharismaLevelMultiplier=.45,a.BitNodeMultipliers.PurchasedServerLimit=0,a.BitNodeMultipliers.HomeComputerRamCost=5,a.BitNodeMultipliers.CrimeMoney=.5,a.BitNodeMultipliers.ScriptHackMoney=.1,a.BitNodeMultipliers.HackExpGain=.05,a.BitNodeMultipliers.ServerStartingMoney=.1,a.BitNodeMultipliers.ServerMaxMoney=.1,a.BitNodeMultipliers.ServerStartingSecurity=2.5,a.BitNodeMultipliers.CorporationValuation=.5,a.BitNodeMultipliers.FourSigmaMarketDataCost=5,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=4,a.BitNodeMultipliers.BladeburnerRank=.9,a.BitNodeMultipliers.BladeburnerSkillCost=1.2,a.BitNodeMultipliers.GangKarmaRequirement=3;break;case 10:a.BitNodeMultipliers.HackingLevelMultiplier=.2,a.BitNodeMultipliers.StrengthLevelMultiplier=.4,a.BitNodeMultipliers.DefenseLevelMultiplier=.4,a.BitNodeMultipliers.DexterityLevelMultiplier=.4,a.BitNodeMultipliers.AgilityLevelMultiplier=.4,a.BitNodeMultipliers.CharismaLevelMultiplier=.4,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.5,a.BitNodeMultipliers.HacknetNodeMoney=.5,a.BitNodeMultipliers.ManualHackMoney=.5,a.BitNodeMultipliers.ScriptHackMoney=.5,a.BitNodeMultipliers.CodingContractMoney=.5,a.BitNodeMultipliers.InfiltrationMoney=.5,a.BitNodeMultipliers.CorporationValuation=.5,a.BitNodeMultipliers.AugmentationMoneyCost=5,a.BitNodeMultipliers.AugmentationRepCost=2,a.BitNodeMultipliers.HomeComputerRamCost=1.5,a.BitNodeMultipliers.PurchasedServerCost=5,a.BitNodeMultipliers.PurchasedServerLimit=.6,a.BitNodeMultipliers.PurchasedServerMaxRam=.5,a.BitNodeMultipliers.BladeburnerRank=.8,a.BitNodeMultipliers.GangKarmaRequirement=3;break;case 11:a.BitNodeMultipliers.HackingLevelMultiplier=.5,a.BitNodeMultipliers.HackExpGain=.5,a.BitNodeMultipliers.ServerMaxMoney=.1,a.BitNodeMultipliers.ServerStartingMoney=.1,a.BitNodeMultipliers.ServerGrowthRate=.2,a.BitNodeMultipliers.ServerWeakenRate=2,a.BitNodeMultipliers.CrimeMoney=3,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.HacknetNodeMoney=.1,a.BitNodeMultipliers.AugmentationMoneyCost=2,a.BitNodeMultipliers.InfiltrationMoney=2.5,a.BitNodeMultipliers.InfiltrationRep=2.5,a.BitNodeMultipliers.CorporationValuation=.1,a.BitNodeMultipliers.CodingContractMoney=.25,a.BitNodeMultipliers.FourSigmaMarketDataCost=4,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=4;break;case 12:{let t=0;for(let n=0;n<e.sourceFiles.length;n++)12===e.sourceFiles[n].n&&(t=e.sourceFiles[n].lvl);const n=Math.pow(1.02,t),r=1/n;a.BitNodeMultipliers.DaedalusAugsRequirement=Math.min(n,1.34),a.BitNodeMultipliers.HackingLevelMultiplier=r,a.BitNodeMultipliers.StrengthLevelMultiplier=r,a.BitNodeMultipliers.DefenseLevelMultiplier=r,a.BitNodeMultipliers.DexterityLevelMultiplier=r,a.BitNodeMultipliers.AgilityLevelMultiplier=r,a.BitNodeMultipliers.CharismaLevelMultiplier=r,a.BitNodeMultipliers.ServerMaxMoney=r,a.BitNodeMultipliers.ServerStartingMoney=r,a.BitNodeMultipliers.ServerGrowthRate=r,a.BitNodeMultipliers.ServerWeakenRate=r,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.HomeComputerRamCost=n,a.BitNodeMultipliers.PurchasedServerCost=n,a.BitNodeMultipliers.PurchasedServerLimit=r,a.BitNodeMultipliers.PurchasedServerMaxRam=r,a.BitNodeMultipliers.ManualHackMoney=r,a.BitNodeMultipliers.ScriptHackMoney=r,a.BitNodeMultipliers.CompanyWorkMoney=r,a.BitNodeMultipliers.CrimeMoney=r,a.BitNodeMultipliers.HacknetNodeMoney=r,a.BitNodeMultipliers.CodingContractMoney=r,a.BitNodeMultipliers.CompanyWorkExpGain=r,a.BitNodeMultipliers.ClassGymExpGain=r,a.BitNodeMultipliers.FactionWorkExpGain=r,a.BitNodeMultipliers.HackExpGain=r,a.BitNodeMultipliers.CrimeExpGain=r,a.BitNodeMultipliers.FactionWorkRepGain=r,a.BitNodeMultipliers.FactionPassiveRepGain=r,a.BitNodeMultipliers.RepToDonateToFaction=n,a.BitNodeMultipliers.AugmentationRepCost=n,a.BitNodeMultipliers.AugmentationMoneyCost=n,a.BitNodeMultipliers.InfiltrationMoney=r,a.BitNodeMultipliers.InfiltrationRep=r,a.BitNodeMultipliers.FourSigmaMarketDataCost=n,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=n,a.BitNodeMultipliers.CorporationValuation=r,a.BitNodeMultipliers.BladeburnerRank=r,a.BitNodeMultipliers.BladeburnerSkillCost=n;break}default:console.warn("Player.bitNodeN invalid")}}},,,,function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BuyMaterial=exports.SetSmartSupply=exports.SellProduct=exports.SellMaterial=exports.IssueDividends=exports.LevelUpgrade=exports.UnlockUpgrade=exports.NewCity=exports.NewIndustry=void 0;const IndustryData_1=__webpack_require__(146),Industry_1=__webpack_require__(1338),Constants_1=__webpack_require__(95),OfficeSpace_1=__webpack_require__(228),Cities_1=__webpack_require__(195);function NewIndustry(e,t,n){for(let t=0;t<e.divisions.length;++t)if(e.divisions[t].name===n)throw new Error("This division name is already in use!");const a=IndustryData_1.IndustryStartingCosts[t];if(void 0===a)throw new Error("Invalid industry: ${industry}");if(e.funds.lt(a))throw new Error("Not enough money to create a new division in this industry");if(""===n)throw new Error("New division must have a name!");e.funds=e.funds.minus(a),e.divisions.push(new Industry_1.Industry({corp:e,name:n,type:t}))}function NewCity(e,t,n){if(e.funds.lt(Constants_1.CorporationConstants.OfficeInitialCost))throw new Error("You don't have enough company funds to open a new office!");e.funds=e.funds.minus(Constants_1.CorporationConstants.OfficeInitialCost),t.offices[n]=new OfficeSpace_1.OfficeSpace({loc:n,size:Constants_1.CorporationConstants.OfficeInitialSize})}function UnlockUpgrade(e,t){if(e.funds.lt(t[1]))throw new Error("Insufficient funds");e.unlock(t)}function LevelUpgrade(e,t){const n=t[1],a=t[2],r=e.upgrades[t[0]],i=n*Math.pow(a,r);if(e.funds.lt(i))throw new Error("Insufficient funds");e.upgrade(t)}function IssueDividends(e,t){if(isNaN(t)||t<0||t>Constants_1.CorporationConstants.DividendMaxPercentage)throw new Error(`Invalid value. Must be an integer between 0 and ${Constants_1.CorporationConstants.DividendMaxPercentage}`);e.dividendPercentage=100*t}function SellMaterial(mat,amt,price){""===price&&(price="0"),""===amt&&(amt="0");let cost=price.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");let temp=cost.replace(/MP/g,mat.bCost+"");try{temp=eval(temp)}catch(e){throw new Error("Invalid value or expression for sell price field: "+e)}if(null==temp||isNaN(parseFloat(temp)))throw new Error("Invalid value or expression for sell price field");if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,amt.includes("MAX")||amt.includes("PROD")){let q=amt.replace(/\s+/g,"");q=q.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=q.replace(/MAX/g,"1");tempQty=tempQty.replace(/PROD/g,"1");try{tempQty=eval(tempQty)}catch(e){throw new Error("Invalid value or expression for sell price field: "+e)}if(null==tempQty||isNaN(parseFloat(tempQty)))throw new Error("Invalid value or expression for sell price field");mat.sllman[0]=!0,mat.sllman[1]=q}else{if(isNaN(parseFloat(amt)))throw new Error("Invalid value for sell quantity field! Must be numeric or 'MAX'");{let e=parseFloat(amt);isNaN(e)&&(e=0),0===e?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=e)}}}function SellProduct(product,city,amt,price,all){if(price.includes("MP")){price=price.replace(/\s+/g,""),price=price.replace(/[^-()\d/*+.MP]/g,"");let temp=price.replace(/MP/g,"1");try{temp=eval(temp)}catch(e){throw new Error("Invalid value or expression for sell quantity field: "+e)}if(null==temp||isNaN(parseFloat(temp)))throw new Error("Invalid value or expression for sell quantity field.");product.sCost=price}else{const e=parseFloat(price);if(isNaN(e))throw new Error("Invalid value for sell price field");product.sCost=e}const cities=Object.keys(Cities_1.Cities);if(amt.includes("MAX")||amt.includes("PROD")){let qty=amt.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let temp=qty.replace(/MAX/g,"1");temp=temp.replace(/PROD/g,"1");try{temp=eval(temp)}catch(e){throw new Error("Invalid value or expression for sell price field: "+e)}if(null==temp||isNaN(parseFloat(temp)))throw new Error("Invalid value or expression for sell price field");if(all)for(let e=0;e<cities.length;++e){const t=cities[e];product.sllman[t][0]=!0,product.sllman[t][1]=qty}else product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(parseFloat(amt)))throw new Error("Invalid value for sell quantity field! Must be numeric");{let e=parseFloat(amt);if(isNaN(e)&&(e=0),0===e)if(all)for(let e=0;e<cities.length;++e){const t=cities[e];product.sllman[t][0]=!1,product.sllman[t][1]=""}else product.sllman[city][0]=!1,product.sllman[city][1]="";else if(all)for(let t=0;t<cities.length;++t){const n=cities[t];product.sllman[n][0]=!0,product.sllman[n][1]=e}else product.sllman[city][0]=!0,product.sllman[city][1]=e}}}function SetSmartSupply(e,t){e.smartSupplyEnabled=t}function BuyMaterial(e,t){if(isNaN(t))throw new Error(`Invalid amount '${t}' to buy material '${e.name}'`);e.buy=t}exports.NewIndustry=NewIndustry,exports.NewCity=NewCity,exports.UnlockUpgrade=UnlockUpgrade,exports.LevelUpgrade=LevelUpgrade,exports.IssueDividends=IssueDividends,exports.SellMaterial=SellMaterial,exports.SellProduct=SellProduct,exports.SetSmartSupply=SetSmartSupply,exports.BuyMaterial=BuyMaterial},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTextFile=t.getTextFile=t.TextFile=void 0;const a=n(77),r=n(13),i=n(29);class o{constructor(e="",t=""){this.fn=(e.endsWith(".txt")?e:`${e}.txt`).replace(/\s+/g,""),this.text=t}append(e){this.text+=e}download(){const e=this.fn,t=new Blob([this.text],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const e=document.createElement("a"),n=URL.createObjectURL(t);e.href=n,e.download=this.fn,document.body.appendChild(e),e.click(),a.setTimeoutRef(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){r.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}function s(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=o,i.Reviver.constructors.TextFile=o,t.getTextFile=s,t.createTextFile=function(e,t,n){if(null!==s(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const a=new o(e,t);return n.textFiles.push(a),a}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Company=void 0;const o=n(298),s=i(n(58)),l=n(11),c=n(29),u={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class m{constructor(e=u){this.name=e.name,this.info=e.info,this.companyPositions=e.companyPositions,this.expMultiplier=e.expMultiplier,this.salaryMultiplier=e.salaryMultiplier,this.jobStatReqOffset=e.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.rolloverRep=0}hasPosition(e){return e instanceof o.CompanyPosition?null!=this.companyPositions[e.name]:null!=this.companyPositions[e]}hasAgentPositions(){return null!=this.companyPositions[s.AgentCompanyPositions[0]]}hasBusinessConsultantPositions(){return null!=this.companyPositions[s.BusinessConsultantCompanyPositions[0]]}hasBusinessPositions(){return null!=this.companyPositions[s.BusinessCompanyPositions[0]]}hasEmployeePositions(){return null!=this.companyPositions[s.MiscCompanyPositions[1]]}hasITPositions(){return null!=this.companyPositions[s.ITCompanyPositions[0]]}hasSecurityPositions(){return null!=this.companyPositions[s.SecurityCompanyPositions[2]]}hasSoftwareConsultantPositions(){return null!=this.companyPositions[s.SoftwareConsultantCompanyPositions[0]]}hasSoftwarePositions(){return null!=this.companyPositions[s.SoftwareCompanyPositions[0]]}hasWaiterPositions(){return null!=this.companyPositions[s.MiscCompanyPositions[0]]}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=l.CONSTANTS.CompanyReputationToFavorBase*Math.pow(l.CONSTANTS.CompanyReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=l.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return c.Generic_toJSON("Company",this)}static fromJSON(e){return c.Generic_fromJSON(m,e.data)}}t.Company=m,c.Reviver.constructors.Company=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerCost=t.calculateCacheUpgradeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateHashGainRate=void 0;const a=n(19),r=n(33);t.calculateHashGainRate=function(e,t,n,i,o){return r.HacknetServerConstants.HashesPerLevel*e*Math.pow(1.07,Math.log2(n))*(1+(i-1)/5)*(1-t/n)*o*a.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetServerConstants.MaxLevel)return 1/0;const i=r.HacknetServerConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<a;++e)o+=Math.pow(i,s),++s;return 10*r.HacknetServerConstants.BaseCost*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetServerConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<a;++e)i+=s*r.HacknetServerConstants.RamBaseCost*Math.pow(r.HacknetServerConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetServerConstants.MaxCores)return 1/0;const i=r.HacknetServerConstants.UpgradeCoreMult;let o=0,s=e;for(let e=0;e<a;++e)o+=Math.pow(i,s-1),++s;return o*=r.HacknetServerConstants.CoreBaseCost,o*=n},t.calculateCacheUpgradeCost=function(e,t=1){const n=Math.round(t);if(isNaN(n)||n<1)return 0;if(e>=r.HacknetServerConstants.MaxCache)return 1/0;const a=r.HacknetServerConstants.UpgradeCacheMult;let i=0,o=e;for(let e=0;e<n;++e)i+=Math.pow(a,o-1),++o;return i*=r.HacknetServerConstants.CacheBaseCost},t.calculateServerCost=function(e,t=1){return e-1>=r.HacknetServerConstants.MaxServers?1/0:r.HacknetServerConstants.BaseCost*Math.pow(r.HacknetServerConstants.PurchaseMult,e-1)*t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStatusText=void 0;const a=n(77),r=n(192),i=3e3;let o;t.createStatusText=function(e){void 0!==o&&(clearTimeout(o),o=void 0);const t=r.getElementById("status-text");t.style.display="block",t.classList.add("status-text"),t.innerText=e,o=a.setTimeoutRef(()=>{t.innerText="",t.style.display="none",t.classList.remove("status-text")},i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BladeburnerConstants=void 0,t.BladeburnerConstants={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,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetIndustryResearchTrees=t.IndustryResearchTrees=t.IndustryDescriptions=t.IndustryStartingCosts=t.Industries=void 0;const r=a(n(0)),i=n(1342),o=n(21);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:r.default.createElement(r.default.Fragment,null,"Engage in the production and distribution of energy.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Energy}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Utilities:r.default.createElement(r.default.Fragment,null,"Distribute water and provide wastewater services.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Utilities}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Agriculture:r.default.createElement(r.default.Fragment,null,"Cultivate crops and breed livestock to produce food.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Agriculture}),r.default.createElement("br",null),"Recommended starting Industry: YES"),Fishing:r.default.createElement(r.default.Fragment,null,"Produce food through the breeding and processing of fish and fish products.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Fishing}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Mining:r.default.createElement(r.default.Fragment,null,"Extract and process metals from the earth.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Mining}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Food:r.default.createElement(r.default.Fragment,null,"Create your own restaurants all around the world.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Food}),r.default.createElement("br",null),"Recommended starting Industry: YES"),Tobacco:r.default.createElement(r.default.Fragment,null,"Create and distribute tobacco and tobacco-related products.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Tobacco}),r.default.createElement("br",null),"Recommended starting Industry: YES"),Chemical:r.default.createElement(r.default.Fragment,null,"Produce industrial chemicals.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Chemical}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Pharmaceutical:r.default.createElement(r.default.Fragment,null,"Discover, develop, and create new pharmaceutical drugs.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Pharmaceutical}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Computer:r.default.createElement(r.default.Fragment,null,"Develop and manufacture new computer hardware and networking infrastructures.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Computer}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Robotics:r.default.createElement(r.default.Fragment,null,"Develop and create robots.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Robotics}),r.default.createElement("br",null),"Recommended starting Industry: NO"),Software:r.default.createElement(r.default.Fragment,null,"Develop computer software and create AI Cores.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Software}),r.default.createElement("br",null),"Recommended starting Industry: YES"),Healthcare:r.default.createElement(r.default.Fragment,null,"Create and manage hospitals.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.Healthcare}),r.default.createElement("br",null),"Recommended starting Industry: NO"),RealEstate:r.default.createElement(r.default.Fragment,null,"Develop and manage real estate properties.",r.default.createElement("br",null),r.default.createElement("br",null),"Starting cost: ",r.default.createElement(o.Money,{money:t.IndustryStartingCosts.RealEstate}),r.default.createElement("br",null),"Recommended starting Industry: NO")},t.IndustryResearchTrees={Energy:i.getBaseResearchTreeCopy(),Utilities:i.getBaseResearchTreeCopy(),Agriculture:i.getBaseResearchTreeCopy(),Fishing:i.getBaseResearchTreeCopy(),Mining:i.getBaseResearchTreeCopy(),Food:i.getProductIndustryResearchTreeCopy(),Tobacco:i.getProductIndustryResearchTreeCopy(),Chemical:i.getBaseResearchTreeCopy(),Pharmaceutical:i.getProductIndustryResearchTreeCopy(),Computer:i.getProductIndustryResearchTreeCopy(),Robotics:i.getProductIndustryResearchTreeCopy(),Software:i.getProductIndustryResearchTreeCopy(),Healthcare:i.getProductIndustryResearchTreeCopy(),RealEstate:i.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=i.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopup=void 0;const a=n(52),r=n(192);t.createPopup=function(e,t,n={}){const i=a.createElement("div",{class:"popup-box-container",display:"flex",id:e}),o=a.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)o.appendChild(e);return n.backgroundColor&&(o.style.backgroundColor=n.backgroundColor),i.appendChild(o),r.getElementById("entire-game-container").appendChild(i),i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiteratureNames=void 0,t.LiteratureNames={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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptStartStopEventEmitter=void 0;const a=n(500);t.WorkerScriptStartStopEventEmitter=new a.EventEmitter},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeChildrenFromElement=void 0;const a=n(73),r=n(192);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=a.isString(e)?r.getElementById(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLastExportBonus=t.onExport=t.canGetBonus=t.LastExportBonus=void 0;const a=n(17);t.LastExportBonus=0;const r=864e5;function i(){return(new Date).getTime()-t.LastExportBonus>r}t.canGetBonus=i,t.onExport=function(e){if(i()){for(const t of e.factions)a.Factions[t].favor++;t.LastExportBonus=(new Date).getTime()}},t.setLastExportBonus=function(e){t.LastExportBonus=e}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logBoxCreate=void 0;const s=i(n(0)),l=o(n(22)),c=n(71),u=n(52),m=n(96);let p;function d(e){const t=s.useState(!1)[1];function n(){t(e=>!e)}function a(){const t=document.getElementById(e.id);null!=t&&(l.default.unmountComponentAtNode(t),m.removeElementById(e.id))}return s.useEffect(()=>{const e=setInterval(n,1e3);return()=>clearInterval(e)},[]),s.useEffect(()=>{function e(e){27===e.keyCode&&a()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:"log-box-header",onMouseDown:function(t){t.preventDefault();let n=t.clientX,a=t.clientY,r=e.container.offsetLeft+e.container.clientWidth/2,i=e.container.offsetTop+e.container.clientWidth/5;function o(t){r+=t.clientX-n,i+=t.clientY-a,e.container.style.left=r+"px",e.container.style.top=i+"px",e.container.style.right="",e.container.style.bottom="",n=t.clientX,a=t.clientY}document.addEventListener("mouseup",function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",o)}),document.addEventListener("mousemove",o)}},s.default.createElement("p",null,e.script.filename," ",e.script.args.map(e=>`${e}`).join(" ")),s.default.createElement("div",null,s.default.createElement("button",{className:"log-box-button",onClick:function(){c.killWorkerScript(e.script,e.script.server,!0),a()}},"Kill Script"),s.default.createElement("button",{className:"log-box-button",onClick:a},"Close"))),s.default.createElement("div",{className:"log-box-log-container"},s.default.createElement("p",null,e.script.logs.map((e,t)=>s.default.createElement("span",{key:t,style:{whiteSpace:"pre-line"}},e,s.default.createElement("br",null))))))}!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");p=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.logBoxCreate=function(e){const t=e.server+"-"+e.filename+e.args.map(e=>`${e}`).join("-");if(null!==document.getElementById(t))return;const n=u.createElement("div",{class:"log-box-container",id:t});p.appendChild(n),l.default.render(s.default.createElement(d,{script:e,id:t,container:n}),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RamCalculationErrorCode=void 0,function(e){e[e.SyntaxError=-1]="SyntaxError",e[e.ImportError=-2]="ImportError",e[e.URLImportError=-3]="URLImportError"}(t.RamCalculationErrorCode||(t.RamCalculationErrorCode={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNodeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateMoneyGainRate=void 0;const a=n(19),r=n(33);t.calculateMoneyGainRate=function(e,t,n,i){return e*r.HacknetNodeConstants.MoneyGainPerLevel*Math.pow(1.035,t-1)*((n+5)/6)*i*a.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetNodeConstants.MaxLevel)return 1/0;const i=r.HacknetNodeConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<a;++e)o+=r.HacknetNodeConstants.LevelBaseCost*Math.pow(i,s),++s;return r.HacknetNodeConstants.BaseCost/2*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetNodeConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<a;++e)i+=s*r.HacknetNodeConstants.RamBaseCost*Math.pow(r.HacknetNodeConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const a=Math.round(t);if(isNaN(a)||a<1)return 0;if(e>=r.HacknetNodeConstants.MaxCores)return 1/0;const i=r.HacknetNodeConstants.CoreBaseCost,o=r.HacknetNodeConstants.UpgradeCoreMult;let s=0,l=e;for(let e=0;e<a;++e)s+=i*Math.pow(o,l-1),++l;return s*=n},t.calculateNodeCost=function(e,t=1){return e<=0?0:r.HacknetNodeConstants.BaseCost*Math.pow(r.HacknetNodeConstants.PurchaseNextMult,e-1)*t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetscriptPort=void 0;const a=n(25);t.NetscriptPort=class{constructor(){this.data=[]}write(e){return this.data.push(e),this.data.length>a.Settings.MaxPortCapacity?this.data.shift():null}tryWrite(e){return!(this.data.length>=a.Settings.MaxPortCapacity||(this.data.push(e),0))}read(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()}peek(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]}full(){return this.data.length==a.Settings.MaxPortCapacity}empty(){return 0===this.data.length}clear(){this.data.length=0}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interpolate=void 0,t.interpolate=function(e,t,n){function a(e,t,a){function r(e,t,n){return(1-n)*e+n*t}for(const i of Object.keys(e))n[i]=r(e[i],t[i],a);return e}return t<0?a(e.Trivial,e.Trivial,0):t>=0&&t<1?a(e.Trivial,e.Normal,t):t>=1&&t<2?a(e.Normal,e.Hard,t-1):t>=2&&t<3?a(e.Hard,e.Impossible,t-2):a(e.Impossible,e.Impossible,0)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GameTimer=void 0;const s=o(n(221)),l=i(n(0)),c=n(483),u=o(n(89)),m=c.withStyles(()=>({bar:{transition:"none",backgroundColor:"#adff2f"}}))(s.default);t.GameTimer=function(e){const[t,n]=l.useState(100);return l.useEffect(()=>{const t=setInterval(()=>{n(t=>(t<=0&&e.onExpire(),t-200/e.millis*100))},200);return()=>{clearInterval(t)}},[]),l.default.createElement(u.default,{item:!0,xs:12},l.default.createElement(m,{variant:"determinate",value:t}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyHandler=void 0;const o=i(n(0));t.KeyHandler=function(e){let t;return o.useEffect(()=>t.focus()),o.default.createElement("div",{tabIndex:1,ref:e=>t=e,onKeyDown:function(t){if(console.log("isTrusted?",t.isTrusted),!t.isTrusted)return console.log("untrusted event!"),void e.onFailure({automated:!0});e.onKeyDown(t)}})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Accordion=void 0;const o=i(n(0));t.Accordion=class extends o.Component{constructor(e){super(e),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.state={panelOpened:!!e.panelInitiallyOpened&&e.panelInitiallyOpened}}handleHeaderClick(){this.setState({panelOpened:!this.state.panelOpened})}render(){let e="accordion-header";return"string"==typeof this.props.headerClass&&(e=this.props.headerClass),this.state.panelOpened&&(e+=" active"),o.createElement(o.Fragment,null,o.createElement("button",{className:e,onClick:this.handleHeaderClick},this.props.headerContent),o.createElement(s,{opened:this.state.panelOpened,panelClass:this.props.panelClass,panelContent:this.props.panelContent}))}};class s extends o.Component{shouldComponentUpdate(e){return this.props.opened||e.opened}render(){let e="accordion-panel";return"string"==typeof this.props.panelClass&&(e=this.props.panelClass),this.props.opened?o.createElement("div",{className:e,style:{display:"block"}},this.props.panelContent):o.createElement(o.Fragment,null)}}},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CopyableText=t.ClickableTag=void 0;const o=i(n(0));var s;!function(e){e[e.Tag_span=0]="Tag_span",e[e.Tag_h1=1]="Tag_h1"}(s=t.ClickableTag||(t.ClickableTag={}));class l extends o.Component{constructor(e){super(e),this.copy=this.copy.bind(this),this.tooltipClasses=this.tooltipClasses.bind(this),this.textClasses=this.textClasses.bind(this),this.state={tooltipVisible:!1}}copy(){const e=document.createElement("textarea");e.value=this.props.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),this.setState({tooltipVisible:!0}),setTimeout(()=>this.setState({tooltipVisible:!1}),1e3)}tooltipClasses(){let e="copy_tooltip_text";return this.state.tooltipVisible&&(e+=" copy_tooltip_text_visible"),e}textClasses(){let e="copy_tooltip noselect text";return this.state.tooltipVisible&&(e+=" copy_tooltip_copied"),e}render(){switch(this.props.tag){case s.Tag_h1:return o.createElement("h1",{className:this.textClasses(),onClick:this.copy},this.props.value,o.createElement("span",{className:this.tooltipClasses()},"Copied!"));case s.Tag_span:return o.createElement("span",{className:this.textClasses(),onClick:this.copy},o.createElement("b",null,this.props.value),o.createElement("span",{className:this.tooltipClasses()},"Copied!"))}}}t.CopyableText=l,l.defaultProps={tag:s.Tag_span}},,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeExploits=t.ExploitName=t.Exploit=void 0,function(e){e.UndocumentedFunctionCall="UndocumentedFunctionCall",e.Unclickable="Unclickable",e.PrototypeTampering="PrototypeTampering",e.Bypass="Bypass",e.EditSaveFile="EditSaveFile"}(a=t.Exploit||(t.Exploit={}));const r={UndocumentedFunctionCall:"by looking beyond the documentation.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",Unclickable:"by clicking the unclickable.",Bypass:"by circumventing the ram cost of document."};t.ExploitName=function(e){return r[e]},t.sanitizeExploits=function(e){return e.filter(e=>Object.keys(a).includes(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Crimes=void 0;const a=n(707),r=n(11);t.Crimes={Shoplift:new a.Crime("Shoplift",r.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new a.Crime("Rob Store",r.CONSTANTS.CrimeRobStore,6e4,4e5,.2,.5,{hacking_exp:30,dexterity_exp:45,agility_exp:45,hacking_success_weight:.5,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:7.5*r.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new a.Crime("Mug",r.CONSTANTS.CrimeMug,4e3,36e3,.2,.25,{strength_exp:3,defense_exp:3,dexterity_exp:3,agility_exp:3,strength_success_weight:1.5,defense_success_weight:.5,dexterity_success_weight:1.5,agility_success_weight:.5}),Larceny:new a.Crime("Larceny",r.CONSTANTS.CrimeLarceny,9e4,8e5,1/3,1.5,{hacking_exp:45,dexterity_exp:60,agility_exp:60,hacking_success_weight:.5,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:15*r.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new a.Crime("Deal Drugs",r.CONSTANTS.CrimeDrugs,1e4,12e4,1,.5,{dexterity_exp:5,agility_exp:5,charisma_exp:10,charisma_success_weight:3,dexterity_success_weight:2,agility_success_weight:1}),BondForgery:new a.Crime("Bond Forgery",r.CONSTANTS.CrimeBondForgery,3e5,45e5,.5,.1,{hacking_exp:100,dexterity_exp:150,charisma_exp:15,hacking_success_weight:.05,dexterity_success_weight:1.25,intelligence_exp:60*r.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new a.Crime("Traffick Arms",r.CONSTANTS.CrimeTraffickArms,4e4,6e5,2,1,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:20,charisma_exp:40,charisma_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1}),Homicide:new a.Crime("Homicide",r.CONSTANTS.CrimeHomicide,3e3,45e3,1,3,{strength_exp:2,defense_exp:2,dexterity_exp:2,agility_exp:2,strength_success_weight:2,defense_success_weight:2,dexterity_success_weight:.5,agility_success_weight:.5,kills:1}),GrandTheftAuto:new a.Crime("Grand Theft Auto",r.CONSTANTS.CrimeGrandTheftAuto,8e4,16e5,8,5,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:80,charisma_exp:40,hacking_success_weight:1,strength_success_weight:1,dexterity_success_weight:4,agility_success_weight:2,charisma_success_weight:2,intelligence_exp:16*r.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new a.Crime("Kidnap",r.CONSTANTS.CrimeKidnap,12e4,36e5,5,6,{strength_exp:80,defense_exp:80,dexterity_exp:80,agility_exp:80,charisma_exp:80,charisma_success_weight:1,strength_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:26*r.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new a.Crime("Assassination",r.CONSTANTS.CrimeAssassination,3e5,12e6,8,10,{strength_exp:300,defense_exp:300,dexterity_exp:300,agility_exp:300,strength_success_weight:1,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:65*r.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new a.Crime("Heist",r.CONSTANTS.CrimeHeist,6e5,12e7,18,15,{hacking_exp:450,strength_exp:450,defense_exp:450,dexterity_exp:450,agility_exp:450,charisma_exp:450,hacking_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,charisma_success_weight:1,intelligence_exp:130*r.CONSTANTS.IntelligenceCrimeBaseExpGain})}},,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return D}),n.d(t,"b",function(){return L});var a=n(12),r=n(80),i=n(3),o=n(129),s=n(93),l=n(465),c=n(32),u=n(146),m=n(30),p=n(15),d=n(126),h=n(17),f=n(72),g=n(26),y=n(88),_=n(81),b=n(1),v=n(315),k=n(148),E=n(20),C=n(23),S=n(37),P=n(38),T=n(48),M=n(75),O=n(18),w=n(13),x=n(90),N=n(96),A=n(52),R=n(147),I=n(69);const B=25e7;function D(){O.routing.navigateTo(O.Page.Terminal),Object(o.initBitNodeMultipliers)(b.Player),b.Player.prestigeAugmentation(),document.getElementById("mainmenu-container").style.visibility="visible",M.a.resetTerminalInput(),p.Engine.loadTerminalContent(),e("#terminal tr:not(:last)").remove(),Object(M.b)(),Object(_.c)();var t=b.Player.getHomeComputer();for(var n in Object(E.prestigeAllServers)(),Object(P.prestigeSpecialServerIps)(),Object(E.AddToAllServers)(t),Object(C.prestigeHomeComputer)(t),Object(r.b)(i.AugmentationNames.Neurolink)&&a.Augmentations[i.AugmentationNames.Neurolink].owned&&(t.programs.push(m.Programs.FTPCrackProgram.name),t.programs.push(m.Programs.RelaySMTPProgram.name)),Object(r.b)(i.AugmentationNames.CashRoot)&&a.Augmentations[i.AugmentationNames.CashRoot].owned&&(b.Player.setMoney(1e6),t.programs.push(m.Programs.BruteSSHProgram.name)),Object(r.b)(i.AugmentationNames.PCMatrix)&&a.Augmentations[i.AugmentationNames.PCMatrix].owned&&(t.programs.push(m.Programs.DeepscanV1.name),t.programs.push(m.Programs.AutoLink.name)),Object(E.initForeignServers)(b.Player.getHomeComputer()),c.Companies)c.Companies.hasOwnProperty(n)&&c.Companies[n].gainFavor();for(var n in h.Factions)h.Factions.hasOwnProperty(n)&&h.Factions[n].gainFavor();if(p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,M.a.finishAction(!0)),Object(h.initFactions)(),Object(r.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),Object(y.c)(),b.Player.inGang()){const e=h.Factions[b.Player.gang.facName];e instanceof d.Faction&&Object(f.joinFaction)(e)}if(b.Player.bladeburner instanceof s.Bladeburner&&b.Player.bladeburner.prestige(),8===b.Player.bitNodeN&&(b.Player.money=new I.default(B)),(8===b.Player.bitNodeN||S.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),b.Player.hasWseAccount&&(Object(T.initStockMarket)(),Object(T.initSymbolToStockMap)()),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(r.b)(i.AugmentationNames.TheRedPill)&&a.Augmentations[i.AugmentationNames.TheRedPill].owned){var l=E.AllServers[P.SpecialServerIps[P.SpecialServerNames.WorldDaemon]],u=E.AllServers[P.SpecialServerIps[P.SpecialServerNames.DaedalusServer]];l&&u&&(l.serversOnNetwork.push(u.ip),u.serversOnNetwork.push(l.ip))}Object(v.resetPidCounter)()}function L(t){Object(o.initBitNodeMultipliers)(b.Player),Object(S.updateSourceFileFlags)(b.Player),b.Player.prestigeSourceFile(),Object(_.c)();var n=b.Player.getHomeComputer();for(var s in Object(E.prestigeAllServers)(),Object(P.prestigeSpecialServerIps)(),Object(E.AddToAllServers)(n),Object(C.prestigeHomeComputer)(n),Object(E.initForeignServers)(b.Player.getHomeComputer()),S.SourceFileFlags[9]>=2?n.setMaxRam(128):S.SourceFileFlags[1]>0?n.setMaxRam(32):n.setMaxRam(8),n.cpuCores=1,c.Companies)c.Companies.hasOwnProperty(s)&&(c.Companies[s].favor=0);for(var s in h.Factions)h.Factions.hasOwnProperty(s)&&(h.Factions[s].favor=0);for(var m in p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,M.a.finishAction(!0)),a.Augmentations)a.Augmentations.hasOwnProperty(m)&&delete a.Augmentations[m];if(S.SourceFileFlags[12]>0&&b.Player.augmentations.push({name:i.AugmentationNames.NeuroFluxGovernor,level:S.SourceFileFlags[12]}),Object(h.initFactions)(),Object(r.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(M.b)(),Object(y.c)(),document.getElementById("mainmenu-container").style.visibility="visible",M.a.resetTerminalInput(),p.Engine.loadTerminalContent(),3===b.Player.bitNodeN&&(n.messages.push(k.LiteratureNames.CorporationManagementHandbook),Object(w.dialogBoxCreate)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===b.Player.bitNodeN){Object(l.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then(function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(A.createElement)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),n=Object(A.createElement)("br"),a=Object(A.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(N.removeElementById)(e),!1)});Object(R.createPopup)(e,[t,n,a])}).catch(function(e){Object(x.exceptionAlert)(e)})}if(8===b.Player.bitNodeN&&(b.Player.money=new I.default(B)),(8===b.Player.bitNodeN||S.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),10===b.Player.bitNodeN&&Object(w.dialogBoxCreate)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.Player.hasWseAccount?(Object(T.initStockMarket)(),Object(T.initSymbolToStockMap)()):Object(T.deleteStockMarket)(),b.Player.inGang()&&clearGangUI(),b.Player.gang=null,b.Player.corporation=null,Object(u.resetIndustryResearchTrees)(),b.Player.bladeburner=null,S.SourceFileFlags[9]>=3){const e=b.Player.createHacknetServer();e.level=100,e.cores=10,e.cache=5,e.updateHashRate(b.Player.hacknet_node_money_mult),e.updateHashCapacity(),Object(g.r)()}document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),0===S.SourceFileFlags[5]||t||b.Player.gainIntelligenceExp(300),Object(v.resetPidCounter)()}}).call(this,n(145))},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sellShort=t.shortStock=t.sellStock=t.buyStock=void 0;const o=n(301),s=n(98),l=n(11),c=n(1),u=n(6),m=n(21),p=n(13),d=i(n(0));t.buyStock=function(e,t,n=null,a={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("buyStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==a.suppressDialog&&p.dialogBoxCreate("Failed to buy stock. This may be a bug, contact developer"),!1;const r=o.getBuyTransactionCost(e,t,s.PositionTypes.Long);if(null==r)return!1;if(c.Player.money.lt(r))return n?n.log("buyStock",`You do not have enough money to purchase this position. You need ${u.numeralWrapper.formatMoney(r)}.`):!0!==a.suppressDialog&&p.dialogBoxCreate(d.createElement(d.Fragment,null,"You do not have enough money to purchase this. You need ",d.createElement(m.Money,{money:r}))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("buyStock",`Purchasing '${t+e.playerShares+e.playerShortShares}' shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares`):!0!==a.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${u.numeralWrapper.formatShares(e.maxShares)} shares.`),!1;const i=e.playerShares*e.playerAvgPx;c.Player.loseMoney(r);const h=i+r-l.CONSTANTS.StockMarketCommission;if(e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=h/e.playerShares,o.processTransactionForecastMovement(e,t),null!=a.rerenderFn&&"function"==typeof a.rerenderFn&&a.rerenderFn(),n){const a=`Bought ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} for ${u.numeralWrapper.formatMoney(r)}. `+`Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} in commission fees.`;n.log("buyStock",a)}else!0!==a.suppressDialog&&p.dialogBoxCreate(d.createElement(d.Fragment,null,"Bought ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",d.createElement(m.Money,{money:r}),". Paid ",d.createElement(m.Money,{money:l.CONSTANTS.StockMarketCommission})," in commission fees."));return!0},t.sellStock=function(e,t,n=null,a={}){if(null==e||t<0||isNaN(t))return n?n.log("sellStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==a.suppressDialog&&p.dialogBoxCreate("Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer"),!1;if((t=Math.round(t))>e.playerShares&&(t=e.playerShares),0===t)return!1;const r=o.getSellTransactionGain(e,t,s.PositionTypes.Long);if(null==r)return!1;let i=r-e.playerAvgPx*t;if(isNaN(i)&&(i=0),c.Player.gainMoney(r),c.Player.recordMoneySource(i,"stock"),n&&(n.scriptRef.onlineMoneyMade+=i,c.Player.scriptProdSinceLastAug+=i),e.playerShares=Math.round(e.playerShares-t),0===e.playerShares&&(e.playerAvgPx=0),o.processTransactionForecastMovement(e,t),null!=a.rerenderFn&&"function"==typeof a.rerenderFn&&a.rerenderFn(),n){const a=`Sold ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(r)}.`;n.log("sellStock",a)}else!0!==a.suppressDialog&&p.dialogBoxCreate(d.createElement(d.Fragment,null,"Sold ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",d.createElement(m.Money,{money:r}),"."));return!0},t.shortStock=function(e,t,n=null,a={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("shortStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==a.suppressDialog&&p.dialogBoxCreate("Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;const r=o.getBuyTransactionCost(e,t,s.PositionTypes.Short);if(null==r)return!1;if(c.Player.money.lt(r))return n?n.log("shortStock","You do not have enough money to purchase this short position. You need "+u.numeralWrapper.formatMoney(r)):!0!==a.suppressDialog&&p.dialogBoxCreate(d.createElement(d.Fragment,null,"You do not have enough money to purchase this short position. You need ",d.createElement(m.Money,{money:r}))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("shortStock",`This '${t+e.playerShares+e.playerShortShares}' short shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares.`):!0!==a.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${e.maxShares} shares.`),!1;const i=e.playerShortShares*e.playerAvgShortPx;c.Player.loseMoney(r);const h=i+r-l.CONSTANTS.StockMarketCommission;if(e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=h/e.playerShortShares,o.processTransactionForecastMovement(e,t),null!=a.rerenderFn&&"function"==typeof a.rerenderFn&&a.rerenderFn(),n){const a=`Bought a short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} `+`for ${u.numeralWrapper.formatMoney(r)}. Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} `+"in commission fees.";n.log("shortStock",a)}else a.suppressDialog||p.dialogBoxCreate(d.createElement(d.Fragment,null,"Bought a short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",d.createElement(m.Money,{money:r}),". Paid ",d.createElement(m.Money,{money:l.CONSTANTS.StockMarketCommission})," in commission fees."));return!0},t.sellShort=function(e,t,n=null,a={}){if(null==e||isNaN(t)||t<0)return n?n.log("sellShort",`Invalid arguments: stock='${e}' shares='${t}'`):a.suppressDialog||p.dialogBoxCreate("Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if((t=Math.round(t))>e.playerShortShares&&(t=e.playerShortShares),0===t)return!1;const r=t*e.playerAvgShortPx,i=o.getSellTransactionGain(e,t,s.PositionTypes.Short);if(null==i||isNaN(i)||null==r)return n?n.log("sellShort","Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"):a.suppressDialog||p.dialogBoxCreate("Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"),!1;let l=i-r;if(isNaN(l)&&(l=0),c.Player.gainMoney(i),c.Player.recordMoneySource(l,"stock"),n&&(n.scriptRef.onlineMoneyMade+=l,c.Player.scriptProdSinceLastAug+=l),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),o.processTransactionForecastMovement(e,t),null!=a.rerenderFn&&"function"==typeof a.rerenderFn&&a.rerenderFn(),n){const a=`Sold your short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(i)}`;n.log("sellShort",a)}else a.suppressDialog||p.dialogBoxCreate(d.createElement(d.Fragment,null,"Sold your short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",d.createElement(m.Money,{money:i})));return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgrades=void 0;const a=n(499),r=n(1123);t.GangMemberUpgrades={},a.gangMemberUpgradesMetadata.forEach(e=>{t.GangMemberUpgrades[e.name]=new r.GangMemberUpgrade(e.name,e.cost,e.upgType,e.mults)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateContract=t.generateRandomContractOnHome=t.generateRandomContract=void 0;const a=n(92),r=n(17),i=n(1),o=n(20),s=n(23),l=n(38),c=n(501),u=n(44);function m(){const e=Object.keys(a.CodingContractTypes);return e[u.getRandomInt(0,e.length-1)]}function p(){const e={name:"",type:u.getRandomInt(0,a.CodingContractRewardType.Money)};e.type=function(e){let t=e;const n=i.Player.factions.filter(e=>{try{return r.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});return t===a.CodingContractRewardType.FactionReputation&&0===n.length&&(t=a.CodingContractRewardType.CompanyReputation),t===a.CodingContractRewardType.FactionReputationAll&&0===n.length&&(t=a.CodingContractRewardType.CompanyReputation),t===a.CodingContractRewardType.CompanyReputation&&0===Object.keys(i.Player.jobs).length&&(t=a.CodingContractRewardType.Money),t}(e.type);const t=i.Player.factions.filter(e=>{try{return r.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});switch(e.type){case a.CodingContractRewardType.FactionReputation:{const n=t.length,a=t[u.getRandomInt(0,n-1)];e.name=a;break}case a.CodingContractRewardType.CompanyReputation:{const t=Object.keys(i.Player.jobs);t.length>0?e.name=t[u.getRandomInt(0,t.length-1)]:e.type=a.CodingContractRewardType.Money;break}}return e}function d(){const e=Object.keys(o.AllServers);let t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];for(let a=0;a<200&&(!(n instanceof c.Server)||n.purchasedByPlayer||n.hostname===l.SpecialServerNames.WorldDaemon);++a)t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];return n}function h(e,t){let n=`contract-${u.getRandomInt(0,1e6)}`;for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===n).length<=0);++t)n=`contract-${u.getRandomInt(0,1e6)}`;return t.name&&(n+=`-${t.name.replace(/\s/g,"")}`),n}t.generateRandomContract=function(){const e=m(),t=p(),n=d(),r=h(n,t),i=new a.CodingContract(r,e,t);n.addContract(i)},t.generateRandomContractOnHome=function(){const e=m(),t=p(),n=i.Player.getHomeComputer(),r=h(n,t),o=new a.CodingContract(r,e,t);n.addContract(o)},t.generateContract=function(e){let t;const n=Object.keys(a.CodingContractTypes);t=null!=e.problemType&&n.includes(e.problemType)?e.problemType:m();const r=p();let i,l;null!=e.server?(null==(i=s.GetServerByHostname(e.server))&&(i=o.AllServers[e.server]),null==i&&(i=d())):i=d(),l=null!=e.fn?e.fn:h(i,r);const c=new a.CodingContract(l,t,r);i.addContract(c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashManager=void 0;const a=n(246),r=n(29);class i{constructor(){this.capacity=0,this.hashes=0,this.upgrades={};for(const e in a.HashUpgrades)this.upgrades[e]=0}getMult(e){const t=a.HashUpgrades[e],n=this.upgrades[e];return null==t||null==n?(console.error("Could not find Hash Study upgrade"),1):1+t.value*n/100}getStudyMult(){return this.getMult("Improve Studying")}getTrainingMult(){return this.getMult("Improve Gym Training")}getUpgrade(e){const t=a.HashUpgrades[e];return t||(console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${e}`),null)}getUpgradeCost(e){const t=this.getUpgrade(e),n=this.upgrades[e];return null==t||null==n?(console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${e}`),1/0):t.getCost(n)}prestige(){for(const e in a.HashUpgrades)this.upgrades[e]=0;this.hashes=0,this.updateCapacity(0)}refundUpgrade(e){const t=a.HashUpgrades[e];--this.upgrades[e];const n=this.upgrades[e];if(null==t||null==n||n<0)return void console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`);const r=t.getCost(n);this.hashes+=r}storeHashes(e){this.hashes+=e,this.hashes=Math.min(this.hashes,this.capacity)}updateCapacity(e){e<0&&(this.capacity=0),this.capacity=Math.max(e,0)}upgrade(e){if(null==a.HashUpgrades[e])return console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`),!1;const t=this.getUpgradeCost(e);return!(this.hashes<t)&&(this.hashes-=t,++this.upgrades[e],!0)}toJSON(){return r.Generic_toJSON("HashManager",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.HashManager=i,r.Reviver.constructors.HashManager=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sleeve=void 0;const a=n(247),r=n(708),i=n(19),o=n(707),s=n(170),l=n(32),c=n(140),u=n(53),m=n(11),p=n(126),d=n(17),h=n(427),f=n(43),g=n(41),y=n(29);class _ extends r.Person{constructor(e=null){super(),this.className="",this.crimeType="",this.currentTask=a.SleeveTaskType.Idle,this.currentTaskLocation="",this.currentTaskMaxTime=0,this.currentTaskTime=0,this.earningsForSleeves=r.createTaskTracker(),this.earningsForPlayer=r.createTaskTracker(),this.earningsForTask=r.createTaskTracker(),this.factionWorkType=h.FactionWorkType.None,this.gainRatesForTask=r.createTaskTracker(),this.gymStatType="",this.logs=[],this.memory=1,this.shock=1,this.storedCycles=0,this.sync=1,null!=e&&this.shockRecovery(e)}commitCrime(e,t){const n=s.Crimes[t];return n instanceof o.Crime&&(this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.gainRatesForTask.hack=n.hacking_exp*this.hacking_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.str=n.strength_exp*this.strength_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.def=n.defense_exp*this.defense_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.dex=n.dexterity_exp*this.dexterity_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.agi=n.agility_exp*this.agility_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.cha=n.charisma_exp*this.charisma_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.money=n.money*this.crime_money_mult*i.BitNodeMultipliers.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=t,this.currentTaskMaxTime=n.time,this.currentTask=a.SleeveTaskType.Crime,!0)}finishTask(e){let t=r.createTaskTracker();if(this.currentTask===a.SleeveTaskType.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const n=s.Crimes[this.crimeType];if(!(n instanceof o.Crime))return console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`),this.resetTaskStatus(),t;if(Math.random()<n.successRate(this)){const a=r.createTaskTracker(),i=Object.keys(a);for(let e=0;e<i.length;++e){const t=i[e];a[t]=2*this.gainRatesForTask[t]}t=this.gainExperience(e,a),this.gainMoney(e,this.gainRatesForTask),e.karma-=n.karma*(this.sync/100)}else t=this.gainExperience(e,this.gainRatesForTask);return this.currentTaskTime=0,t}return this.resetTaskStatus(),t}gainExperience(e,t,n=1,a=!1){if(a)return t.hack>0&&(this.hacking_exp+=t.hack),t.str>0&&(this.strength_exp+=t.str),t.def>0&&(this.defense_exp+=t.def),t.dex>0&&(this.dexterity_exp+=t.dex),t.agi>0&&(this.agility_exp+=t.agi),t.cha>0&&(this.charisma_exp+=t.cha),r.createTaskTracker();const i=this.shock/100*(this.sync/100)*n,o=t.hack*i,s=t.str*i,l=t.def*i,c=t.dex*i,u=t.agi*i,m=t.cha*i;return o>0&&(this.hacking_exp+=o,e.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,e.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,e.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,e.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),u>0&&(this.agility_exp+=u,e.gainAgilityExp(u),this.earningsForPlayer.agi+=u,this.earningsForTask.agi+=u),m>0&&(this.charisma_exp+=m,e.gainCharismaExp(m),this.earningsForPlayer.cha+=m,this.earningsForTask.cha+=m),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=u*(this.sync/100),this.earningsForSleeves.cha+=m*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:u*(this.sync/100),cha:m*(this.sync/100),money:0}}gainMoney(e,t,n=1){const a=t.money*n;this.earningsForTask.money+=a,this.earningsForPlayer.money+=a,e.gainMoney(a),e.recordMoneySource(a,"sleeves")}getMemoryUpgradeCost(e){const t=Math.round(e);if(t<0)return 0;if(this.memory+t>100)return this.getMemoryUpgradeCost(100-this.memory);let n=0,a=this.memory-1;for(let t=0;t<e;++t)n+=Math.pow(1.02,a),++a;return 1e12*n}getRepGain(e){if(this.currentTask!==a.SleeveTaskType.Faction){if(this.currentTask===a.SleeveTaskType.Company){const t=this.currentTaskLocation,n=l.Companies[t];if(null==n)return console.error(`Invalid company found when trying to calculate rep gain: ${t}`),0;const a=u.CompanyPositions[e.jobs[t]];if(null==a)return console.error(`Invalid company position name found when trying to calculate rep gain: ${e.jobs[t]}`),0;const r=a.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma),i=1+n.favor/100;return r*this.company_rep_mult*i}return console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`),0}{let e=1;const t=d.Factions[this.currentTaskLocation];switch(null!=t&&(e=1+t.favor/100),this.factionWorkType){case h.FactionWorkType.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100)*e;case h.FactionWorkType.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100)*e;case h.FactionWorkType.Security:return this.getFactionSecurityWorkRepGain()*(this.shock/100)*e;default:return console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`),0}}}installAugmentation(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.applyAugmentation(e),this.augmentations.push({name:e.name,level:1}),this.updateStatLevels()}log(e){this.logs.push(e),this.logs.length>50&&this.logs.shift()}prestige(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.resetTaskStatus(),this.earningsForSleeves=r.createTaskTracker(),this.earningsForPlayer=r.createTaskTracker(),this.shockRecovery(e),this.augmentations=[],this.resetMultipliers(),this.shock=1,this.storedCycles=0,this.sync=Math.max(this.memory,1),this.logs=[]}process(e,t=1){const n=1e3/m.CONSTANTS.MilliPerCycle;if(this.storedCycles+=t,this.storedCycles<n)return null;let i=this.storedCycles*m.CONSTANTS.MilliPerCycle,o=this.storedCycles;0!==this.currentTaskMaxTime&&this.currentTaskTime+i>this.currentTaskMaxTime&&(i=this.currentTaskMaxTime-this.currentTaskTime,o=Math.floor(i/m.CONSTANTS.MilliPerCycle),(i<0||o<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),i=0,o=0)),this.currentTaskTime+=i,this.shock=Math.min(100,this.shock+1e-4*this.storedCycles);let s=r.createTaskTracker();switch(this.currentTask){case a.SleeveTaskType.Idle:break;case a.SleeveTaskType.Class:case a.SleeveTaskType.Gym:this.updateTaskGainRates(e),s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);break;case a.SleeveTaskType.Faction:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=d.Factions[this.currentTaskLocation];if(!(t instanceof p.Faction)){console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case a.SleeveTaskType.Company:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=l.Companies[this.currentTaskLocation];if(!(t instanceof c.Company)){console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case a.SleeveTaskType.Recovery:this.shock=Math.min(100,this.shock+2e-4*o);break;case a.SleeveTaskType.Synchro:this.sync=Math.min(100,this.sync+2e-4*e.getIntelligenceBonus(.5)*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===a.SleeveTaskType.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=r.createTaskTracker(),this.gainRatesForTask=r.createTaskTracker(),this.currentTask=a.SleeveTaskType.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=h.FactionWorkType.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType="",this.className=""}shockRecovery(e){return this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=a.SleeveTaskType.Recovery,!0}synchronize(e){return this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=a.SleeveTaskType.Synchro,!0}takeUniversityCourse(e,t,n){this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let r=1;switch(t.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():if(this.city!==f.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSummitUniversity,r=4;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():if(this.city!==f.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12RothmanUniversity,r=3;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==f.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenZBInstituteOfTechnology,r=5;break;default:return!1}switch(n.toLowerCase()){case"study computer science":break;case"data structures":this.gainRatesForTask.money=m.CONSTANTS.ClassDataStructuresBaseCost*r*-1;break;case"networks":this.gainRatesForTask.money=m.CONSTANTS.ClassNetworksBaseCost*r*-1;break;case"algorithms":this.gainRatesForTask.money=m.CONSTANTS.ClassAlgorithmsBaseCost*r*-1;break;case"management":this.gainRatesForTask.money=m.CONSTANTS.ClassManagementBaseCost*r*-1;break;case"leadership":this.gainRatesForTask.money=m.CONSTANTS.ClassLeadershipBaseCost*r*-1;break;default:return!1}return this.className=n,this.currentTask=a.SleeveTaskType.Class,!0}travel(e,t){return e.loseMoney(m.CONSTANTS.TravelCost),this.city=t,!0}tryBuyAugmentation(e,t){return!!e.canAfford(t.startingCost)&&(!this.augmentations.some(e=>e.name===t.name)&&(e.loseMoney(t.startingCost),this.installAugmentation(t),!0))}updateTaskGainRates(e){if(this.currentTask!==a.SleeveTaskType.Class)if(this.currentTask!==a.SleeveTaskType.Gym)console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():t=2;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():t=5;break;case g.LocationName.Sector12IronGym.toLowerCase():t=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():t=10;break;case g.LocationName.VolhavenMilleniumFitnessGym:t=4;break;default:return}const n=1,a=e.hashManager.getTrainingMult()*t,r=this.gymStatType.toLowerCase();r.includes("str")?this.gainRatesForTask.str=n*a*this.strength_exp_mult:r.includes("def")?this.gainRatesForTask.def=n*a*this.defense_exp_mult:r.includes("dex")?this.gainRatesForTask.dex=n*a*this.dexterity_exp_mult:r.includes("agi")&&(this.gainRatesForTask.agi=n*a*this.agility_exp_mult)}else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():t=3;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():t=2;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():t=4;break;default:return}const n=t*e.hashManager.getStudyMult();switch(this.className.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=m.CONSTANTS.ClassStudyComputerScienceBaseExp*n*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=m.CONSTANTS.ClassDataStructuresBaseExp*n*this.hacking_exp_mult;break;case"networks":this.gainRatesForTask.hack=m.CONSTANTS.ClassNetworksBaseExp*n*this.hacking_exp_mult;break;case"algorithms":this.gainRatesForTask.hack=m.CONSTANTS.ClassAlgorithmsBaseExp*n*this.hacking_exp_mult;break;case"management":this.gainRatesForTask.cha=m.CONSTANTS.ClassManagementBaseExp*n*this.charisma_exp_mult;break;case"leadership":this.gainRatesForTask.cha=m.CONSTANTS.ClassLeadershipBaseExp*n*this.charisma_exp_mult}}}upgradeMemory(e){e<0?console.warn(`Sleeve.upgradeMemory() called with negative value: ${e}`):this.memory=Math.min(100,Math.round(this.memory+e))}workForCompany(e,t){if(!(l.Companies[t]instanceof c.Company)||null==e.jobs[t])return!1;this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const n=l.Companies[t],r=u.CompanyPositions[e.jobs[t]];return null!=n&&(null!=r&&(this.gainRatesForTask.money=r.baseSalary*n.salaryMultiplier*this.work_money_mult*i.BitNodeMultipliers.CompanyWorkMoney,this.gainRatesForTask.hack=r.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.str=r.strengthExpGain*n.expMultiplier*this.strength_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.def=r.defenseExpGain*n.expMultiplier*this.defense_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.dex=r.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.agi=r.agilityExpGain*n.expMultiplier*this.agility_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.cha=r.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.currentTaskLocation=t,this.currentTask=a.SleeveTaskType.Company,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer8Hours,!0))}workForFaction(e,t,n){if(""===t)return!1;if(!(d.Factions[t]instanceof p.Faction&&e.factions.includes(t)))return!1;this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const r=d.Factions[t].getInfo(),o=n.toLowerCase();if(o.includes("hack")){if(!r.offerHackingWork)return!1;this.factionWorkType=h.FactionWorkType.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else if(o.includes("field")){if(!r.offerFieldWork)return!1;this.factionWorkType=h.FactionWorkType.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else{if(!o.includes("security"))return!1;if(!r.offerSecurityWork)return!1;this.factionWorkType=h.FactionWorkType.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}return this.currentTaskLocation=t,this.currentTask=a.SleeveTaskType.Faction,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer20Hours,!0}workoutAtGym(e,t,n){this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let r=1;switch(t.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():if(this.city!=f.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumCrushFitnessGym,r=3;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():if(this.city!=f.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSnapFitnessGym,r=10;break;case g.LocationName.Sector12IronGym.toLowerCase():if(this.city!=f.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12IronGym,r=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():if(this.city!=f.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12PowerhouseGym,r=20;break;case g.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(this.city!=f.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenMilleniumFitnessGym,r=7;break;default:return!1}const i=n.toLowerCase();return this.gainRatesForTask.money=m.CONSTANTS.ClassGymBaseCost*r*-1,!!(i.includes("str")||i.includes("def")||i.includes("dex")||i.includes("agi"))&&(this.gymStatType=n,this.currentTask=a.SleeveTaskType.Gym,!0)}toJSON(){return y.Generic_toJSON("Sleeve",this)}static fromJSON(e){return y.Generic_fromJSON(_,e.data)}}t.Sleeve=_,y.Reviver.constructors.Sleeve=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoneySourceTracker=void 0;const a=n(29);class r{constructor(){this.bladeburner=0,this.casino=0,this.class=0,this.codingcontract=0,this.corporation=0,this.crime=0,this.gang=0,this.hacking=0,this.hacknetnode=0,this.hospitalization=0,this.infiltration=0,this.sleeves=0,this.stock=0,this.total=0,this.work=0}record(e,t){const n=t.toLowerCase();"number"==typeof this[n]?(this[n]+=e,this.total+=e):console.warn(`MoneySourceTracker.record() called with invalid source: ${t}`)}reset(){for(const e in this)"number"==typeof this[e]&&(this[e]=0)}toJSON(){return a.Generic_toJSON("MoneySourceTracker",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.MoneySourceTracker=r,a.Reviver.constructors.MoneySourceTracker=r},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=void 0,t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e);t.progress=Math.max(Math.min(t.progress,1),0);const n=Math.max(Math.floor(t.progress/(1/t.totalTicks)),1),a=Math.max(t.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(a)}]`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementById=void 0,t.getElementById=function(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stock=t.StockForecastInfluenceLimit=void 0;const a=n(29),r=n(44);t.StockForecastInfluenceLimit=5;const i={b:!0,initPrice:1e4,marketCap:1e12,mv:1,name:"",otlkMag:0,spreadPerc:0,shareTxForMovement:1e6,symbol:""};function o(e){let t;switch(typeof e){case"number":return e;case"object":{const n=e;t=r.getRandomInt(n.min,n.max);break}default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}return"object"==typeof e&&"number"==typeof e.divisor?t/e.divisor:t}class s{constructor(e=i){this.name=e.name,this.symbol=e.symbol,this.price=o(e.initPrice),this.lastPrice=this.price,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=o(e.mv),this.b=e.b,this.otlkMag=e.otlkMag,this.otlkMagForecast=this.getAbsoluteForecast(),this.cap=r.getRandomInt(1e3*this.price,25e3*this.price),this.spreadPerc=o(e.spreadPerc),this.shareTxForMovement=o(e.shareTxForMovement),this.shareTxUntilMovement=this.shareTxForMovement;const t=e.marketCap/this.price;this.totalShares=1e5*Math.round(t/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5)}changeForecastForecast(e){this.otlkMagForecast=e,this.otlkMagForecast>100?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()<t?this.b?this.otlkMag+=e:this.otlkMag-=e:this.b?this.otlkMag-=e:this.otlkMag+=e,this.otlkMag=Math.min(this.otlkMag,50),this.otlkMag<0&&(this.otlkMag*=-1,this.b=!this.b)}cycleForecastForecast(e=.1){Math.random()<.5?this.changeForecastForecast(this.otlkMagForecast+e):this.changeForecastForecast(this.otlkMagForecast-e)}flipForecastForecast(){const e=this.otlkMagForecast-50;this.otlkMagForecast=50+-1*e}getAbsoluteForecast(){return this.b?50+this.otlkMag:50-this.otlkMag}getAskPrice(){return this.price*(1+this.spreadPerc/100)}getBidPrice(){return this.price*(1-this.spreadPerc/100)}getForecastIncreaseChance(){const e=this.otlkMagForecast-this.getAbsoluteForecast();return(50+Math.min(Math.max(e,-45),45))/100}influenceForecast(e){this.otlkMag>t.StockForecastInfluenceLimit&&(this.otlkMag=Math.max(t.StockForecastInfluenceLimit,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 a.Generic_toJSON("Stock",this)}static fromJSON(e){return a.Generic_fromJSON(s,e.data)}}t.Stock=s,a.Reviver.constructors.Stock=s},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cities=void 0,t.Cities={}},,function(e,t,n){"use strict";n.r(t),n.d(t,"createFconf",function(){return u}),n.d(t,"parseFconfSettings",function(){return l}),n.d(t,"loadFconf",function(){return m});var a=n(39);n.d(t,"FconfSettings",function(){return a.FconfSettings});var r=n(104),i=n(13),o={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m",MAIN_MENU_STYLE:"Customize the main navigation menu on the left-hand side. Current options:\n\ndefault, classic, compact",THEME_BACKGROUND_COLOR:"Sets the background color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000",THEME_FONT_COLOR:"Sets the font color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33",THEME_HIGHLIGHT_COLOR:"Sets the highlight color for not only the Terminal, but also for \nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff",THEME_PROMPT_COLOR:"Sets the prompt color in the Terminal\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672",WRAP_INPUT:"Wrap Terminal Input. If this is enabled, then when a Terminal command is\ntoo long and overflows, then it will wrap to the next line instead of\nside-scrolling\n\nNote that after you enable/disable this, you'll have to run a command\nbefore its effect takes place."};const s=["default","classic","compact"];function l(e){var t=Object(r.b)(e,{sourceType:"module"}),n=[];for(n.push(t);0!=n.length;){var a=n.shift();switch(a.type){case"BlockStatement":case"Program":for(var i=0;i<a.body.length;++i)a.body[i]instanceof r.a&&n.push(a.body[i]);break;case"AssignmentExpression":var o;if(null==a.left||null==a.left.name)break;if(o=a.left.name,null==a.right||null==a.right.raw)break;c(o,a.right.raw)}for(var s in a)a.hasOwnProperty(s)&&a[s]instanceof r.a&&n.push(a[s])}p(),d()}function c(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=a.FconfSettings[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,a.FconfSettings[e]=t;break;case"MAIN_MENU_STYLE":t=n(t);s.includes(t)?a.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid option specified for ${e}. Options: ${s.toString()}`);break;case"THEME_BACKGROUND_COLOR":case"THEME_FONT_COLOR":case"THEME_HIGHLIGHT_COLOR":case"THEME_PROMPT_COLOR":t=n(t);/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)?a.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid color specified for ${e}. Must be a hex color code preceded by a pound (#)`)}else console.warn(`Invalid .fconf setting: ${e}`);function n(e){return(e=e.toLowerCase()).startsWith('"')&&(e=e.slice(1)),e.endsWith('"')&&(e=e.slice(0,-1)),e}}function u(){var e="";for(var t in a.FconfSettings)if(a.FconfSettings.hasOwnProperty(t)){if(null==(n=o[t]))continue;for(var n=n.split("\n"),r=0;r<n.length;++r)e+="//"+n[r]+"\n";e+=`${t} = ${!0===a.FconfSettings[t]?"1":!1===a.FconfSettings[t]?"0":'"'+String(a.FconfSettings[t])+'"'}\n\n`}return e}function m(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(a.FconfSettings[n]=t[n]);p(),d()}function p(){null!=a.FconfSettings.THEME_HIGHLIGHT_COLOR&&null!=a.FconfSettings.THEME_FONT_COLOR&&null!=a.FconfSettings.THEME_BACKGROUND_COLOR&&null!=a.FconfSettings.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",a.FconfSettings.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",a.FconfSettings.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",a.FconfSettings.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",a.FconfSettings.THEME_PROMPT_COLOR)):console.error("Cannot find Theme Settings")}function d(){const e=document.getElementById("mainmenu"),t=document.getElementById("hacking-menu-header"),n=document.getElementById("character-menu-header"),r=document.getElementById("world-menu-header"),i=document.getElementById("help-menu-header");function o(){t.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),n.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),r.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),i.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),n.classList.add(e),r.classList.add(e),i.classList.add(e)}if("default"===a.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===a.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==a.FconfSettings.MAIN_MENU_STYLE)return;o(),e.classList.remove("classic"),e.classList.add("compact"),s("mainmenu-accordion-header-compact")}t.click(),t.click(),n.click(),n.click(),r.click(),r.click(),i.click(),i.click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RunningScript=void 0;const a=n(39),r=n(25),i=n(7),o=n(29),s=n(426);class l{constructor(e=null,t=[]){this.args=[],this.dataMap={},this.filename="",this.logs=[],this.logUpd=!1,this.offlineExpGained=0,this.offlineMoneyMade=0,this.offlineRunningTime=.01,this.onlineExpGained=0,this.onlineMoneyMade=0,this.onlineRunningTime=.01,this.pid=-1,this.ramUsage=0,this.server="",this.threads=1,null!=e&&(this.filename=e.filename,this.args=t,this.server=e.server,this.ramUsage=e.ramUsage)}log(e){this.logs.length>r.Settings.MaxLogCapacity&&this.logs.shift();let t=e;a.FconfSettings.ENABLE_TIMESTAMPS&&(t="["+s.getTimestamp()+"] "+t),this.logs.push(t),this.logUpd=!0}displayLog(){for(let e=0;e<this.logs.length;++e)i.post(this.logs[e])}clearLog(){this.logs.length=0}recordHack(e,t,n=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n}recordGrow(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][2]+=t}recordWeaken(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][3]+=t}toJSON(){return o.Generic_toJSON("RunningScript",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.RunningScript=l,o.Reviver.constructors.RunningScript=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=void 0,t.compareArrays=function e(t,n){if(t.length!==n.length)return!1;for(let a=0;a<t.length;++a)if(Array.isArray(t[a])){if(!Array.isArray(n[a]))return!1;if(!e(t[a],n[a]))return!1}else if(t[a]!==n[a])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedAugmentation=void 0;t.PlayerOwnedAugmentation=class{constructor(e=""){this.level=1,this.name="",this.name=e}}},,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrow=t.random=void 0,t.random=function(e,t){return Math.random()*(t-e)+e},t.getArrow=function(e){switch(e.keyCode){case 38:case 87:return"↑";case 65:case 37:return"←";case 40:case 83:return"↓";case 39:case 68:return"→"}return""}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedAugmentationsOrderSetting=t.PurchaseAugmentationsOrderSetting=t.EditorSetting=t.CodeMirrorThemeSetting=t.CodeMirrorKeybindingSetting=t.AceKeybindingSetting=void 0,function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(t.AceKeybindingSetting||(t.AceKeybindingSetting={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(t.CodeMirrorKeybindingSetting||(t.CodeMirrorKeybindingSetting={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.SolarizedDark="solarized dark",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(t.CodeMirrorThemeSetting||(t.CodeMirrorThemeSetting={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(t.EditorSetting||(t.EditorSetting={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(t.PurchaseAugmentationsOrderSetting||(t.PurchaseAugmentationsOrderSetting={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(t.OwnedAugmentationsOrderSetting||(t.OwnedAugmentationsOrderSetting={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OfficeSpace=void 0;const a=n(294),r=n(95),i=n(44),o=n(24),s=n(29),l=n(757);class c{constructor(e={}){this.tier="Basic",this.minEne=0,this.maxEne=100,this.minHap=0,this.maxHap=100,this.maxMor=100,this.employees=[],this.employeeProd={[a.EmployeePositions.Operations]:0,[a.EmployeePositions.Engineer]:0,[a.EmployeePositions.Business]:0,[a.EmployeePositions.Management]:0,[a.EmployeePositions.RandD]:0,total:0},this.loc=e.loc?e.loc:"",this.cost=e.cost?e.cost:1,this.size=e.size?e.size:1,this.comf=e.comfort?e.comfort:1,this.beau=e.beauty?e.beauty:1}atCapacity(){return this.employees.length>=this.size}process(e=1,t,n){if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&void 0!==e&&(e.pos=a.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);let r=1;t.funds<0&&n.lastCycleRevenue<0?r=Math.pow(.99,e):t.funds>0&&n.lastCycleRevenue>0&&(r=Math.pow(1.01,e));const i=n.hasResearch("AutoBrew"),o=n.hasResearch("AutoPartyManager");let s=0;for(let t=0;t<this.employees.length;++t){const n=this.employees[t];o?(n.mor=this.maxMor,n.hap=this.maxHap):(n.mor*=r,n.hap*=r,n.mor=Math.min(n.mor,this.maxMor),n.hap=Math.min(n.hap,this.maxHap)),i?n.ene=this.maxEne:(n.ene*=r,n.ene=Math.min(n.ene,this.maxEne)),s+=n.process(e,this)}return this.calculateEmployeeProductivity(t,n),s}calculateEmployeeProductivity(e,t){for(const e in this.employeeProd)this.employeeProd[e]=0;let n=0;for(let a=0;a<this.employees.length;++a){const r=this.employees[a],i=r.calculateProductivity(e,t);this.employeeProd[r.pos]+=i,n+=i}this.employeeProd.total=n}hireRandomEmployee(){if(this.atCapacity())return;if(null!=document.getElementById("cmpy-mgmt-hire-employee-popup"))return;const e=i.getRandomInt(76,100)/100,t=i.getRandomInt(50,100),n=i.getRandomInt(50,100),a=i.getRandomInt(50,100),s=i.getRandomInt(50,100),c=i.getRandomInt(50,100),u=r.CorporationConstants.EmployeeSalaryMultiplier*(t+n+a+s+c),m=new l.Employee({intelligence:t*e,charisma:n*e,experience:a*e,creativity:s*e,efficiency:c*e,salary:u*e}),p=o.generateRandomString(7);for(let e=0;e<this.employees.length;++e)if(this.employees[e].name===p)return this.hireRandomEmployee();return m.name=p,this.employees.push(m),m}assignEmployeeToJob(e){for(let t=0;t<this.employees.length;++t)if(this.employees[t].pos===a.EmployeePositions.Unassigned)return this.employees[t].pos=e,!0;return!1}unassignEmployeeFromJob(e){for(let t=0;t<this.employees.length;++t)if(this.employees[t].pos===e)return this.employees[t].pos=a.EmployeePositions.Unassigned,!0;return!1}toJSON(){return s.Generic_toJSON("OfficeSpace",this)}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}}t.OfficeSpace=c,s.Reviver.constructors.OfficeSpace=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=void 0,t.removeElement=function(e){if(null!==e)if(e instanceof Element){for(;null!==e.firstChild;)e.removeChild(e.firstChild);null!==e.parentNode&&e.parentNode.removeChild(e)}else console.debug("The element passed into 'removeElement' was not an instance of an Element.");else console.debug("The element passed into 'removeElement' was null.")}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFiles=void 0;const a=n(1037);t.SourceFiles={},t.SourceFiles.SourceFile1=new a.SourceFile(1,"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.SourceFiles.SourceFile2=new a.SourceFile(2,"This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.SourceFiles.SourceFile3=new a.SourceFile(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile4=new a.SourceFile(4,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File opens up more of the Singularity Functions you can use."),t.SourceFiles.SourceFile5=new a.SourceFile(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() and getServer() Netscript functions, as well as the formulas API, and will raise all of your hacking-related multipliers by:<br><br> Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile6=new a.SourceFile(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile7=new a.SourceFile(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile8=new a.SourceFile(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.SourceFiles.SourceFile9=new a.SourceFile(9,"This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.SourceFiles.SourceFile10=new a.SourceFile(10,"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.SourceFiles.SourceFile11=new a.SourceFile(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br><br>It also reduces the price increase for every aug bought by:<br><br>Level 1: 4%<br>Level 2: 6%<br>Level 3: 7%"),t.SourceFiles.SourceFile12=new a.SourceFile(12,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((a=a.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Script=void 0;const r=n(502),i=n(18),o=n(77),s=n(29),l=n(303);let c=0;class u{constructor(e="",t="",n="",a=[]){this.code="",this.filename="",this.url="",this.module="",this.dependencies=[],this.ramUsage=0,this.server="",this.filename=e,this.code=t,this.ramUsage=0,this.server=n,this.module="",this.moduleSequenceNumber=++c,""!==this.code&&this.updateRamUsage(a)}download(){const e=this.filename+".js",t=new Blob([this.code],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const n=document.createElement("a"),a=URL.createObjectURL(t);n.href=a,n.download=e,document.body.appendChild(n),n.click(),o.setTimeoutRef(function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)},0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++c}saveScript(e,t,n){if(i.routing.isOn(i.Page.ScriptEditor)){this.code=e.replace(/^\s+|\s+$/g,"");const a=document.getElementById("script-editor-filename");if(null==a)return void console.error("Failed to get Script filename DOM element");this.filename=a.value,this.server=t,this.updateRamUsage(n),this.markUpdated()}}updateRamUsage(e){return a(this,void 0,void 0,function*(){const t=yield r.calculateRamUsage(this.code,e);t>0&&(this.ramUsage=l.roundToTwo(t))})}toJSON(){return s.Generic_toJSON("Script",this)}static fromJSON(e){return s.Generic_fromJSON(u,e.data)}}t.Script=u,s.Reviver.constructors.Script=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOffset=void 0,t.addOffset=function(e,t){if(t<0||t>100)return e;const n=e*(t/100);return e+(Math.random()*(2*n)-n)}},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrades=void 0;const a=n(1133),r=n(1132);function i(e){t.HashUpgrades[e.name]=new a.HashUpgrade(e)}t.HashUpgrades={};for(const e of r.HashUpgradesMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveTaskType=void 0,function(e){e[e.Idle=0]="Idle",e[e.Company=1]="Company",e[e.Faction=2]="Faction",e[e.Crime=3]="Crime",e[e.Class=4]="Class",e[e.Gym=5]="Gym",e[e.Recovery=6]="Recovery",e[e.Synchro=7]="Synchro"}(t.SleeveTaskType||(t.SleeveTaskType={}))},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStockMarket4STixApiCost=t.getStockMarket4SDataCost=t.getStockMarketTixApiCost=t.getStockMarketAccountCost=void 0;const a=n(19),r=n(11);t.getStockMarketAccountCost=function(){return r.CONSTANTS.WSEAccountCost},t.getStockMarketTixApiCost=function(){return r.CONSTANTS.TIXAPICost},t.getStockMarket4SDataCost=function(){return r.CONSTANTS.MarketData4SCost*a.BitNodeMultipliers.FourSigmaMarketDataCost},t.getStockMarket4STixApiCost=function(){return r.CONSTANTS.MarketDataTixApi4SCost*a.BitNodeMultipliers.FourSigmaMarketDataApiCost}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findCrime=t.determineCrimeSuccess=void 0;const a=n(170),r=n(13);t.determineCrimeSuccess=function(e,t){let n=0,i=!1;for(const r in a.Crimes){const o=a.Crimes[r];if(o.type==t){n=o.successRate(e),i=!0;break}}return i?Math.random()<=n:(r.dialogBoxCreate(`ERR: Unrecognized crime type: ${t} This is probably a bug please contact the developer`,!1),!1)},t.findCrime=function(e){return e.includes("shoplift")?a.Crimes.Shoplift:e.includes("rob")&&e.includes("store")?a.Crimes.RobStore:e.includes("mug")?a.Crimes.Mug:e.includes("larceny")?a.Crimes.Larceny:e.includes("drugs")?a.Crimes.DealDrugs:e.includes("bond")&&e.includes("forge")?a.Crimes.BondForgery:e.includes("traffick")&&e.includes("arms")?a.Crimes.TraffickArms:e.includes("homicide")?a.Crimes.Homicide:e.includes("grand")&&e.includes("auto")?a.Crimes.GrandTheftAuto:e.includes("kidnap")?a.Crimes.Kidnap:e.includes("assassinate")?a.Crimes.Assassination:e.includes("heist")?a.Crimes.Heist:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScript=void 0;const a=n(1128),r=n(10),i=n(20);t.WorkerScript=class{constructor(e,t,n){this.code="",this.delay=null,this.disableLogs={},this.dynamicLoadedFns={},this.dynamicRamUsage=r.RamCostConstants.ScriptBaseRamCost,this.errorMessage="",this.loadedFns={},this.output="",this.ramUsage=0,this.running=!1,this.name=e.filename,this.serverIp=e.server;const o=Math.round(t);if("number"!=typeof o||isNaN(o))throw new Error(`Invalid PID when constructing WorkerScript: ${t}`);this.pid=o,e.pid=o;const s=i.AllServers[this.serverIp];if(null==s)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);let l=!1;for(let e=0;e<s.scripts.length;++e)s.scripts[e].filename===this.name&&(l=!0,this.code=s.scripts[e].code);if(!l)throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);this.env=new a.Environment(null),"function"==typeof n&&(this.env.vars=n(this)),this.env.set("args",e.args.slice()),this.scriptRef=e,this.args=e.args.slice()}getServer(){const e=i.AllServers[this.serverIp];if(null==e)throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);return e}getScript(){const e=this.getServer();for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.name)return e.scripts[t];return console.error("Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong"),null}getScriptOnServer(e,t){null==t&&(t=this.getServer());for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e)return t.scripts[n];return null}shouldLog(e){return null==this.disableLogs[e]}log(e,t){this.shouldLog(e)&&(e&&t?this.scriptRef.log(`${e}: ${t}`):e?this.scriptRef.log(e):this.scriptRef.log(t))}print(e){this.scriptRef.log(e)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsTable=void 0;const o=i(n(0));t.StatsTable=function(e,t){let n=o.createElement(o.Fragment,null);return t&&(n=o.createElement(o.Fragment,null,o.createElement("h2",null,o.createElement("u",null,t)),o.createElement("br",null))),o.createElement(o.Fragment,null,n,o.createElement("table",null,o.createElement("tbody",null,e.map(e=>o.createElement("tr",{key:e[0]},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right",paddingLeft:".25em"}),o.createElement("td",{key:t,style:n},e)}))))))}},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,t.ActionTypes={Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions=void 0,t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WHRNG=t.BadRNG=void 0;t.BadRNG=new class{constructor(){this.m=1024,this.a=341,this.c=1,this.x=0,this.reset()}step(){this.x=(this.a*this.x+this.c)%this.m}random(){return this.step(),this.x/this.m}reset(){this.x=(new Date).getTime()%this.m}};t.WHRNG=class{constructor(e){this.s1=0,this.s2=0,this.s3=0;const t=e/1e3%3e4;this.s1=t,this.s2=t,this.s3=t}step(){this.s1=171*this.s1%30269,this.s2=172*this.s2%30307,this.s3=170*this.s3%30323}random(){return this.step(),(this.s1/30269+this.s2/30307+this.s3/30323)%1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StockSymbols=void 0;const a=n(41);t.StockSymbols={},t.StockSymbols[a.LocationName.AevumECorp]="ECP",t.StockSymbols[a.LocationName.Sector12MegaCorp]="MGCP",t.StockSymbols[a.LocationName.Sector12BladeIndustries]="BLD",t.StockSymbols[a.LocationName.AevumClarkeIncorporated]="CLRK",t.StockSymbols[a.LocationName.VolhavenOmniTekIncorporated]="OMTK",t.StockSymbols[a.LocationName.Sector12FourSigma]="FSIG",t.StockSymbols[a.LocationName.ChongqingKuaiGongInternational]="KGI",t.StockSymbols[a.LocationName.AevumFulcrumTechnologies]="FLCM",t.StockSymbols[a.LocationName.IshimaStormTechnologies]="STM",t.StockSymbols[a.LocationName.NewTokyoDefComm]="DCOMM",t.StockSymbols[a.LocationName.VolhavenHeliosLabs]="HLS",t.StockSymbols[a.LocationName.NewTokyoVitaLife]="VITA",t.StockSymbols[a.LocationName.Sector12IcarusMicrosystems]="ICRS",t.StockSymbols[a.LocationName.Sector12UniversalEnergy]="UNV",t.StockSymbols[a.LocationName.AevumAeroCorp]="AERO",t.StockSymbols[a.LocationName.VolhavenOmniaCybersystems]="OMN",t.StockSymbols[a.LocationName.ChongqingSolarisSpaceSystems]="SLRS",t.StockSymbols[a.LocationName.NewTokyoGlobalPharmaceuticals]="GPH",t.StockSymbols[a.LocationName.IshimaNovaMedical]="NVMD",t.StockSymbols[a.LocationName.AevumWatchdogSecurity]="WDS",t.StockSymbols[a.LocationName.VolhavenLexoCorp]="LXO",t.StockSymbols[a.LocationName.AevumRhoConstruction]="RHOC",t.StockSymbols[a.LocationName.Sector12AlphaEnterprises]="APHE",t.StockSymbols[a.LocationName.VolhavenSysCoreSecurities]="SYSC",t.StockSymbols[a.LocationName.VolhavenCompuTek]="CTK",t.StockSymbols[a.LocationName.AevumNetLinkTechnologies]="NTLK",t.StockSymbols[a.LocationName.IshimaOmegaSoftware]="OMGA",t.StockSymbols[a.LocationName.Sector12FoodNStuff]="FNS",t.StockSymbols["Sigma Cosmetics"]="SGC",t.StockSymbols["Joes Guns"]="JGN",t.StockSymbols["Catalyst Ventures"]="CTYS",t.StockSymbols["Microdyne Technologies"]="MDYN",t.StockSymbols["Titan Laboratories"]="TITN"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberTasks=void 0;const a=n(1125),r=n(702);t.GangMemberTasks={},a.gangMemberTasksMetadata.forEach(e=>{t.GangMemberTasks[e.name]=new r.GangMemberTask(e.name,e.desc,e.isHacking,e.isCombat,e.params)})},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPosition=void 0;const o=n(11),s=i(n(58));t.CompanyPosition=class{constructor(e){this.name=e.name,this.nextPosition=e.nextPosition,this.baseSalary=e.baseSalary,this.repMultiplier=e.repMultiplier,this.requiredHacking=null!=e.reqdHacking?e.reqdHacking:0,this.requiredStrength=null!=e.reqdStrength?e.reqdStrength:0,this.requiredDefense=null!=e.reqdDefense?e.reqdDefense:0,this.requiredDexterity=null!=e.reqdDexterity?e.reqdDexterity:0,this.requiredAgility=null!=e.reqdAgility?e.reqdAgility:0,this.requiredCharisma=null!=e.reqdCharisma?e.reqdCharisma:0,this.requiredReputation=null!=e.reqdReputation?e.reqdReputation:0,this.hackingEffectiveness=null!=e.hackingEffectiveness?e.hackingEffectiveness:0,this.strengthEffectiveness=null!=e.strengthEffectiveness?e.strengthEffectiveness:0,this.defenseEffectiveness=null!=e.defenseEffectiveness?e.defenseEffectiveness:0,this.dexterityEffectiveness=null!=e.dexterityEffectiveness?e.dexterityEffectiveness:0,this.agilityEffectiveness=null!=e.agilityEffectiveness?e.agilityEffectiveness:0,this.charismaEffectiveness=null!=e.charismaEffectiveness?e.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=e.hackingExpGain?e.hackingExpGain:0,this.strengthExpGain=null!=e.strengthExpGain?e.strengthExpGain:0,this.defenseExpGain=null!=e.defenseExpGain?e.defenseExpGain:0,this.dexterityExpGain=null!=e.dexterityExpGain?e.dexterityExpGain:0,this.agilityExpGain=null!=e.agilityExpGain?e.agilityExpGain:0,this.charismaExpGain=null!=e.charismaExpGain?e.charismaExpGain:0}calculateJobPerformance(e,t,n,a,r,i){const s=this.hackingEffectiveness*e/o.CONSTANTS.MaxSkillLevel,l=this.strengthEffectiveness*t/o.CONSTANTS.MaxSkillLevel,c=this.defenseEffectiveness*n/o.CONSTANTS.MaxSkillLevel,u=this.dexterityEffectiveness*a/o.CONSTANTS.MaxSkillLevel,m=this.agilityEffectiveness*r/o.CONSTANTS.MaxSkillLevel,p=this.charismaEffectiveness*i/o.CONSTANTS.MaxSkillLevel;let d=this.repMultiplier*(s+l+c+u+m+p)/100;return isNaN(d)&&(console.error("Company reputation gain calculated to be NaN"),d=0),d}isSoftwareJob(){return s.SoftwareCompanyPositions.includes(this.name)}isITJob(){return s.ITCompanyPositions.includes(this.name)}isSecurityEngineerJob(){return s.SecurityEngineerCompanyPositions.includes(this.name)}isNetworkEngineerJob(){return s.NetworkEngineerCompanyPositions.includes(this.name)}isBusinessJob(){return s.BusinessCompanyPositions.includes(this.name)}isSecurityJob(){return s.SecurityCompanyPositions.includes(this.name)}isAgentJob(){return s.AgentCompanyPositions.includes(this.name)}isSoftwareConsultantJob(){return s.SoftwareConsultantCompanyPositions.includes(this.name)}isBusinessConsultantJob(){return s.BusinessConsultantCompanyPositions.includes(this.name)}isPartTimeJob(){return s.PartTimeCompanyPositions.includes(this.name)}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateBuyMaxAmount=t.processTransactionForecastMovement=t.getSellTransactionGain=t.getBuyTransactionCost=t.forecastChangePerPriceMovement=void 0;const a=n(193),r=n(98),i=n(11);t.forecastChangePerPriceMovement=.006,t.getBuyTransactionCost=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof a.Stock)?null:(t=Math.min(t,e.maxShares),n===r.PositionTypes.Long?t*e.getAskPrice()+i.CONSTANTS.StockMarketCommission:t*e.getBidPrice()+i.CONSTANTS.StockMarketCommission)},t.getSellTransactionGain=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof a.Stock)?null:(t=Math.min(t,e.maxShares),n===r.PositionTypes.Long?t*e.getBidPrice()-i.CONSTANTS.StockMarketCommission:t*e.playerAvgShortPx+((e.playerAvgShortPx-e.getAskPrice())*t-i.CONSTANTS.StockMarketCommission))},t.processTransactionForecastMovement=function(e,n){if(isNaN(n)||n<=0||!(e instanceof a.Stock))return;n=Math.min(n,e.maxShares);const r=e.shareTxUntilMovement;if(n<=r)return e.shareTxUntilMovement-=n,void(e.shareTxUntilMovement<=0&&(e.shareTxUntilMovement=e.shareTxForMovement,e.influenceForecast(t.forecastChangePerPriceMovement),e.influenceForecastForecast(t.forecastChangePerPriceMovement*(e.mv/100))));const i=n-r;let o=1+Math.ceil(i/e.shareTxForMovement);e.shareTxUntilMovement=e.shareTxForMovement-(n-e.shareTxUntilMovement)%e.shareTxForMovement,(e.shareTxUntilMovement===e.shareTxForMovement||e.shareTxUntilMovement<=0)&&(++o,e.shareTxUntilMovement=e.shareTxForMovement);const s=t.forecastChangePerPriceMovement*(o-1),l=s*(e.mv/100);e.influenceForecast(s),e.influenceForecastForecast(l)},t.calculateBuyMaxAmount=function(e,t,n){if(!(e instanceof a.Stock))return 0;const o=t===r.PositionTypes.Long,s=n-i.CONSTANTS.StockMarketCommission,l=o?e.getAskPrice():e.getBidPrice();return Math.floor(s/l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItems=void 0;const a=n(1126),r=n(30);t.DarkWebItems={BruteSSHProgram:new a.DarkWebItem(r.Programs.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new a.DarkWebItem(r.Programs.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new a.DarkWebItem(r.Programs.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new a.DarkWebItem(r.Programs.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new a.DarkWebItem(r.Programs.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new a.DarkWebItem(r.Programs.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new a.DarkWebItem(r.Programs.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new a.DarkWebItem(r.Programs.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'"),ServerProfilerProgram:new a.DarkWebItem(r.Programs.ServerProfiler.name,1e6,"Displays hacking and Netscript-related information about a server")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=void 0,t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.influenceStockThroughCompanyWork=t.influenceStockThroughServerGrow=t.influenceStockThroughServerHack=t.forecastForecastChangeFromCompanyWork=t.forecastForecastChangeFromHack=void 0;const a=n(193),r=n(48);t.forecastForecastChangeFromHack=.1,t.forecastForecastChangeFromCompanyWork=.001,t.influenceStockThroughServerHack=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=r.StockMarket[i]),!(o instanceof a.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast-t.forecastForecastChangeFromHack)},t.influenceStockThroughServerGrow=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=r.StockMarket[i]),!(o instanceof a.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast+t.forecastForecastChangeFromHack)},t.influenceStockThroughCompanyWork=function(e,n,i){const o=e.name;let s=null;if("string"==typeof o&&""!==o&&(s=r.StockMarket[o]),s instanceof a.Stock&&Math.random()<.002*i){const e=t.forecastForecastChangeFromCompanyWork*n;s.changeForecastForecast(s.otlkMagForecast+e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Gang=void 0;const a=n(126),r=n(17),i=n(13),o=n(29),s=n(90),l=n(44),c=n(703),u=n(11),m=n(297),p=n(86),d=n(1124);class h{constructor(e="",t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}getPower(){return p.AllGangs[this.facName].power}getTerritory(){return p.AllGangs[this.facName].territory}process(e=1,t){const n=1e3/u.CONSTANTS._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const a=Math.min(this.storedCycles,5*n);try{this.processGains(a,t),this.processExperienceGains(a),this.processTerritoryAndPowerGains(a),this.storedCycles-=a}catch(e){console.error(`Exception caught when processing Gang: ${e}`)}}processGains(e=1,t){let n=0,o=0,s=0,l=0;for(let e=0;e<this.members.length;++e){o+=this.members[e].calculateRespectGain(this),n+=this.members[e].calculateMoneyGain(this),s+=this.members[e].calculateWantedLevelGain(this),this.members[e].getTask().baseWanted<0&&l++}this.respectGainRate=o,this.wantedGainRate=s,this.moneyGainRate=n;const u=o*e;this.respect+=u;const m=r.Factions[this.facName];if(!(m instanceof a.Faction))throw i.dialogBoxCreate("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev"),new Error("Could not find the faction associated with this gang.");const p=1+m.favor/100;m.playerReputation+=t.faction_rep_mult*u*p/c.GangConstants.GangRespectToReputationRatio;for(let t=0;t<this.members.length;++t)this.members[t].recordEarnedRespect(e,this);if(!(1===this.wanted&&s<0)){const t=this.wanted;let n=t+s*e;n*=1-.001*l,s<=0&&n>t&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}t.gainMoney(n*e),t.recordMoneySource(n*e,"gang")}processTerritoryAndPowerGains(e=1){if(this.storedTerritoryAndPowerCycles+=e,this.storedTerritoryAndPowerCycles<c.GangConstants.CyclesPerTerritoryAndPowerUpdate)return;this.storedTerritoryAndPowerCycles-=c.GangConstants.CyclesPerTerritoryAndPowerUpdate;const t=this.facName;for(const e in p.AllGangs)if(p.AllGangs.hasOwnProperty(e))if(e==t)p.AllGangs[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*p.AllGangs[e].power;p.AllGangs[e].power+=Math.min(.85,t)}else{const n=.75*t*p.AllGangs[e].territory;p.AllGangs[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(let e=0;e<c.GangConstants.Names.length;++e){const a=c.GangConstants.Names.filter(t=>t!==c.GangConstants.Names[e]),r=l.getRandomInt(0,a.length-1),i=c.GangConstants.Names[e],o=a[r];if(!(i!==t&&o!==t||Math.random()<this.territoryClashChance))continue;const s=p.AllGangs[i].power,u=s/(s+p.AllGangs[o].power);function n(e,t){const n=Math.max(1,1+Math.log(p.AllGangs[e].power/p.AllGangs[t].power)/Math.log(50));return Math.min(p.AllGangs[t].territory,1e-4*n*(Math.random()+.5))}if(Math.random()<u){if(p.AllGangs[o].territory<=0)return;const e=n(i,o);p.AllGangs[i].territory+=e,p.AllGangs[o].territory-=e,i===t?(this.clash(!0),p.AllGangs[o].power*=1/1.01):o===t?this.clash(!1):p.AllGangs[o].power*=1/1.01}else{if(p.AllGangs[i].territory<=0)return;const e=n(o,i);p.AllGangs[i].territory-=e,p.AllGangs[o].territory+=e,i===t?this.clash(!1):o===t?(this.clash(!0),p.AllGangs[i].power*=1/1.01):p.AllGangs[i].power*=1/1.01}}}processExperienceGains(e=1){for(let t=0;t<this.members.length;++t)this.members[t].gainExperience(e),this.members[t].updateSkillLevels()}clash(e=!1){let t=.01;if(e?t/=2:p.AllGangs[this.facName].power*=1/1.008,!(Math.random()<.65))for(let e=this.members.length-1;e>=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const a=t/Math.pow(n.def,.6);Math.random()<a&&this.killMember(n)}}canRecruitMember(){return!(this.members.length>=c.GangConstants.MaximumGangMembers)&&this.respect>=this.getRespectNeededToRecruitMember()}getRespectNeededToRecruitMember(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.pow(5,e)}recruitMember(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;const t=new d.GangMember(e);return this.members.push(t),!0}getWantedPenalty(){return this.respect/(this.respect+this.wanted)}calculatePower(){let e=0;for(let t=0;t<this.members.length;++t)m.GangMemberTasks.hasOwnProperty(this.members[t].task)&&"Territory Warfare"===this.members[t].task&&(e+=this.members[t].calculatePower());return.015*Math.max(.002,this.getTerritory())*e}killMember(e){const t=this.respect,n=.05*t+e.earnedRespect;this.respect=Math.max(0,t-n);for(let t=0;t<this.members.length;++t)if(e.name===this.members[t].name){this.members.splice(t,1);break}this.notifyMemberDeath&&i.dialogBoxCreate(`${e.name} was killed in a gang clash! You lost ${n} respect`)}ascendMember(e,t){try{const n=e.ascend();return this.respect=Math.max(1,this.respect-n.respect),t&&t.log("ascend",`Ascended Gang member ${e.name}`),n}catch(e){throw null==t&&s.exceptionAlert(e),e}}getDiscount(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)}getAllTaskNames(){return Object.keys(m.GangMemberTasks).filter(e=>{const t=m.GangMemberTasks[e];return null!=t&&("Unassigned"!==t.name&&(this.isHackingGang===t.isHacking||!this.isHackingGang===t.isCombat))})}getUpgradeCost(e){return null==e?1/0:e.cost/this.getDiscount()}toJSON(){return o.Generic_toJSON("Gang",this)}static fromJSON(e){return o.Generic_fromJSON(h,e.data)}}t.Gang=h,o.Reviver.constructors.Gang=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetPidCounter=t.generateNextPid=void 0;const a=n(111);let r=1;t.generateNextPid=function(){let e=r,t=!1;for(let n=0;n<1e6;){if(!a.workerScripts.has(e+n)){t=!0,e+=n;break}n===Number.MAX_SAFE_INTEGER-1?n=1:++n}return t?((r=e+1)>=Number.MAX_SAFE_INTEGER&&(r=1),e):-1},t.resetPidCounter=function(){r=1}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var a=n(1);e(document).click(function(t){r&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var r=!1;function i(){r=!1,document.getElementById("game-options-container").style.display="none"}function o(){document.getElementById("game-options-container").style.display="flex",document.getElementById("settingsSuppressBladeburnerPopup").closest("fieldset").style.display=a.Player.canAccessBladeburner()?"block":"none",setTimeout(function(){r=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return o(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(145))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var a=n(30),r=n(1),i=n(52);const o={};function s(){for(const e in o){const t=a.Programs[e];o[e].style.display="none",!r.Player.hasProgram(t.name)&&t.create.req(r.Player)&&(o[e].style.display="inline-block")}}function l(){var e=0;for(const t in a.Programs)null!=a.Programs[t].create&&(r.Player.hasProgram(a.Programs[t].name)||a.Programs[t].create.req(r.Player)&&e++);return!1===r.Player.firstProgramAvailable&&e>0&&(r.Player.firstProgramAvailable=!0,document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function c(){const e=document.getElementById("create-program-list");for(const t in a.Programs){if(null===a.Programs[t].create)continue;const n=Object(i.createElement)("a",{class:"a-link-button",id:a.Programs[t].htmlID(),innerText:a.Programs[t].name,tooltip:a.Programs[t].create.tooltip});o[t]=n,e.appendChild(n)}for(const e in o){const t=a.Programs[e];o[e].addEventListener("click",function(){return r.Player.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},,function(e,t,n){"use strict";function a(e,t){const n=e.hostname;return"requiredHackingSkill"in e?!1===e.hasAdminRights?{res:!1,msg:`Cannot ${t} ${n} server because you do not have root access`}:{res:!0}:{res:!1,msg:`Cannot ${t} ${n} server because it is a Hacknet Node`}}Object.defineProperty(t,"__esModule",{value:!0}),t.netscriptCanWeaken=t.netscriptCanGrow=t.netscriptCanHack=void 0,t.netscriptCanHack=function(e,t){const n=a(e,"hack");return n.res?e.requiredHackingSkill>t.hacking_skill?{res:!1,msg:`Cannot hack ${e.hostname} server because your hacking skill is not high enough`}:{res:!0}:n},t.netscriptCanGrow=function(e){return a(e,"grow")},t.netscriptCanWeaken=function(e){return a(e,"weaken")}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const o=i(n(0)),s=n(13),l=1e10;t.Game=class extends o.Component{win(e,t){e.gainMoney(t),e.recordMoneySource(t,"casino")}reachedLimit(e){const t=e.getCasinoWinnings()>l;return t&&s.dialogBoxCreate(o.createElement(o.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),t}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseTorRouter=t.createUpgradeHomeCoresPopup=t.createStartCorporationPopup=t.createPurchaseServerPopup=t.createTravelPopup=void 0;const o=n(11),s=n(20),l=n(23),c=n(127),u=n(38),m=n(25),p=n(6),d=n(21),h=n(13),f=n(63),g=n(52),y=n(147),_=n(481),b=n(96),v=i(n(0));t.createTravelPopup=function(e,t){const n=o.CONSTANTS.TravelCost;if(m.Settings.SuppressTravelConfirmation)return void t(e);const a=f.yesNoBoxGetYesButton(),r=f.yesNoBoxGetNoButton();null!=a&&null!=r?(a.innerHTML="Yes",a.addEventListener("click",()=>(f.yesNoBoxClose(),t(e),!1)),r.innerHTML="No",r.addEventListener("click",()=>(f.yesNoBoxClose(),!1)),f.yesNoBoxCreate(v.createElement("span",null,"Would you like to travel to ",e,"? The trip will cost ",v.createElement(d.Money,{money:n}),"."))):console.warn("Could not find YesNo pop-up box buttons")},t.createPurchaseServerPopup=function(e,t){const n=c.getPurchaseServerCost(e);if(n===1/0)return void h.dialogBoxCreate("Something went wrong when trying to purchase this server. Please contact developer.");const a=f.yesNoTxtInpBoxGetYesButton(),r=f.yesNoTxtInpBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase Server",r.innerHTML="Cancel",a.addEventListener("click",function(){c.purchaseServer(e,t),f.yesNoTxtInpBoxClose()}),r.addEventListener("click",function(){f.yesNoTxtInpBoxClose()}),f.yesNoTxtInpBoxCreate(v.createElement(v.Fragment,null,"Would you like to purchase a new server with ",p.numeralWrapper.formatRAM(e)," of RAM for ",v.createElement(d.Money,{money:n,player:t}),"?",v.createElement("br",null),v.createElement("br",null),"Please enter the server hostname below:",v.createElement("br",null))))},t.createStartCorporationPopup=function(e){if(!e.canAccessCorporation()||e.hasCorporation())return;const t="create-corporation-popup",n=g.createElement("p",{innerHTML:"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares<br><br>If you would like to start one, please enter a name for your corporation below:"}),a=g.createElement("input",{class:"text-input",placeholder:"Corporation Name"}),r=g.createElement("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(!e.canAfford(15e10))return h.dialogBoxCreate("You don't have enough money to create a corporation! You need $150b."),!1;const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n),e.loseMoney(15e10);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),i=g.createElement("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n,5e8);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),o=_.createPopupCloseButton(t,{class:"popup-box-button"});y.createPopup(t,[n,a,o,r,i]),a.focus()},t.createUpgradeHomeCoresPopup=function(e){const t=e.getHomeComputer().cpuCores;if(t>=8)return void h.dialogBoxCreate(v.createElement(v.Fragment,null,"You have the maximum amount of CPU cores on your home computer."));const n=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17][t],a=f.yesNoBoxGetYesButton(),r=f.yesNoBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase",a.addEventListener("click",()=>{e.canAfford(n)?(e.loseMoney(n),e.getHomeComputer().cpuCores++,h.dialogBoxCreate("You purchased an additional CPU Core for your home computer! It now has "+e.getHomeComputer().cpuCores+" cores.")):h.dialogBoxCreate("You do not have enough money to purchase an additional CPU Core for your home computer!"),f.yesNoBoxClose()}),r.innerHTML="Cancel",r.addEventListener("click",()=>{f.yesNoBoxClose()}),f.yesNoBoxCreate(v.createElement(v.Fragment,null,"Would you like to purchase an additional CPU Core for your home computer? Each CPU Core lets you start with an additional Core Node in Hacking Missions.",v.createElement("br",null),v.createElement("br",null),"Purchasing an additional core (for a total of ",e.getHomeComputer().cpuCores+1,") will cost ",v.createElement(d.Money,{money:n,player:e}))))},t.purchaseTorRouter=function(e){if(e.hasTorRouter())return void h.dialogBoxCreate("You already have a TOR Router!");if(!e.canAfford(o.CONSTANTS.TorRouterCost))return void h.dialogBoxCreate("You cannot afford to purchase the TOR router!");e.loseMoney(o.CONSTANTS.TorRouterCost);const t=l.safetlyCreateUniqueServer({ip:s.createUniqueRandomIp(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});s.AddToAllServers(t),u.SpecialServerIps.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),h.dialogBoxCreate("You have purchased a TOR router!<br>You now have access to the dark web from your home computer.<br>Use the scan/scan-analyze commands to search for the dark web connection.")}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.killIcon=t.stealthIcon=void 0;const o=i(n(0));t.stealthIcon=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},o.createElement("g",null,o.createElement("path",{d:"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"}),o.createElement("path",{d:"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"}))),t.killIcon=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},o.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),o.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),o.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),o.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButtonPurchased=void 0;const o=i(n(0));t.StdButtonPurchased=class extends o.Component{constructor(e){super(e),this.hasTooltip=this.hasTooltip.bind(this),this.tooltip=this.tooltip.bind(this)}hasTooltip(){return null!=this.props.tooltip&&""!==this.props.tooltip}tooltip(){return this.props.tooltip?this.props.tooltip:""}render(){let e="std-button-bought";this.hasTooltip()&&(e+=" tooltip");let t={__html:""};return this.hasTooltip()&&(t={__html:this.tooltip()}),o.createElement("button",{className:e,onClick:this.props.onClick,style:this.props.style},this.props.text,this.hasTooltip()&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t}))}}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomIp=void 0;const a=n(1134);t.createRandomIp=function(){return a.getRandomByte(99)+"."+a.getRandomByte(9)+"."+a.getRandomByte(9)+"."+a.getRandomByte(9)}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialSizes=void 0,t.MaterialSizes={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0,"Real Estate":0,"AI Cores":0}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locations=void 0;const a=n(1036),r=n(195),i=n(1035),o=n(43),s=n(1034);function l(e){if(!e.name)throw new Error("Invalid constructor parameters for Location. No 'name' property");return t.Locations[e.name]instanceof i.Location&&console.warn(`Property with name ${e.name} already exists and is being overwritten`),t.Locations[e.name]=new i.Location(e),t.Locations[e.name]}t.Locations={},r.Cities[o.CityName.Aevum]=new a.City(o.CityName.Aevum),r.Cities[o.CityName.Chongqing]=new a.City(o.CityName.Chongqing),r.Cities[o.CityName.Ishima]=new a.City(o.CityName.Ishima),r.Cities[o.CityName.NewTokyo]=new a.City(o.CityName.NewTokyo),r.Cities[o.CityName.Sector12]=new a.City(o.CityName.Sector12),r.Cities[o.CityName.Volhaven]=new a.City(o.CityName.Volhaven),r.Cities[o.CityName.Aevum].asciiArt="\n [aevum police headquarters] 26 \n o \n I \\ [bachman & associates] \n \\ 56 B \n x \\ [summit university] \n \\ \\ 28 \n \\ [snap fitness gym] x o--L-----------N \n K \\ / \n \\ \\ Q [casino] \n x 58 \\ / [travel agency] \n \\ 94 95 o \n 90 x 59 o------o | \n \\ / \\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\ | \\ / \n [hospital] \\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\ [rho construction] \n H [netlink tech.] | J \n | | \\ \n | 34 x \\ \n [clarke inc.] C | \\ [world stock exchange] \n | | \\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P ",r.Cities[o.CityName.Chongqing].asciiArt="\n | \n 75 o \n \\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\ o 78 [kuaigong international] \n \\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D ",r.Cities[o.CityName.Ishima].asciiArt="\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\ x 57 \n / / | \\ | \n / / | \\ | \n o 22 o | \\| 29/56 \n | | o \n | [hospital] D / \\ 3 2 1 \n o | / \\ o-------x------o \n / o / \\ / \n 48 o / 55 x \\ / \n \\ / / x \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ \n / \\ / \\ \n / \\ [travel agency] F o 31 \n / \\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E ",r.Cities[o.CityName.NewTokyo].asciiArt="\n \n \n o \n \\ \n \\ [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\ 24 25 26 27 \n \\ \n [noodle bar] x 14 \n \\ \n \\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n ",r.Cities[o.CityName.Sector12].asciiArt="\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\ | \\ / \n | \\ | [iron gym] x 95 \n (79) x \\ | / \\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\ / \n | C [cia] \\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\ \n | o------------o 34 / \\ \n (29) | / [carmichael sec.] D \\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] ",r.Cities[o.CityName.Volhaven].asciiArt="\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\ / \\ \n \\ o 65 o 69 \n [syscore sec.] H | | \n \\ | | [millenium fitness gym] \n \\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K ";for(const e of s.LocationsMetadata){const t=l(e),n=t.city;if(null===n)for(const e in r.Cities)r.Cities[e].addLocation(t.name);else r.Cities[n].addLocation(t.name)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestamp=void 0,t.getTimestamp=function(){const e=new Date,t=`0${e.getHours()}`.slice(-2),n=`0${e.getMinutes()}`.slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${n}`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionWorkType=void 0,function(e){e[e.Field=0]="Field",e[e.Hacking=1]="Hacking",e[e.None=2]="None",e[e.Security=3]="Security"}(t.FactionWorkType||(t.FactionWorkType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateIntelligenceBonus=void 0,t.calculateIntelligenceBonus=function(e,t=1){return 1+t*Math.pow(e,.8)/600}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateHospitalizationCost=t.getHospitalizationCost=void 0;const a=n(11);function r(e){let t;return(t="number"==typeof e.money?e.money:e.money.toNumber())<0?0:Math.min(.1*t,(e.max_hp-e.hp)*a.CONSTANTS.HospitalCostPerHp)}t.getHospitalizationCost=r,t.calculateHospitalizationCost=function(e,t){const n=e.hp;e.hp-=t;const a=r(e);return e.hp=n,a}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReputationRate=void 0;const a=n(6),r=n(60);t.ReputationRate=function(e){return r.Reputation(`${a.numeralWrapper.formatReputation(e)} / sec`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJobRequirementText=void 0,t.getJobRequirementText=function(e,t,n=!1){let a="";const r=e.jobStatReqOffset,i=t.requiredHacking>0?t.requiredHacking+r:0,o=t.requiredStrength>0?t.requiredStrength+r:0,s=t.requiredDefense>0?t.requiredDefense+r:0,l=t.requiredDexterity>0?t.requiredDexterity+r:0,c=t.requiredDexterity>0?t.requiredDexterity+r:0,u=t.requiredCharisma>0?t.requiredCharisma+r:0,m=t.requiredReputation;return n?(a="Requires:<br>",a+=i.toString()+" hacking<br>",a+=o.toString()+" strength<br>",a+=s.toString()+" defense<br>",a+=l.toString()+" dexterity<br>",a+=c.toString()+" agility<br>",a+=u.toString()+" charisma<br>",a+=m.toString()+" reputation"):(a="(Requires ",i>0&&(a+=i+" hacking, "),o>0&&(a+=o+" strength, "),s>0&&(a+=s+" defense, "),l>0&&(a+=l+" dexterity, "),c>0&&(a+=c+" agility, "),u>0&&(a+=u+" charisma, "),m>1&&(a+=m+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedSourceFile=void 0;t.PlayerOwnedSourceFile=class{constructor(e,t){this.lvl=1,this.n=1,this.n=e,this.lvl=t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamUsageFromRunningScript=void 0;const a=n(20);t.getRamUsageFromRunningScript=function(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=a.AllServers[e.server];if(null==t)return 0;for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e.filename)return e.ramUsage=t.scripts[n].ramUsage,e.ramUsage;return 0}},,function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"NetscriptFunctions",function(){return xe});var a=n(474),r=n(460),i=n(10),o=n(151),s=n(12),l=n(80),c=n(174),u=n(3),m=n(19),p=n(252),d=n(93),h=n(140),f=n(32),g=n(298),y=n(53),_=n(11),b=n(302),v=(n(133),n(518),n(517),n(51)),k=n(547),E=n(314),C=n(86),S=n(297),P=n(176),T=n(17),M=n(72),O=n(427),w=n(319),x=n(26),N=n(157),A=n(141),R=n(33),I=n(79),B=n(43),D=n(41),L=n(75),F=n(122),j=n(74),W=n(82),G=n(1),H=n(30),U=n(233),q=n(121),$=n(66),K=n(20),z=n(198),Y=n(23),V=n(127),J=n(38),X=n(37),Q=n(175),Z=n(313),ee=n(48),te=n(301),ne=n(110),ae=n(98),re=n(296),ie=n(251),oe=n(87),se=n(139),le=n(81),ce=n(71),ue=n(111),me=n(68),pe=n(462),de=n(158),he=n(247),fe=n(546),ge=n(169),ye=n(6),_e=n(7),be=n(77),ve=n(838),ke=n(24),Ee=n(155),Ce=n(112),Se=n(73),Pe=n(52),Te=n(147),Me=n(96);const Oe=new pe.a("",()=>void 0);function we(e){if(null==e)return null;if(!(e.hasOwnProperty("properties")&&e.hasOwnProperty("getter")&&e.hasOwnProperty("setter")&&e.hasOwnProperty("proto")))return e;let t;if(e.hasOwnProperty("class")&&"Array"===e.class){t=[];const n=Oe.getProperty(e,"length");for(let a=0;a<n;a++)Oe.hasProperty(e,a)&&(t[a]=we(Oe.getProperty(e,a)))}else for(var n in t={},e.properties){const a=e.properties[n];t[n]=we(a)}return t}function xe(t){const n=function(e,n){if(t.dynamicLoadedFns[e])return;t.dynamicLoadedFns[e]=!0;let a=t.scriptRef.threads;if("number"!=typeof a&&(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.serverIp}`),a=1),t.dynamicRamUsage+=n*a,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(me.b)(t,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+e+". This is probably because you somehow circumvented the static RAM calculation.<br><br>Please don't do that :(<br><br>Dynamic RAM Usage: "+ye.numeralWrapper.formatRAM(t.dynamicRamUsage)+"<br>Static RAM Usage: "+ye.numeralWrapper.formatRAM(t.ramUsage))},pe=function(e,t=""){var n=Object(Y.getServer)(e);if(null==n)throw Le(t,`Invalid IP/hostname: ${e}`);return n},Oe=function(e,n,a,r){if("string"==typeof a&&""!==a||(a="getRunningScript"),!Array.isArray(r))throw Object(me.b)(t,`Invalid scriptArgs argument passed into getRunningScript() from ${a}(). `+"This is probably a bug. Please report to game developer");if(null!=e&&"string"==typeof e){null==n&&(n=t.serverIp);const i=pe(n,a);return Object(q.a)(e,r,i)}return t.scriptRef},Ne=function(e,t){"string"==typeof t&&""!==t||(t="getRunningScriptgetRunningScriptByPid");for(const t of Object.keys(K.AllServers)){const n=K.AllServers[t],a=Object(q.b)(e,n);if(a)return a}return null},Ae=function(e,t,n){return Array.isArray(n)||(n=[]),`Cannot find running script ${e} on server ${t} with args: ${Object(Ce.arrayToString)(n)}`},Re=function(e=""){if(!G.Player.hasWseAccount)throw Le(e,`You don't have WSE Access! Cannot use ${e}()`);if(!G.Player.hasTixApiAccess)throw Le(e,`You don't have TIX API Access! Cannot use ${e}()`)},Ie=function(e,t=""){const n=ee.SymbolToStockMap[e];if(null==n)throw Le(t,`Invalid stock symbol: '${e}'`);return n},Be=function(e,n=""){return e instanceof I.HacknetServer&&(t.log(n,"Does not work on Hacknet Servers"),!0)},De=function(e,t=""){if(isNaN(e))throw Le(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=G.Player.hacknetNodes.length)throw Le(t,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(x.h)()){const n=K.AllServers[G.Player.hacknetNodes[e]];if(null==n)throw Le(t,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return n}return G.Player.hacknetNodes[e]},Le=function(e,n){const a=(new Error).stack.split("\n").slice(1),r=t.getServer().scripts,i=[];for(const e of a){let t;for(const n of r){n.url&&e.includes(n.url)&&(t=n.filename);for(const a of n.dependencies)e.includes(a.url)&&(t=a.filename)}if(!t)continue;function o(e){const t=e.match(/.*:(\d+):\d+.*/),n=e.match(/.*at (.+) \(.*/);return t&&n?{line:t[1],func:n[1]}:null}let n={line:"-1",func:"unknown"};const a=o(e);function s(e){const t=e.match(/.*:(\d+):\d+$/),n=e.lastIndexOf("@");return t&&-1!==n?{line:t[1],func:e.slice(0,n)}:null}a&&(n=a);let l=s(e);l&&(n=l),i.push(`${t}:L${n.line}@${n.func}`)}t.log(e,n);let l=`${e}: ${n}`;return 0!==i.length&&(l+=`<br><br>Stack:<br>${i.join("<br>")}`),Object(me.b)(t,l)},Fe=function(e,t){if(X.SourceFileFlags[5]<1&&5!==G.Player.bitNodeN||X.SourceFileFlags[t]<1&&G.Player.bitNodeN!==t){let n="";throw 5!==t&&(n=` and Source-File ${t}-1`),Le(`formulas.${e}`,`Requires Source-File 5-1${n} to run.`)}},je=function(e,t){if(4!==G.Player.bitNodeN&&X.SourceFileFlags[4]<t)throw Le(e,`This singularity function requires Source-File 4-${t} to run.`)},We=function(e,t=!1){if(!(7===G.Player.bitNodeN||G.Player.sourceFiles.some(e=>7===e.n))){throw Le(`bladeburner.${e}`,"You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.")}if(!t){if(!(G.Player.bladeburner instanceof d.Bladeburner)){throw Le(`bladeburner.${e}`,"You must be a member of the Bladeburner division to use this API.")}}},Ge=function(e,t){if(!G.Player.bladeburner.cities.hasOwnProperty(t))throw Le(`bladeburner.${e}`,`Invalid city: ${t}`)},He=function(e){if(10!==G.Player.bitNodeN&&!X.SourceFileFlags[10])throw Le(`sleeve.${e}`,"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10")},Ue=function(e,n){if(n>=G.Player.sleeves.length||n<0){const a=`Invalid sleeve number: ${n}`;throw t.log(e,a),Le(`sleeve.${e}`,a)}},qe=function(e,t,n){const a=pe(t,e).getContract(n);if(null==a)throw Le(`codingcontract.${e}`,`Cannot find contract '${n}' on server '${t}'`);return a},$e=function(e){if(!(G.Player.gang instanceof E.Gang))throw Le(`gang.${e}`,"You do not currently have a Gang")},Ke=function(e,t){for(const e of G.Player.gang.members)if(e.name===t)return e;throw Le(`gang.${e}`,`Invalid gang member: '${t}'`)},ze=function(e,t,n){const a=G.Player.bladeburner.getActionIdFromTypeAndName(t,n);if(!a)throw Le(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);const r=G.Player.bladeburner.getActionObject(a);if(!r)throw Le(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);return r},Ye=function(e,t){const n=f.Companies[t];if(null==n||!(n instanceof h.Company))throw Le(e,`Invalid company name: '${t}'`);return n},Ve=function(e,t){if(!Object(T.factionExists)(t))throw Le(e,`Invalid faction name: '${t}`);return T.Factions[t]},Je=function(e,t){if(!Object(l.b)(t))throw Le(e,`Invalid augmentation: '${t}'`);return s.Augmentations[t]};const Xe=function(e=null){if(e&&Object(Se.isString)(e)){const t=G.Player.getHomeComputer();for(const n of t.scripts)if(n.filename===e){if(n.ramUsage>t.maxRam-t.ramUsed)return;const e=new z.RunningScript(n,[]);e.threads=1,Object(le.e)(e,t)}}},Qe=function(e,n,{threads:a,stock:r}={}){if(void 0===e)throw Le("hack","Takes 1 argument.");const i=Object(me.d)(t,"hack",a),o=Object(Y.getServer)(e);if(null==o)throw Le("hack",`Invalid IP/hostname: ${e}.`);var s=Object(v.calculateHackingTime)(o,G.Player);const l=Object(w.netscriptCanHack)(o,G.Player);if(!l.res)throw Le("hack",l.msg);return t.log("hack",`Executing ${e} in ${Object(ke.convertTimeMsToTimeElapsedString)(1e3*s,!0)} (t=${ye.numeralWrapper.formatThreads(i)})`),Object(me.c)(1e3*s,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(v.calculateHackingChance)(o,G.Player),a=Math.random(),s=Object(v.calculateHackingExpGain)(o,G.Player)*i,l=s/4;if(a<e){const e=Object(v.calculatePercentMoneyHacked)(o,G.Player);let a=Math.ceil(1/e*(o.moneyAvailable/o.moneyMax));isNaN(a)&&(a=1e6);let c=Math.floor(o.moneyAvailable*e)*i;c<=0&&(c=0,s=l),c>o.moneyAvailable&&(c=o.moneyAvailable),o.moneyAvailable-=c,o.moneyAvailable<0&&(o.moneyAvailable=0);const u=c*m.BitNodeMultipliers.ScriptHackMoneyGain;return G.Player.gainMoney(u),t.scriptRef.onlineMoneyMade+=u,G.Player.scriptProdSinceLastAug+=u,G.Player.recordMoneySource(u,"hacking"),t.scriptRef.recordHack(o.ip,u,i),G.Player.gainHackingExp(s),t.scriptRef.onlineExpGained+=s,t.log("hack",`Successfully hacked '${o.hostname}' for ${ye.numeralWrapper.formatMoney(u)} and ${ye.numeralWrapper.formatExp(s)} exp (t=${ye.numeralWrapper.formatThreads(i)})`),o.fortify(_.CONSTANTS.ServerFortifyAmount*Math.min(i,a)),r&&Object(Z.influenceStockThroughServerHack)(o,u),n&&(o.backdoorInstalled=!0),Promise.resolve(u)}return G.Player.gainHackingExp(l),t.scriptRef.onlineExpGained+=l,t.log("hack",`Failed to hack '${o.hostname}'. Gained ${ye.numeralWrapper.formatExp(l)} exp (t=${ye.numeralWrapper.formatThreads(i)})`),Promise.resolve(0)})},Ze=function(e){let t="";for(let n of e)"object"!=typeof(n=we(n))?t+=`${n}`:t+=JSON.stringify(n);return t},et={hacknet:{numNodes:function(){return G.Player.hacknetNodes.length},maxNumNodes:function(){return Object(x.h)()?R.HacknetServerConstants.MaxServers:1/0},purchaseNode:function(){return Object(x.m)()},getPurchaseNodeCost:function(){return Object(x.h)()?Object(x.c)():Object(x.b)()},getNodeStats:function(e){const t=De(e,"getNodeStats"),n=Object(x.h)(),a={name:n?t.hostname:t.name,level:t.level,ram:n?t.maxRam:t.ram,cores:t.cores,production:n?t.hashRate:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:n?t.totalHashesGenerated:t.totalMoneyGenerated};return n&&(a.cache=t.cache,a.hashCapacity=t.hashCapacity),a},upgradeLevel:function(e,t){const n=De(e,"upgradeLevel");return Object(x.o)(n,t)},upgradeRam:function(e,t){const n=De(e,"upgradeRam");return Object(x.p)(n,t)},upgradeCore:function(e,t){const n=De(e,"upgradeCore");return Object(x.l)(n,t)},upgradeCache:function(e,t){if(!Object(x.h)())return!1;const n=De(e,"upgradeCache"),a=Object(x.k)(n,t);return a&&Object(x.r)(),a},getLevelUpgradeCost:function(e,t){return De(e,"upgradeLevel").calculateLevelUpgradeCost(t,G.Player.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,t){return De(e,"upgradeRam").calculateRamUpgradeCost(t,G.Player.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,t){return De(e,"upgradeCore").calculateCoreUpgradeCost(t,G.Player.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(e,t){if(!Object(x.h)())return 1/0;return De(e,"upgradeCache").calculateCacheUpgradeCost(t)},numHashes:function(){return Object(x.h)()?G.Player.hashManager.hashes:0},hashCapacity:function(){return Object(x.h)()?G.Player.hashManager.capacity:0},hashCost:function(e){return Object(x.h)()?G.Player.hashManager.getUpgradeCost(e):1/0},spendHashes:function(e,t){return!!Object(x.h)()&&Object(x.n)(e,t)},getHashUpgradeLevel:function(e){const t=G.Player.hashManager.upgrades[e];if(void 0===t)throw Le("hacknet.hashUpgradeLevel",`Invalid Hash Upgrade: ${e}`);return t},getStudyMult:function(){return!!Object(x.h)()&&G.Player.hashManager.getStudyMult()},getTrainingMult:function(){return!!Object(x.h)()&&G.Player.hashManager.getTrainingMult()}},sprintf:a.sprintf,vsprintf:a.vsprintf,scan:function(e=t.serverIp,a=!0){n("scan",Object(i.getRamCost)("scan"));var r=Object(Y.getServer)(e);if(null==r)throw Le("scan",`Invalid IP/hostname: ${e}.`);for(var o=[],s=0;s<r.serversOnNetwork.length;s++){var l;null!=(l=a?Object(Y.getServerOnNetwork)(r,s).hostname:Object(Y.getServerOnNetwork)(r,s).ip)&&o.push(l)}return t.log("scan",`returned ${r.serversOnNetwork.length} connections for ${r.hostname}`),o},hack:function(e,{threads:t,stock:a}={}){return n("hack",Object(i.getRamCost)("hack")),Qe(e,!1,{threads:t,stock:a})},hackAnalyzeThreads:function(e,a){n("hackAnalyzeThreads",Object(i.getRamCost)("hackAnalyzeThreads"));const r=pe(e,"hackAnalyzeThreads");if(isNaN(a))throw Le(t,`Invalid growth argument passed into hackAnalyzeThreads: ${a}. Must be numeric.`);if(a<0||a>r.moneyAvailable)return-1;const o=Object(v.calculatePercentMoneyHacked)(r,G.Player);return a/Math.floor(r.moneyAvailable*o)},hackAnalyzePercent:function(e){n("hackAnalyzePercent",Object(i.getRamCost)("hackAnalyzePercent"));const t=pe(e,"hackAnalyzePercent");return 100*Object(v.calculatePercentMoneyHacked)(t,G.Player)},hackChance:function(e){n("hackChance",Object(i.getRamCost)("hackChance"));const t=pe(e,"hackChance");return Object(v.calculateHackingChance)(t,G.Player)},sleep:function(e){if(void 0===e)throw Le("sleep","Takes 1 argument.");return t.log("sleep",`Sleeping for ${e} milliseconds`),Object(me.c)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e,{threads:a,stock:r}={}){n("grow",Object(i.getRamCost)("grow"));const o=Object(me.d)(t,"grow",a);if(void 0===e)throw Le("grow","Takes 1 argument.");var s=Object(Y.getServer)(e);if(null==s)throw Le("grow",`Invalid IP/hostname: ${e}.`);const l=Object(Y.getServer)(t.serverIp),c=Object(w.netscriptCanGrow)(s);if(!c.res)throw Le("grow",c.msg);var u=Object(v.calculateGrowTime)(s,G.Player);return t.log("grow",`Executing on '${s.hostname}' in ${Object(ke.convertTimeMsToTimeElapsedString)(1e3*u,!0)} (t=${ye.numeralWrapper.formatThreads(o)}).`),Object(me.c)(1e3*u,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=s.moneyAvailable<=0?1:s.moneyAvailable;s.moneyAvailable+=1*o,Object(Y.processSingleServerGrowth)(s,o,G.Player,l.cpuCores);const n=s.moneyAvailable;t.scriptRef.recordGrow(s.ip,o);var a=Object(v.calculateHackingExpGain)(s,G.Player)*o;const i=n/e-1;return t.log("grow",`Available money on '${s.hostname}' grown by ${ye.numeralWrapper.formatPercentage(i,6)}. Gained ${ye.numeralWrapper.formatExp(a)} hacking exp (t=${ye.numeralWrapper.formatThreads(o)}).`),t.scriptRef.onlineExpGained+=a,G.Player.gainHackingExp(a),r&&Object(Z.influenceStockThroughServerGrow)(s,n-e),Promise.resolve(n/e)})},growthAnalyze:function(e,t){n("growthAnalyze",Object(i.getRamCost)("growthAnalyze"));const a=pe(e,"growthAnalyze");if("number"!=typeof t||isNaN(t)||t<1||!isFinite(t))throw Le("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${t}.`);return Object(Y.numCycleForGrowth)(a,Number(t),G.Player)},weaken:function(e,{threads:a}={}){n("weaken",Object(i.getRamCost)("weaken"));var r=Object(me.d)(t,"weaken",a);if(void 0===e)throw Le("weaken","Takes 1 argument.");const o=Object(Y.getServer)(e);if(null==o)throw Le("weaken",`Invalid IP/hostname: ${e}`);const s=Object(w.netscriptCanWeaken)(o);if(!s.res)throw Le("weaken",s.msg);const l=Object(v.calculateWeakenTime)(o,G.Player);return t.log("weaken",`Executing on '${o.hostname}' in ${Object(ke.convertTimeMsToTimeElapsedString)(1e3*l,!0)} (t=${ye.numeralWrapper.formatThreads(r)})`),Object(me.c)(1e3*l,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=1+(Object(Y.getServer)(t.serverIp).cpuCores-1)/16;o.weaken(_.CONSTANTS.ServerWeakenAmount*r*e),t.scriptRef.recordWeaken(o.ip,r);const n=Object(v.calculateHackingExpGain)(o,G.Player)*r;return t.log("weaken",`'${o.hostname}' security level weakened to ${o.hackDifficulty}. Gained ${ye.numeralWrapper.formatExp(n)} hacking exp (t=${ye.numeralWrapper.formatThreads(r)})`),t.scriptRef.onlineExpGained+=n,G.Player.gainHackingExp(n),Promise.resolve(_.CONSTANTS.ServerWeakenAmount*r)})},print:function(){if(0===arguments.length)throw Le("print","Takes at least 1 argument.");t.print(Ze(arguments))},tprint:function(){if(0===arguments.length)throw Le("tprint","Takes at least 1 argument.");Object(_e.post)(`${t.scriptRef.filename}: ${Ze(arguments)}`)},tprintf:function(e,...t){Object(_e.post)(Object(a.vsprintf)(e,t))},clearLog:function(){t.scriptRef.clearLog()},disableLog:function(e){if("ALL"===e){for(e in tt)t.disableLogs[e]=!0;t.log("disableLog","Disabled logging for all functions")}else{if(void 0===tt[e])throw Le("disableLog",`Invalid argument: ${e}.`);t.disableLogs[e]=!0,t.log("disableLog",`Disabled logging for ${e}`)}},enableLog:function(e){if(void 0===tt[e])throw Le("enableLog",`Invalid argument: ${e}.`);delete t.disableLogs[e],t.log("enableLog",`Enabled logging for ${e}`)},isLogEnabled:function(e){if(void 0===tt[e])throw Le("isLogEnabled",`Invalid argument: ${e}.`);return!t.disableLogs[e]},getScriptLogs:function(e,n,...a){const r=Oe(e,n,"getScriptLogs",a);return null==r?(t.log("getScriptLogs",Ae(e,n,a)),""):r.logs.slice()},tail:function(e,n=t.serverIp,...a){let r;null!=(r=0===arguments.length?t.scriptRef:"number"==typeof e?Ne(e,"tail"):Oe(e,n,"tail",a))?Object(Ee.logBoxCreate)(r):t.log("tail",Ae(e,n,a))},nuke:function(e){if(n("nuke",Object(i.getRamCost)("nuke")),void 0===e)throw Le("nuke","Takes 1 argument.");var a=Object(Y.getServer)(e);if(null==a)throw Le("nuke",`Invalid IP/hostname: ${e}.`);if(!G.Player.hasProgram(H.Programs.NukeProgram.name))throw Le("nuke","You do not have the NUKE.exe virus!");if(a.openPortCount<a.numOpenPortsRequired)throw Le("nuke","Not enough ports opened to use NUKE.exe virus.");return a.hasAdminRights?t.log("nuke",`Already have root access to '${a.hostname}'.`):(a.hasAdminRights=!0,t.log("nuke",`Executed NUKE.exe virus on '${a.hostname}' to gain root access.`)),!0},brutessh:function(e){if(n("brutessh",Object(i.getRamCost)("brutessh")),void 0===e)throw Le("brutessh","Takes 1 argument.");var a=Object(Y.getServer)(e);if(null==a)throw Le("brutessh",`Invalid IP/hostname: ${e}.`);if(!G.Player.hasProgram(H.Programs.BruteSSHProgram.name))throw Le("brutessh","You do not have the BruteSSH.exe program!");return a.sshPortOpen?t.log("brutessh",`SSH Port (22) already opened on '${a.hostname}'.`):(t.log("brutessh",`Executed BruteSSH.exe on '${a.hostname}' to open SSH port (22).`),a.sshPortOpen=!0,++a.openPortCount),!0},ftpcrack:function(e){if(n("ftpcrack",Object(i.getRamCost)("ftpcrack")),void 0===e)throw Le("ftpcrack","Takes 1 argument.");var a=Object(Y.getServer)(e);if(null==a)throw Le("ftpcrack",`Invalid IP/hostname: ${e}.`);if(!G.Player.hasProgram(H.Programs.FTPCrackProgram.name))throw Le("ftpcrack","You do not have the FTPCrack.exe program!");return a.ftpPortOpen?t.log("ftpcrack",`FTP Port (21) already opened on '${a.hostname}'.`):(t.log("ftpcrack",`Executed FTPCrack.exe on '${a.hostname}' to open FTP port (21).`),a.ftpPortOpen=!0,++a.openPortCount),!0},relaysmtp:function(e){if(n("relaysmtp",Object(i.getRamCost)("relaysmtp")),void 0===e)throw Le("relaysmtp","Takes 1 argument.");var a=Object(Y.getServer)(e);if(null==a)throw Le("relaysmtp",`Invalid IP/hostname: ${e}.`);if(!G.Player.hasProgram(H.Programs.RelaySMTPProgram.name))throw Le("relaysmtp","You do not have the relaySMTP.exe program!");return a.smtpPortOpen?t.log("relaysmtp",`SMTP Port (25) already opened on '${a.hostname}'.`):(t.log("relaysmtp",`Executed relaySMTP.exe on '${a.hostname}' to open SMTP port (25).`),a.smtpPortOpen=!0,++a.openPortCount),!0},httpworm:function(e){if(n("httpworm",Object(i.getRamCost)("httpworm")),void 0===e)throw Le("httpworm","Takes 1 argument");var a=Object(Y.getServer)(e);if(null==a)throw Le("httpworm",`Invalid IP/hostname: ${e}`);if(!G.Player.hasProgram(H.Programs.HTTPWormProgram.name))throw Le("httpworm","You do not have the HTTPWorm.exe program!");return a.httpPortOpen?t.log("httpworm",`HTTP Port (80) already opened on '${a.hostname}'.`):(t.log("httpworm",`Executed HTTPWorm.exe on '${a.hostname}' to open HTTP port (80).`),a.httpPortOpen=!0,++a.openPortCount),!0},sqlinject:function(e){if(n("sqlinject",Object(i.getRamCost)("sqlinject")),void 0===e)throw Le("sqlinject","Takes 1 argument.");var a=Object(Y.getServer)(e);if(null==a)throw Le("sqlinject",`Invalid IP/hostname: ${e}`);if(!G.Player.hasProgram(H.Programs.SQLInjectProgram.name))throw Le("sqlinject","You do not have the SQLInject.exe program!");return a.sqlPortOpen?t.log("sqlinject",`SQL Port (1433) already opened on '${a.hostname}'.`):(t.log("sqlinject",`Executed SQLInject.exe on '${a.hostname}' to open SQL port (1433).`),a.sqlPortOpen=!0,++a.openPortCount),!0},run:function(e,a=1){if(n("run",Object(i.getRamCost)("run")),void 0===e)throw Le("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(a)||a<=0)throw Le("run",`Invalid thread count. Must be numeric and > 0, is ${a}`);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);var s=Object(Y.getServer)(t.serverIp);if(null==s)throw Le("run","Could not find server. This is a bug. Report to dev.");return Object(le.d)("run",s,e,r,t,a)},exec:function(e,a,r=1){if(n("exec",Object(i.getRamCost)("exec")),void 0===e||void 0===a)throw Le("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(r)||r<=0)throw Le("exec",`Invalid thread count. Must be numeric and > 0, is ${r}`);for(var o=[],s=3;s<arguments.length;++s)o.push(arguments[s]);var l=Object(Y.getServer)(a);if(null==l)throw Le("exec",`Invalid IP/hostname: ${a}`);return Object(le.d)("exec",l,e,o,t,r)},spawn:function(e,a){if(n("spawn",Object(i.getRamCost)("spawn")),!e||!a)throw Le("spawn","Usage: spawn(scriptname, threads)");Object(be.setTimeoutRef)(()=>{if(isNaN(a)||a<=0)throw Le("spawn",`Invalid thread count. Must be numeric and > 0, is ${a}`);for(var n=[],r=2;r<arguments.length;++r)n.push(arguments[r]);var i=Object(Y.getServer)(t.serverIp);if(null==i)throw Le("spawn","Could not find server. This is a bug. Report to dev");return Object(le.d)("spawn",i,e,n,t,a)},1e4),t.log("spawn",`Will execute '${e}' in 10 seconds`),t.running=!1,Object(ce.killWorkerScript)(t)&&t.log("spawn","Exiting...")},kill:function(e,a,...r){let o;n("kill",Object(i.getRamCost)("kill"));const s="number"==typeof e;if(s)o=Object(ce.killWorkerScript)(e);else{if(void 0===e||void 0===a)throw Le("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const n=pe(a),i=Oe(e,a,"kill",r);if(null==i)return t.log("kill",Ae(e,a,r)),!1;o=Object(ce.killWorkerScript)(i,n.ip)}return o?(s?t.log("kill",`Killing script with PID ${e}`):t.log("kill",`Killing '${e}' on '${a}' with args: ${Object(Ce.arrayToString)(r)}.`),!0):(s?t.log("kill",`No script with PID ${e}`):t.log("kill",`No such script '${e}' on '${a}' with args: ${Object(Ce.arrayToString)(r)}`),!1)},killall:function(e=t.serverIp){if(n("killall",Object(i.getRamCost)("killall")),void 0===e)throw Le("killall","Takes 1 argument");const a=Object(Y.getServer)(e);if(null==a)throw Le("killall",`Invalid IP/hostname: ${e}`);const r=a.runningScripts.length>0;for(let e=a.runningScripts.length-1;e>=0;--e)Object(ce.killWorkerScript)(a.runningScripts[e],a.ip,!1);return o.WorkerScriptStartStopEventEmitter.emitEvent(),t.log("killall",`Killing all scripts on '${a.hostname}'. May take a few minutes for the scripts to die.`),r},exit:function(){t.running=!1,Object(ce.killWorkerScript)(t)?t.log("exit","Exiting..."):t.log("exit","Failed. This is a bug. Report to dev.")},scp:function(e,a,r){if(n("scp",Object(i.getRamCost)("scp")),2!==arguments.length&&3!==arguments.length)throw Le("scp","Takes 2 or 3 arguments");if(e&&e.constructor===Array){var o=!1;return e.forEach(function(e){xe(t).scp(e,a,r)&&(o=!0)}),o}if(!Object(oe.isValidFilePath)(e))throw Le("scp",`Invalid filename: '${e}'`);if(!e.endsWith(".lit")&&!Object($.isScriptFilename)(e)&&!e.endsWith("txt"))throw Le("scp","Only works for .script, .lit, and .txt files");var s,l;if(null!=r){if(void 0===e||void 0===a||void 0===r)throw Le("scp","Takes 2 or 3 arguments");if(null==(s=Object(Y.getServer)(r)))throw Le("scp",`Invalid IP/hostname: ${r}`);if(null==(l=Object(Y.getServer)(a)))throw Le("scp",`Invalid IP/hostname: ${a}`)}else{if(null==a)throw Le("scp","Takes 2 or 3 arguments");if(void 0===e||void 0===a)throw Le("scp","Takes 2 or 3 arguments");if(null==(s=Object(Y.getServer)(a)))throw Le("scp",`Invalid IP/hostname: ${a}`);if(null==(l=Object(Y.getServer)(t.serverIp)))throw Le("scp","Could not find server ip for this script. This is a bug. Report to dev.")}if(e.endsWith(".lit")){for(var c=!1,u=0;u<l.messages.length;++u)if(!(l.messages[u]instanceof j.Message)&&l.messages[u]==e){c=!0;break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.messages.length;++u)if(s.messages[u]===e)return t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;return s.messages.push(e),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}if(e.endsWith(".txt")){var m;for(c=!1,u=0;u<l.textFiles.length;++u)if(l.textFiles[u].fn===e){c=!0,m=l.textFiles[u];break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.textFiles.length;++u)if(s.textFiles[u].fn===e)return s.textFiles[u].text=m.text,t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;var p=new se.TextFile(m.fn,m.text);return s.textFiles.push(p),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}let d=null;for(let t=0;t<l.scripts.length;++t)if(e==l.scripts[t].filename){d=l.scripts[t];break}if(null==d)return t.log("scp",`File '${e}' does not exist.`),!1;for(let n=0;n<s.scripts.length;++n)if(e==s.scripts[n].filename){t.log("scp",`WARNING: File '${e}' overwritten on '${s.hostname}'`);const a=s.scripts[n];return a.code===d.code||(a.code=d.code,a.ramUsage=d.ramUsage,a.markUpdated(),!0)}const h=new U.Script(e);return h.code=d.code,h.ramUsage=d.ramUsage,h.server=s.ip,s.scripts.push(h),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0},ls:function(e,t){if(n("ls",Object(i.getRamCost)("ls")),void 0===e)throw Le("ls","Usage: ls(ip/hostname, [grep filter])");const a=Object(Y.getServer)(e);if(null==a)throw Le("ls",`Invalid IP/hostname: ${e}`);let r=!1;arguments.length>=2&&(r=t.toString());const o=[];for(let e=0;e<a.programs.length;e++)r?a.programs[e].includes(r)&&o.push(a.programs[e]):o.push(a.programs[e]);for(let e=0;e<a.scripts.length;e++)r?a.scripts[e].filename.includes(r)&&o.push(a.scripts[e].filename):o.push(a.scripts[e].filename);for(let e=0;e<a.messages.length;e++)r?a.messages[e]instanceof j.Message?a.messages[e].filename.includes(r)&&o.push(a.messages[e].filename):a.messages[e].includes(r)&&o.push(a.messages[e]):a.messages[e]instanceof j.Message?o.push(a.messages[e].filename):o.push(a.messages[e]);for(var s=0;s<a.textFiles.length;s++)r?a.textFiles[s].fn.includes(r)&&o.push(a.textFiles[s].fn):o.push(a.textFiles[s].fn);for(s=0;s<a.contracts.length;++s)r?a.contracts[s].fn.includes(r)&&o.push(a.contracts[s].fn):o.push(a.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){n("ps",Object(i.getRamCost)("ps"));var a=Object(Y.getServer)(e);if(null==a)throw Le("ps",`Invalid IP/hostname: ${e}`);const r=[];for(const e in a.runningScripts){const t=a.runningScripts[e];r.push({filename:t.filename,threads:t.threads,args:t.args.slice(),pid:t.pid})}return r},hasRootAccess:function(e){if(n("hasRootAccess",Object(i.getRamCost)("hasRootAccess")),void 0===e)throw Le("hasRootAccess","Takes 1 argument");var t=Object(Y.getServer)(e);if(null==t)throw Le("hasRootAccess",`Invalid IP/hostname: ${e}`);return t.hasAdminRights},getIp:function(){n("getIp",Object(i.getRamCost)("getIp"));var e=Object(Y.getServer)(t.serverIp);if(null==e)throw Le("getIp","Could not find server. This is a bug. Report to dev.");return e.ip},getHostname:function(){n("getHostname",Object(i.getRamCost)("getHostname"));var e=Object(Y.getServer)(t.serverIp);if(null==e)throw Le(t,"Could not find server. This is a bug. Report to dev.");return e.hostname},getHackingLevel:function(){return n("getHackingLevel",Object(i.getRamCost)("getHackingLevel")),G.Player.updateSkillLevels(),t.log("getHackingLevel",`returned ${G.Player.hacking_skill}`),G.Player.hacking_skill},getHackingMultipliers:function(){return n("getHackingMultipliers",Object(i.getRamCost)("getHackingMultipliers")),{chance:G.Player.hacking_chance_mult,speed:G.Player.hacking_speed_mult,money:G.Player.hacking_money_mult,growth:G.Player.hacking_grow_mult}},getHacknetMultipliers:function(){return n("getHacknetMultipliers",Object(i.getRamCost)("getHacknetMultipliers")),{production:G.Player.hacknet_node_money_mult,purchaseCost:G.Player.hacknet_node_purchase_cost_mult,ramCost:G.Player.hacknet_node_ram_cost_mult,coreCost:G.Player.hacknet_node_core_cost_mult,levelCost:G.Player.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(n("getBitNodeMultipliers",Object(i.getRamCost)("getBitNodeMultipliers")),X.SourceFileFlags[5]<=0&&5!==G.Player.bitNodeN)throw Le("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},m.BitNodeMultipliers)},getServer:function(e){if(n("getServer",Object(i.getRamCost)("getServer")),X.SourceFileFlags[5]<=0&&5!==G.Player.bitNodeN)throw Le("getServer","Requires Source-File 5 to run.");const t=pe(e,"getServer"),a=Object.assign({},t);return a.contracts=void 0,a.messages=void 0,a.runningScripts=void 0,a.scripts=void 0,a.textFiles=void 0,a.programs=void 0,a.serversOnNetwork=void 0,a},getServerMoneyAvailable:function(e){n("getServerMoneyAvailable",Object(i.getRamCost)("getServerMoneyAvailable"));const a=pe(e,"getServerMoneyAvailable");return Be(a,"getServerMoneyAvailable")?0:"home"==a.hostname?(t.log("getServerMoneyAvailable",`returned player's money: ${ye.numeralWrapper.formatMoney(G.Player.money.toNumber())}`),G.Player.money.toNumber()):(t.log("getServerMoneyAvailable",`returned ${ye.numeralWrapper.formatMoney(a.moneyAvailable)} for '${a.hostname}'`),a.moneyAvailable)},getServerSecurityLevel:function(e){n("getServerSecurityLevel",Object(i.getRamCost)("getServerSecurityLevel"));const a=pe(e,"getServerSecurityLevel");return Be(a,"getServerSecurityLevel")?1:(t.log("getServerSecurityLevel",`returned ${ye.numeralWrapper.formatServerSecurity(a.hackDifficulty,3)} for '${a.hostname}'`),a.hackDifficulty)},getServerBaseSecurityLevel:function(e){n("getServerBaseSecurityLevel",Object(i.getRamCost)("getServerBaseSecurityLevel"));const a=pe(e,"getServerBaseSecurityLevel");return Be(a,"getServerBaseSecurityLevel")?1:(t.log("getServerBaseSecurityLevel",`returned ${ye.numeralWrapper.formatServerSecurity(a.baseDifficulty,3)} for '${a.hostname}'`),a.baseDifficulty)},getServerMinSecurityLevel:function(e){n("getServerMinSecurityLevel",Object(i.getRamCost)("getServerMinSecurityLevel"));const a=pe(e,"getServerMinSecurityLevel");return Be(a,"getServerMinSecurityLevel")?1:(t.log("getServerMinSecurityLevel",`returned ${ye.numeralWrapper.formatServerSecurity(a.minDifficulty,3)} for ${a.hostname}`),a.minDifficulty)},getServerRequiredHackingLevel:function(e){n("getServerRequiredHackingLevel",Object(i.getRamCost)("getServerRequiredHackingLevel"));const a=pe(e,"getServerRequiredHackingLevel");return Be(a,"getServerRequiredHackingLevel")?1:(t.log("getServerRequiredHackingLevel",`returned ${ye.numeralWrapper.formatSkill(a.requiredHackingSkill,0)} for '${a.hostname}'`),a.requiredHackingSkill)},getServerMaxMoney:function(e){n("getServerMaxMoney",Object(i.getRamCost)("getServerMaxMoney"));const a=pe(e,"getServerMaxMoney");return Be(a,"getServerMaxMoney")?0:(t.log("getServerMaxMoney",`returned ${ye.numeralWrapper.formatMoney(a.moneyMax)} for '${a.hostname}'`),a.moneyMax)},getServerGrowth:function(e){n("getServerGrowth",Object(i.getRamCost)("getServerGrowth"));const a=pe(e,"getServerGrowth");return Be(a,"getServerGrowth")?1:(t.log("getServerGrowth",`returned ${a.serverGrowth} for '${a.hostname}'`),a.serverGrowth)},getServerNumPortsRequired:function(e){n("getServerNumPortsRequired",Object(i.getRamCost)("getServerNumPortsRequired"));const a=pe(e,"getServerNumPortsRequired");return Be(a,"getServerNumPortsRequired")?5:(t.log("getServerNumPortsRequired",`returned ${a.numOpenPortsRequired} for '${a.hostname}'`),a.numOpenPortsRequired)},getServerRam:function(e){n("getServerRam",Object(i.getRamCost)("getServerRam"));const a=pe(e,"getServerRam");return t.log("getServerRam",`returned [${ye.numeralWrapper.formatRAM(a.maxRam,2)}, ${ye.numeralWrapper.formatRAM(a.ramUsed,2)}]`),[a.maxRam,a.ramUsed]},getServerMaxRam:function(e){n("getServerMaxRam",Object(i.getRamCost)("getServerMaxRam"));const a=pe(e,"getServerMaxRam");return t.log("getServerMaxRam",`returned ${ye.numeralWrapper.formatRAM(a.maxRam,2)}`),a.maxRam},getServerUsedRam:function(e){n("getServerUsedRam",Object(i.getRamCost)("getServerUsedRam"));const a=pe(e,"getServerUsedRam");return t.log("getServerUsedRam",`returned ${ye.numeralWrapper.formatRAM(a.ramUsed,2)}`),a.ramUsed},serverExists:function(e){return n("serverExists",Object(i.getRamCost)("serverExists")),null!==Object(Y.getServer)(e)},fileExists:function(e,a=t.serverIp){if(n("fileExists",Object(i.getRamCost)("fileExists")),void 0===e)throw Le("fileExists","Usage: fileExists(scriptname, [server])");var r=Object(Y.getServer)(a);if(null==r)throw Le("fileExists",`Invalid IP/hostname: ${a}`);for(var o=0;o<r.scripts.length;++o)if(e==r.scripts[o].filename)return!0;for(o=0;o<r.programs.length;++o)if(e.toLowerCase()==r.programs[o].toLowerCase())return!0;for(o=0;o<r.messages.length;++o)if(!(r.messages[o]instanceof j.Message)&&e.toLowerCase()===r.messages[o])return!0;return null!=Object(se.getTextFile)(e,r)},isRunning:function(e,a=t.serverIp,...r){if(n("isRunning",Object(i.getRamCost)("isRunning")),void 0===e||void 0===a)throw Le("isRunning","Usage: isRunning(scriptname, server, [arg1], [arg2]...)");return"number"==typeof e?null!=Ne(e,"isRunning"):null!=Oe(e,a,"isRunning",r)},getStockSymbols:function(){return n("getStockSymbols",Object(i.getRamCost)("getStockSymbols")),Re("getStockSymbols"),Object.values(re.StockSymbols)},getStockPrice:function(e){return n("getStockPrice",Object(i.getRamCost)("getStockPrice")),Re("getStockPrice"),Ie(e,"getStockPrice").price},getStockAskPrice:function(e){return n("getStockAskPrice",Object(i.getRamCost)("getStockAskPrice")),Re("getStockAskPrice"),Ie(e,"getStockAskPrice").getAskPrice()},getStockBidPrice:function(e){return n("getStockBidPrice",Object(i.getRamCost)("getStockBidPrice")),Re("getStockBidPrice"),Ie(e,"getStockBidPrice").getBidPrice()},getStockPosition:function(e){n("getStockPosition",Object(i.getRamCost)("getStockPosition")),Re("getStockPosition");var t=ee.SymbolToStockMap[e];if(null==t)throw Le("getStockPosition",`Invalid stock symbol: ${e}`);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getStockMaxShares:function(e){return n("getStockMaxShares",Object(i.getRamCost)("getStockMaxShares")),Re("getStockMaxShares"),Ie(e,"getStockMaxShares").maxShares},getStockPurchaseCost:function(e,t,a){n("getStockPurchaseCost",Object(i.getRamCost)("getStockPurchaseCost")),Re("getStockPurchaseCost");const r=Ie(e,"getStockPurchaseCost");let o;t=Math.round(t);const s=a.toLowerCase();if(s.includes("l"))o=ae.PositionTypes.Long;else{if(!s.includes("s"))return 1/0;o=ae.PositionTypes.Short}const l=Object(te.getBuyTransactionCost)(r,t,o);return null==l?1/0:l},getStockSaleGain:function(e,t,a){n("getStockSaleGain",Object(i.getRamCost)("getStockSaleGain")),Re("getStockSaleGain");const r=Ie(e,"getStockSaleGain");let o;t=Math.round(t);const s=a.toLowerCase();if(s.includes("l"))o=ae.PositionTypes.Long;else{if(!s.includes("s"))return 0;o=ae.PositionTypes.Short}const l=Object(te.getSellTransactionGain)(r,t,o);return null==l?0:l},buyStock:function(e,a){n("buyStock",Object(i.getRamCost)("buyStock")),Re("buyStock");const r=Ie(e,"buyStock");return Object(Q.buyStock)(r,a,t,{rerenderFn:ee.displayStockMarketContent})?r.price:0},sellStock:function(e,a){n("sellStock",Object(i.getRamCost)("sellStock")),Re("sellStock");const r=Ie(e,"sellStock");return Object(Q.sellStock)(r,a,t,{rerenderFn:ee.displayStockMarketContent})?r.price:0},shortStock:function(e,a){if(n("shortStock",Object(i.getRamCost)("shortStock")),Re("shortStock"),8!==G.Player.bitNodeN&&X.SourceFileFlags[8]<=1)throw Le(Q.shortStock,"You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const r=Ie(e,"shortStock");return Object(Q.shortStock)(r,a,t,{rerenderFn:ee.displayStockMarketContent})?r.price:0},sellShort:function(e,a){if(n("sellShort",Object(i.getRamCost)("sellShort")),Re("sellShort"),8!==G.Player.bitNodeN&&X.SourceFileFlags[8]<=1)throw Le("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const r=Ie(e,"sellShort");return Object(Q.sellShort)(r,a,t,{rerenderFn:ee.displayStockMarketContent})?r.price:0},placeOrder:function(e,a,r,o,s){if(n("placeOrder",Object(i.getRamCost)("placeOrder")),Re("placeOrder"),8!==G.Player.bitNodeN&&X.SourceFileFlags[8]<=2)throw Le("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=Ie(e,"placeOrder");let c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=ne.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=ne.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=ne.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Le("placeOrder",`Invalid order type: ${o}`);c=ne.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=ae.PositionTypes.Long;else{if(!lpos.includes("s"))throw Le("placeOrder",`Invalid position type: ${s}`);u=ae.PositionTypes.Short}return Object(ee.placeOrder)(l,a,r,c,u,t)},cancelOrder:function(e,a,r,o,s){if(n("cancelOrder",Object(i.getRamCost)("cancelOrder")),Re("cancelOrder"),8!==G.Player.bitNodeN&&X.SourceFileFlags[8]<=2)throw Le("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=getStockFrom(e,"cancelOrder");if(isNaN(a)||isNaN(r))throw Le("cancelOrder",`Invalid shares or price. Must be numeric. shares=${a}, price=${r}`);var c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=ne.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=ne.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=ne.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Le("cancelOrder",`Invalid order type: ${o}`);c=ne.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=ae.PositionTypes.Long;else{if(!lpos.includes("s"))throw Le("cancelOrder",`Invalid position type: ${s}`);u=ae.PositionTypes.Short}var m={stock:l,shares:a,price:r,type:c,pos:u};return Object(ee.cancelOrder)(m,t)},getOrders:function(){if(n("getOrders",Object(i.getRamCost)("getOrders")),Re("getOrders"),8!==G.Player.bitNodeN&&X.SourceFileFlags[8]<=2)throw Le(t,"You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},a=ee.StockMarket.Orders;for(let t in a){const n=a[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let a=0;a<n.length;++a)e[t].push({shares:n[a].shares,price:n[a].price,type:n[a].type,position:n[a].pos})}}return e},getStockVolatility:function(e){if(n("getStockVolatility",Object(i.getRamCost)("getStockVolatility")),!G.Player.has4SDataTixApi)throw Le("getStockVolatility","You don't have 4S Market Data TIX API Access!");return Ie(e,"getStockVolatility").mv/100},getStockForecast:function(e){if(n("getStockForecast",Object(i.getRamCost)("getStockForecast")),!G.Player.has4SDataTixApi)throw Le("getStockForecast","You don't have 4S Market Data TIX API Access!");const t=Ie(e,"getStockForecast");var a=50;return t.b?a+=t.otlkMag:a-=t.otlkMag,a/100},purchase4SMarketData:function(){return n("purchase4SMarketData",Object(i.getRamCost)("purchase4SMarketData")),Re("purchase4SMarketData"),G.Player.has4SData?(t.log("purchase4SMarketData","Already purchased 4S Market Data."),!0):G.Player.money.lt(Object(ie.getStockMarket4SDataCost)())?(t.log("purchase4SMarketData","Not enough money to purchase 4S Market Data."),!1):(G.Player.has4SData=!0,G.Player.loseMoney(Object(ie.getStockMarket4SDataCost)()),t.log("purchase4SMarketData","Purchased 4S Market Data"),Object(ee.displayStockMarketContent)(),!0)},purchase4SMarketDataTixApi:function(){return n("purchase4SMarketDataTixApi",Object(i.getRamCost)("purchase4SMarketDataTixApi")),Re("purchase4SMarketDataTixApi"),G.Player.has4SDataTixApi?(t.log("purchase4SMarketDataTixApi","Already purchased 4S Market Data TIX API"),!0):G.Player.money.lt(Object(ie.getStockMarket4STixApiCost)())?(t.log("purchase4SMarketDataTixApi","Not enough money to purchase 4S Market Data TIX API"),!1):(G.Player.has4SDataTixApi=!0,G.Player.loseMoney(Object(ie.getStockMarket4STixApiCost)()),t.log("purchase4SMarketDataTixApi","Purchased 4S Market Data TIX API"),Object(ee.displayStockMarketContent)(),!0)},getPurchasedServerLimit:function(){return n("getPurchasedServerLimit",Object(i.getRamCost)("getPurchasedServerLimit")),Object(V.getPurchaseServerLimit)()},getPurchasedServerMaxRam:function(){return n("getPurchasedServerMaxRam",Object(i.getRamCost)("getPurchasedServerMaxRam")),Object(V.getPurchaseServerMaxRam)()},getPurchasedServerCost:function(e){n("getPurchasedServerCost",Object(i.getRamCost)("getPurchasedServerCost"));const a=Object(V.getPurchaseServerCost)(e);return a===1/0?(t.log("getPurchasedServerCost",`Invalid argument: ram='${e}'`),1/0):a},purchaseServer:function(e,a){n("purchaseServer",Object(i.getRamCost)("purchaseServer"));var r=String(e);if(""==(r=r.replace(/\s+/g,"")))return t.log("purchaseServer",`Invalid argument: hostname='${r}'`),"";if(G.Player.purchasedServers.length>=Object(V.getPurchaseServerLimit)())return t.log("purchaseServer",`You have reached the maximum limit of ${Object(V.getPurchaseServerLimit)()} servers. You cannot purchase any more.`),"";const o=Object(V.getPurchaseServerCost)(a);if(o===1/0)return t.log("purchaseServer",`Invalid argument: ram='${a}'`),"";if(G.Player.money.lt(o))return t.log("purchaseServer",`Not enough money to purchase server. Need ${ye.numeralWrapper.formatMoney(o)}`),"";var s=Object(Y.safetlyCreateUniqueServer)({ip:Object(K.createUniqueRandomIp)(),hostname:r,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:a});Object(K.AddToAllServers)(s),G.Player.purchasedServers.push(s.ip);var l=G.Player.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),G.Player.loseMoney(o),t.log("purchaseServer",`Purchased new server with hostname '${s.hostname}' for ${ye.numeralWrapper.formatMoney(o)}`),s.hostname},deleteServer:function(e){n("deleteServer",Object(i.getRamCost)("deleteServer"));var a=String(e);a=a.replace(/\s\s+/g,"");var r=Object(Y.GetServerByHostname)(a);if(null==r)return t.log("deleteServer",`Invalid argument: hostname='${a}'`),!1;if(!r.purchasedByPlayer||"home"===r.hostname)return t.log("deleteServer","Cannot delete non-purchased server."),!1;var o=r.ip;if(r.isConnectedTo)return t.log("deleteServer","You are currently connected to the server you are trying to delete."),!1;if(o===t.serverIp)return t.log("deleteServer","Cannot delete the server this script is running on."),!1;if(r.runningScripts.length>0)return t.log("deleteServer",`Cannot delete server '${r.hostname}' because it still has scripts running.`),!1;for(var s=!1,l=0;l<G.Player.purchasedServers.length;++l)if(o==G.Player.purchasedServers[l]){s=!0,G.Player.purchasedServers.splice(l,1);break}if(!s)return t.log("deleteServer",`Could not identify server ${r.hostname} as a purchased server. This is a bug. Report to dev.`),!1;delete K.AllServers[o],s=!1;var c=G.Player.getHomeComputer();for(l=0;l<c.serversOnNetwork.length;++l)if(o==c.serversOnNetwork[l])return c.serversOnNetwork.splice(l,1),t.log("deleteServer",`Deleted server '${a}`),!0;return t.log("deleteServer",`Could not find server ${r.hostname} as a purchased server. This is a bug. Report to dev.`),!1},getPurchasedServers:function(e=!0){n("getPurchasedServers",Object(i.getRamCost)("getPurchasedServers"));var t=[];return G.Player.purchasedServers.forEach(function(n){if(e){var a=Object(Y.getServer)(n);if(null==a)throw Le("getPurchasedServers","Could not find server. This is a bug. Report to dev.");t.push(a.hostname)}else t.push(n)}),t},write:function(e,a="",r="a"){if(n("write",Object(i.getRamCost)("write")),isNaN(e)){if(Object(Se.isString)(e)){let n=e;if(!Object(oe.isValidFilePath)(n))throw Le("write",`Invalid filepath: ${n}`);0===n.lastIndexOf("/")&&(n=Object(oe.removeLeadingSlash)(n));try{a=String(a)}catch(e){throw Le("write",`Invalid data (${e}). Data being written must be convertible to a string`)}const i=t.getServer();if(null==i)throw Le("write","Error getting Server. This is a bug. Report to dev.");if(Object($.isScriptFilename)(n)){let e=t.getScriptOnServer(n);if(null==e)return e=new U.Script(n,a,i.ip,i.scripts),i.scripts.push(e),!0;"w"===r?e.code=a:e.code+=a,e.updateRamUsage(i.scripts),e.markUpdated()}else{let e=Object(se.getTextFile)(n,i);if(null==e)return e=Object(se.createTextFile)(n,a,i),!0;"w"===r?e.write(a):e.append(a)}return!0}throw Le("write",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("write",`Trying to write to invalid port: ${e}. Only ports 1-${_.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("write",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.write(a)},tryWrite:function(e,t=""){if(n("tryWrite",Object(i.getRamCost)("tryWrite")),isNaN(e))throw Le("tryWrite",`Invalid argument: ${e}`);if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("tryWrite",`Invalid port: ${e}. Only ports 1-${_.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("tryWrite",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.tryWrite(t)},read:function(e){if(n("read",Object(i.getRamCost)("read")),isNaN(e)){if(Object(Se.isString)(e)){let n=e,a=Object(Y.getServer)(t.serverIp);if(null==a)throw Le("read","Error getting Server. This is a bug. Report to dev.");if(Object($.isScriptFilename)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(se.getTextFile)(n,a);return null!==e?e.text:""}}throw Le("read",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("read",`Invalid port: ${e}. Only ports 1-${_.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("read",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.read()},peek:function(e){if(n("peek",Object(i.getRamCost)("peek")),isNaN(e))throw Le("peek",`Invalid argument. Must be a port number between 1 and ${_.CONSTANTS.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("peek",`Invalid argument. Must be a port number between 1 and ${_.CONSTANTS.NumNetscriptPorts}, is ${e}`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("peek",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.peek()},clear:function(e){if(n("clear",Object(i.getRamCost)("clear")),!isNaN(e)){if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("clear",`Trying to clear invalid port: ${e}. Only ports 1-${_.CONSTANTS.NumNetscriptPorts} are valid`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("clear",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.clear()}if(!Object(Se.isString)(e))throw Le("clear",`Invalid argument: ${e}`);var a=e,r=Object(Y.getServer)(t.serverIp);if(null==r)throw Le("clear","Error getting Server. This is a bug. Report to dev.");var o=Object(se.getTextFile)(a,r);return null!=o&&o.write(""),0},getPortHandle:function(e){if(n("getPortHandle",Object(i.getRamCost)("getPortHandle")),isNaN(e))throw Le("getPortHandle",`Invalid port: ${e} Must be an integer between 1 and ${_.CONSTANTS.NumNetscriptPorts}.`);if((e=Math.round(e))<1||e>_.CONSTANTS.NumNetscriptPorts)throw Le("getPortHandle",`Invalid port: ${e}. Only ports 1-${_.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=le.a[e-1])||!(e instanceof de.NetscriptPort))throw Le("getPortHandle",`Could not find port: ${e}. This is a bug. Report to dev.`);return e},rm:function(e,a){n("rm",Object(i.getRamCost)("rm")),null!=a&&""!==a||(a=t.serverIp);const r=pe(a,"rm").removeFile(e);return r.res||t.log("rm",r.msg),r.res},scriptRunning:function(e,t){n("scriptRunning",Object(i.getRamCost)("scriptRunning"));var a=Object(Y.getServer)(t);if(null==a)throw Le("scriptRunning",`Invalid IP/hostname: ${t}`);for(var r=0;r<a.runningScripts.length;++r)if(a.runningScripts[r].filename==e)return!0;return!1},scriptKill:function(e,t){n("scriptKill",Object(i.getRamCost)("scriptKill"));var a=Object(Y.getServer)(t);if(null==a)throw Le("scriptKill",`Invalid IP/hostname: ${t}`);for(var r=!1,o=0;o<a.runningScripts.length;++o)a.runningScripts[o].filename==e&&(Object(ce.killWorkerScript)(a.runningScripts[o],a.ip),r=!0);return r},getScriptName:function(){return t.name},getScriptRam:function(e,a=t.serverIp){n("getScriptRam",Object(i.getRamCost)("getScriptRam"));var r=Object(Y.getServer)(a);if(null==r)throw Le("getScriptRam",`Invalid IP/hostname: ${a}`);for(var o=0;o<r.scripts.length;++o)if(r.scripts[o].filename==e)return r.scripts[o].ramUsage;return 0},getRunningScript:function(e,a){let r;if(n("getRunningScript",Object(i.getRamCost)("getRunningScript")),0===arguments.length)r=t.scriptRef;else if("number"==typeof e)r=Ne(e,"getRunningScript");else{const t=[];for(var o=2;o<arguments.length;++o)t.push(arguments[o]);r=Oe(e,a,"getRunningScript",t)}return null===r?null:{args:r.args.slice(),filename:r.filename,logs:r.logs.slice(),offlineExpGained:r.offlineExpGained,offlineMoneyMade:r.offlineMoneyMade,offlineRunningTime:r.offlineRunningTime,onlineExpGained:r.onlineExpGained,onlineMoneyMade:r.onlineMoneyMade,onlineRunningTime:r.onlineRunningTime,pid:r.pid,ramUsage:r.ramUsage,server:r.server,threads:r.threads}},getHackTime:function(e){n("getHackTime",Object(i.getRamCost)("getHackTime"));const t=pe(e,"getHackTime");return Be(t,"getHackTime")?1/0:Object(v.calculateHackingTime)(t,G.Player)},getGrowTime:function(e){n("getGrowTime",Object(i.getRamCost)("getGrowTime"));const t=pe(e,"getGrowTime");return Be(t,"getGrowTime")?1/0:Object(v.calculateGrowTime)(t,G.Player)},getWeakenTime:function(e){n("getWeakenTime",Object(i.getRamCost)("getWeakenTime"));const t=pe(e,"getWeakenTime");return Be(t,"getWeakenTime")?1/0:Object(v.calculateWeakenTime)(t,G.Player)},getScriptIncome:function(e,a){if(n("getScriptIncome",Object(i.getRamCost)("getScriptIncome")),0===arguments.length){var r=[];let e=0;for(const t of ue.workerScripts.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return r.push(e),r.push(G.Player.scriptProdSinceLastAug/(G.Player.playtimeSinceLastAug/1e3)),r}var o=Object(Y.getServer)(a);if(null==o)throw Le("getScriptIncome",`Invalid IP/hostnamed: ${a}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(q.a)(e,s,o);return null==c?(t.log("getScriptIncome",`No such script '${e}' on '${o.hostname}' with args: ${Object(Ce.arrayToString)(s)}`),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,a){if(n("getScriptExpGain",Object(i.getRamCost)("getScriptExpGain")),0===arguments.length){var r=0;for(const e of ue.workerScripts.values())r+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return r}var o=Object(Y.getServer)(a);if(null==o)throw Le("getScriptExpGain",`Invalid IP/hostnamed: ${a}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(q.a)(e,s,o);return null==c?(t.log("getScriptExpGain",`No such script '${e}' on '${o.hostname}' with args: ${Object(Ce.arrayToString)(s)}`),-1):c.onlineExpGained/c.onlineRunningTime},nFormat:function(e,t){return isNaN(e)||isNaN(parseFloat(e))||"string"!=typeof t?"":ye.numeralWrapper.format(parseFloat(e),t)},tFormat:function(e,t=!1){return Object(ke.convertTimeMsToTimeElapsedString)(e,t)},getTimeSinceLastAug:function(){return n("getTimeSinceLastAug",Object(i.getRamCost)("getTimeSinceLastAug")),G.Player.playtimeSinceLastAug},prompt:function(e){Object(Se.isString)(e)||(e=JSON.stringify(e));const t=`prompt-popup-${e.slice(0,20)}`,n=Object(Pe.createElement)("p",{innerHTML:e});return new Promise(function(e){const a=Object(Pe.createElement)("button",{class:"popup-box-button",innerText:"Yes",clickListener:()=>{Object(Me.removeElementById)(t),e(!0)}}),r=Object(Pe.createElement)("button",{class:"popup-box-button",innerText:"No",clickListener:()=>{Object(Me.removeElementById)(t),e(!1)}});Object(Te.createPopup)(t,[n,a,r])})},wget:async function(n,a,r=t.serverIp){if(!Object($.isScriptFilename)(a)&&!a.endsWith(".txt"))return t.log("wget",`Invalid target file: '${a}'. Must be a script or text file.`),Promise.resolve(!1);var i=pe(r,"wget");return new Promise(function(o){e.get(n,function(e){let n;return(n=Object($.isScriptFilename)(a)?i.writeToScriptFile(a,e):i.writeToTextFile(a,e)).success?n.overwritten?(t.log("wget",`Successfully retrieved content and overwrote '${a}' on '${r}'`),o(!0)):(t.log("wget",`Successfully retrieved content to new file '${a}' on '${r}'`),o(!0)):(t.log("wget","Failed."),o(!1))},"text").fail(function(e){return t.log("wget",JSON.stringify(e)),o(!1)})})},getFavorToDonate:function(){return n("getFavorToDonate",Object(i.getRamCost)("getFavorToDonate")),Math.floor(_.CONSTANTS.BaseFavorToDonate*m.BitNodeMultipliers.RepToDonateToFaction)},universityCourse:function(e,a){if(n("universityCourse",Object(i.getRamCost)("universityCourse")),je("universityCourse",1),!W.c){if(G.Player.isWorking){var r=G.Player.singularityStopWork();t.log("universityCourse",r)}var o,s,l;switch(e.toLowerCase()){case D.LocationName.AevumSummitUniversity.toLowerCase():if(G.Player.city!=B.CityName.Aevum)return t.log("universityCourse","You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;G.Player.gotoLocation(D.LocationName.AevumSummitUniversity),o=4,s=3;break;case D.LocationName.Sector12RothmanUniversity.toLowerCase():if(G.Player.city!=B.CityName.Sector12)return t.log("universityCourse","You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;G.Player.location=D.LocationName.Sector12RothmanUniversity,o=3,s=2;break;case D.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(G.Player.city!=B.CityName.Volhaven)return t.log("universityCourse","You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;G.Player.location=D.LocationName.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.log("universityCourse",`Invalid university name: '${e}'.`),!1}switch(a.toLowerCase()){case"Study Computer Science".toLowerCase():l=_.CONSTANTS.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=_.CONSTANTS.ClassDataStructures;break;case"Networks".toLowerCase():l=_.CONSTANTS.ClassNetworks;break;case"Algorithms".toLowerCase():l=_.CONSTANTS.ClassAlgorithms;break;case"Management".toLowerCase():l=_.CONSTANTS.ClassManagement;break;case"Leadership".toLowerCase():l=_.CONSTANTS.ClassLeadership;break;default:return t.log("universityCourse",`Invalid class name: ${a}.`),!1}return G.Player.startClass(o,s,l),t.log("universityCourse",`Started ${l} at ${e}`),!0}t.log("universityCourse","You are in the middle of a mission.")},gymWorkout:function(e,a){if(n("gymWorkout",Object(i.getRamCost)("gymWorkout")),je("gymWorkout",1),!W.c){if(G.Player.isWorking){var r=G.Player.singularityStopWork();t.log("gymWorkout",r)}var o,s;switch(e.toLowerCase()){case D.LocationName.AevumCrushFitnessGym.toLowerCase():if(G.Player.city!=B.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;G.Player.location=D.LocationName.AevumCrushFitnessGym,o=3,s=2;break;case D.LocationName.AevumSnapFitnessGym.toLowerCase():if(G.Player.city!=B.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;G.Player.location=D.LocationName.AevumSnapFitnessGym,o=10,s=5;break;case D.LocationName.Sector12IronGym.toLowerCase():if(G.Player.city!=B.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;G.Player.location=D.LocationName.Sector12IronGym,o=1,s=1;break;case D.LocationName.Sector12PowerhouseGym.toLowerCase():if(G.Player.city!=B.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;G.Player.location=D.LocationName.Sector12PowerhouseGym,o=20,s=10;break;case D.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(G.Player.city!=B.CityName.Volhaven)return t.log("gymWorkout","You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;G.Player.location=D.LocationName.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.log("gymWorkout",`Invalid gym name: ${e}. gymWorkout() failed`),!1}switch(a.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():G.Player.startClass(o,s,_.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():G.Player.startClass(o,s,_.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():G.Player.startClass(o,s,_.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():G.Player.startClass(o,s,_.CONSTANTS.ClassGymAgility);break;default:return t.log("gymWorkout",`Invalid stat: ${a}.`),!1}return t.log("gymWorkout",`Started training ${a} at ${e}`),!0}t.log("gymWorkout","You are in the middle of a mission.")},travelToCity:function(e){switch(n("travelToCity",Object(i.getRamCost)("travelToCity")),je("travelToCity",1),e){case B.CityName.Aevum:case B.CityName.Chongqing:case B.CityName.Sector12:case B.CityName.NewTokyo:case B.CityName.Ishima:case B.CityName.Volhaven:if(G.Player.money.lt(_.CONSTANTS.TravelCost))throw Le("travelToCity","Not enough money to travel.");return G.Player.loseMoney(_.CONSTANTS.TravelCost),G.Player.city=e,t.log("travelToCity",`Traveled to ${e}`),!0;default:return t.log("travelToCity",`Invalid city name: '${e}'.`),!1}},purchaseTor:function(){if(n("purchaseTor",Object(i.getRamCost)("purchaseTor")),je("purchaseTor",1),null!=J.SpecialServerIps["Darkweb Server"])return t.log("purchaseTor","You already have a TOR router!"),!1;if(G.Player.money.lt(_.CONSTANTS.TorRouterCost))return t.log("purchaseTor","You cannot afford to purchase a Tor router."),!1;G.Player.loseMoney(_.CONSTANTS.TorRouterCost);var e=Object(Y.safetlyCreateUniqueServer)({ip:Object(K.createUniqueRandomIp)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(K.AddToAllServers)(e),J.SpecialServerIps.addIp("Darkweb Server",e.ip),G.Player.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(G.Player.getHomeComputer().ip),G.Player.gainIntelligenceExp(_.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("purchaseTor","You have purchased a Tor router!"),!0},purchaseProgram:function(e){if(n("purchaseProgram",Object(i.getRamCost)("purchaseProgram")),je("purchaseProgram",1),null==J.SpecialServerIps["Darkweb Server"])return t.log("purchaseProgram","You do not have the TOR router."),!1;e=e.toLowerCase();let a=null;for(const t in b.DarkWebItems){const n=b.DarkWebItems[t];n.program.toLowerCase()==e&&(a=n)}return null==a?(t.log("purchaseProgram",`Invalid program name: '${e}.`),!1):G.Player.money.lt(a.price)?(t.log("purchaseProgram",`Not enough money to purchase '${a.program}'. Need ${ye.numeralWrapper.formatMoney(a.price)}`),!1):G.Player.hasProgram(a.program)?(t.log("purchaseProgram",`You already have the '${a.program}' program`),!0):(G.Player.loseMoney(a.price),G.Player.getHomeComputer().programs.push(a.program),t.log("purchaseProgram",`You have purchased the '${a.program}' program. The new program can be found on your home computer.`),!0)},getCurrentServer:function(){return n("getCurrentServer",Object(i.getRamCost)("getCurrentServer")),je("getCurrentServer",1),G.Player.getCurrentServer().hostname},connect:function(e){if(n("connect",Object(i.getRamCost)("connect")),je("connect",1),!e)throw Le("connect",`Invalid hostname: '${e}'`);let t=Object(Y.getServer)(e);if(null==t)throw Le("connect",`Invalid hostname: '${e}'`);if("home"===e)return G.Player.getCurrentServer().isConnectedTo=!1,G.Player.currentServer=G.Player.getHomeComputer().ip,G.Player.getCurrentServer().isConnectedTo=!0,L.a.currDir="/",L.a.resetTerminalInput(!0),!0;const a=G.Player.getCurrentServer();for(let n=0;n<a.serversOnNetwork.length;n++){const r=Object(Y.getServerOnNetwork)(a,n);if(r.ip==e||r.hostname==e)return G.Player.getCurrentServer().isConnectedTo=!1,G.Player.currentServer=t.ip,G.Player.getCurrentServer().isConnectedTo=!0,L.a.currDir="/",L.a.resetTerminalInput(!0),!0}return!1},manualHack:function(){n("manualHack",Object(i.getRamCost)("manualHack")),je("manualHack",1);const e=G.Player.getCurrentServer();return Qe(e.hostname,!0)},installBackdoor:function(){n("installBackdoor",Object(i.getRamCost)("installBackdoor")),je("installBackdoor",1);const e=G.Player.getCurrentServer(),a=Object(v.calculateHackingTime)(e,G.Player)/4*1e3,r=Object(w.netscriptCanHack)(e,G.Player);if(!r.res)throw Le("installBackdoor",r.msg);return t.log("installBackdoor",`Installing backdoor on '${e.hostname}' in ${Object(ke.convertTimeMsToTimeElapsedString)(a,!0)}`),Object(me.c)(a,t).then(function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",`Successfully installed backdoor on '${e.hostname}'`),e.backdoorInstalled=!0,Promise.resolve())})},getStats:function(){return n("getStats",Object(i.getRamCost)("getStats")),je("getStats",1),t.log("getStats","getStats is deprecated, please use getPlayer"),{hacking:G.Player.hacking_skill,strength:G.Player.strength,defense:G.Player.defense,dexterity:G.Player.dexterity,agility:G.Player.agility,charisma:G.Player.charisma,intelligence:G.Player.intelligence}},getCharacterInformation:function(){return n("getCharacterInformation",Object(i.getRamCost)("getCharacterInformation")),je("getCharacterInformation",1),t.log("getCharacterInformation","getCharacterInformation is deprecated, please use getPlayer"),{bitnode:G.Player.bitNodeN,city:G.Player.city,factions:G.Player.factions.slice(),hp:G.Player.hp,jobs:Object.keys(G.Player.jobs),jobTitles:Object.values(G.Player.jobs),maxHp:G.Player.max_hp,mult:{agility:G.Player.agility_mult,agilityExp:G.Player.agility_exp_mult,companyRep:G.Player.company_rep_mult,crimeMoney:G.Player.crime_money_mult,crimeSuccess:G.Player.crime_success_mult,defense:G.Player.defense_mult,defenseExp:G.Player.defense_exp_mult,dexterity:G.Player.dexterity_mult,dexterityExp:G.Player.dexterity_exp_mult,factionRep:G.Player.faction_rep_mult,hacking:G.Player.hacking_mult,hackingExp:G.Player.hacking_exp_mult,strength:G.Player.strength_mult,strengthExp:G.Player.strength_exp_mult,workMoney:G.Player.work_money_mult},timeWorked:G.Player.timeWorked,tor:J.SpecialServerIps.hasOwnProperty("Darkweb Server"),workHackExpGain:G.Player.workHackExpGained,workStrExpGain:G.Player.workStrExpGained,workDefExpGain:G.Player.workDefExpGained,workDexExpGain:G.Player.workDexExpGained,workAgiExpGain:G.Player.workAgiExpGained,workChaExpGain:G.Player.workChaExpGained,workRepGain:G.Player.workRepGained,workMoneyGain:G.Player.workMoneyGained,hackingExp:G.Player.hacking_exp,strengthExp:G.Player.strength_exp,defenseExp:G.Player.defense_exp,dexterityExp:G.Player.dexterity_exp,agilityExp:G.Player.agility_exp,charismaExp:G.Player.charisma_exp}},getPlayer:function(){n("getPlayer",Object(i.getRamCost)("getPlayer"));const e={hacking_skill:G.Player.hacking_skill,hp:G.Player.hp,max_hp:G.Player.max_hp,strength:G.Player.strength,defense:G.Player.defense,dexterity:G.Player.dexterity,agility:G.Player.agility,charisma:G.Player.charisma,intelligence:G.Player.intelligence,hacking_chance_mult:G.Player.hacking_chance_mult,hacking_speed_mult:G.Player.hacking_speed_mult,hacking_money_mult:G.Player.hacking_money_mult,hacking_grow_mult:G.Player.hacking_grow_mult,hacking_exp:G.Player.hacking_exp,strength_exp:G.Player.strength_exp,defense_exp:G.Player.defense_exp,dexterity_exp:G.Player.dexterity_exp,agility_exp:G.Player.agility_exp,charisma_exp:G.Player.charisma_exp,hacking_mult:G.Player.hacking_mult,strength_mult:G.Player.strength_mult,defense_mult:G.Player.defense_mult,dexterity_mult:G.Player.dexterity_mult,agility_mult:G.Player.agility_mult,charisma_mult:G.Player.charisma_mult,hacking_exp_mult:G.Player.hacking_exp_mult,strength_exp_mult:G.Player.strength_exp_mult,defense_exp_mult:G.Player.defense_exp_mult,dexterity_exp_mult:G.Player.dexterity_exp_mult,agility_exp_mult:G.Player.agility_exp_mult,charisma_exp_mult:G.Player.charisma_exp_mult,company_rep_mult:G.Player.company_rep_mult,faction_rep_mult:G.Player.faction_rep_mult,money:G.Player.money.toNumber(),city:G.Player.city,location:G.Player.location,crime_money_mult:G.Player.crime_money_mult,crime_success_mult:G.Player.crime_success_mult,isWorking:G.Player.isWorking,workType:G.Player.workType,currentWorkFactionName:G.Player.currentWorkFactionName,currentWorkFactionDescription:G.Player.currentWorkFactionDescription,workHackExpGainRate:G.Player.workHackExpGainRate,workStrExpGainRate:G.Player.workStrExpGainRate,workDefExpGainRate:G.Player.workDefExpGainRate,workDexExpGainRate:G.Player.workDexExpGainRate,workAgiExpGainRate:G.Player.workAgiExpGainRate,workChaExpGainRate:G.Player.workChaExpGainRate,workRepGainRate:G.Player.workRepGainRate,workMoneyGainRate:G.Player.workMoneyGainRate,workMoneyLossRate:G.Player.workMoneyLossRate,workHackExpGained:G.Player.workHackExpGained,workStrExpGained:G.Player.workStrExpGained,workDefExpGained:G.Player.workDefExpGained,workDexExpGained:G.Player.workDexExpGained,workAgiExpGained:G.Player.workAgiExpGained,workChaExpGained:G.Player.workChaExpGained,workRepGained:G.Player.workRepGained,workMoneyGained:G.Player.workMoneyGained,createProgramName:G.Player.createProgramName,createProgramReqLvl:G.Player.createProgramReqLvl,className:G.Player.className,crimeType:G.Player.crimeType,work_money_mult:G.Player.work_money_mult,hacknet_node_money_mult:G.Player.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:G.Player.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:G.Player.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:G.Player.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:G.Player.hacknet_node_level_cost_mult,hasWseAccount:G.Player.hasWseAccount,hasTixApiAccess:G.Player.hasTixApiAccess,has4SData:G.Player.has4SData,has4SDataTixApi:G.Player.has4SDataTixApi,bladeburner_max_stamina_mult:G.Player.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:G.Player.bladeburner_stamina_gain_mult,bladeburner_analysis_mult:G.Player.bladeburner_analysis_mult,bladeburner_success_chance_mult:G.Player.bladeburner_success_chance_mult,bitNodeN:G.Player.bitNodeN,totalPlaytime:G.Player.totalPlaytime,playtimeSinceLastAug:G.Player.playtimeSinceLastAug,playtimeSinceLastBitnode:G.Player.playtimeSinceLastBitnode,jobs:{},factions:G.Player.factions.slice(),tor:J.SpecialServerIps.hasOwnProperty("Darkweb Server")};return Object.assign(e.jobs,G.Player.jobs),e},hospitalize:function(){return n("hospitalize",Object(i.getRamCost)("hospitalize")),je("hospitalize",1),G.Player.hospitalize()},isBusy:function(){return n("isBusy",Object(i.getRamCost)("isBusy")),je("isBusy",1),G.Player.isWorking||W.c},stopAction:function(){if(n("stopAction",Object(i.getRamCost)("stopAction")),je("stopAction",1),G.Player.isWorking){var e=G.Player.singularityStopWork();return t.log("stopAction",e),!0}return!1},upgradeHomeRam:function(){n("upgradeHomeRam",Object(i.getRamCost)("upgradeHomeRam")),je("upgradeHomeRam",2);const e=G.Player.getHomeComputer();if(e.maxRam>=_.CONSTANTS.HomeComputerMaxRam)return t.log("upgradeHomeRam","Your home computer is at max RAM."),!1;const a=G.Player.getUpgradeHomeRamCost();return G.Player.money.lt(a)?(t.log("upgradeHomeRam",`You don't have enough money. Need ${ye.numeralWrapper.formatMoney(a)}`),!1):(e.maxRam*=2,G.Player.loseMoney(a),G.Player.gainIntelligenceExp(_.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeRam",`Purchased additional RAM for home computer! It now has ${e.maxRam}GB of RAM.`),!0)},getUpgradeHomeRamCost:function(){return n("getUpgradeHomeRamCost",Object(i.getRamCost)("getUpgradeHomeRamCost")),je("getUpgradeHomeRamCost",2),G.Player.getUpgradeHomeRamCost()},workForCompany:function(e){if(n("workForCompany",Object(i.getRamCost)("workForCompany")),je("workForCompany",2),null==e&&(e=G.Player.companyName),null==e||""===e||!(f.Companies[e]instanceof h.Company))return t.log("workForCompany",`Invalid company: '${e}'`),!1;if(!Object.keys(G.Player.jobs).includes(e))return t.log("workForCompany",`You do not have a job at '${e}'`),!1;if(W.c)return t.log("workForCompany","You are in the middle of a mission."),!1;const a=G.Player.jobs[e],r=y.CompanyPositions[a];if(""===a||!(r instanceof g.CompanyPosition))return t.log("workForCompany","You do not have a job"),!1;if(G.Player.isWorking){var o=G.Player.singularityStopWork();t.log("workForCompany",o)}return r.isPartTimeJob()?G.Player.startWorkPartTime(e):G.Player.startWork(e),t.log("workForCompany",`Began working at '${G.Player.companyName}' as a '${a}'`),!0},applyToCompany:function(e,a){var r;switch(n("applyToCompany",Object(i.getRamCost)("applyToCompany")),je("applyToCompany",2),Ye("applyToCompany",e),G.Player.location=e,a.toLowerCase()){case"software":r=G.Player.applyForSoftwareJob(!0);break;case"software consultant":r=G.Player.applyForSoftwareConsultantJob(!0);break;case"it":r=G.Player.applyForItJob(!0);break;case"security engineer":r=G.Player.applyForSecurityEngineerJob(!0);break;case"network engineer":r=G.Player.applyForNetworkEngineerJob(!0);break;case"business":r=G.Player.applyForBusinessJob(!0);break;case"business consultant":r=G.Player.applyForBusinessConsultantJob(!0);break;case"security":r=G.Player.applyForSecurityJob(!0);break;case"agent":r=G.Player.applyForAgentJob(!0);break;case"employee":r=G.Player.applyForEmployeeJob(!0);break;case"part-time employee":r=G.Player.applyForPartTimeEmployeeJob(!0);break;case"waiter":r=G.Player.applyForWaiterJob(!0);break;case"part-time waiter":r=G.Player.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",`Invalid job: '${a}'.`),!1}return Object(Se.isString)(r)?(t.log("applyToCompany",r),!1):(r?t.log("applyToCompany",`You were offered a new job at '${e}' as a '${G.Player.jobs[e]}'`):t.log("applyToCompany",`You failed to get a new job/promotion at '${e}' in the '${a}' field.`),r)},getCompanyRep:function(e){return n("getCompanyRep",Object(i.getRamCost)("getCompanyRep")),je("getCompanyRep",2),Ye("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){return n("getCompanyFavor",Object(i.getRamCost)("getCompanyFavor")),je("getCompanyFavor",2),Ye("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){return n("getCompanyFavorGain",Object(i.getRamCost)("getCompanyFavorGain")),je("getCompanyFavorGain",2),Ye("getCompanyFavorGain",e).getFavorGain()[0]},checkFactionInvitations:function(){return n("checkFactionInvitations",Object(i.getRamCost)("checkFactionInvitations")),je("checkFactionInvitations",2),G.Player.factionInvitations.slice()},joinFaction:function(e){if(n("joinFaction",Object(i.getRamCost)("joinFaction")),je("joinFaction",2),Ve("joinFaction",e),!G.Player.factionInvitations.includes(e))return t.log("joinFaction",`You have not been invited by faction '${e}'`),!1;const a=T.Factions[e];Object(M.joinFaction)(a);for(let t=0;t<G.Player.factionInvitations.length;++t)(G.Player.factionInvitations[t]==e||T.Factions[G.Player.factionInvitations[t]].isBanned)&&(G.Player.factionInvitations.splice(t,1),t--);return G.Player.gainIntelligenceExp(_.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("joinFaction",`Joined the '${e}' faction.`),!0},workForFaction:function(e,a){if(n("workForFaction",Object(i.getRamCost)("workForFaction")),je("workForFaction",2),Ve("workForFaction",e),G.Player.inGang()&&void 0!==C.AllGangs[e])t.log("workForFaction",`Faction '${e}' does not offer work at the moment.`);else{if(!W.c){if(!G.Player.factions.includes(e))return t.log("workForFaction",`You are not a member of '${e}'`),!1;if(G.Player.isWorking){const e=G.Player.singularityStopWork();t.log("workForFaction",e)}var r=T.Factions[e];switch(a.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"].includes(r.name)?(G.Player.startFactionHackWork(r),t.log("workForFaction",`Started carrying out hacking contracts for '${r.name}'`),!0):(t.log("workForFaction",`Faction '${r.name}' do not need help with hacking contracts.`),!1);case"field":case"fieldwork":case"field work":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Tetrads","Slum Snakes"].includes(r.name)?(G.Player.startFactionFieldWork(r),t.log("workForFaction",`Started carrying out field missions for '${r.name}'`),!0):(t.log("workForFaction",`Faction '${r.name}' do not need help with field missions.`),!1);case"security":case"securitywork":case"security work":return["ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Syndicate","Tetrads","Slum Snakes","Tian Di Hui"].includes(r.name)?(G.Player.startFactionSecurityWork(r),t.log("workForFaction",`Started carrying out security work for '${r.name}'`),!0):(t.log("workForFaction",`Faction '${r.name}' do not need help with security work.`),!1);default:t.log("workForFaction",`Invalid work type: '${a}`)}return!0}t.log("workForFaction","You are in the middle of a mission.")}},getFactionRep:function(e){return n("getFactionRep",Object(i.getRamCost)("getFactionRep")),je("getFactionRep",2),Ve("getFactionRep",e).playerReputation},getFactionFavor:function(e){return n("getFactionFavor",Object(i.getRamCost)("getFactionFavor")),je("getFactionFavor",2),Ve("getFactionFavor",e).favor},getFactionFavorGain:function(e){return n("getFactionFavorGain",Object(i.getRamCost)("getFactionFavorGain")),je("getFactionFavorGain",2),Ve("getFactionFavorGain",e).getFavorGain()[0]},donateToFaction:function(e,a){n("donateToFaction",Object(i.getRamCost)("donateToFaction")),je("donateToFaction",3);const r=Ve("donateToFaction",e);if("number"!=typeof a||a<=0)return t.log("donateToFaction",`Invalid donation amount: '${a}'.`),!1;if(G.Player.money.lt(a))return t.log("donateToFaction",`You do not have enough money to donate ${ye.numeralWrapper.formatMoney(a)} to '${e}'`),!1;const o=Math.round(_.CONSTANTS.BaseFavorToDonate*m.BitNodeMultipliers.RepToDonateToFaction);if(r.favor<o)return t.log("donateToFaction",`You do not have enough favor to donate to this faction. Have ${r.favor}, need ${o}`),!1;const s=a/_.CONSTANTS.DonateMoneyToRepDivisor*G.Player.faction_rep_mult;return r.playerReputation+=s,G.Player.loseMoney(a),t.log("donateToFaction",`${ye.numeralWrapper.formatMoney(a)} donated to '${e}' for ${ye.numeralWrapper.formatReputation(s)} reputation`),!0},createProgram:function(e){if(n("createProgram",Object(i.getRamCost)("createProgram")),je("createProgram",3),W.c)return void t.log("createProgram","You are in the middle of a mission.");if(G.Player.isWorking){var a=G.Player.singularityStopWork();t.log("createProgram",a)}e=e.toLowerCase();let r=null;for(const t in H.Programs)H.Programs[t].name.toLowerCase()==e&&(r=H.Programs[t]);return null==r?(t.log("createProgram",`The specified program does not exist: '${e}`),!1):G.Player.hasProgram(r.name)?(t.log("createProgram",`You already have the '${r.name}' program`),!1):r.create.req(G.Player)?(G.Player.startCreateProgramWork(r.name,r.create.time,r.create.level),t.log("createProgram",`Began creating program: '${e}'`),!0):(t.log("createProgram",`Hacking level is too low to create '${r.name}' (level ${r.create.level} req)`),!1)},commitCrime:function(e){if(n("commitCrime",Object(i.getRamCost)("commitCrime")),je("commitCrime",3),W.c)return void t.log("commitCrime","You are in the middle of a mission.");if(G.Player.isWorking){const e=G.Player.singularityStopWork();t.log("commitCrime",e)}G.Player.gotoLocation(D.LocationName.Slums);const a=Object(p.findCrime)(e.toLowerCase());if(null==a)throw Le("commitCrime",`Invalid crime: '${e}'`);return t.log("commitCrime",`Attempting to commit ${a.name}...`),a.commit(G.Player,1,{workerscript:t})},getCrimeChance:function(e){n("getCrimeChance",Object(i.getRamCost)("getCrimeChance")),je("getCrimeChance",3);const t=Object(p.findCrime)(e.toLowerCase());if(null==t)throw Le("getCrimeChance",`Invalid crime: ${e}`);return t.successRate(G.Player)},getCrimeStats:function(e){n("getCrimeStats",Object(i.getRamCost)("getCrimeStats")),je("getCrimeStats",3);const t=Object(p.findCrime)(e.toLowerCase());if(null==t)throw Le("getCrimeStats",`Invalid crime: ${e}`);return Object.assign({},t)},getOwnedAugmentations:function(e=!1){n("getOwnedAugmentations",Object(i.getRamCost)("getOwnedAugmentations")),je("getOwnedAugmentations",3);for(var t=[],a=0;a<G.Player.augmentations.length;++a)t.push(G.Player.augmentations[a].name);if(e)for(a=0;a<G.Player.queuedAugmentations.length;++a)t.push(G.Player.queuedAugmentations[a].name);return t},getOwnedSourceFiles:function(){n("getOwnedSourceFiles",Object(i.getRamCost)("getOwnedSourceFiles")),je("getOwnedSourceFiles",3);let e=[];for(let t=0;t<G.Player.sourceFiles.length;++t)e.push({n:G.Player.sourceFiles[t].n,lvl:G.Player.sourceFiles[t].lvl});return e},getAugmentationsFromFaction:function(e){n("getAugmentationsFromFaction",Object(i.getRamCost)("getAugmentationsFromFaction")),je("getAugmentationsFromFaction",3);const t=Ve("getAugmentationsFromFaction",e);if(G.Player.hasGangWith(e)){const e=[];for(const t in s.Augmentations){s.Augmentations[t].isSpecial||e.push(t)}return e}return t.augmentations.slice()},getAugmentationPrereq:function(e){return n("getAugmentationPrereq",Object(i.getRamCost)("getAugmentationPrereq")),je("getAugmentationPrereq",3),Je("getAugmentationPrereq",e).prereqs.slice()},getAugmentationCost:function(e){n("getAugmentationCost",Object(i.getRamCost)("getAugmentationCost")),je("getAugmentationCost",3);const t=Je("getAugmentationCost",e);return[t.baseRepRequirement,t.baseCost]},getAugmentationStats:function(e){n("getAugmentationStats",Object(i.getRamCost)("getAugmentationStats")),je("getAugmentationStats",3);const t=Je("getAugmentationStats",e);return Object.assign({},t.mults)},purchaseAugmentation:function(e,a){n("purchaseAugmentation",Object(i.getRamCost)("purchaseAugmentation")),je("purchaseAugmentation",3);const r=Ve("purchaseAugmentation",e),o=Je("purchaseAugmentation",a);let l=[];if(G.Player.hasGangWith(e))for(const e in s.Augmentations){s.Augmentations[e].isSpecial||l.push(e)}else l=r.augmentations;if(!l.includes(a))return t.log("purchaseAugmentation",`Faction '${e}' does not have the '${a}' augmentation.`),!1;if(!(o.name===u.AugmentationNames.NeuroFluxGovernor)){for(let e=0;e<G.Player.queuedAugmentations.length;++e)if(G.Player.queuedAugmentations[e].name===o.name)return t.log("purchaseAugmentation",`You already have the '${a}' augmentation.`),!1;for(let e=0;e<G.Player.augmentations.length;++e)if(G.Player.augmentations[e].name===o.name)return t.log("purchaseAugmentation",`You already have the '${a}' augmentation.`),!1}if(r.playerReputation<o.baseRepRequirement)return t.log("purchaseAugmentation",`You do not have enough reputation with '${r.name}'.`),!1;const c=Object(M.purchaseAugmentation)(o,r,!0);return t.log("purchaseAugmentation",c),!(!Object(Se.isString)(c)||!c.startsWith("You purchased"))&&(G.Player.gainIntelligenceExp(_.CONSTANTS.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){n("softReset",Object(i.getRamCost)("softReset")),je("softReset",3),t.log("softReset","Soft resetting. This will cause this script to be killed"),Object(be.setTimeoutRef)(()=>{Object(c.a)(),Xe(e)},0),t.running=!1,Object(ce.killWorkerScript)(t)},installAugmentations:function(e){if(n("installAugmentations",Object(i.getRamCost)("installAugmentations")),je("installAugmentations",3),0===G.Player.queuedAugmentations.length)return t.log("installAugmentations","You do not have any Augmentations to be installed."),!1;G.Player.gainIntelligenceExp(_.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("installAugmentations","Installing Augmentations. This will cause this script to be killed"),Object(be.setTimeoutRef)(()=>{Object(l.e)(),Xe(e)},0),t.running=!1,Object(ce.killWorkerScript)(t)},gang:{createGang:function(e){n("createGang",Object(i.getRamCost)("gang","createGang"));if(!G.Player.canAccessGang()||!["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"].includes(e))return!1;if(G.Player.inGang())return!1;if(!G.Player.factions.includes(e))return!1;const t="NiteSec"===e||"The Black Hand"===e;return G.Player.startGang(e,t),!0},inGang:function(){return n("inGang",Object(i.getRamCost)("gang","inGang")),G.Player.inGang()},getMemberNames:function(){return n("getMemberNames",Object(i.getRamCost)("gang","getMemberNames")),$e("getMemberNames"),G.Player.gang.members.map(e=>e.name)},getGangInformation:function(){return n("getGangInformation",Object(i.getRamCost)("gang","getGangInformation")),$e("getGangInformation"),{faction:G.Player.gang.facName,isHacking:G.Player.gang.isHackingGang,moneyGainRate:G.Player.gang.moneyGainRate,power:G.Player.gang.getPower(),respect:G.Player.gang.respect,respectGainRate:G.Player.gang.respectGainRate,territory:G.Player.gang.getTerritory(),territoryClashChance:G.Player.gang.territoryClashChance,territoryWarfareEngaged:G.Player.gang.territoryWarfareEngaged,wantedLevel:G.Player.gang.wanted,wantedLevelGainRate:G.Player.gang.wantedGainRate}},getOtherGangInformation:function(){n("getOtherGangInformation",Object(i.getRamCost)("gang","getOtherGangInformation")),$e("getOtherGangInformation");const e={};for(const t in C.AllGangs)e[t]=Object.assign({},C.AllGangs[t]);return e},getMemberInformation:function(e){n("getMemberInformation",Object(i.getRamCost)("gang","getMemberInformation")),$e("getMemberInformation");const t=Ke("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.calculateAscensionMult(t.hack_asc_points),str_asc_mult:t.calculateAscensionMult(t.str_asc_points),def_asc_mult:t.calculateAscensionMult(t.def_asc_points),dex_asc_mult:t.calculateAscensionMult(t.dex_asc_points),agi_asc_mult:t.calculateAscensionMult(t.agi_asc_points),cha_asc_mult:t.calculateAscensionMult(t.cha_asc_points),hack_asc_points:t.hack_asc_points,str_asc_points:t.str_asc_points,def_asc_points:t.def_asc_points,dex_asc_points:t.dex_asc_points,agi_asc_points:t.agi_asc_points,cha_asc_points:t.cha_asc_points,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){return n("canRecruitMember",Object(i.getRamCost)("gang","canRecruitMember")),$e("canRecruitMember"),G.Player.gang.canRecruitMember()},recruitMember:function(e){n("recruitMember",Object(i.getRamCost)("gang","recruitMember")),$e("recruitMember");const a=G.Player.gang.recruitMember(e);return a?t.log("recruitMember",`Successfully recruited Gang Member '${e}'`):t.log("recruitMember",`Failed to recruit Gang Member '${e}'`),a},getTaskNames:function(){n("getTaskNames",Object(i.getRamCost)("gang","getTaskNames")),$e("getTaskNames");const e=G.Player.gang.getAllTaskNames();return e.unshift("Unassigned"),e},setMemberTask:function(e,a){n("setMemberTask",Object(i.getRamCost)("gang","setMemberTask")),$e("setMemberTask");const r=Ke("setMemberTask",e).assignToTask(a);return r?t.log("setMemberTask",`Successfully assigned Gang Member '${e}' to '${a}' task`):t.log("setMemberTask",`Failed to assign Gang Member '${e}' to '${a}' task. '${e}' is now Unassigned`),r},getTaskStats:function(e){n("getTaskStats",Object(i.getRamCost)("gang","getTaskStats")),$e("getTaskStats");const t=function(e,t){const n=S.GangMemberTasks[t];if(!n)throw Le(`gang.${e}`,`Invalid task: '${t}'`);return n}("getTaskStats",e),a=Object.assign({},t);return a.territory=Object.assign({},t.territory),a},getEquipmentNames:function(){return n("getEquipmentNames",Object(i.getRamCost)("gang","getEquipmentNames")),$e("getEquipmentNames"),Object.keys(P.GangMemberUpgrades)},getEquipmentCost:function(e){n("getEquipmentCost",Object(i.getRamCost)("gang","getEquipmentCost")),$e("getEquipmentCost");const t=P.GangMemberUpgrades[e];return null===t?1/0:G.Player.gang.getUpgradeCost(t)},getEquipmentType:function(e){n("getEquipmentType",Object(i.getRamCost)("gang","getEquipmentType")),$e("getEquipmentType");const t=P.GangMemberUpgrades[e];return null==t?"":t.getType()},getEquipmentStats:function(e){n("getEquipmentStats",Object(i.getRamCost)("gang","getEquipmentStats")),$e("getEquipmentStats");const t=P.GangMemberUpgrades[e];if(!t)throw Le("getEquipmentStats",`Invalid equipment: ${e}`);return Object.assign({},t.mults)},purchaseEquipment:function(e,a){n("purchaseEquipment",Object(i.getRamCost)("gang","purchaseEquipment")),$e("purchaseEquipment");const r=Ke("purchaseEquipment",e),o=P.GangMemberUpgrades[a];if(!o)return!1;const s=r.buyUpgrade(o,G.Player,G.Player.gang);return s?t.log("purchaseEquipment",`Purchased '${a}' for Gang member '${e}'`):t.log("purchaseEquipment",`Failed to purchase '${a}' for Gang member '${e}'`),s},ascendMember:function(e){n("ascendMember",Object(i.getRamCost)("gang","ascendMember")),$e("ascendMember");const a=Ke("ascendMember",e);if(a.canAscend())return G.Player.gang.ascendMember(a,t)},setTerritoryWarfare:function(e){n("setTerritoryWarfare",Object(i.getRamCost)("gang","setTerritoryWarfare")),$e("setTerritoryWarfare"),e?(G.Player.gang.territoryWarfareEngaged=!0,t.log("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(G.Player.gang.territoryWarfareEngaged=!1,t.log("setTerritoryWarfare","Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){if(n("getChanceToWinClash",Object(i.getRamCost)("gang","getChanceToWinClash")),$e("getChanceToWinClash"),null==C.AllGangs[e])throw Le(`gang.${getChanceToWinClash}`,`Invalid gang: ${e}`);const t=C.AllGangs[G.Player.gang.facName].power;return t/(C.AllGangs[e].power+t)},getBonusTime:function(){return n("getBonusTime",Object(i.getRamCost)("gang","getBonusTime")),$e("getBonusTime"),Math.round(G.Player.gang.storedCycles/5)}},bladeburner:{getContractNames:function(){return n("getContractNames",Object(i.getRamCost)("bladeburner","getContractNames")),We("getContractNames"),G.Player.bladeburner.getContractNamesNetscriptFn()},getOperationNames:function(){return n("getOperationNames",Object(i.getRamCost)("bladeburner","getOperationNames")),We("getOperationNames"),G.Player.bladeburner.getOperationNamesNetscriptFn()},getBlackOpNames:function(){return n("getBlackOpNames",Object(i.getRamCost)("bladeburner","getBlackOpNames")),We("getBlackOpNames"),G.Player.bladeburner.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){return n("getBlackOpRank",Object(i.getRamCost)("bladeburner","getBlackOpRank")),We("getBlackOpRank"),ze("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){return n("getGeneralActionNames",Object(i.getRamCost)("bladeburner","getGeneralActionNames")),We("getGeneralActionNames"),G.Player.bladeburner.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){return n("getSkillNames",Object(i.getRamCost)("bladeburner","getSkillNames")),We("getSkillNames"),G.Player.bladeburner.getSkillNamesNetscriptFn()},startAction:function(e="",a=""){n("startAction",Object(i.getRamCost)("bladeburner","startAction")),We("startAction");try{return G.Player.bladeburner.startActionNetscriptFn(G.Player,e,a,t)}catch(e){throw Le("bladeburner.startAction",e)}},stopBladeburnerAction:function(){return n("stopBladeburnerAction",Object(i.getRamCost)("bladeburner","stopBladeburnerAction")),We("stopBladeburnerAction"),G.Player.bladeburner.resetAction()},getCurrentAction:function(){return n("getCurrentAction",Object(i.getRamCost)("bladeburner","getCurrentAction")),We("getCurrentAction"),G.Player.bladeburner.getTypeAndNameFromActionId(G.Player.bladeburner.action)},getActionTime:function(e="",a=""){n("getActionTime",Object(i.getRamCost)("bladeburner","getActionTime")),We("getActionTime");try{return G.Player.bladeburner.getActionTimeNetscriptFn(G.Player,e,a,t)}catch(e){throw Le("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(e="",a=""){n("getActionEstimatedSuccessChance",Object(i.getRamCost)("bladeburner","getActionEstimatedSuccessChance")),We("getActionEstimatedSuccessChance");try{return G.Player.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(G.Player,e,a,t)}catch(e){throw Le("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",a){n("getActionRepGain",Object(i.getRamCost)("bladeburner","getActionRepGain")),We("getActionRepGain");const r=ze("getActionRepGain",e,t);let o;return o=null==a||isNaN(a)?Math.pow(r.rewardFac,r.level-1):Math.pow(r.rewardFac,a-1),r.rankGain*o*m.BitNodeMultipliers.BladeburnerRank},getActionCountRemaining:function(e="",a=""){n("getActionCountRemaining",Object(i.getRamCost)("bladeburner","getActionCountRemaining")),We("getActionCountRemaining");try{return G.Player.bladeburner.getActionCountRemainingNetscriptFn(e,a,t)}catch(e){throw Le("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){return n("getActionMaxLevel",Object(i.getRamCost)("bladeburner","getActionMaxLevel")),We("getActionMaxLevel"),ze("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){return n("getActionCurrentLevel",Object(i.getRamCost)("bladeburner","getActionCurrentLevel")),We("getActionCurrentLevel"),ze("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){return n("getActionAutolevel",Object(i.getRamCost)("bladeburner","getActionAutolevel")),We("getActionAutolevel"),ze("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",a=!0){n("setActionAutolevel",Object(i.getRamCost)("bladeburner","setActionAutolevel")),We("setActionAutolevel"),ze("setActionAutolevel",e,t).autoLevel=a},setActionLevel:function(e="",t="",a=1){n("setActionLevel",Object(i.getRamCost)("bladeburner","setActionLevel")),We("setActionLevel");const r=ze("setActionLevel",e,t);if(a<1||a>r.maxLevel)throw Le("bladeburner.setActionLevel",`Level must be between 1 and ${r.maxLevel}, is ${a}`);r.level=a},getRank:function(){return n("getRank",Object(i.getRamCost)("bladeburner","getRank")),We("getRank"),G.Player.bladeburner.rank},getSkillPoints:function(){return n("getSkillPoints",Object(i.getRamCost)("bladeburner","getSkillPoints")),We("getSkillPoints"),G.Player.bladeburner.skillPoints},getSkillLevel:function(e=""){n("getSkillLevel",Object(i.getRamCost)("bladeburner","getSkillLevel")),We("getSkillLevel");try{return G.Player.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Le("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(e=""){n("getSkillUpgradeCost",Object(i.getRamCost)("bladeburner","getSkillUpgradeCost")),We("getSkillUpgradeCost");try{return G.Player.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Le("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(e){n("upgradeSkill",Object(i.getRamCost)("bladeburner","upgradeSkill")),We("upgradeSkill");try{return G.Player.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Le("bladeburner.upgradeSkill",e)}},getTeamSize:function(e="",a=""){n("getTeamSize",Object(i.getRamCost)("bladeburner","getTeamSize")),We("getTeamSize");try{return G.Player.bladeburner.getTeamSizeNetscriptFn(e,a,t)}catch(e){throw Le("bladeburner.getTeamSize",e)}},setTeamSize:function(e="",a="",r){n("setTeamSize",Object(i.getRamCost)("bladeburner","setTeamSize")),We("setTeamSize");try{return G.Player.bladeburner.setTeamSizeNetscriptFn(e,a,r,t)}catch(e){throw Le("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(e){return n("getCityEstimatedPopulation",Object(i.getRamCost)("bladeburner","getCityEstimatedPopulation")),We("getCityEstimatedPopulation"),Ge("getCityEstimatedPopulation",e),G.Player.bladeburner.cities[e].popEst},getCityEstimatedCommunities:function(e){return n("getCityEstimatedCommunities",Object(i.getRamCost)("bladeburner","getCityEstimatedCommunities")),We("getCityEstimatedCommunities"),Ge("getCityEstimatedCommunities",e),G.Player.bladeburner.cities[e].commsEst},getCityChaos:function(e){return n("getCityChaos",Object(i.getRamCost)("bladeburner","getCityChaos")),We("getCityChaos"),Ge("getCityChaos",e),G.Player.bladeburner.cities[e].chaos},getCity:function(){return n("getCity",Object(i.getRamCost)("bladeburner","getCity")),We("getCityChaos"),G.Player.bladeburner.city},switchCity:function(e){return n("switchCity",Object(i.getRamCost)("bladeburner","switchCity")),We("switchCity"),Ge("switchCity",e),G.Player.bladeburner.city=e},getStamina:function(){return n("getStamina",Object(i.getRamCost)("bladeburner","getStamina")),We("getStamina"),[G.Player.bladeburner.stamina,G.Player.bladeburner.maxStamina]},joinBladeburnerFaction:function(){return n("joinBladeburnerFaction",Object(i.getRamCost)("bladeburner","joinBladeburnerFaction")),We("joinBladeburnerFaction",!0),G.Player.bladeburner.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){if(n("joinBladeburnerDivision",Object(i.getRamCost)("bladeburner","joinBladeburnerDivision")),We("joinBladeburnerDivision",!0),7===G.Player.bitNodeN||X.SourceFileFlags[7]>0){if(8===G.Player.bitNodeN)return!1;if(G.Player.bladeburner instanceof d.Bladeburner)return!0;if(G.Player.strength>=100&&G.Player.defense>=100&&G.Player.dexterity>=100&&G.Player.agility>=100){G.Player.bladeburner=new d.Bladeburner(G.Player),t.log("joinBladeburnerDivision","You have been accepted into the Bladeburner division");const e=document.getElementById("world-menu-header");return e instanceof HTMLElement&&(e.click(),e.click()),!0}return t.log("joinBladeburnerDivision","You do not meet the requirements for joining the Bladeburner division"),!1}},getBonusTime:function(){return n("getBonusTime",Object(i.getRamCost)("bladeburner","getBonusTime")),We("getBonusTime"),Math.round(G.Player.bladeburner.storedCycles/5)}},codingcontract:{attempt:function(e,a,r=t.serverIp,{returnReward:o}={}){n("attempt",Object(i.getRamCost)("codingcontract","attempt"));const s=qe("attempt",r,a);if(Object(ve.is2DArray)(e)){let t=[];for(let n=0;n<e.length;++n)t.push(["[",e[n].toString(),"]"].join(""));e=t.join(",")}else e=String(e);const l=pe(r,"codingcontract.attempt");if(s.isSolution(e)){const e=G.Player.gainCodingContractReward(s.reward,s.getDifficulty());return t.log("attempt",`Successfully completed Coding Contract '${a}'. Reward: ${e}`),l.removeContract(a),!o||e}return++s.tries,s.tries>=s.getMaxNumTries()?(t.log("attempt",`Coding Contract attempt '${a}' failed. Contract is now self-destructing`),l.removeContract(a)):t.log("attempt",`Coding Contract attempt '${a}' failed. ${s.getMaxNumTries()-s.tries} attempts remaining.`),!!o&&""},getContractType:function(e,a=t.serverIp){return n("getContractType",Object(i.getRamCost)("codingcontract","getContractType")),qe("getContractType",a,e).getType()},getData:function(e,a=t.serverIp){n("getData",Object(i.getRamCost)("codingcontract","getData"));const r=qe("getData",a,e).getData();if(r.constructor===Array){const e=r.slice();for(let t=0;t<e.length;++t)r[t].constructor===Array&&(e[t]=r[t].slice());return e}return r},getDescription:function(e,a=t.serverIp){return n("getDescription",Object(i.getRamCost)("codingcontract","getDescription")),qe("getDescription",a,e).getDescription()},getNumTriesRemaining:function(e,a=t.serverIp){n("getNumTriesRemaining",Object(i.getRamCost)("codingcontract","getNumTriesRemaining"));const r=qe("getNumTriesRemaining",a,e);return r.getMaxNumTries()-r.tries}},sleeve:{getNumSleeves:function(){return n("getNumSleeves",Object(i.getRamCost)("sleeve","getNumSleeves")),He("getNumSleeves"),G.Player.sleeves.length},setToShockRecovery:function(e=0){return n("setToShockRecovery",Object(i.getRamCost)("sleeve","setToShockRecovery")),He("setToShockRecovery"),Ue("setToShockRecovery",e),G.Player.sleeves[e].shockRecovery(G.Player)},setToSynchronize:function(e=0){return n("setToSynchronize",Object(i.getRamCost)("sleeve","setToSynchronize")),He("setToSynchronize"),Ue("setToSynchronize",e),G.Player.sleeves[e].synchronize(G.Player)},setToCommitCrime:function(e=0,t=""){return n("setToCommitCrime",Object(i.getRamCost)("sleeve","setToCommitCrime")),He("setToCommitCrime"),Ue("setToCommitCrime",e),G.Player.sleeves[e].commitCrime(G.Player,t)},setToUniversityCourse:function(e=0,t="",a=""){return n("setToUniversityCourse",Object(i.getRamCost)("sleeve","setToUniversityCourse")),He("setToUniversityCourse"),Ue("setToUniversityCourse",e),G.Player.sleeves[e].takeUniversityCourse(G.Player,t,a)},travel:function(e=0,t=""){return n("travel",Object(i.getRamCost)("sleeve","travel")),He("travel"),Ue("travel",e),G.Player.sleeves[e].travel(G.Player,t)},setToCompanyWork:function(e=0,t=""){n("setToCompanyWork",Object(i.getRamCost)("sleeve","setToCompanyWork")),He("setToCompanyWork"),Ue("setToCompanyWork",e);for(let n=0;n<G.Player.sleeves.length;++n){if(n===e)continue;const a=G.Player.sleeves[n];if(a.currentTask===he.SleeveTaskType.Company&&a.currentTaskLocation===t)throw Le("sleeve.setToFactionWork",`Sleeve ${e} cannot work for company ${t} because Sleeve ${n} is already working for them.`)}return G.Player.sleeves[e].workForCompany(G.Player,t)},setToFactionWork:function(e=0,t="",a=""){n("setToFactionWork",Object(i.getRamCost)("sleeve","setToFactionWork")),He("setToFactionWork"),Ue("setToFactionWork",e);for(let n=0;n<G.Player.sleeves.length;++n){if(n===e)continue;const a=G.Player.sleeves[n];if(a.currentTask===he.SleeveTaskType.Faction&&a.currentTaskLocation===t)throw Le("sleeve.setToFactionWork",`Sleeve ${e} cannot work for faction ${t} because Sleeve ${n} is already working for them.`)}return G.Player.sleeves[e].workForFaction(G.Player,t,a)},setToGymWorkout:function(e=0,t="",a=""){return n("setToGymWorkout",Object(i.getRamCost)("sleeve","setToGymWorkout")),He("setToGymWorkout"),Ue("setToGymWorkout",e),G.Player.sleeves[e].workoutAtGym(G.Player,t,a)},getSleeveStats:function(e=0){n("getSleeveStats",Object(i.getRamCost)("sleeve","getSleeveStats")),He("getSleeveStats"),Ue("getSleeveStats",e);const t=G.Player.sleeves[e];return{shock:100-t.shock,sync:t.sync,hacking_skill:t.hacking_skill,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma}},getTask:function(e=0){n("getTask",Object(i.getRamCost)("sleeve","getTask")),He("getTask"),Ue("getTask",e);const t=G.Player.sleeves[e];return{task:he.SleeveTaskType[t.currentTask],crime:t.crimeType,location:t.currentTaskLocation,gymStatType:t.gymStatType,factionWorkType:O.FactionWorkType[t.factionWorkType]}},getInformation:function(e=0){n("getInformation",Object(i.getRamCost)("sleeve","getInformation")),He("getInformation"),Ue("getInformation",e);const t=G.Player.sleeves[e];return{city:t.city,hp:t.hp,jobs:Object.keys(G.Player.jobs),jobTitle:Object.values(G.Player.jobs),maxHp:t.max_hp,tor:J.SpecialServerIps.hasOwnProperty("Darkweb Server"),mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.currentTaskTime,earningsForSleeves:{workHackExpGain:t.earningsForSleeves.hack,workStrExpGain:t.earningsForSleeves.str,workDefExpGain:t.earningsForSleeves.def,workDexExpGain:t.earningsForSleeves.dex,workAgiExpGain:t.earningsForSleeves.agi,workChaExpGain:t.earningsForSleeves.cha,workMoneyGain:t.earningsForSleeves.money},earningsForPlayer:{workHackExpGain:t.earningsForPlayer.hack,workStrExpGain:t.earningsForPlayer.str,workDefExpGain:t.earningsForPlayer.def,workDexExpGain:t.earningsForPlayer.dex,workAgiExpGain:t.earningsForPlayer.agi,workChaExpGain:t.earningsForPlayer.cha,workMoneyGain:t.earningsForPlayer.money},earningsForTask:{workHackExpGain:t.earningsForTask.hack,workStrExpGain:t.earningsForTask.str,workDefExpGain:t.earningsForTask.def,workDexExpGain:t.earningsForTask.dex,workAgiExpGain:t.earningsForTask.agi,workChaExpGain:t.earningsForTask.cha,workMoneyGain:t.earningsForTask.money},workRepGain:t.getRepGain(G.Player)}},getSleeveAugmentations:function(e=0){n("getSleeveAugmentations",Object(i.getRamCost)("sleeve","getSleeveAugmentations")),He("getSleeveAugmentations"),Ue("getSleeveAugmentations",e);const t=[];for(let n=0;n<G.Player.sleeves[e].augmentations.length;n++)t.push(G.Player.sleeves[e].augmentations[n].name);return t},getSleevePurchasableAugs:function(e=0){n("getSleevePurchasableAugs",Object(i.getRamCost)("sleeve","getSleevePurchasableAugs")),He("getSleevePurchasableAugs"),Ue("getSleevePurchasableAugs",e);const t=Object(fe.findSleevePurchasableAugs)(G.Player.sleeves[e],G.Player),a=[];for(let e=0;e<t.length;e++){const n=t[e];a.push({name:n.name,cost:n.startingCost})}return a},purchaseSleeveAug:function(e=0,t=""){n("purchaseSleeveAug",Object(i.getRamCost)("sleeve","purchaseSleeveAug")),He("purchaseSleeveAug"),Ue("purchaseSleeveAug",e);const a=s.Augmentations[t];if(!a)throw Le("sleeve.purchaseSleeveAug",`Invalid aug: ${t}`);return G.Player.sleeves[e].tryBuyAugmentation(G.Player,a)}},formulas:{basic:{calculateSkill:function(e,t=1){return Fe("basic.calculateSkill",5),Object(F.calculateSkill)(e,t)},calculateExp:function(e,t=1){return Fe("basic.calculateExp",5),Object(F.calculateExp)(e,t)},hackChance:function(e,t){return Fe("basic.hackChance",5),Object(v.calculateHackingChance)(e,t)},hackExp:function(e,t){return Fe("basic.hackExp",5),Object(v.calculateHackingExpGain)(e,t)},hackPercent:function(e,t){return Fe("basic.hackPercent",5),Object(v.calculatePercentMoneyHacked)(e,t)},growPercent:function(e,t,n,a=1){return Fe("basic.growPercent",5),Object(k.calculateServerGrowth)(e,t,n,a)},hackTime:function(e,t){return Fe("basic.hackTime",5),Object(v.calculateHackingTime)(e,t)},growTime:function(e,t){return Fe("basic.growTime",5),Object(v.calculateGrowTime)(e,t)},weakenTime:function(e,t){return Fe("basic.weakenTime",5),Object(v.calculateWeakenTime)(e,t)}},hacknetNodes:{moneyGainRate:function(e,t,n,a=1){return Fe("hacknetNodes.moneyGainRate",5),Object(N.calculateMoneyGainRate)(e,t,n,a)},levelUpgradeCost:function(e,t=1,n=1){return Fe("hacknetNodes.levelUpgradeCost",5),Object(N.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Fe("hacknetNodes.ramUpgradeCost",5),Object(N.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Fe("hacknetNodes.coreUpgradeCost",5),Object(N.calculateCoreUpgradeCost)(e,t,n)},hacknetNodeCost:function(e,t){return Fe("hacknetNodes.hacknetNodeCost",5),Object(N.calculateNodeCost)(e,t)},constants:function(){return Fe("hacknetNodes.constants",5),Object.assign({},R.HacknetNodeConstants)}},hacknetServers:{hashGainRate:function(e,t,n,a,r=1){return Fe("hacknetServers.hashGainRate",9),Object(A.calculateHashGainRate)(e,t,n,a,r)},levelUpgradeCost:function(e,t=1,n=1){return Fe("hacknetServers.levelUpgradeCost",9),Object(A.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Fe("hacknetServers.ramUpgradeCost",9),Object(A.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Fe("hacknetServers.coreUpgradeCost",9),Object(A.calculateCoreUpgradeCost)(e,t,n)},cacheUpgradeCost:function(e,t=1,n=1){return Fe("hacknetServers.cacheUpgradeCost",9),Object(A.calculateCacheUpgradeCost)(e,t,n)},hashUpgradeCost:function(e,t){Fe("hacknetServers.hashUpgradeCost",9);const n=G.Player.hashManager.getUpgrade(e);if(!n)throw Le("formulas.hacknetServers.calculateHashUpgradeCost",`Invalid Hash Upgrade: ${e}`);return n.getCost(t)},hacknetServerCost:function(e,t){return Fe("hacknetServers.hacknetServerCost",9),Object(A.calculateServerCost)(e,t)},constants:function(){return Fe("hacknetServers.constants",9),Object.assign({},R.HacknetServerConstants)}}},heart:{break:function(){return G.Player.karma}},exploit:function(){G.Player.giveExploit(ge.Exploit.UndocumentedFunctionCall)},bypass:function(e){e.completely_unused_field=void 0,document.completely_unused_field=void 0,document.completely_unused_field=!0,e.completely_unused_field&&1.6===t.ramUsage&&G.Player.giveExploit(ge.Exploit.Bypass),e.completely_unused_field=void 0,document.completely_unused_field=void 0},flags:function(e){e=we(e);const n={};for(const t of e){let e=String;"number"==typeof t[1]?e=Number:"boolean"==typeof t[1]?e=Boolean:Array.isArray(t[1])&&(e=[String]);const a=t[0].length>1?2:1;n["-".repeat(a)+t[0]]=e}const a=r(n,{argv:t.args});for(const t of e)a.hasOwnProperty("--"+t[0])&&a.hasOwnProperty("-"+t[0])||(a[t[0]]=t[1]);for(const e of Object.keys(a)){if(!e.startsWith("-"))continue;const t=a[e];delete a[e];const n=2===e.length?1:2;a[e.slice(n)]=t}return a}};const tt=Object.fromEntries([...function e(t){const n=[];for(const[a,r]of Object.entries(t))"function"==typeof r?n.push(a):"object"==typeof r&&n.push(...e(r));return n}(et)].map(e=>[e,!0]));return et}}.call(this,n(145))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(104),r=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=a.b(e,r.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var i,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(i=l.match(s))&&(this.stepFunctions_[i[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=a.b(this.polyfills_.join("\n"),r.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new r.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new r.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack};
|
||
/**
|
||
* @license
|
||
* JavaScript Interpreter
|
||
*
|
||
* Copyright 2013 Google Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=a.b(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var n,i=0;n=e.body[i];i++)t.node.body.push(n);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var n=t.node,a=n.type;if("Program"===a&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!n.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,n=this.createNativeFunction(function(e){throw EvalError("Can't happen")},!1);n.eval=!0,this.setProperty(e,"eval",n),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var a=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i<a.length;i++){var o=function(e){return function(n){try{return e(n)}catch(e){t.throwException(t.URI_ERROR,e.message)}}}(a[i][0]);this.setProperty(e,a[i][1],this.createNativeFunction(o,!1),r.NONENUMERABLE_DESCRIPTOR)}this.OBJECT=this.OBJECT,this.OBJECT_PROTO=this.OBJECT_PROTO,this.FUNCTION=this.FUNCTION,this.FUNCTION_PROTO=this.FUNCTION_PROTO,this.ARRAY=this.ARRAY,this.ARRAY_PROTO=this.ARRAY_PROTO,this.REGEXP=this.REGEXP,this.REGEXP_PROTO=this.REGEXP_PROTO,this.DATE=this.DATE,this.DATE_PROTO=this.DATE_PROTO,this.UNDEFINED=void 0,this.NULL=null,this.NAN=NaN,this.TRUE=!0,this.FALSE=!1,this.STRING_EMPTY="",this.NUMBER_ZERO=0,this.NUMBER_ONE=1,this.initFunc_&&this.initFunc_(this,e)},r.prototype.initFunction=function(e){var t,n=this,i=/^[A-Za-z_$][\w$]*$/;(t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.FUNCTION_PROTO);if(arguments.length)var o=String(arguments[arguments.length-1]);else o="";var s=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(s){for(var l=s.split(/\s*,\s*/),c=0;c<l.length;c++){var u=l[c];i.test(u)||n.throwException(n.SYNTAX_ERROR,"Invalid function argument: "+u)}s=l.join(", ")}t.parentScope=n.global;try{var m=a.b("(function("+s+") {"+o+"})",r.PARSE_OPTIONS)}catch(e){n.throwException(n.SYNTAX_ERROR,"Invalid code: "+e.message)}return 1!==m.body.length&&n.throwException(n.SYNTAX_ERROR,"Invalid code in function body."),t.node=m.body[0].expression,n.setProperty(t,"length",t.node.length,r.READONLY_DESCRIPTOR),t}).id=this.functionCounter_++,this.FUNCTION=this.createObjectProto(this.FUNCTION_PROTO),this.setProperty(e,"Function",this.FUNCTION),this.setProperty(this.FUNCTION,"prototype",this.FUNCTION_PROTO),this.FUNCTION.nativeFunc=t,this.setProperty(this.FUNCTION_PROTO,"constructor",this.FUNCTION,r.NONENUMERABLE_DESCRIPTOR),this.FUNCTION_PROTO.nativeFunc=function(){},this.FUNCTION_PROTO.nativeFunc.id=this.functionCounter_++,this.setProperty(this.FUNCTION_PROTO,"length",0,r.READONLY_DESCRIPTOR);var o=function(e){if(!(e&&e.isObject||n.getScope().strict))if(void 0===e||null===e)e=n.global;else{var t=n.createObjectProto(n.getPrototype(e));t.data=e,e=t}return e};t=function(e,t){var a=n.stateStack[n.stateStack.length-1];a.func_=this,a.funcThis_=o(e),a.arguments_=[],null!==t&&void 0!==t&&(t.isObject?a.arguments_=n.arrayPseudoToNative(t):n.throwException(n.TYPE_ERROR,"CreateListFromArrayLike called on non-object")),a.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"apply",t),t=function(e){var t=n.stateStack[n.stateStack.length-1];t.func_=this,t.funcThis_=o(e),t.arguments_=[];for(var a=1;a<arguments.length;a++)t.arguments_.push(arguments[a]);t.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"call",t),this.polyfills_.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),t=function(){return this.toString()},this.setNativeFunctionPrototype(this.FUNCTION,"toString",t),this.setProperty(this.FUNCTION,"toString",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(){return this.valueOf()},this.setNativeFunctionPrototype(this.FUNCTION,"valueOf",t),this.setProperty(this.FUNCTION,"valueOf",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR)},r.prototype.initObject=function(e){var t,n=this;t=function(e){if(void 0===e||null===e)return n.calledWithNew()?this:n.createObjectProto(n.OBJECT_PROTO);if(!e.isObject){var t=n.createObjectProto(n.getPrototype(e));return t.data=e,t}return e},this.OBJECT=this.createNativeFunction(t,!0),this.setProperty(this.OBJECT,"prototype",this.OBJECT_PROTO),this.setProperty(this.OBJECT_PROTO,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"Object",this.OBJECT);var a=function(e){void 0!==e&&null!==e||n.throwException(n.TYPE_ERROR,"Cannot convert '"+e+"' to object")};t=function(e){a(e);var t=e.isObject?e.properties:e;return n.arrayNativeToPseudo(Object.getOwnPropertyNames(t))},this.setProperty(this.OBJECT,"getOwnPropertyNames",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),e.isObject&&(e=e.properties),n.arrayNativeToPseudo(Object.keys(e))},this.setProperty(this.OBJECT,"keys",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(e){return null===e?n.createObjectProto(null):(void 0!==e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object prototype may only be an Object or null"),n.createObjectProto(e))},this.setProperty(this.OBJECT,"create",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var create_ = Object.create;","Object.create = function(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),t=function(e,t,a){return t=String(t),e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.defineProperty called on non-object"),a&&a.isObject||n.throwException(n.TYPE_ERROR,"Property description must be an object"),!e.properties[t]&&e.preventExtensions&&n.throwException(n.TYPE_ERROR,"Can't define property '"+t+"', object is not extensible"),n.setProperty(e,t,r.VALUE_IN_DESCRIPTOR,a.properties),e},this.setProperty(this.OBJECT,"defineProperty",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),t=function(e,t){if(e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.getOwnPropertyDescriptor called on non-object"),(t=String(t))in e.properties){var a=Object.getOwnPropertyDescriptor(e.properties,t),r=e.getter[t],i=e.setter[t];(r||i)&&(a.get=r,a.set=i,delete a.value,delete a.writable);var o=a.value,s="value"in a;delete a.value;var l=n.nativeToPseudo(a);return s&&n.setProperty(l,"value",o),l}},this.setProperty(this.OBJECT,"getOwnPropertyDescriptor",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),n.getPrototype(e)},this.setProperty(this.OBJECT,"getPrototypeOf",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(e){return Boolean(e)&&!e.preventExtensions},this.setProperty(this.OBJECT,"isExtensible",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(e){return e&&e.isObject&&(e.preventExtensions=!0),e},this.setProperty(this.OBJECT,"preventExtensions",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),this.setNativeFunctionPrototype(this.OBJECT,"toString",r.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"toLocaleString",r.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"valueOf",r.Object.prototype.valueOf),t=function(e){return a(this),this.isObject?String(e)in this.properties:this.hasOwnProperty(e)},this.setNativeFunctionPrototype(this.OBJECT,"hasOwnProperty",t),t=function(e){return a(this),this.isObject?Object.prototype.propertyIsEnumerable.call(this.properties,e):this.propertyIsEnumerable(e)},this.setNativeFunctionPrototype(this.OBJECT,"propertyIsEnumerable",t),t=function(e){for(;;){if(!(e=n.getPrototype(e)))return!1;if(e===this)return!0}},this.setNativeFunctionPrototype(this.OBJECT,"isPrototypeOf",t)},r.prototype.initArray=function(e){var t,n=this;t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.ARRAY_PROTO);var a=arguments[0];if(1===arguments.length&&"number"==typeof a)isNaN(r.legalArrayLength(a))&&n.throwException(n.RANGE_ERROR,"Invalid array length"),t.properties.length=a;else{for(var i=0;i<arguments.length;i++)t.properties[i]=arguments[i];t.properties.length=i}return t},this.ARRAY=this.createNativeFunction(t,!0),this.ARRAY_PROTO=this.ARRAY.properties.prototype,this.setProperty(e,"Array",this.ARRAY),t=function(e){return e&&"Array"===e.class},this.setProperty(this.ARRAY,"isArray",this.createNativeFunction(t,!1),r.NONENUMERABLE_DESCRIPTOR),t=function(){return Array.prototype.pop.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"pop",t),t=function(e){return Array.prototype.push.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"push",t),t=function(){return Array.prototype.shift.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"shift",t),t=function(e){return Array.prototype.unshift.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"unshift",t),t=function(){return Array.prototype.reverse.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"reverse",t),t=function(e,t){var a=Array.prototype.splice.apply(this.properties,arguments);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"splice",t),t=function(e,t){var a=Array.prototype.slice.call(this.properties,e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"slice",t),t=function(e){return Array.prototype.join.call(this.properties,e)},this.setNativeFunctionPrototype(this.ARRAY,"join",t),t=function(e){for(var t=[],a=0,r=n.getProperty(this,"length"),i=0;i<r;i++){if(n.hasProperty(this,i)){var o=n.getProperty(this,i);t[a]=o}a++}for(i=0;i<arguments.length;i++){var s=arguments[i];if(n.isa(s,n.ARRAY))for(var l=n.getProperty(s,"length"),c=0;c<l;c++)n.hasProperty(s,c)&&(t[a]=n.getProperty(s,c)),a++;else t[a]=s}return n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.ARRAY,"concat",t),t=function(e,t){return Array.prototype.indexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"indexOf",t),t=function(e,t){return Array.prototype.lastIndexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"lastIndexOf",t),t=function(){return Array.prototype.sort.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"sort",t),this.polyfills_.push("Object.defineProperty(Array.prototype, 'every',","{configurable: true, writable: true, value:","function(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},r.prototype.initString=function(e){var t,n=this;t=function(e){return e=String(e),n.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i<a.length;i++)this.setNativeFunctionPrototype(this.STRING,a[i],String.prototype[a[i]]);t=function(e,t,a){return t=t?n.pseudoToNative(t):void 0,a=a?n.pseudoToNative(a):void 0,String(this).localeCompare(e,t,a)},this.setNativeFunctionPrototype(this.STRING,"localeCompare",t),t=function(e,t){n.isa(e,n.REGEXP)&&(e=e.data);var a=String(this).split(e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.STRING,"split",t),t=function(e){n.isa(e,n.REGEXP)&&(e=e.data);var t=String(this).match(e);return t&&n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.STRING,"match",t),t=function(e){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).search(e)},this.setNativeFunctionPrototype(this.STRING,"search",t),t=function(e,t){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).replace(e,t)},this.setNativeFunctionPrototype(this.STRING,"replace",t),this.polyfills_.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(e){var t,n=this;t=function(e){return e=Boolean(e),n.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(e){var t,n=this;t=function(e){return e=Number(e),n.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var a=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i<a.length;i++)this.setProperty(this.NUMBER,a[i],Number[a[i]],r.READONLY_NONENUMERABLE_DESCRIPTOR);t=function(e){try{return Number(this).toExponential(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toExponential",t),t=function(e){try{return Number(this).toFixed(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toFixed",t),t=function(e){try{return Number(this).toPrecision(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toPrecision",t),t=function(e){try{return Number(this).toString(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toString",t),t=function(e,t){return e=e?n.pseudoToNative(e):void 0,t=t?n.pseudoToNative(t):void 0,Number(this).toLocaleString(e,t)},this.setNativeFunctionPrototype(this.NUMBER,"toLocaleString",t)},r.prototype.initDate=function(e){var t,n=this;t=function(e,t){if(!n.calledWithNew())return Date();var a=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(Date,a)),this},this.DATE=this.createNativeFunction(t,!0),this.DATE_PROTO=this.DATE.properties.prototype,this.setProperty(e,"Date",this.DATE),this.setProperty(this.DATE,"now",this.createNativeFunction(Date.now,!1),r.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"parse",this.createNativeFunction(Date.parse,!1),r.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"UTC",this.createNativeFunction(Date.UTC,!1),r.NONENUMERABLE_DESCRIPTOR);for(var a=["getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toISOString","toJSON","toGMTString","toLocaleDateString","toLocaleString","toLocaleTimeString","toTimeString","toUTCString"],i=0;i<a.length;i++)t=function(e){return function(t){for(var a=[],r=0;r<arguments.length;r++)a[r]=n.pseudoToNative(arguments[r]);return this.data[e].apply(this.data,a)}}(a[i]),this.setNativeFunctionPrototype(this.DATE,a[i],t)},r.prototype.initRegExp=function(e){var t,n=this;t=function(e,t){if(n.calledWithNew())var a=this;else a=n.createObjectProto(n.REGEXP_PROTO);return e=e?e.toString():"",t=t?t.toString():"",n.populateRegExp(a,new RegExp(e,t)),a},this.REGEXP=this.createNativeFunction(t,!0),this.REGEXP_PROTO=this.REGEXP.properties.prototype,this.setProperty(e,"RegExp",this.REGEXP),this.setProperty(this.REGEXP.properties.prototype,"global",void 0,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"ignoreCase",void 0,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"multiline",void 0,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"source","(?:)",r.READONLY_NONENUMERABLE_DESCRIPTOR),t=function(e){return this.data.test(e)},this.setNativeFunctionPrototype(this.REGEXP,"test",t),t=function(e){e=e.toString(),this.data.lastIndex=Number(n.getProperty(this,"lastIndex"));var t=this.data.exec(e);if(n.setProperty(this,"lastIndex",this.data.lastIndex),t){for(var a=n.createObjectProto(n.ARRAY_PROTO),r=0;r<t.length;r++)n.setProperty(a,r,t[r]);return n.setProperty(a,"index",t.index),n.setProperty(a,"input",t.input),a}return null},this.setNativeFunctionPrototype(this.REGEXP,"exec",t)},r.prototype.initError=function(e){var t=this;this.ERROR=this.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(t.ERROR);return e&&t.setProperty(n,"message",String(e),r.NONENUMERABLE_DESCRIPTOR),n},!0),this.setProperty(e,"Error",this.ERROR),this.setProperty(this.ERROR.properties.prototype,"message","",r.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.ERROR.properties.prototype,"name","Error",r.NONENUMERABLE_DESCRIPTOR);var n=function(n){var a=t.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(a);return e&&t.setProperty(n,"message",String(e),r.NONENUMERABLE_DESCRIPTOR),n},!0);return t.setProperty(a,"prototype",t.createObject(t.ERROR)),t.setProperty(a.properties.prototype,"name",n,r.NONENUMERABLE_DESCRIPTOR),t.setProperty(e,n,a),a};this.EVAL_ERROR=n("EvalError"),this.RANGE_ERROR=n("RangeError"),this.REFERENCE_ERROR=n("ReferenceError"),this.SYNTAX_ERROR=n("SyntaxError"),this.TYPE_ERROR=n("TypeError"),this.URI_ERROR=n("URIError")},r.prototype.initMath=function(e){var t=this.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"Math",t);for(var n=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],a=0;a<n.length;a++)this.setProperty(t,n[a],Math[n[a]],r.READONLY_NONENUMERABLE_DESCRIPTOR);var i=["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","random","round","sin","sqrt","tan"];for(a=0;a<i.length;a++)this.setProperty(t,i[a],this.createNativeFunction(Math[i[a]],!1),r.NONENUMERABLE_DESCRIPTOR)},r.prototype.initJSON=function(e){var t=this,n=t.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"JSON",n);var a=function(e){try{var n=JSON.parse(e.toString())}catch(e){t.throwException(t.SYNTAX_ERROR,e.message)}return t.nativeToPseudo(n)};this.setProperty(n,"parse",this.createNativeFunction(a,!1)),a=function(e){var n=t.pseudoToNative(e);try{var a=JSON.stringify(n)}catch(e){t.throwException(t.TYPE_ERROR,e.message)}return a},this.setProperty(n,"stringify",this.createNativeFunction(a,!1))},r.prototype.isa=function(e,t){if(null===e||void 0===e||!t)return!1;var n=t.properties.prototype;if(e===n)return!0;for(e=this.getPrototype(e);e;){if(e===n)return!0;e=e.proto}return!1},r.legalArrayLength=function(e){var t=e>>>0;return t===Number(e)?t:NaN},r.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},r.Value,r.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(a=r.toStringCycles_).push(this);try{for(var e=[],t=0;t<this.properties.length;t++){var n=this.properties[t];e[t]=n&&n.isObject&&-1!==a.indexOf(n)?"...":n}}finally{a.pop()}return e.join(",")}if("Error"===this.class){var a,i,o;if(-1!==(a=r.toStringCycles_).indexOf(this))return"[object Error]";var s=this;do{if("name"in s.properties){i=s.properties.name;break}}while(s=s.proto);s=this;do{if("message"in s.properties){o=s.properties.message;break}}while(s=s.proto);a.push(this);try{i=i&&i.toString(),o=o&&o.toString()}finally{a.pop()}return o?i+": "+o:String(i)}return null!==this.data?String(this.data):"[object "+this.class+"]"},r.Object.prototype.valueOf=function(){return void 0===this.data||null===this.data||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data},r.prototype.createObject=function(e){return this.createObjectProto(e&&e.properties.prototype)},r.prototype.createObjectProto=function(e){if("object"!=typeof e)throw Error("Non object prototype");var t=new r.Object(e);return this.isa(t,this.FUNCTION)&&(this.setProperty(t,"prototype",this.createObjectProto(this.OBJECT_PROTO||null)),t.class="Function"),this.isa(t,this.ARRAY)&&(this.setProperty(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.class="Array"),this.isa(t,this.ERROR)&&(t.class="Error"),t},r.prototype.populateRegExp=function(e,t){e.data=t,this.setProperty(e,"lastIndex",t.lastIndex,r.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"source",t.source,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"global",t.global,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"ignoreCase",t.ignoreCase,r.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"multiline",t.multiline,r.READONLY_NONENUMERABLE_DESCRIPTOR)},r.prototype.createFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.parentScope=t,n.node=e,this.setProperty(n,"length",n.node.params.length,r.READONLY_DESCRIPTOR),n},r.prototype.createNativeFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.nativeFunc=e,e.id=this.functionCounter_++,this.setProperty(n,"length",e.length,r.READONLY_DESCRIPTOR),t?this.setProperty(n.properties.prototype,"constructor",n,r.NONENUMERABLE_DESCRIPTOR):!1===t&&(n.illegalConstructor=!0,this.setProperty(n,"prototype",void 0)),n},r.prototype.createAsyncFunction=function(e){var t=this.createObjectProto(this.FUNCTION_PROTO);return t.asyncFunc=e,e.id=this.functionCounter_++,this.setProperty(t,"length",e.length,r.READONLY_DESCRIPTOR),t},r.prototype.nativeToPseudo=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(e instanceof RegExp){var t=this.createObjectProto(this.REGEXP_PROTO);return this.populateRegExp(t,e),t}if(e instanceof Date){var n=this.createObjectProto(this.DATE_PROTO);return n.data=e,n}if(e instanceof Function){var a=this;return this.createNativeFunction(function(){return a.nativeToPseudo(e.apply(a,Array.prototype.slice.call(arguments).map(function(e){return a.pseudoToNative(e)})))},void 0)}var r;if(Array.isArray(e)){r=this.createObjectProto(this.ARRAY_PROTO);for(var i=0;i<e.length;i++)i in e&&this.setProperty(r,i,this.nativeToPseudo(e[i]))}else for(var o in r=this.createObjectProto(this.OBJECT_PROTO),e)this.setProperty(r,o,this.nativeToPseudo(e[o]));return r},r.prototype.pseudoToNative=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(this.isa(e,this.REGEXP))return e.data;if(this.isa(e,this.DATE))return e.data;var n,a=t||{pseudo:[],native:[]};if(-1!==(i=a.pseudo.indexOf(e)))return a.native[i];if(a.pseudo.push(e),this.isa(e,this.ARRAY)){n=[],a.native.push(n);for(var r=this.getProperty(e,"length"),i=0;i<r;i++)this.hasProperty(e,i)&&(n[i]=this.pseudoToNative(this.getProperty(e,i),a))}else{var o;for(var s in n={},a.native.push(n),e.properties)o=e.properties[s],n[s]=this.pseudoToNative(o,a)}return a.pseudo.pop(),a.native.pop(),n},r.prototype.arrayNativeToPseudo=function(e){for(var t=this.createObjectProto(this.ARRAY_PROTO),n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++)this.setProperty(t,n[a],e[n[a]]);return t},r.prototype.arrayPseudoToNative=function(e){var t=[];for(var n in e.properties)t[n]=this.getProperty(e,n);return t.length=r.legalArrayLength(this.getProperty(e,"length"))||0,t},r.prototype.getPrototype=function(e){switch(typeof e){case"number":return this.NUMBER.properties.prototype;case"boolean":return this.BOOLEAN.properties.prototype;case"string":return this.STRING.properties.prototype}return e?e.proto:null},r.prototype.getProperty=function(e,t,n){if(t=String(t),void 0===e||null===e){let a;null!=n&&null!=n.loc&&null!=n.loc.start&&(a=n.loc.start.line),this.throwException(this.TYPE_ERROR,"Cannot read property '"+t+"' of "+e,a)}if("length"===t){if(this.isa(e,this.STRING))return String(e).length}else if(t.charCodeAt(0)<64&&this.isa(e,this.STRING)){var a=r.legalArrayIndex(t);if(!isNaN(a)&&a<String(e).length)return String(e)[a]}do{if(e.properties&&t in e.properties){var i=e.getter[t];return i?(i.isGetter=!0,i):e.properties[t]}}while(e=this.getPrototype(e))},r.prototype.hasProperty=function(e,t){if(!e.isObject)throw TypeError("Primitive data type has no properties");if("length"===(t=String(t))&&this.isa(e,this.STRING))return!0;if(this.isa(e,this.STRING)){var n=r.legalArrayIndex(t);if(!isNaN(n)&&n<String(e).length)return!0}do{if(e.properties&&t in e.properties)return!0}while(e=this.getPrototype(e));return!1},r.prototype.setProperty=function(e,t,n,a){t=String(t),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of "+e),a&&("get"in a||"set"in a)&&("value"in a||"writable"in a)&&this.throwException(this.TYPE_ERROR,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var i=!this.stateStack||this.getScope().strict;if(e.isObject){if(this.isa(e,this.STRING)){var o=r.legalArrayIndex(t);if("length"===t||!isNaN(o)&&o<String(e).length)return void(i&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'"))}if("Array"===e.class){var s,l=e.properties.length;if("length"===t){if(a){if(!("value"in a))return;n=a.value}if(n=r.legalArrayLength(n),isNaN(n)&&this.throwException(this.RANGE_ERROR,"Invalid array length"),n<l)for(s in e.properties)s=r.legalArrayIndex(s),!isNaN(s)&&n<=s&&delete e.properties[s]}else isNaN(s=r.legalArrayIndex(t))||(e.properties.length=Math.max(l,s+1))}if(!e.preventExtensions||t in e.properties)if(a){"get"in a&&(a.get?e.getter[t]=a.get:delete e.getter[t]),"set"in a&&(a.set?e.setter[t]=a.set:delete e.setter[t]);var c={};"configurable"in a&&(c.configurable=a.configurable),"enumerable"in a&&(c.enumerable=a.enumerable),"writable"in a&&(c.writable=a.writable,delete e.getter[t],delete e.setter[t]),"value"in a?(c.value=a.value,delete e.getter[t],delete e.setter[t]):n!==r.VALUE_IN_DESCRIPTOR&&(c.value=n,delete e.getter[t],delete e.setter[t]);try{Object.defineProperty(e.properties,t,c)}catch(e){this.throwException(this.TYPE_ERROR,"Cannot redefine property: "+t)}}else{if(n===r.VALUE_IN_DESCRIPTOR)throw ReferenceError("Value not specified.");for(var u=e;!(t in u.properties);)if(!(u=this.getPrototype(u))){u=e;break}if(u.setter&&u.setter[t])return u.setter[t];if(u.getter&&u.getter[t])i&&this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.properties[t]=n}catch(n){i&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else i&&this.throwException(this.TYPE_ERROR,"Can't add property '"+t+"', object is not extensible")}else i&&this.throwException(this.TYPE_ERROR,"Can't create property '"+t+"' on '"+e+"'")},r.prototype.setNativeFunctionPrototype=function(e,t,n){this.setProperty(e.properties.prototype,t,this.createNativeFunction(n,!1),r.NONENUMERABLE_DESCRIPTOR)},r.prototype.getScope=function(){var e=this.stateStack[this.stateStack.length-1].scope;if(!e)throw Error("No scope found.");return e},r.prototype.createScope=function(e,t){var n=this.createObjectProto(null);if(n.parentScope=t,t||this.initGlobalScope(n),this.populateScope_(e,n),n.strict=!1,t&&t.strict)n.strict=!0;else{var a=e.body&&e.body[0];a&&a.expression&&"Literal"===a.expression.type&&"use strict"===a.expression.value&&(n.strict=!0)}return n},r.prototype.createSpecialScope=function(e,t){if(!e)throw Error("parentScope required");var n=t||this.createObjectProto(null);return n.parentScope=e,n.strict=e.strict,n},r.prototype.getValueFromScope=function(e,t){for(var n=this.getScope();n&&n!==this.global;){if(e in n.properties)return n.properties[e];n=n.parentScope}if(n===this.global&&this.hasProperty(n,e))return this.getProperty(n,e);var a,r=this.stateStack[this.stateStack.length-1].node;"UnaryExpression"===r.type&&"typeof"===r.operator||(null!=t&&null!=t.loc&&null!=t.loc.start&&(a=t.loc.start.line),this.throwException(this.REFERENCE_ERROR,e+" is not defined",a))},r.prototype.setValueToScope=function(e,t){for(var n=this.getScope(),a=n.strict;n&&n!==this.global;){if(e in n.properties)return void(n.properties[e]=t);n=n.parentScope}if(n===this.global&&(!a||this.hasProperty(n,e)))return this.setProperty(n,e,t);this.throwException(this.REFERENCE_ERROR,e+" is not defined")},r.prototype.populateScope_=function(e,t){if("VariableDeclaration"===e.type)for(var n=0;n<e.declarations.length;n++)this.setProperty(t,e.declarations[n].id.name,void 0,r.VARIABLE_DESCRIPTOR);else{if("FunctionDeclaration"===e.type)return void this.setProperty(t,e.id.name,this.createFunction(e,t),r.VARIABLE_DESCRIPTOR);if("FunctionExpression"===e.type)return;if("ExpressionStatement"===e.type)return}var a=e.constructor;for(var i in e){var o=e[i];if(o&&"object"==typeof o)if(Array.isArray(o))for(n=0;n<o.length;n++)o[n]&&o[n].constructor===a&&this.populateScope_(o[n],t);else o.constructor===a&&this.populateScope_(o,t)}},r.prototype.stripLocations_=function(e,t,n){for(var a in t?e.start=t:delete e.start,n?e.end=n:delete e.end,e)if(e.hasOwnProperty(a)){var r=e[a];r&&"object"==typeof r&&this.stripLocations_(r,t,n)}},r.prototype.calledWithNew=function(){return this.stateStack[this.stateStack.length-1].isConstructor},r.prototype.getValue=function(e,t){return e[0]===r.SCOPE_REFERENCE?this.getValueFromScope(e[1],t):this.getProperty(e[0],e[1],t)},r.prototype.setValue=function(e,t){return e[0]===r.SCOPE_REFERENCE?this.setValueToScope(e[1],t):this.setProperty(e[0],e[1],t)},r.Completion={NORMAL:0,BREAK:1,CONTINUE:2,RETURN:3,THROW:4},r.prototype.throwException=function(e,t,n){if(void 0===t)var a=e;else{a=this.createObject(e);this.setProperty(a,"message",t,r.NONENUMERABLE_DESCRIPTOR)}var i;throw null!=n&&(i=this.getErrorLineNumberMessage(n)),this.unwind(r.Completion.THROW,a,void 0,i),r.STEP_ERROR},r.prototype.unwind=function(e,t,n,a=""){if(e===r.Completion.NORMAL)throw TypeError("Should not unwind for NORMAL completions");for(var i=this.stateStack;i.length>0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===r.Completion.RETURN)return void(o.value=t);if(e!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===r.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void i.pop()}else if(e===r.Completion.CONTINUE&&(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop))return}var s;if(this.isa(t,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(t,"name").toString(),u=this.getProperty(t,"message").valueOf();s=(e=l[c]||Error)(u+a)}else s=String(t)+a;throw s},r.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var i=new r.State(a,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=n,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},r.State=function(e,t){this.node=e,this.scope=t},r.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,i=t.n_||0;for(t.array_?(this.setProperty(t.array_,i,t.value),i++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);i<a.length;){if(a[i])return t.n_=i,new r.State(a[i],t.scope);i++}e.pop(),e[e.length-1].value=t.array_},r.prototype.stepAssignmentExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new r.State(n.left,t.scope);return a.components=!0,a}if(!t.doneRight_){if(t.leftReference_||(t.leftReference_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_&&"="!==n.operator){var i=this.getValue(t.leftReference_,n);if(t.leftValue_=i,i&&"object"==typeof i&&i.isGetter){i.isGetter=!1,t.doneGetter_=!0;var o=i;return this.createGetter_(o,t.leftReference_)}}return t.doneRight_=!0,new r.State(n.right,t.scope)}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s=t.leftValue_,l=t.value;switch(n.operator){case"=":s=l;break;case"+=":s+=l;break;case"-=":s-=l;break;case"*=":s*=l;break;case"/=":s/=l;break;case"%=":s%=l;break;case"<<=":s<<=l;break;case">>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},r.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new r.State(n.right,t.scope);e.pop();var a,i=t.leftValue_,o=t.value;switch(n.operator){case"==":a=i==o;break;case"!=":a=i!=o;break;case"===":a=i===o;break;case"!==":a=i!==o;break;case">":a=i>o;break;case">=":a=i>=o;break;case"<":a=i<o;break;case"<=":a=i<=o;break;case"+":a=i+o;break;case"-":a=i-o;break;case"*":a=i*o;break;case"/":a=i/o;break;case"%":a=i%o;break;case"&":a=i&o;break;case"|":a=i|o;break;case"^":a=i^o;break;case"<<":a=i<<o;break;case">>":a=i>>o;break;case">>>":a=i>>>o;break;case"in":if(!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",e)}a=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",e)}a=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},r.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,i=n.body[a];if(i)return t.n_=a+1,new r.State(i,t.scope);e.pop()},r.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(r.Completion.BREAK,void 0,a)},r.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var i=new r.State(n.callee,t.scope);return i.components=!0,i}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,n),o[0]===r.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),n.arguments[t.n_])return new r.State(n.arguments[t.n_++],t.scope);if("NewExpression"===n.type){if(o.illegalConstructor){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a constructor",e)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{if(t.doneExec_=!0,!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a function",e)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;u<l.params.length;u++){var m=l.params[u].name,p=t.arguments_.length>u?t.arguments_[u]:void 0;this.setProperty(c,m,p)}var d=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u<t.arguments_.length;u++)this.setProperty(d,u,t.arguments_[u]);this.setProperty(c,"arguments",d);var h=l.id&&l.id.name;return h&&this.setProperty(c,h,o),this.setProperty(c,"this",t.funcThis_,r.READONLY_DESCRIPTOR),t.value=void 0,new r.State(l.body,c)}if(o.eval){var f=t.arguments_[0];if("string"==typeof f){try{var g=a.b(f.toString(),r.PARSE_OPTIONS)}catch(e){let t=this.getErrorLineNumber(n);this.throwException(this.SYNTAX_ERROR,"Invalid code: "+e.message,t)}var y=new this.nodeConstructor;return y.type="EvalProgram_",y.body=g.body,this.stripLocations_(y,n.start,n.end),(c=t.directEval_?t.scope:this.global).strict?c=this.createScope(g,c):this.populateScope_(g,c),this.value=void 0,new r.State(y,c)}t.value=f}else if(o.nativeFunc)t.value=o.nativeFunc.apply(t.funcThis_,t.arguments_);else{if(o.asyncFunc){var _=this,b=t.arguments_.concat(function(e){t.value=e,_.paused_=!1});return this.paused_=!0,void o.asyncFunc.apply(t.funcThis_,b)}{let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o.class+" is not a function",e)}}}},r.prototype.stepCatchClause=function(e,t,n){if(!t.done_){t.done_=!0;var a=this.createSpecialScope(t.scope);return this.setProperty(a,n.param.name,t.throwValue),new r.State(n.body,a)}e.pop()},r.prototype.stepConditionalExpression=function(e,t,n){var a=t.mode_||0;if(0===a)return t.mode_=1,new r.State(n.test,t.scope);if(1===a){t.mode_=2;var i=Boolean(t.value);if(i&&n.consequent)return new r.State(n.consequent,t.scope);if(!i&&n.alternate)return new r.State(n.alternate,t.scope);this.value=void 0}e.pop(),"ConditionalExpression"===n.type&&(e[e.length-1].value=t.value)},r.prototype.stepContinueStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(r.Completion.CONTINUE,void 0,a)},r.prototype.stepDebuggerStatement=function(e,t,n){e.pop()},r.prototype.stepDoWhileStatement=function(e,t,n){if("DoWhileStatement"===n.type&&void 0===t.test_&&(t.value=!0,t.test_=!0),!t.test_)return t.test_=!0,new r.State(n.test,t.scope);if(t.value){if(n.body)return t.test_=!1,t.isLoop=!0,new r.State(n.body,t.scope)}else e.pop()},r.prototype.stepEmptyStatement=function(e,t,n){e.pop()},r.prototype.stepEvalProgram_=function(e,t,n){var a=t.n_||0,i=n.body[a];if(i)return t.n_=a+1,new r.State(i,t.scope);e.pop(),e[e.length-1].value=this.value},r.prototype.stepExpressionStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new r.State(n.expression,t.scope);e.pop(),this.value=t.value},r.prototype.stepForInStatement=function(e,t,n){if(!t.doneInit_&&(t.doneInit_=!0,n.left.declarations&&n.left.declarations[0].init)){if(t.scope.strict){let e=this.getErrorLineNumber(n);this.throwException(this.SYNTAX_ERROR,"for-in loop variable declaration may not have an initializer.",e)}return new r.State(n.left,t.scope)}if(!t.doneObject_)return t.doneObject_=!0,t.variable_||(t.variable_=t.value),new r.State(n.right,t.scope);if(t.isLoop||(t.isLoop=!0,t.object_=t.value,t.visited_=Object.create(null)),void 0===t.name_)e:for(;;){if(t.object_&&t.object_.isObject)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_.properties));;){if(void 0===(a=t.props_.shift()))break;if(Object.prototype.hasOwnProperty.call(t.object_.properties,a)&&(!t.visited_[a]&&(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_.properties,a)))){t.name_=a;break e}}else if(null!==t.object_&&void 0!==t.object_)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_));;){var a;if(void 0===(a=t.props_.shift()))break;if(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_,a)){t.name_=a;break e}}if(t.object_=this.getPrototype(t.object_),t.props_=null,null===t.object_)return void e.pop()}if(!t.doneVariable_){t.doneVariable_=!0;var i=n.left;if("VariableDeclaration"!==i.type){t.variable_=null;var o=new r.State(i,t.scope);return o.components=!0,o}t.variable_=[r.SCOPE_REFERENCE,i.declarations[0].id.name]}if(t.variable_||(t.variable_=t.value),!t.doneSetter_){t.doneSetter_=!0;var s=t.name_,l=this.setValue(t.variable_,s);if(l)return this.createSetter_(l,t.variable_,s)}return t.name_=void 0,t.doneVariable_=!1,t.doneSetter_=!1,n.body?new r.State(n.body,t.scope):void 0},r.prototype.stepForStatement=function(e,t,n){var a=t.mode_||0;if(0===a){if(t.mode_=1,n.init)return new r.State(n.init,t.scope)}else if(1===a){if(t.mode_=2,n.test)return new r.State(n.test,t.scope)}else if(2===a){if(t.mode_=3,!n.test||t.value)return t.isLoop=!0,new r.State(n.body,t.scope);e.pop()}else if(3===a&&(t.mode_=1,n.update))return new r.State(n.update,t.scope)},r.prototype.stepFunctionDeclaration=function(e,t,n){e.pop()},r.prototype.stepFunctionExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.createFunction(n,t.scope)},r.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.components)e[e.length-1].value=[r.SCOPE_REFERENCE,n.name];else{var a=this.getValueFromScope(n.name,n);if(a&&"object"==typeof a&&a.isGetter){a.isGetter=!1;for(var i=t.scope;!this.hasProperty(i,n.name);)i=i.parentScope;var o=a;return this.createGetter_(o,this.global)}e[e.length-1].value=a}},r.prototype.stepIfStatement=r.prototype.stepConditionalExpression,r.prototype.stepLabeledStatement=function(e,t,n){e.pop();var a=t.labels||[];a.push(n.label.name);var i=new r.State(n.body,t.scope);return i.labels=a,i},r.prototype.stepLiteral=function(e,t,n){e.pop();var a=n.value;if(a instanceof RegExp){var r=this.createObjectProto(this.REGEXP_PROTO);this.populateRegExp(r,a),a=r}e[e.length-1].value=a},r.prototype.stepLogicalExpression=function(e,t,n){if("&&"!==n.operator&&"||"!==n.operator)throw SyntaxError("Unknown logical operator: "+n.operator);if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(n.left,t.scope);if(t.doneRight_)e.pop(),e[e.length-1].value=t.value;else{if(!("&&"===n.operator&&!t.value||"||"===n.operator&&t.value))return t.doneRight_=!0,new r.State(n.right,t.scope);e.pop(),e[e.length-1].value=t.value}},r.prototype.stepMemberExpression=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new r.State(n.object,t.scope);var a;if(n.computed){if(!t.doneProperty_)return t.object_=t.value,t.doneProperty_=!0,new r.State(n.property,t.scope);a=t.value}else t.object_=t.value,a=n.property.name;if(e.pop(),t.components)e[e.length-1].value=[t.object_,a];else{var i=this.getProperty(t.object_,a);if(i&&"object"==typeof i&&i.isGetter){i.isGetter=!1;var o=i;return this.createGetter_(o,t.object_)}e[e.length-1].value=i}},r.prototype.stepNewExpression=r.prototype.stepCallExpression,r.prototype.stepObjectExpression=function(e,t,n){var a=t.n_||0,i=n.properties[a];if(t.object_){if("Identifier"===(s=i.key).type)var o=s.name;else{if("Literal"!==s.type)throw SyntaxError("Unknown object structure: "+s.type);o=s.value}t.properties_[o]||(t.properties_[o]={}),t.properties_[o][i.kind]=t.value,t.n_=++a,i=n.properties[a]}else t.object_=this.createObjectProto(this.OBJECT_PROTO),t.properties_=Object.create(null);if(i)return new r.State(i.value,t.scope);for(var s in t.properties_){var l=t.properties_[s];if("get"in l||"set"in l){var c={configurable:!0,enumerable:!0,get:l.get,set:l.set};this.setProperty(t.object_,s,null,c)}else this.setProperty(t.object_,s,l.init)}e.pop(),e[e.length-1].value=t.object_},r.prototype.stepProgram=function(e,t,n){var a=n.body.shift();if(a)return t.done=!1,new r.State(a,t.scope);t.done=!0},r.prototype.stepReturnStatement=function(e,t,n){if(n.argument&&!t.done_)return t.done_=!0,new r.State(n.argument,t.scope);this.unwind(r.Completion.RETURN,t.value,void 0)},r.prototype.stepSequenceExpression=function(e,t,n){var a=t.n_||0,i=n.expressions[a];if(i)return t.n_=a+1,new r.State(i,t.scope);e.pop(),e[e.length-1].value=t.value},r.prototype.stepSwitchStatement=function(e,t,n){if(!t.test_)return t.test_=1,new r.State(n.discriminant,t.scope);for(1===t.test_&&(t.test_=2,t.switchValue_=t.value,t.defaultCase_=-1);;){var a=t.index_||0,i=n.cases[a];if(t.matched_||!i||i.test)if(i||t.matched_||-1===t.defaultCase_){if(!i)return void e.pop();if(!t.matched_&&!t.tested_&&i.test)return t.tested_=!0,new r.State(i.test,t.scope);if(t.matched_||t.value===t.switchValue_){t.matched_=!0;var o=t.n_||0;if(i.consequent[o])return t.isSwitch=!0,t.n_=o+1,new r.State(i.consequent[o],t.scope)}t.tested_=!1,t.n_=0,t.index_=a+1}else t.matched_=!0,t.index_=t.defaultCase_;else t.defaultCase_=a,t.index_=a+1}},r.prototype.stepThisExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.getValueFromScope("this",n)},r.prototype.stepThrowStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new r.State(n.argument,t.scope);this.throwException(t.value)},r.prototype.stepTryStatement=function(e,t,n){if(!t.doneBlock_)return t.doneBlock_=!0,new r.State(n.block,t.scope);if(t.cv&&t.cv.type===r.Completion.THROW&&!t.doneHandler_&&n.handler){t.doneHandler_=!0;var a=new r.State(n.handler,t.scope);return a.throwValue=t.cv.value,t.cv=void 0,a}if(!t.doneFinalizer_&&n.finalizer)return t.doneFinalizer_=!0,new r.State(n.finalizer,t.scope);e.pop(),t.cv&&this.unwind(t.cv.type,t.cv.value,t.cv.label)},r.prototype.stepUnaryExpression=function(e,t,n){if(!t.done_){t.done_=!0;var a=new r.State(n.argument,t.scope);return a.components="delete"===n.operator,a}e.pop();var i=t.value;if("-"===n.operator)i=-i;else if("+"===n.operator)i=+i;else if("!"===n.operator)i=!i;else if("~"===n.operator)i=~i;else if("delete"===n.operator){var o=!0;if(Array.isArray(i)){var s=i[0];s===r.SCOPE_REFERENCE&&(s=t.scope);var l=String(i[1]);try{delete s.properties[l]}catch(e){t.scope.strict?this.throwException(this.TYPE_ERROR,"Cannot delete property '"+l+"' of '"+s+"'"):o=!1}}i=o}else if("typeof"===n.operator)i=i&&"Function"===i.class?"function":typeof i;else{if("void"!==n.operator)throw SyntaxError("Unknown unary operator: "+n.operator);i=void 0}e[e.length-1].value=i},r.prototype.stepUpdateExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new r.State(n.argument,t.scope);return a.components=!0,a}if(t.leftSide_||(t.leftSide_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_){var i=this.getValue(t.leftSide_,n);if(t.leftValue_=i,i&&"object"==typeof i&&i.isGetter){i.isGetter=!1,t.doneGetter_=!0;var o=i;return this.createGetter_(o,t.leftSide_)}}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s;i=Number(t.leftValue_);if("++"===n.operator)s=i+1;else{if("--"!==n.operator)throw SyntaxError("Unknown update expression: "+n.operator);s=i-1}var l=n.prefix?s:i,c=this.setValue(t.leftSide_,s);if(c)return t.doneSetter_=!0,t.setterValue_=l,this.createSetter_(c,t.leftSide_,s);e.pop(),e[e.length-1].value=l},r.prototype.stepVariableDeclaration=function(e,t,n){var a=n.declarations,i=t.n_||0,o=a[i];for(t.init_&&o&&(this.setValueToScope(o.id.name,t.value),t.init_=!1,o=a[++i]);o;){if(o.init)return t.n_=i,t.init_=!0,new r.State(o.init,t.scope);o=a[++i]}e.pop()},r.prototype.stepWithStatement=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new r.State(n.object,t.scope);if(!t.doneBody_){t.doneBody_=!0;var a=this.createSpecialScope(t.scope,t.value);return new r.State(n.body,a)}e.pop()},r.prototype.stepWhileStatement=r.prototype.stepDoWhileStatement,r.prototype.step=r.prototype.step,r.prototype.run=r.prototype.run,r.prototype.appendCode=r.prototype.appendCode,r.prototype.createObject=r.prototype.createObject,r.prototype.createObjectProto=r.prototype.createObjectProto,r.prototype.createAsyncFunction=r.prototype.createAsyncFunction,r.prototype.createNativeFunction=r.prototype.createNativeFunction,r.prototype.getProperty=r.prototype.getProperty,r.prototype.setProperty=r.prototype.setProperty,r.prototype.nativeToPseudo=r.prototype.nativeToPseudo,r.prototype.pseudoToNative=r.prototype.pseudoToNative,r.prototype.createPrimitive=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashRate=void 0;const a=n(6),r=n(128);t.HashRate=function(e){return r.Hashes(`${a.numeralWrapper.formatHashes(e)} / sec`)}},function(e,t,n){"use strict";n.d(t,"b",function(){return g}),n.d(t,"a",function(){return y});var a=n(0),r=n.n(a),i=n(850),o=n(849),s=n(848),l=n(847),c=n(846),u=n(845),m=n(844),p=n(26),d=n(1),h=n(20),f=n(40);const g=Object.freeze({x1:1,x5:5,x10:10,MAX:"MAX"});class y extends r.a.Component{constructor(e){super(e),this.state={purchaseMultiplier:g.x1,totalProduction:0},this.createHashUpgradesPopup=this.createHashUpgradesPopup.bind(this),this.handlePurchaseButtonClick=this.handlePurchaseButtonClick.bind(this),this.recalculateTotalProduction=this.recalculateTotalProduction.bind(this)}componentDidMount(){this.recalculateTotalProduction()}createHashUpgradesPopup(){const e="hacknet-server-hash-upgrades-popup";Object(f.createPopup)(e,l.a,{popupId:e,rerender:this.createHashUpgradesPopup})}handlePurchaseButtonClick(){Object(p.m)()>=0&&this.recalculateTotalProduction()}recalculateTotalProduction(){let e=0;for(let t=0;t<d.Player.hacknetNodes.length;++t)if(Object(p.h)()){const n=h.AllServers[d.Player.hacknetNodes[t]];n?e+=n.hashRate:console.warn(`Could not find Hacknet Server object in AllServers map (i=${t})`)}else e+=d.Player.hacknetNodes[t].moneyGainRatePerSecond;this.setState({totalProduction:e})}setPurchaseMultiplier(e){this.setState({purchaseMultiplier:e})}render(){let e;e=Object(p.h)()?Object(p.c)():Object(p.b)();const t=[this.setPurchaseMultiplier.bind(this,g.x1),this.setPurchaseMultiplier.bind(this,g.x5),this.setPurchaseMultiplier.bind(this,g.x10),this.setPurchaseMultiplier.bind(this,g.MAX)],n=d.Player.hacknetNodes.map(e=>{if(Object(p.h)()){const t=h.AllServers[e];if(null==t)throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${e}`);return r.a.createElement(s.a,{key:t.hostname,node:t,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})}return r.a.createElement(o.a,{key:e.name,node:e,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})});return r.a.createElement("div",null,r.a.createElement("h1",null,"Hacknet ",Object(p.h)()?"Servers":"Nodes"),r.a.createElement(i.a,null),r.a.createElement(m.a,{cost:e,multiplier:this.state.purchaseMultiplier,onClick:this.handlePurchaseButtonClick}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(u.a,{totalProduction:this.state.totalProduction}),r.a.createElement(c.a,{onClicks:t,purchaseMultiplier:this.state.purchaseMultiplier})),Object(p.h)()&&r.a.createElement("button",{className:"std-button",onClick:this.createHashUpgradesPopup,style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var a=n(15),r=n(77),i=n(153),o=n(52),s=n(90),l=n(73);let c=!1;function u(e){if(c=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");a.Engine.loadCinematicTextContent();const t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(i.removeChildrenFromElement)(t);for(let t=0;t<e.length;++t)if(!Object(l.isString)(e[t]))throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");return function e(t,n=0){if(n>=t.length)return Promise.resolve(!0);return function(e){return new Promise(function(t,n){const a=document.getElementById("cinematic-text-container"),i=document.createElement("p");a.appendChild(i);const o=function e(t,n,a=0){return new Promise(function(i,o){Object(r.setTimeoutRef)(function(){const r=n.substring(0,a);if(a>=n.length)return t.innerHTML=r,i(!0);t.innerHTML=r+"<span class='typed-cursor'> █ </span>";const s=e(t,n,a+1);s.then(function(e){i(e)},function(e){o(e)})},15)})}(i,e,0);o.then(function(e){t(e)},function(e){n(e)})})}(t[n]).then(function(){return e(t,n+1)})}(e).then(function(){return function(){var e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container");return e.appendChild(Object(o.createElement)("br")),new Promise(function(n){e.appendChild(Object(o.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",c=!1,n()}}))})}()}).catch(function(e){Object(s.exceptionAlert)(e)})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.clearSleevesPage=t.updateSleevesPage=t.createSleevesPage=void 0;const s=o(n(0)),l=n(940),c=n(247),u=n(939),m=n(11),p=n(17),d=n(427),h=n(170),f=n(195),g=n(43),y=n(41),_=n(6),b=n(18),v=n(13),k=n(191),E=n(90),C=n(50),S=n(52),P=n(566),T=n(147),M=n(481),O=n(512),w=n(153),x=n(229),N=n(96),A=n(938),R=n(21),I=n(119),B=n(456),D=n(937),L=n(936),F=n(935),j=i(n(22)),W=n(412),G={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let H;function U(){if(b.routing.isOn(b.Page.Sleeves)){if(null===H)throw new Error("playerRef is null in updateSleevesPage()");if(null===G.sleeves)throw new Error("UIElems.sleeves is null in updateSleevesPage()");try{for(let e=0;e<H.sleeves.length;++e){$(H.sleeves[e],G.sleeves[e])}}catch(e){E.exceptionAlert(e)}}}function q(e,t){const n={container:null,statsPanel:null,stats:null,moreStatsButton:null,travelButton:null,purchaseAugsButton:null,taskPanel:null,taskSelector:null,taskDetailsSelector:null,taskDetailsSelector2:null,taskDescription:null,taskSetButton:null,taskProgressBar:null,earningsPanel:null,currentEarningsInfo:null,totalEarningsButton:null};return null===H?n:b.routing.isOn(b.Page.Sleeves)?(n.container=S.createElement("div",{class:"sleeve-container",display:"block"}),n.statsPanel=S.createElement("div",{class:"sleeve-panel",width:"25%"}),n.stats=S.createElement("div",{class:"sleeve-stats-text"}),n.moreStatsButton=S.createElement("button",{class:"std-button",innerText:"More Stats",clickListener:()=>{v.dialogBoxCreate(L.MoreStatsContent(e))}}),n.travelButton=S.createElement("button",{class:"std-button",innerText:"Travel",clickListener:()=>{if(null===H)return;const a="sleeve-travel-popup",r=[];r.push(M.createPopupCloseButton(a,{class:"std-button"})),r.push(S.createElement("p",{innerHTML:"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. "+`Traveling to a different city costs ${W.renderToStaticMarkup(s.default.createElement(R.Money,{money:m.CONSTANTS.TravelCost,player:H}))}. `+"It will also CANCEL the sleeve's current task (setting it to idle)"}));for(const i in f.Cities)e.city!==i&&function(e,i){r.push(S.createElement("div",{class:"cmpy-mgmt-find-employee-option",innerText:i,clickListener:()=>{if(null==H)throw new Error("playerRef is null in popupArguments.click()");return H.canAfford(m.CONSTANTS.TravelCost)?(e.city=i,H.loseMoney(m.CONSTANTS.TravelCost),e.resetTaskStatus(),N.removeElementById(a),$(e,n),Y(e,n,t),!1):(v.dialogBoxCreate("You cannot afford to have this sleeve travel to another city",!1),!1)}}))}(e,i);T.createPopup(a,r)}}),n.purchaseAugsButton=S.createElement("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{if(null==H)throw new Error("playerRef is null in purchaseAugsButton.click()");l.createSleevePurchaseAugsPopup(e,H)}}),n.statsPanel.appendChild(n.stats),n.statsPanel.appendChild(n.moreStatsButton),n.statsPanel.appendChild(n.travelButton),e.shock>=100&&n.statsPanel.appendChild(n.purchaseAugsButton),n.taskPanel=S.createElement("div",{class:"sleeve-panel",width:"40%"}),n.taskSelector=S.createElement("select",{class:"dropdown"}),n.taskSelector.add(P.createOptionElement("------")),n.taskSelector.add(P.createOptionElement("Work for Company")),n.taskSelector.add(P.createOptionElement("Work for Faction")),n.taskSelector.add(P.createOptionElement("Commit Crime")),n.taskSelector.add(P.createOptionElement("Take University Course")),n.taskSelector.add(P.createOptionElement("Workout at Gym")),n.taskSelector.add(P.createOptionElement("Shock Recovery")),n.taskSelector.add(P.createOptionElement("Synchronize")),n.taskDetailsSelector=S.createElement("select",{class:"dropdown"}),n.taskDetailsSelector2=S.createElement("select",{class:"dropdown"}),n.taskDescription=S.createElement("p"),n.taskProgressBar=S.createElement("p"),n.taskSelector.addEventListener("change",()=>{Y(e,n,t)}),n.taskSelector.selectedIndex=e.currentTask,n.taskSelector.dispatchEvent(new Event("change")),V(e,n),n.taskSetButton=S.createElement("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==H)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");if(null==t.taskDescription)throw new Error("elems.taskDescription is null");const n=O.getSelectValue(t.taskSelector),a=O.getSelectValue(t.taskDetailsSelector),r=O.getSelectValue(t.taskDetailsSelector2);let i=!1;switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":i=e.workForCompany(H,a);break;case"Work for Faction":i=e.workForFaction(H,a,r);break;case"Commit Crime":i=e.commitCrime(H,a);break;case"Take University Course":i=e.takeUniversityCourse(H,r,a);break;case"Workout at Gym":i=e.workoutAtGym(H,r,a);break;case"Shock Recovery":e.currentTask=c.SleeveTaskType.Recovery,i=e.shockRecovery(H);break;case"Synchronize":i=e.synchronize(H);break;default:console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${n}`)}if(i)V(e,t);else switch(n){case"Work for Faction":t.taskDescription.innerText="Failed to assign sleeve to task. This is most likely because the selected faction does not offer the selected work type.";break;default:t.taskDescription.innerText="Failed to assign sleeve to task. Invalid choice(s)."}if(b.routing.isOn(b.Page.Sleeves)){if(U(),null==G.sleeves)throw new Error("UIElems.sleeves is null");for(const e of G.sleeves){if(null==e.taskSelector)throw new Error("e.taskSelector is null");e.taskSelector.dispatchEvent(new Event("change"))}}}catch(e){return console.error(`Exception caught in setSleeveTask(): ${e}`),E.exceptionAlert(e),!1}}(e,n)}}),n.taskPanel.appendChild(n.taskSelector),n.taskPanel.appendChild(n.taskDetailsSelector),n.taskPanel.appendChild(n.taskDetailsSelector2),n.taskPanel.appendChild(n.taskSetButton),n.taskPanel.appendChild(n.taskDescription),n.taskPanel.appendChild(n.taskProgressBar),n.earningsPanel=S.createElement("div",{class:"sleeve-panel",width:"35%"}),n.currentEarningsInfo=S.createElement("div"),n.totalEarningsButton=S.createElement("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{v.dialogBoxCreate(F.MoreEarningsContent(e))}}),n.earningsPanel.appendChild(n.currentEarningsInfo),n.earningsPanel.appendChild(n.totalEarningsButton),$(e,n),n.container.appendChild(n.statsPanel),n.container.appendChild(n.taskPanel),n.container.appendChild(n.earningsPanel),n):n}function $(e,t){if(b.routing.isOn(b.Page.Sleeves)){if(null==H)throw new Error("playerRef is null in updateSleeveUi()");if(null==t.taskProgressBar)throw new Error("elems.taskProgressBar is null");if(null==t.stats)throw new Error("elems.stats is null");if(null==t.currentEarningsInfo)throw new Error("elems.currentEarningsInfo is null");if(j.render(D.StatsElement(e),t.stats),e.currentTask===c.SleeveTaskType.Crime){const n=[["Money",s.default.createElement(R.Money,{money:parseFloat(e.currentTaskLocation)}),"(on success)"],["Hacking Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.str),"(2x on success)"],["Defense Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",_.numeralWrapper.formatExp(e.gainRatesForTask.cha),"(2x on success)"]];j.render(A.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=k.createProgressBarText({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25})}else{const n=[["Money:",I.MoneyRate(5*e.gainRatesForTask.money)],["Hacking Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.hack)} / s`],["Strength Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.str)} / s`],["Defense Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.def)} / s`],["Dexterity Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.dex)} / s`],["Agility Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.agi)} / s`],["Charisma Exp:",`${_.numeralWrapper.formatExp(5*e.gainRatesForTask.cha)} / s`]];if(e.currentTask===c.SleeveTaskType.Company||e.currentTask===c.SleeveTaskType.Faction){const t=e.getRepGain(H);n.push(["Reputation:",B.ReputationRate(5*t)])}j.render(A.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=""}}}t.createSleevesPage=function(e){if(b.routing.isOn(b.Page.Sleeves))try{H=e,G.container=S.createElement("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),G.info=S.createElement("p",{class:"sleeves-page-info",innerHTML:"<h1>Sleeves</h1>Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.<br /><br />Sleeves can be used to perform different tasks synchronously.<br /><br />"}),G.faqButton=S.createElement("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{v.dialogBoxCreate(u.SleeveFaq,!1)}}),G.docButton=S.createElement("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),G.sleeveList=S.createElement("ul"),G.sleeves=[];for(const t of e.sleeves){const n=q(t,e.sleeves);if(null==n.container)throw new Error("sleeveUi.container is null in createSleevesPage()");G.sleeveList.appendChild(n.container),G.sleeves.push(n)}G.container.appendChild(G.info),G.container.appendChild(G.faqButton),G.container.appendChild(G.docButton),G.container.appendChild(G.sleeveList);const t=document.getElementById("entire-game-container");if(null===t)throw new Error("entire-game-container not found in createSleevesPage()");t.appendChild(G.container)}catch(e){E.exceptionAlert(e)}},t.updateSleevesPage=U,t.clearSleevesPage=function(){G.container instanceof HTMLElement&&x.removeElement(G.container);for(const e in G)G[e]=null;H=null};const K=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],z=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function Y(e,t,n){if(null==H)throw new Error("playerRef is null in updateSleeveTaskSelector()");const a=[];for(const t of n)e!==t&&t.currentTask===c.SleeveTaskType.Company&&a.push(t.currentTaskLocation);const r=[];for(const t of n)e!==t&&t.currentTask===c.SleeveTaskType.Faction&&r.push(t.currentTaskLocation);if(null===t.taskDetailsSelector)throw new Error("elems.taskDetailsSelector is null");if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector is null");switch(w.removeChildrenFromElement(t.taskDetailsSelector),w.removeChildrenFromElement(t.taskDetailsSelector2),t.taskDetailsSelector2=C.clearEventListeners(t.taskDetailsSelector2),O.getSelectValue(t.taskSelector)){case"Work for Company":{let n=0;const r=Object.keys(H.jobs);for(let i=0;i<r.length;++i)a.includes(r[i])||(t.taskDetailsSelector.add(P.createOptionElement(r[i])),e.currentTaskLocation===r[i]&&(t.taskDetailsSelector.selectedIndex=n),++n),t.taskDetailsSelector2.add(P.createOptionElement("------"));break}case"Work for Faction":{let n=0;for(const a of H.factions)r.includes(a)||(t.taskDetailsSelector.add(P.createOptionElement(a)),e.currentTaskLocation===a&&(t.taskDetailsSelector.selectedIndex=n),++n);t.taskDetailsSelector.addEventListener("change",()=>{if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector2 is null");const n=O.getSelectValue(t.taskDetailsSelector),a=p.Factions[n];if(null==a)return void console.warn(`Invalid faction name when trying to update Sleeve Task Selector: ${n}`);const r=a.getInfo();w.removeChildrenFromElement(t.taskDetailsSelector2);let i=0;r.offerHackingWork&&(t.taskDetailsSelector2.add(P.createOptionElement("Hacking Contracts")),e.factionWorkType===d.FactionWorkType.Hacking&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerFieldWork&&(t.taskDetailsSelector2.add(P.createOptionElement("Field Work")),e.factionWorkType===d.FactionWorkType.Field&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerSecurityWork&&(t.taskDetailsSelector2.add(P.createOptionElement("Security Work")),e.factionWorkType===d.FactionWorkType.Security&&(t.taskDetailsSelector2.selectedIndex=i),++i)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break}case"Commit Crime":{let n=0;for(const a in h.Crimes){const r=h.Crimes[a].name;if(t.taskDetailsSelector.add(P.createOptionElement(r,a)),""===e.crimeType)continue;const i=h.Crimes[e.crimeType];null!==i&&(r===i.name&&(t.taskDetailsSelector.selectedIndex=n),++n)}t.taskDetailsSelector2.add(P.createOptionElement("------"));break}case"Take University Course":for(let n=0;n<K.length;++n)t.taskDetailsSelector.add(P.createOptionElement(K[n])),e.className===K[n]&&(t.taskDetailsSelector.selectedIndex=n);switch(e.city){case g.CityName.Aevum:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.AevumSummitUniversity));break;case g.CityName.Sector12:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.Sector12RothmanUniversity));break;case g.CityName.Volhaven:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.VolhavenZBInstituteOfTechnology));break;default:t.taskDetailsSelector2.add(P.createOptionElement("No university available in city!"))}break;case"Workout at Gym":for(let n=0;n<z.length;++n)t.taskDetailsSelector.add(P.createOptionElement(z[n])),e.gymStatType===z[n].substring(6,9).toLowerCase()&&(t.taskDetailsSelector.selectedIndex=n);switch(e.city){case g.CityName.Aevum:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.AevumCrushFitnessGym)),t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.AevumSnapFitnessGym)),e.currentTaskLocation===y.LocationName.AevumCrushFitnessGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===y.LocationName.AevumSnapFitnessGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case g.CityName.Sector12:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.Sector12IronGym)),t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.Sector12PowerhouseGym)),e.currentTaskLocation===y.LocationName.Sector12IronGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===y.LocationName.Sector12PowerhouseGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case g.CityName.Volhaven:t.taskDetailsSelector2.add(P.createOptionElement(y.LocationName.VolhavenMilleniumFitnessGym));break;default:t.taskDetailsSelector2.add(P.createOptionElement("No gym available in city!"))}break;case"Shock Recovery":case"Synchronize":case"------":return t.taskDetailsSelector.add(P.createOptionElement("------")),void t.taskDetailsSelector2.add(P.createOptionElement("------"))}}function V(e,t){try{if(null==H)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");const n=O.getSelectValue(t.taskSelector),a=O.getSelectValue(t.taskDetailsSelector),r=O.getSelectValue(t.taskDetailsSelector2);if(null==t.taskDescription)throw new Error("elems.taskDescription should not be null");switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":t.taskDescription.innerText=`This sleeve is currently working your job at ${e.currentTaskLocation}.`;break;case"Work for Faction":t.taskDescription.innerText=`This sleeve is currently doing ${r} for ${e.currentTaskLocation}.`;break;case"Commit Crime":t.taskDescription.innerText=`This sleeve is currently attempting to ${h.Crimes[a].type} (Success Rate: ${_.numeralWrapper.formatPercentage(h.Crimes[a].successRate(e))}).`;break;case"Take University Course":t.taskDescription.innerText=`This sleeve is currently studying/taking a course at ${e.currentTaskLocation}.`;break;case"Workout at Gym":t.taskDescription.innerText=`This sleeve is currently working out at ${e.currentTaskLocation}.`;break;case"Shock Recovery":t.taskDescription.innerText="This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.";break;case"Synchronize":t.taskDescription.innerText="This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.";break;default:console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${n}`)}}catch(e){console.error(`Exception caught in updateSleeveTaskDescription(): ${e}`),E.exceptionAlert(e)}}},,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LocationRoot=void 0;const o=i(n(0)),s=n(975),l=n(974),c=n(195),u=n(425),m=n(490),p=n(11),d=n(13);t.LocationRoot=class extends o.Component{constructor(e){super(e),this.state={city:e.p.city,inCity:null==e.initiallyInCity||e.initiallyInCity,location:e.p.location},this.enterLocation=this.enterLocation.bind(this),this.returnToCity=this.returnToCity.bind(this),this.travel=this.travel.bind(this)}enterLocation(e){this.props.p.gotoLocation(e),this.setState({inCity:!1,location:e})}returnToCity(){this.setState({inCity:!0})}renderCity(){const e=c.Cities[this.state.city];if(null==e)throw new Error(`Invalid city when rendering UI: ${this.state.city}`);return o.createElement("div",{className:"noselect"},o.createElement("h2",null,this.state.city),o.createElement(s.LocationCity,{city:e,enterLocation:this.enterLocation}))}renderLocation(){const e=u.Locations[this.state.location];if(null==e)throw new Error(`Invalid location when rendering UI: ${this.state.location}`);return e.types.includes(m.LocationType.StockMarket)&&this.props.engine.loadStockMarketContent(),o.createElement(l.GenericLocation,{engine:this.props.engine,loc:e,p:this.props.p,returnToCity:this.returnToCity,travel:this.travel})}travel(e){const t=this.props.p,n=p.CONSTANTS.TravelCost;if(t.canAfford(n)){if(t.loseMoney(n),t.travel(e),d.dialogBoxCreate(o.createElement("span",{className:"noselect"},"You are now in ",e,"!")),!1===t.firstTimeTraveled){t.firstTimeTraveled=!0;const e=document.getElementById("travel-tab"),n=document.getElementById("world-menu-header");null!=e&&null!==n&&(e.style.display="list-item",n.click(),n.click())}this.props.p.travel(e)&&this.setState({inCity:!0,city:e})}else d.dialogBoxCreate(`You cannot afford to travel to ${e}`)}render(){return this.state.inCity?this.renderCity():this.renderLocation()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNextCompanyPositionHelper=void 0;const a=n(53);t.getNextCompanyPositionHelper=function(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:a.CompanyPositions[t]}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HelpTexts=t.TerminalHelpText=void 0,t.TerminalHelpText="Type 'help name' to learn more about the command 'name'<br><br>alias [-g] [name=\"value\"] Create or display Terminal aliases<br>analyze Get information about the current machine <br>backdoor Install a backdoor on the current machine <br>buy [-l/program] Purchase a program through the Dark Web<br>cat [file] Display a .msg, .lit, or .txt file<br>cd [dir] Change to a new directory<br>check [script] [args...] Print a script's logs to Terminal<br>clear Clear all text on the terminal <br>cls See 'clear' command <br>connect [ip/hostname] Connects to a remote server<br>download [script/text file] Downloads scripts or text files to your computer<br>expr [math expression] Evaluate a mathematical expression<br>free Check the machine's memory (RAM) usage<br>hack Hack the current machine<br>help [command] Display this help text, or the help text for a command<br>home Connect to home computer<br>hostname Displays the hostname of the machine<br>ifconfig Displays the IP address of the machine<br>kill [script/pid] [args...] Stops the specified script on the current server <br>killall Stops all running scripts on the current machine<br>ls [dir] [| grep pattern] Displays all files on the machine<br>lscpu Displays the number of CPU cores on the machine<br>mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>mv [src] [dest] Move/rename a text or script file<br>nano [file] Text editor - Open up and edit a script or text file<br>ps Display all scripts that are currently running<br>rm [file] Delete a file from the server<br>run [name] [-t] [n] [args...] Execute a program or script<br>scan Prints all immediately-available network connections<br>scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away<br>scp [file] [server] Copies a file to a destination server<br>sudov Shows whether you have root access on this computer<br>tail [script] [args...] Displays dynamic logs for the specified script<br>theme [preset] | bg txt hlgt Change the color scheme of the UI<br>top Displays all running scripts and their RAM usage<br>unalias [alias name] Deletes the specified alias<br>wget [url] [target file] Retrieves code/text from a web server<br>",t.HelpTexts={alias:"alias [-g] [name=\"value\"] <br>Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>alias nuke=\"run NUKE.exe\"<br><br>Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set: <br><br>alias worm=\"HTTPWorm.exe\"<br><br>and then you tried to run the following terminal command: <br><br>run worm<br><br>This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>alias -g worm=\"HTTPWorm.exe\"<br><br>Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal. <br><br>The 'unalias' command can be used to remove aliases.<br><br>",analyze:"analze<br>Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor<br>Install a backdoor on the current machine, grants a secret bonus depending on the machine.<br>Requires root access to run.<br>",buy:"buy [-l / program]<br>Purchase a program through the Dark Web. Requires a TOR router to use.<br><br>If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.<br><br>Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",cat:"cat [file]<br>Display message (.msg), literature (.lit), or text (.txt) files. Examples:<br><br>cat j1.msg<br>cat foo.lit<br>cat servers.txt",cd:"cd [dir]<br>Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:<br><br>cd scripts/hacking<br>cd /logs<br>cd ../",check:"check [script name] [args...]<br>Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>run foo.script 1 2 foodnstuff<br><br>Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>check foo.script 1 2 foodnstuff",clear:"clear<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]<br>Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]<br>Downloads a script or text file to your computer (like your real life computer).<br>You can also download all of your scripts/text files as a zip file using the following Terminal commands:<br><br>Download all scripts and text files: download *<br>Download all scripts: download *.script<br>Download all text files: download *.txt<br>",expr:"expr [mathematical expression]<br>Evaluate a simple mathematical expression. Supports native JavaScript operators:<br>+, -, /, *, **, %<br>Example:<br>expr 25 * 2 ** 10<br>Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free<br>Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack<br>Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>",help:"help [command]<br>Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples: <br><br>help alias<br>help scan-analyze",home:"home<br>Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname<br>Prints the hostname of the current server",ifconfig:"ipconfig<br>Prints the IP address of the current server",kill:"kill [script name] [args...]<br>kill [pid]<br>Kill the script specified by the script name and arguments OR by its PID.<br><br>If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:<br><br>run foo.script 1 sigma-cosmetics<br><br>Then to kill this script the same arguments would have to be used:<br><br>kill foo.script 1 sigma-cosmetics<br><br>If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall<br>Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]<br>The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order. <br><br>The 'dir' optional parameter can be used to display files/directories in another directory.<br><br>The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.<br><br>Examples:<br><br>List all files with the '.script' extension in the current directory:<br>ls | grep .script<br><br>List all files with the '.js' extension in the root directory:<br>ls / | grep .js<br><br>List all files with the word 'purchase' in the filename, in the 'scripts' directory:<br>ls scripts | grep purchase",lscpu:"lscpu<br>Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]<br>Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:<br><br>mem foo.script<br>mem foo.script -t 50<br>The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]<br>Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types<br><br>Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples: <br><br>mv hacking-controller.script scripts/hacking-controller.script<br>mv myScript.js myOldScript.js",nano:"nano [file name]<br>Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps<br>Prints all scripts that are running on the current server",rm:"rm [file]<br>Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]<br>Execute a program or a script.<br><br>The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space. <br><br>",scan:"scan<br>Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]<br>Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.<br><br>By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.<br><br>The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.<br><br>By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]<br>Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov<br>Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]<br>Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments: <br><br>run foo.script 10 50000<br><br>Then in order to check its logs with 'tail' the same arguments must be used: <br><br>tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]<br>Change the color of the game's user interface<br><br>This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:<br><br>theme #ffffff #385 #235012<br><br>A color picker such as <a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> can be used to get your desired hex color values<br><br>Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top<br>Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]<br>Deletes the specified alias. Note that the double quotation marks are required. <br><br>As an example, if an alias was declared using:<br><br>alias r=\"run\"<br><br>Then it could be removed using:<br><br>unalias r<br><br>It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]<br>Retrieves data from a URL and downloads it to a file on the current server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, it will be overwritten by this command.<br><br>Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:<br><br>wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trusted=void 0,t.trusted=function(e){return function(t){t.isTrusted&&e()}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopupCloseButton=void 0;const a=n(52),r=n(229);t.createPopupCloseButton=function(e,t){const n=a.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&n.click()}return n.addEventListener("click",()=>{if(e instanceof Element)r.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&r.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),n}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingStdButton=void 0;const o=i(n(0));t.AutoupdatingStdButton=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}render(){const e=null!=this.props.tooltip&&""!==this.props.tooltip;let t=this.props.disabled?"std-button-disabled":"std-button";e&&(t+=" tooltip");const n={__html:this.props.tooltip?this.props.tooltip:""};return o.createElement("button",{className:t,onClick:this.props.onClick,style:this.props.style},this.props.text,e&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:n}))}}},,,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SuccessChance=void 0;const r=a(n(0)),i=n(24);t.SuccessChance=function(e){return e.chance[0]===e.chance[1]?r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"%"):r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"% ~ ",i.formatNumber(100*e.chance[1],1),"%")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationType=void 0,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"}(t.LocationType||(t.LocationType={}))},,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberUpgradesMetadata=t.UpgradeType=void 0,function(e){e.Weapon="w",e.Armor="a",e.Vehicle="v",e.Rootkit="r",e.Augmentation="g"}(a=t.UpgradeType||(t.UpgradeType={})),t.gangMemberUpgradesMetadata=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:a.Weapon},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:a.Weapon},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:a.Weapon},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:a.Weapon},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:a.Weapon},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:a.Weapon},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:a.Weapon},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:a.Weapon},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:a.Armor},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:a.Armor},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:a.Armor},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:a.Armor},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:a.Vehicle},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:a.Vehicle},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:a.Vehicle},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:a.Vehicle},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:a.Rootkit},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:a.Rootkit},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:a.Rootkit},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:a.Augmentation},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:a.Augmentation},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:a.Augmentation},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:a.Augmentation},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:a.Augmentation},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:a.Augmentation},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:a.Augmentation},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:a.Augmentation},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:a.Augmentation},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:a.Augmentation},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:a.Augmentation}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;t.EventEmitter=class{constructor(e){if(this.subscribers={},Array.isArray(e))for(const t of e)this.addSubscriber(t)}addSubscriber(e){this.subscribers[e.id]=e.cb}emitEvent(...e){for(const t in this.subscribers)(0,this.subscribers[t])(e)}removeSubscriber(e){delete this.subscribers[e]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const a=n(705),r=n(19),i=n(1131),o=n(413),s=n(29);class l extends a.BaseServer{constructor(e={hostname:"",ip:o.createRandomIp()}){super(e),this.backdoorInstalled=!1,this.baseDifficulty=1,this.hackDifficulty=1,this.minDifficulty=1,this.moneyAvailable=0,this.moneyMax=0,this.numOpenPortsRequired=5,this.openPortCount=0,this.purchasedByPlayer=!1,this.requiredHackingSkill=1,this.serverGrowth=1,this.hostname.startsWith("hacknet-node-")&&(this.hostname=i.createRandomString(10)),this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.maxRam=null!=e.maxRam?e.maxRam:0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*r.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*r.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*r.BitNodeMultipliers.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5}capDifficulty(){this.hackDifficulty<this.minDifficulty&&(this.hackDifficulty=this.minDifficulty),this.hackDifficulty<1&&(this.hackDifficulty=1),this.hackDifficulty>100&&(this.hackDifficulty=100)}changeMinimumSecurity(e,t=!1){t?this.minDifficulty*=e:this.minDifficulty+=e,this.minDifficulty=Math.max(1,this.minDifficulty)}changeMaximumMoney(e,t=!1){t?this.moneyMax*=e:this.moneyMax+=e}fortify(e){this.hackDifficulty+=e,this.capDifficulty()}weaken(e){this.hackDifficulty-=e*r.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()}toJSON(){return s.Generic_toJSON("Server",this)}static fromJSON(e){return s.Generic_fromJSON(l,e.data)}}t.Server=l,s.Reviver.constructors.Server=l},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"calculateRamUsage",function(){return calculateRamUsage});var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(207),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(104),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(156),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(10),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__);const specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(otherScripts,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(e,t){const n=parseOnlyCalculateDeps(e,t);completedParses.add(t);for(let e=0;e<n.additionalModules.length;++e)completedParses.has(n.additionalModules[e])||parseQueue.push(n.additionalModules[e]);dependencyMap=Object.assign(dependencyMap,n.dependencyMap)}const initialModule="__SPECIAL_INITIAL_MODULE__";for(parseCode(code,initialModule);parseQueue.length>0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.URLImportError}else{if(!Array.isArray(otherScripts))return console.warn("parseOnlyRamCalculate() not called with array of scripts"),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;let e=null,t=nextModule.startsWith("./")?nextModule.slice(2):nextModule;for(const n of otherScripts)if(n.filename===t){e=n;break}if(null==e)return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;code=e.code}parseCode(code,nextModule)}let ram=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.error(`Error applying function: ${e}`),0}}if(workerScript.loadedFns[e])continue;let t;workerScript.loadedFns[e]=!0,t=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:e in workerScript.env.vars.sleeve?workerScript.env.vars.sleeve[e]:workerScript.env.vars[e],ram+=applyFuncRam(t)}catch(e){continue}}return ram}catch(e){return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}}function parseOnlyCalculateDeps(e,t){const n=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.b)(e,{sourceType:"module",ecmaVersion:9}),a=t+memCheckGlobalKey,r={};r[a]=new Set;let i={};var o=[];function s(e,n){const a=r[e]||(r[e]=new Set);n in i&&a.add(i[n]),a.add(t+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,specialReferenceIF),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(n,{key:a},Object.assign({ImportDeclaration:(e,t)=>{const n=e.source.value;o.push(n),r[t.key].add(n+memCheckGlobalKey);for(let a=0;a<e.specifiers.length;++a){const o=e.specifiers[a];void 0!==o.imported&&void 0!==o.local?i[o.local.name]=n+"."+o.imported.name:r[t.key].add(n+".*")}},FunctionDeclaration:e=>{const n=t+"."+e.id.name;acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e,{key:n},c())}},c())),{dependencyMap:r,additionalModules:o}}async function calculateRamUsage(e,t){const n={loadedFns:{},env:{vars:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCosts}};try{return await parseOnlyRamCalculate(t,e,n)}catch(e){return console.error("Failed to parse script for RAM calculations:"),console.error(e),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;const a=n(1),r=n(44),i=n(234),o=n(29),s=n(144);class l{constructor(e=null){this.name="",this.desc="",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=100,this.difficultyFac=1.01,this.rewardFac=1.02,this.successes=0,this.failures=0,this.rankGain=0,this.rankLoss=0,this.hpLoss=0,this.hpLost=0,this.isStealth=!1,this.isKill=!1,this.count=r.getRandomInt(1e3,25e3),this.countGrowth=r.getRandomInt(1,5),this.weights={hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7},this.decays={hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.teamCount=0,e&&e.name&&(this.name=e.name),e&&e.desc&&(this.desc=e.desc),e&&e.baseDifficulty&&(this.baseDifficulty=i.addOffset(e.baseDifficulty,10)),e&&e.difficultyFac&&(this.difficultyFac=e.difficultyFac),e&&e.rewardFac&&(this.rewardFac=e.rewardFac),e&&e.rankGain&&(this.rankGain=e.rankGain),e&&e.rankLoss&&(this.rankLoss=e.rankLoss),e&&e.hpLoss&&(this.hpLoss=e.hpLoss),e&&e.isStealth&&(this.isStealth=e.isStealth),e&&e.isKill&&(this.isKill=e.isKill),e&&e.count&&(this.count=e.count),e&&e.countGrowth&&(this.countGrowth=e.countGrowth),e&&e.weights&&(this.weights=e.weights),e&&e.decays&&(this.decays=e.decays);let t=0;for(const e in this.weights)this.weights.hasOwnProperty(e)&&(t+=this.weights[e]);if(t-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(const e in this.decays)if(this.decays.hasOwnProperty(e)&&this.decays[e]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}getDifficulty(){const e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e}attempt(e){return Math.random()<this.getSuccessChance(e)}getActionTimePenalty(){return 1}getActionTime(e){let t=this.getDifficulty()/s.BladeburnerConstants.DifficultyToTimeFactor;const n=e.skillMultipliers.actionTime,r=a.Player.agility*e.skillMultipliers.effAgi,i=a.Player.dexterity*e.skillMultipliers.effDex,o=.5*(Math.pow(r,s.BladeburnerConstants.EffAgiExponentialFactor)+Math.pow(i,s.BladeburnerConstants.EffDexExponentialFactor)+r/s.BladeburnerConstants.EffAgiLinearFactor+i/s.BladeburnerConstants.EffDexLinearFactor);return t=Math.max(1,t*n/o),Math.ceil(t*this.getActionTimePenalty())}getTeamSuccessBonus(e){return 1}getActionTypeSkillSuccessBonus(e){return 1}getChaosCompetencePenalty(e,t){const n=e.getCurrentCity();return t.est?Math.pow(n.popEst/s.BladeburnerConstants.PopulationThreshold,s.BladeburnerConstants.PopulationExponent):Math.pow(n.pop/s.BladeburnerConstants.PopulationThreshold,s.BladeburnerConstants.PopulationExponent)}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>s.BladeburnerConstants.ChaosThreshold){const e=t.chaos-s.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}getEstSuccessChance(e){function t(e){return Math.max(0,Math.min(e,1))}const n=this.getSuccessChance(e,{est:!0}),a=this.getSuccessChance(e),r=Math.abs(a-n);let i=a-r,o=a+r;const s=e.getCurrentCity(),l=s.pop/s.popEst;return l<1?i*=l:o*=l,[t(i),t(o)]}getSuccessChance(e,t={est:!1}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");let n=this.getDifficulty(),r=0;for(const t in this.weights)if(this.weights.hasOwnProperty(t)){const n=a.Player.queryStatFromString(t),i="eff"+t.charAt(0).toUpperCase()+t.slice(1);let o=e.skillMultipliers[i];null==o&&(console.error(`Failed to find Bladeburner Skill multiplier for: ${t}`),o=1),r+=this.weights[t]*Math.pow(o*n,this.decays[t])}if(r*=a.Player.getIntelligenceBonus(.75),r*=e.calculateStaminaPenalty(),r*=this.getTeamSuccessBonus(e),r*=this.getChaosCompetencePenalty(e,t),n*=this.getChaosDifficultyBonus(e),"Raid"==this.name&&e.getCurrentCity().comms<=0)return 0;if(r*=e.skillMultipliers.successChanceAll,r*=this.getActionTypeSkillSuccessBonus(e),this.isStealth&&(r*=e.skillMultipliers.successChanceStealth),this.isKill&&(r*=e.skillMultipliers.successChanceKill),r*=a.Player.bladeburner_success_chance_mult,isNaN(r))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,r/n)}getSuccessesNeededForNextLevel(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))}setMaxLevel(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel}toJSON(){return o.Generic_toJSON("Action",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Action=l,o.Reviver.constructors.Action=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectText=t.getSelectValue=void 0,t.getSelectValue=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].value},t.getSelectText=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].text}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Product=void 0;const a=n(294),r=n(420),i=n(1336),o=n(1335),s=n(29),l=n(44);class c{constructor(e={}){this.name="",this.dmd=0,this.cmp=0,this.mku=0,this.pCost=0,this.sCost=0,this.fin=!1,this.prog=0,this.createCity="",this.designCost=0,this.advCost=0,this.rat=0,this.qlt=0,this.per=0,this.dur=0,this.rel=0,this.aes=0,this.fea=0,this.data=o.createCityMap([0,0,0]),this.loc="",this.siz=0,this.reqMats={},this.prdman=o.createCityMap([!1,0]),this.sllman=o.createCityMap([!1,0]),this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=o.createCityMap(0),this.name=e.name?e.name:"",this.dmd=e.demand?e.demand:0,this.cmp=e.competition?e.competition:0,this.mku=e.markup?e.markup:0,this.createCity=e.createCity?e.createCity:"",this.designCost=e.designCost?e.designCost:0,this.advCost=e.advCost?e.advCost:0,this.qlt=e.quality?e.quality:0,this.per=e.performance?e.performance:0,this.dur=e.durability?e.durability:0,this.rel=e.reliability?e.reliability:0,this.aes=e.aesthetics?e.aesthetics:0,this.fea=e.features?e.features:0,this.loc=e.loc?e.loc:"",this.siz=e.size?e.size:0,this.reqMats=e.req?e.req:{}}createProduct(e=1,t=1){this.fin||(this.prog+=.01*e*t)}finishProduct(e,t){this.fin=!0;const n=this.prog/100,i=e[a.EmployeePositions.Engineer]/e.total,o=e[a.EmployeePositions.Management]/e.total,s=e[a.EmployeePositions.RandD]/e.total,c=e[a.EmployeePositions.Operations]/e.total,u=e[a.EmployeePositions.Business]/e.total,m=n*(1.2*i+.9*o+1.3*s+1.5*c+u)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=m*(.1*e[a.EmployeePositions.Engineer]+.05*e[a.EmployeePositions.Management]+.05*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.02*e[a.EmployeePositions.Business]),this.per=m*(.15*e[a.EmployeePositions.Engineer]+.02*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.02*e[a.EmployeePositions.Business]),this.dur=m*(.05*e[a.EmployeePositions.Engineer]+.02*e[a.EmployeePositions.Management]+.08*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.05*e[a.EmployeePositions.Business]),this.rel=m*(.02*e[a.EmployeePositions.Engineer]+.08*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.08*e[a.EmployeePositions.Business]),this.aes=m*(0*e[a.EmployeePositions.Engineer]+.08*e[a.EmployeePositions.Management]+.05*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.1*e[a.EmployeePositions.Business]),this.fea=m*(.08*e[a.EmployeePositions.Engineer]+.05*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.05*e[a.EmployeePositions.Business]),this.calculateRating(t);const p=1+Math.pow(this.advCost,.1)/100;this.mku=100/(p*Math.pow(this.qlt+.001,.65)*(u+o)),0===this.mku&&(this.mku=1),this.dmd=0===t.awareness?20:Math.min(100,p*(t.popularity/t.awareness*100)),this.cmp=l.getRandomInt(0,70);for(const e in t.reqMats)if(t.reqMats.hasOwnProperty(e)){const n=t.reqMats[e];if(void 0===n)continue;this.reqMats[e]=n}this.siz=0;for(const e in t.reqMats){const n=t.reqMats[e];void 0!==n&&(this.siz+=r.MaterialSizes[e]*n)}}calculateRating(e){const t=i.ProductRatingWeights[e.type];null!=t?(this.rat=0,this.rat+=t.Quality?this.qlt*t.Quality:0,this.rat+=t.Performance?this.per*t.Performance:0,this.rat+=t.Durability?this.dur*t.Durability:0,this.rat+=t.Reliability?this.rel*t.Reliability:0,this.rat+=t.Aesthetics?this.aes*t.Aesthetics:0,this.rat+=t.Features?this.fea*t.Features:0):console.error(`Could not find product rating weights for: ${e}`)}toJSON(){return s.Generic_toJSON("Product",this)}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}}t.Product=c,s.Reviver.constructors.Product=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResearchMap=void 0;const a=n(1341),r=n(1340);function i(e){null!=t.ResearchMap[e.name]&&console.warn(`Duplicate Research being defined: ${e.name}`),t.ResearchMap[e.name]=new a.Research(e)}t.ResearchMap={};for(const e of r.researchMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Material=void 0;const a=n(29);class r{constructor(e={}){this.name="InitName",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=[0,0],this.cmp=0,this.cmpR=[0,0],this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.imp=0,this.exp=[],this.totalExp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=0,e.name&&(this.name=e.name),this.init()}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,99],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,99],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,99],this.bCost=4e4,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,9],this.cmp=90,this.cmpR=[80,9],this.bCost=75e3,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,99],this.cmp=90,this.cmpR=[80,9],this.bCost=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error(`Invalid material type in init(): ${this.name}`)}}processMarket(){const e=1+Math.random()*this.mv/300,t=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=t,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/e):(this.cmp*=1/t,this.cmp<this.cmpR[0]&&(this.cmp=this.cmpR[0]),this.bCost*=e);const n=1+Math.random()*this.mv/100;Math.random()<.5?(this.dmd*=n,this.dmd>this.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=e):(this.dmd*=1/n,this.dmd<this.dmdR[0]&&(this.dmd=this.dmdR[0]),this.bCost*=1/e)}toJSON(){return a.Generic_toJSON("Material",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.Material=r,a.Reviver.constructors.Material=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Warehouse=void 0;const a=n(515),r=n(420),i=n(6),o=n(29),s=n(90);class l{constructor(e={}){this.breakdown="",this.level=1,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.smartSupplyConsiderExports=!1,this.smartSupplyStore=0,this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.materials={Water:new a.Material({name:"Water"}),Energy:new a.Material({name:"Energy"}),Food:new a.Material({name:"Food"}),Plants:new a.Material({name:"Plants"}),Metal:new a.Material({name:"Metal"}),Hardware:new a.Material({name:"Hardware"}),Chemicals:new a.Material({name:"Chemicals"}),Drugs:new a.Material({name:"Drugs"}),Robots:new a.Material({name:"Robots"}),AICores:new a.Material({name:"AI Cores"}),RealEstate:new a.Material({name:"Real Estate"})},e.corp&&e.industry&&this.updateSize(e.corp,e.industry)}updateMaterialSizeUsed(){this.sizeUsed=0,this.breakdown="";for(const e in this.materials){const t=this.materials[e];r.MaterialSizes.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*r.MaterialSizes[e],t.qty>0&&(this.breakdown+=e+": "+i.numeralWrapper.format(t.qty*r.MaterialSizes[e],"0,0.0")+"<br>"))}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(e,t){try{this.size=100*this.level*e.getStorageMultiplier()*t.getStorageMultiplier()}catch(e){s.exceptionAlert(e)}}toJSON(){return o.Generic_toJSON("Warehouse",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Warehouse=l,o.Reviver.constructors.Warehouse=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUpgrades=void 0,t.CorporationUpgrades={0:[0,2e9,1.06,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.06,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,4e9,1.1,.001,"DreamSense","Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 15 seconds."],3:[3,4e9,1.12,.005,"Wilson Analytics","Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive)."],4:[4,1e9,1.06,.1,"Nuoptimal Nootropic Injector Implants","Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive)."],5:[5,1e9,1.06,.1,"Speech Processor Implants","Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive)."],6:[6,1e9,1.06,.1,"Neural Accelerators","Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.01,"ABC SalesBots","Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive)."],9:[9,5e9,1.07,.05,"Project Insight","Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive)."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUnlockUpgrades=void 0,t.CorporationUnlockUpgrades={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],1:[1,25e9,"Smart Supply","Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production."],2:[2,5e9,"Market Research - Demand","Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product."],3:[3,5e9,"Market Data - Competition","Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for every material and product."],4:[4,1e10,"VeChain","Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation."],5:[5,5e11,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e12,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"]}},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSleevePurchasableAugs=void 0;const a=n(12),r=n(3),i=n(17);t.findSleevePurchasableAugs=function(e,t){const n=e.augmentations.map(e=>e.name),o=[];function s(e){return e.name!==r.AugmentationNames.NeuroFluxGovernor&&!n.includes(e.name)&&!o.includes(e)&&!e.isSpecial}if(t.inGang()){const e=t.getGangFaction();for(const t in a.Augmentations){const n=a.Augmentations[t];s(n)&&e.playerReputation>n.baseRepRequirement&&o.push(n)}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.Factions[e];if(null!=t)for(const e of t.augmentations){const n=a.Augmentations[e];s(n)&&t.playerReputation>n.baseRepRequirement&&o.push(n)}}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerGrowth=void 0;const a=n(11),r=n(19);t.calculateServerGrowth=function(e,t,n,i=1){const o=Math.max(Math.floor(t),0);let s=1+(a.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;s>a.CONSTANTS.ServerMaxGrowthRate&&(s=a.CONSTANTS.ServerMaxGrowthRate);const l=o*(e.serverGrowth/100)*r.BitNodeMultipliers.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*n.hacking_grow_mult*c)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showLiterature=void 0;const a=n(1348),r=n(13);t.showLiterature=function(e){const t=a.Literatures[e];if(null==t)return;const n=`<i>${t.title}</i><br><br>${t.txt}`;r.dialogBoxCreate(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeLoadingScreen=void 0;const a=n(192),r=n(96);t.removeLoadingScreen=function(){r.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveScriptsRoot=void 0;const o=i(n(0)),s=n(932),l=n(931);t.ActiveScriptsRoot=class extends o.Component{constructor(e){super(e)}render(){return o.createElement(o.Fragment,null,o.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),o.createElement(s.ScriptProduction,Object.assign({},this.props)),o.createElement(l.ServerAccordions,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.clearResleevesPage=t.createResleevesPage=void 0;const o=n(934),s=n(12),l=n(6),c=n(21),u=n(18),m=n(13),p=n(90),d=n(52),h=n(566),f=n(512),g=n(153),y=n(229),_=i(n(0)),b=n(412),v={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let k;function E(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(null===k)return t;if(!u.routing.isOn(u.Page.Resleeves))return t;t.container=d.createElement("div",{class:"resleeve-container",display:"block"}),t.statsPanel=d.createElement("div",{class:"resleeve-panel",width:"30%"}),t.stats=d.createElement("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${l.numeralWrapper.formatSkill(e.hacking_skill)} (${l.numeralWrapper.formatExp(e.hacking_exp)} exp)<br />`+`Strength: ${l.numeralWrapper.formatSkill(e.strength)} (${l.numeralWrapper.formatExp(e.strength_exp)} exp)<br />`+`Defense: ${l.numeralWrapper.formatSkill(e.defense)} (${l.numeralWrapper.formatExp(e.defense_exp)} exp)<br />`+`Dexterity: ${l.numeralWrapper.formatSkill(e.dexterity)} (${l.numeralWrapper.formatExp(e.dexterity_exp)} exp)<br />`+`Agility: ${l.numeralWrapper.formatSkill(e.agility)} (${l.numeralWrapper.formatExp(e.agility_exp)} exp)<br />`+`Charisma: ${l.numeralWrapper.formatSkill(e.charisma)} (${l.numeralWrapper.formatExp(e.charisma_exp)} exp)<br />`+`# Augmentations: ${e.augmentations.length}`}),t.multipliersButton=d.createElement("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{m.dialogBoxCreate(["<h2><u>Total Multipliers:</u></h2>",`Hacking Level multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${l.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${l.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${l.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${l.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${l.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${l.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Hacking Chance multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_chance_mult)}`,`Hacking Speed multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_speed_mult)}`,`Hacking Money multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_money_mult)}`,`Hacking Growth multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_grow_mult)}`,`Salary multiplier: ${l.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Company Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Faction Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Crime Money multiplier: ${l.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${l.numeralWrapper.formatPercentage(e.crime_success_mult)}`,`Hacknet Income multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_money_mult)}`,`Hacknet Purchase Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_purchase_cost_mult)}`,`Hacknet Level Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_level_cost_mult)}`,`Hacknet Ram Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_ram_cost_mult)}`,`Hacknet Core Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_core_cost_mult)}`,`Bladeburner Max Stamina multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_max_stamina_mult)}`,`Bladeburner Stamina Gain multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_stamina_gain_mult)}`,`Bladeburner Field Analysis multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_analysis_mult)}`,`Bladeburner Success Chance multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_success_chance_mult)}`].join("<br />"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=d.createElement("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=d.createElement("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=d.createElement("p");for(let n=0;n<e.augmentations.length;++n)t.augSelector.add(h.createOptionElement(e.augmentations[n].name));t.augSelector.addEventListener("change",()=>{!function(e){if(null==e.augDescription)throw new Error("elems.augDescription is null in updateAugDescription()");const t=f.getSelectValue(e.augSelector),n=s.Augmentations[t];if(null==n)return void console.warn(`Could not find Augmentation with name ${t}`);let a=n.info;"string"!=typeof a&&(a=b.renderToStaticMarkup(a));e.augDescription.innerHTML=a}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const n=e.getCost();return t.costPanel=d.createElement("div",{class:"resleeve-panel",width:"20%"}),t.costText=d.createElement("p",{innerHTML:`It costs ${b.renderToStaticMarkup(_.createElement(c.Money,{money:n,player:k}))} `+"to purchase this Sleeve."}),t.buyButton=d.createElement("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{if(null==k)throw new Error("playerRef is null in buyButton.click()");o.purchaseResleeve(e,k)?m.dialogBoxCreate(_.createElement(_.Fragment,null,"You re-sleeved for ",_.createElement(c.Money,{money:n}),"!"),!1):m.dialogBoxCreate("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}t.createResleevesPage=function(e){if(u.routing.isOn(u.Page.Resleeves))try{let t;k=e,v.container=d.createElement("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),v.info=d.createElement("p",{display:"block",innerHTML:"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!<br /><br />Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).<br /><br />NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=o.generateResleeves()),v.sortTag=d.createElement("p",{display:"inline-block",innerText:"Sort By: "}),v.sortSelector=d.createElement("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),v.sortSelector.add(h.createOptionElement("Cost",t.Cost)),v.sortSelector.add(h.createOptionElement("Hacking Level",t.Hacking)),v.sortSelector.add(h.createOptionElement("Strength Level",t.Strength)),v.sortSelector.add(h.createOptionElement("Defense Level",t.Defense)),v.sortSelector.add(h.createOptionElement("Dexterity Level",t.Dexterity)),v.sortSelector.add(h.createOptionElement("Agility Level",t.Agility)),v.sortSelector.add(h.createOptionElement("Charisma Level",t.Charisma)),v.sortSelector.add(h.createOptionElement("Average Combat Stats",t.AverageCombatStats)),v.sortSelector.add(h.createOptionElement("Average Stats",t.AverageAllStats)),v.sortSelector.add(h.createOptionElement("Number of Augmentations",t.TotalNumAugmentations)),v.resleeveList=d.createElement("ul"),v.sortSelector.onchange=(()=>{function n(...e){let t=0;for(let n=0;n<e.length;++n)t+=e[n];return t/e.length}switch(g.removeChildrenFromElement(v.resleeveList),v.resleeves=[],f.getSelectValue(v.sortSelector)){case t.Hacking:e.resleeves.sort((e,t)=>e.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>n(e.strength,e.defense,e.dexterity,e.agility)-n(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>n(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-n(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}if(null==v.resleeveList)throw new Error("UIElems.resleeveList is null in sortSelector.click()");if(null==v.resleeves)throw new Error("UIElems.resleeves is null in sortSelector.click()");for(const t of e.resleeves){const e=E(t);if(null==e.container)throw new Error("resleeveUi.container is null in sortSelector.click()");v.resleeveList.appendChild(e.container),v.resleeves.push(e)}}),v.sortSelector.dispatchEvent(new Event("change")),v.container.appendChild(v.info),v.container.appendChild(d.createElement("br")),v.container.appendChild(v.sortTag),v.container.appendChild(v.sortSelector),v.container.appendChild(v.resleeveList);const n=document.getElementById("entire-game-container");if(null==n)throw new Error("Could not find entire-game-container in createResleevesPage()");n.appendChild(v.container)}catch(e){p.exceptionAlert(e)}},t.clearResleevesPage=function(){v.container instanceof HTMLElement&&y.removeElement(v.container);for(const e in v)v[e]=null;k=null}},,,,,,function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});n(3),n(92),n(177),n(32),n(30),n(17),n(1),n(458),n(20),n(23),n(103),n(48),n(93),n(193),n(15),n(113),n(13),n(52);var a=n(96),r=(n(21),n(0)),i=n.n(r);n(22);i.a.Component;const o="dev-menu-container";function s(){throw new Error("Cannot create Dev Menu because you are not in a dev build")}function l(){Object(a.removeElementById)(o)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.executeDarkwebTerminalCommand=t.checkIfConnectedToDarkweb=void 0;const o=i(n(0)),s=n(302),l=n(1),c=n(38),u=n(7),m=n(21),p=n(704);t.checkIfConnectedToDarkweb=function(){if(c.SpecialServerIps.hasOwnProperty("Darkweb Server")){const e=c.SpecialServerIps.getIp("Darkweb Server");if(!p.isValidIPAddress(e))return;e==l.Player.getCurrentServer().ip&&u.post("You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item.")}},t.executeDarkwebTerminalCommand=function(e){if(0!=e.length)switch(e[0]){case"buy":{if(2!=e.length)return u.post("Incorrect number of arguments. Usage: "),u.post("buy -l"),void u.post("buy [item name]");const t=e[1];"-l"==t||"-1"==t||"--list"==t?function(){for(const e in s.DarkWebItems){const t=s.DarkWebItems[e];u.postElement(o.createElement(o.Fragment,null,t.program," - ",o.createElement(m.Money,{money:t.price,player:l.Player})," - ",t.description))}}():function(e){e=e.toLowerCase();let t=null;for(const n in s.DarkWebItems){const a=s.DarkWebItems[n];a.program.toLowerCase()==e&&(t=a)}null!==t?l.Player.hasProgram(t.program)?u.post("You already have the "+t.program+" program"):l.Player.money.lt(t.price)?u.post("Not enough money to purchase "+t.program):(l.Player.loseMoney(t.price),l.Player.getHomeComputer().programs.push(t.program),u.post("You have purchased the "+t.program+" program. The new program can be found on your home computer.")):u.post("Unrecognized item: "+e)}(t);break}default:u.post("Command not found")}}},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(20),o=n(79);const s={All:0,Foreign:1,Owned:2,Purchased:3};class l extends r.a.Component{isValidServer(e){const t=this.props.serverType;switch(t){case s.All:return!0;case s.Foreign:return"home"!==e.hostname&&!e.purchasedByPlayer;case s.Owned:return e.purchasedByPlayer||e instanceof o.HacknetServer||"home"===e.hostname;case s.Purchased:return e.purchasedByPlayer||e instanceof o.HacknetServer;default:return console.warn(`Invalid ServerType specified for ServerDropdown component: ${t}`),!1}}renderOption(e){return r.a.createElement("option",{key:e.hostname,value:e.hostname},e.hostname)}render(){const e=[];for(const t in i.AllServers){const n=i.AllServers[t];this.isValidServer(n)&&e.push(this.renderOption(n))}return r.a.createElement("select",{className:"dropdown",onChange:this.props.onChange,style:this.props.style},e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetNode=void 0;const a=n(11),r=n(157),i=n(33),o=n(13),s=n(29);class l{constructor(e="",t=1){this.cores=1,this.level=1,this.moneyGainRatePerSecond=0,this.onlineTimeSeconds=0,this.ram=1,this.totalMoneyGenerated=0,this.name=e,this.updateMoneyGainRate(t)}calculateCoreUpgradeCost(e=1,t){return r.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e=1,t){return r.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e=1,t){return r.calculateRamUpgradeCost(this.ram,e,t)}process(e=1){const t=e*a.CONSTANTS.MilliPerCycle/1e3;let n=this.moneyGainRatePerSecond*t;return isNaN(n)&&(console.error(`Hacknet Node ${this.name} calculated earnings of NaN`),n=0),this.totalMoneyGenerated+=n,this.onlineTimeSeconds+=t,n}upgradeCore(e=1,t){this.cores=Math.min(i.HacknetNodeConstants.MaxCores,Math.round(this.cores+e)),this.updateMoneyGainRate(t)}upgradeLevel(e=1,t){this.level=Math.min(i.HacknetNodeConstants.MaxLevel,Math.round(this.level+e)),this.updateMoneyGainRate(t)}upgradeRam(e=1,t){for(let t=0;t<e;++t)this.ram*=2;this.ram=Math.round(this.ram),this.updateMoneyGainRate(t)}updateMoneyGainRate(e){this.moneyGainRatePerSecond=r.calculateMoneyGainRate(this.level,this.ram,this.cores,e),isNaN(this.moneyGainRatePerSecond)&&(this.moneyGainRatePerSecond=0,o.dialogBoxCreate("Error in calculating Hacknet Node production. Please report to game developer",!1))}toJSON(){return s.Generic_toJSON("HacknetNode",this)}static fromJSON(e){return s.Generic_fromJSON(l,e.data)}}t.HacknetNode=l,s.Reviver.constructors.HacknetNode=l},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionButton=void 0;const o=i(n(0));t.AccordionButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n="accordion-button";t&&(n+=" tooltip"),"string"==typeof e.addClasses&&(n+=` ${e.addClasses}`);const a={__html:e.tooltip?e.tooltip:""};return o.createElement("button",{className:n,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:a}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptAccordion=void 0;const o=i(n(0)),s=n(6),l=n(164),c=n(564),u=n(71),m=n(13),p=n(155),d=n(24),h=n(112),f=n(21);t.WorkerScriptAccordion=function(e){const t=e.workerScript.scriptRef,n=p.logBoxCreate.bind(null,t),a=u.killWorkerScript.bind(null,t,t.server),r=t.onlineMoneyMade/t.onlineRunningTime,i=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,y=t.offlineExpGained/t.offlineRunningTime;return o.createElement(l.Accordion,{headerClass:"active-scripts-script-header",headerContent:o.createElement(o.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:o.createElement(o.Fragment,null,o.createElement("pre",null,"Threads: ",s.numeralWrapper.formatThreads(e.workerScript.scriptRef.threads)),o.createElement("pre",null,"Args: ",h.arrayToString(e.workerScript.args)),o.createElement("pre",null,"Online Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.onlineRunningTime)),o.createElement("pre",null,"Offline Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.offlineRunningTime)),o.createElement("pre",null,"Total online production: ",o.createElement(f.Money,{money:t.onlineMoneyMade})),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(t.onlineExpGained)+" hacking exp"),o.createElement("pre",null,"Online production rate: ",o.createElement(f.Money,{money:r})," / second"),o.createElement("pre",null,Array(25).join(" ")+s.numeralWrapper.formatExp(i)+" hacking exp / second"),o.createElement("pre",null,"Total offline production: ",o.createElement(f.Money,{money:t.offlineMoneyMade})),o.createElement("pre",null,Array(27).join(" ")+s.numeralWrapper.formatExp(t.offlineExpGained)+" hacking exp"),o.createElement("pre",null,"Offline production rate: ",o.createElement(f.Money,{money:g})," / second"),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(y)+" hacking exp / second"),o.createElement(c.AccordionButton,{onClick:n,text:"Log"}),o.createElement(c.AccordionButton,{onClick:function(){a(),m.dialogBoxCreate("Killing script")},text:"Kill Script"}))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOptionElement=void 0;const a=n(52);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),a.createElement("option",{text:e,value:n})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.Card=t.Suit=void 0,function(e){e.Clubs="clubs",e.Diamonds="diamonds",e.Hearts="hearts",e.Spades="spades"}(a=t.Suit||(t.Suit={}));t.Card=class{constructor(e,t){if(this.value=e,this.suit=t,e<1||e>13)throw new Error(`Card instantiated with improper value: ${e}`)}formatValue(){switch(this.value){case 1:return"A";case 11:return"J";case 12:return"Q";case 13:return"K";default:return`${this.value}`}}isRedSuit(){return this.suit===a.Hearts||this.suit===a.Diamonds}getStringRepresentation(){return`${this.formatValue()} of ${this.suit}`}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlinkingCursor=void 0;const r=a(n(0));t.BlinkingCursor=function(){return r.default.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TeamSizePopup=void 0;const o=i(n(0)),s=n(40),l=n(13);t.TeamSizePopup=function(e){const[t,n]=o.useState();return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),o.default.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>n(parseFloat(e.target.value))}),o.default.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const n=Math.round(t);isNaN(n)||n<0?l.dialogBoxCreate("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=n,s.removePopup(e.popupId)}},"Confirm"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationAccordion=void 0;const o=i(n(0)),s=n(164),l=n(3);t.AugmentationAccordion=function(e){let t=e.aug.name;return null!=e.level&&e.aug.name===l.AugmentationNames.NeuroFluxGovernor&&(t+=` - Level ${e.level}`),"string"==typeof e.aug.info?o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,o.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),o.createElement("br",null),o.createElement("br",null),e.aug.stats)}):o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,e.aug.info,o.createElement("br",null),o.createElement("br",null),e.aug.stats)})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorPositions=t.PositionTracker=void 0;class a{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}t.PositionTracker=a,t.CursorPositions=new a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberTask=void 0;t.GangMemberTask=class{constructor(e,t,n,a,r){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=a,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangConstants=void 0,t.GangConstants={GangRespectToReputationRatio:25,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.15,Names:["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIPAddress=void 0,t.isValidIPAddress=function(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n=`^${t}.${t}.${t}.${t}$`;return new RegExp(n).test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseServer=void 0;const a=n(92),r=n(233),i=n(87),o=n(139),s=n(66),l=n(413),c=n(199);t.BaseServer=class{constructor(e={hostname:"",ip:l.createRandomIp()}){this.contracts=[],this.cpuCores=1,this.ftpPortOpen=!1,this.hasAdminRights=!1,this.hostname="",this.httpPortOpen=!1,this.ip="",this.isConnectedTo=!1,this.maxRam=0,this.messages=[],this.organizationName="",this.programs=[],this.ramUsed=0,this.runningScripts=[],this.scripts=[],this.serversOnNetwork=[],this.smtpPortOpen=!1,this.sqlPortOpen=!1,this.sshPortOpen=!1,this.textFiles=[],this.ip=e.ip?e.ip:l.createRandomIp(),this.hostname=e.hostname,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights}addContract(e){this.contracts.push(e)}getContract(e){for(const t of this.contracts)if(t.fn===e)return t;return null}getRunningScript(e,t){for(const n of this.runningScripts)if(n.filename===e&&c.compareArrays(n.args,t))return n;return null}getScript(e){for(let t=0;t<this.scripts.length;t++)if(this.scripts[t].filename===e)return this.scripts[t];return null}isRunning(e){for(const t of this.runningScripts)if(t.filename===e)return!0;return!1}removeContract(e){e instanceof a.CodingContract?this.contracts=this.contracts.filter(t=>t.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)}removeFile(e){if(e.endsWith(".exe")||null!=e.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)){for(let t=0;t<this.programs.length;++t)if(this.programs[t]===e)return this.programs.splice(t,1),{res:!0}}else if(s.isScriptFilename(e)){for(let t=0;t<this.scripts.length;++t)if(this.scripts[t].filename===e)return this.isRunning(e)?{res:!1,msg:"Cannot delete a script that is currently running!"}:(this.scripts.splice(t,1),{res:!0})}else if(e.endsWith(".lit"))for(let t=0;t<this.messages.length;++t){const n=this.messages[t];if("string"==typeof n&&n===e)return this.messages.splice(t,1),{res:!0}}else if(e.endsWith(".txt")){for(let t=0;t<this.textFiles.length;++t)if(this.textFiles[t].fn===e)return this.textFiles.splice(t,1),{res:!0}}else if(e.endsWith(".cct"))for(let t=0;t<this.contracts.length;++t)if(this.contracts[t].fn===e)return this.contracts.splice(t,1),{res:!0};return{res:!1,msg:"No such file exists"}}runScript(e){this.runningScripts.push(e)}setMaxRam(e){this.maxRam=e}writeToScriptFile(e,t){const n={success:!1,overwritten:!1};if(!i.isValidFilePath(e)||!s.isScriptFilename(e))return n;for(let a=0;a<this.scripts.length;++a)if(e===this.scripts[a].filename){const e=this.scripts[a];return e.code=t,e.updateRamUsage(this.scripts),e.markUpdated(),n.overwritten=!0,n.success=!0,n}const a=new r.Script(e,t,this.ip,this.scripts);return this.scripts.push(a),n.success=!0,n}writeToTextFile(e,t){const n={success:!1,overwritten:!1};if(!i.isValidFilePath(e)||!e.endsWith("txt"))return n;for(let a=0;a<this.textFiles.length;++a)if(this.textFiles[a].fn===e)return n.overwritten=!0,this.textFiles[a].text=t,n.success=!0,n;const a=new o.TextFile(e,t);return this.textFiles.push(a),n.success=!0,n}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PopupCloseButton=void 0;const o=i(n(0)),s=i(n(22)),l=n(229),c=n(1138);t.PopupCloseButton=class extends c.PopupButton{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),(e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup)instanceof HTMLElement&&(s.unmountComponentAtNode(e),l.removeElement(e))}render(){const e=this.props.class?this.props.class:"std-button";return o.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Crime=void 0;const a=n(11);t.Crime=class{constructor(e="",t="",n=0,a=0,r=0,i=0,o={}){this.difficulty=0,this.karma=0,this.kills=0,this.money=0,this.name="",this.time=0,this.type="",this.hacking_success_weight=0,this.strength_success_weight=0,this.defense_success_weight=0,this.dexterity_success_weight=0,this.agility_success_weight=0,this.charisma_success_weight=0,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.name=e,this.type=t,this.time=n,this.money=a,this.difficulty=r,this.karma=i,this.hacking_success_weight=o.hacking_success_weight?o.hacking_success_weight:0,this.strength_success_weight=o.strength_success_weight?o.strength_success_weight:0,this.defense_success_weight=o.defense_success_weight?o.defense_success_weight:0,this.dexterity_success_weight=o.dexterity_success_weight?o.dexterity_success_weight:0,this.agility_success_weight=o.agility_success_weight?o.agility_success_weight:0,this.charisma_success_weight=o.charisma_success_weight?o.charisma_success_weight:0,this.hacking_exp=o.hacking_exp?o.hacking_exp:0,this.strength_exp=o.strength_exp?o.strength_exp:0,this.defense_exp=o.defense_exp?o.defense_exp:0,this.dexterity_exp=o.dexterity_exp?o.dexterity_exp:0,this.agility_exp=o.agility_exp?o.agility_exp:0,this.charisma_exp=o.charisma_exp?o.charisma_exp:0,this.intelligence_exp=o.intelligence_exp?o.intelligence_exp:0,this.kills=o.kills?o.kills:0}commit(e,t=1,n=null){return t<=0&&(t=1),e.startCrime(this.type,this.hacking_exp/t,this.strength_exp/t,this.defense_exp/t,this.dexterity_exp/t,this.agility_exp/t,this.charisma_exp/t,this.money/t,this.time,n),this.time}successRate(e){let t=this.hacking_success_weight*e.hacking_skill+this.strength_success_weight*e.strength+this.defense_success_weight*e.defense+this.dexterity_success_weight*e.dexterity+this.agility_success_weight*e.agility+this.charisma_success_weight*e.charisma+a.CONSTANTS.IntelligenceCrimeWeight*e.intelligence;return t/=a.CONSTANTS.MaxSkillLevel,t/=this.difficulty,t*=e.crime_success_mult,t*=e.getIntelligenceBonus(1),Math.min(t,1)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Person=t.createTaskTracker=void 0;const a=n(19),r=n(43),i=n(11),o=n(122),s=n(428);t.createTaskTracker=function(){return{hack:0,str:0,def:0,dex:0,agi:0,cha:0,money:0}};t.Person=class{constructor(){this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=1,this.hp=10,this.max_hp=10,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.augmentations=[],this.queuedAugmentations=[],this.city=r.CityName.Sector12}applyAugmentation(e){for(const t in e.mults)null==this[t]?console.warn(`Augmentation has unrecognized multiplier property: ${t}`):this[t]*=e.mults[t]}calculateStat(e,t=1){return o.calculateSkill(e,t)}getFactionFieldWorkRepGain(){return.9*(this.hacking_skill/i.CONSTANTS.MaxSkillLevel+this.strength/i.CONSTANTS.MaxSkillLevel+this.defense/i.CONSTANTS.MaxSkillLevel+this.dexterity/i.CONSTANTS.MaxSkillLevel+this.agility/i.CONSTANTS.MaxSkillLevel+this.charisma/i.CONSTANTS.MaxSkillLevel)/5.5*this.faction_rep_mult}getFactionHackingWorkRepGain(){return this.hacking_skill/i.CONSTANTS.MaxSkillLevel*this.faction_rep_mult}getFactionSecurityWorkRepGain(){return.9*(this.hacking_skill/i.CONSTANTS.MaxSkillLevel+this.strength/i.CONSTANTS.MaxSkillLevel+this.defense/i.CONSTANTS.MaxSkillLevel+this.dexterity/i.CONSTANTS.MaxSkillLevel+this.agility/i.CONSTANTS.MaxSkillLevel)/4.5*this.faction_rep_mult}resetMultipliers(){this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1}updateStatLevels(){this.hacking_skill=Math.max(1,Math.floor(this.calculateStat(this.hacking_exp,this.hacking_mult*a.BitNodeMultipliers.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateStat(this.strength_exp,this.strength_mult*a.BitNodeMultipliers.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateStat(this.defense_exp,this.defense_mult*a.BitNodeMultipliers.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateStat(this.dexterity_exp,this.dexterity_mult*a.BitNodeMultipliers.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateStat(this.agility_exp,this.agility_mult*a.BitNodeMultipliers.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateStat(this.charisma_exp,this.charisma_mult*a.BitNodeMultipliers.CharismaLevelMultiplier)));const e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}getIntelligenceBonus(e){return s.calculateIntelligenceBonus(this.intelligence,e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSleevePurchasesFromCovenantPopup=t.PopupId=t.BaseCostPerSleeve=t.MaxSleevesFromCovenant=void 0;const a=n(1142),r=n(40);t.MaxSleevesFromCovenant=5,t.BaseCostPerSleeve=1e13,t.PopupId="covenant-sleeve-purchases-popup",t.createSleevePurchasesFromCovenantPopup=function(e){r.createPopup(t.PopupId,a.CovenantPurchasesRoot,{p:e,closeFn:()=>r.removePopup(t.PopupId)})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Favor=void 0;const o=i(n(0)),s=n(6);t.Favor=function(e){return o.createElement("span",{className:"light-yellow samefont"},"number"==typeof e?s.numeralWrapper.formatFavor(e):e)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skill=void 0;const a=n(19);t.Skill=class{constructor(e={name:"foo",desc:"foo"}){if(this.baseCost=1,this.costInc=1,this.maxLvl=0,this.successChanceAll=0,this.successChanceStealth=0,this.successChanceKill=0,this.successChanceContract=0,this.successChanceOperation=0,this.successChanceEstimate=0,this.actionTime=0,this.effHack=0,this.effStr=0,this.effDef=0,this.effDex=0,this.effAgi=0,this.effCha=0,this.stamina=0,this.money=0,this.expGain=0,!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.name=e.name,this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.money&&(this.money=e.money),e.expGain&&(this.expGain=e.expGain)}calculateCost(e){return Math.floor((this.baseCost+e*this.costInc)*a.BitNodeMultipliers.BladeburnerSkillCost)}getMultiplier(e){return"successChanceAll"===e?this.successChanceAll:"successChanceStealth"===e?this.successChanceStealth:"successChanceKill"===e?this.successChanceKill:"successChanceContract"===e?this.successChanceContract:"successChanceOperation"===e?this.successChanceOperation:"successChanceEstimate"===e?this.successChanceEstimate:"actionTime"===e?this.actionTime:"effHack"===e?this.effHack:"effStr"===e?this.effStr:"effDef"===e?this.effDef:"effDex"===e?this.effDex:"effAgi"===e?this.effAgi:"effCha"===e?this.effCha:"stamina"===e?this.stamina:"money"===e?this.money:"expGain"===e?this.expGain:0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skills=void 0;const a=n(750),r=n(1299);t.Skills={},t.Skills[r.SkillNames.BladesIntuition]=new a.Skill({name:r.SkillNames.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),t.Skills[r.SkillNames.Cloak]=new a.Skill({name:r.SkillNames.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),t.Skills[r.SkillNames.ShortCircuit]=new a.Skill({name:r.SkillNames.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),t.Skills[r.SkillNames.DigitalObserver]=new a.Skill({name:r.SkillNames.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),t.Skills[r.SkillNames.Tracer]=new a.Skill({name:r.SkillNames.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),t.Skills[r.SkillNames.Overclock]=new a.Skill({name:r.SkillNames.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),t.Skills[r.SkillNames.Reaper]=new a.Skill({name:r.SkillNames.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),t.Skills[r.SkillNames.EvasiveSystem]=new a.Skill({name:r.SkillNames.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),t.Skills[r.SkillNames.Datamancer]=new a.Skill({name:r.SkillNames.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),t.Skills[r.SkillNames.CybersEdge]=new a.Skill({name:r.SkillNames.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),t.Skills[r.SkillNames.HandsOfMidas]=new a.Skill({name:r.SkillNames.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),t.Skills[r.SkillNames.Hyperdrive]=new a.Skill({name:r.SkillNames.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActions=void 0;const a=n(511);t.GeneralActions={},function(){let e;e="Training",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",t.GeneralActions[e]=new a.Action({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),e="Recruitment",t.GeneralActions[e]=new a.Action({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),e="Diplomacy",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.<br><br>Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",t.GeneralActions[e]=new a.Action({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.<br><br>"})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const a=n(144),r=n(511),i=n(29);class o extends r.Action{constructor(e=null){super(e),this.reqdRank=100,this.teamCount=0,e&&e.reqdRank&&(this.reqdRank=e.reqdRank),e&&e.teamCount&&(this.teamCount=e.teamCount)}getTeamSuccessBonus(e){if(this.teamCount&&this.teamCount>0){return this.teamCount=Math.min(this.teamCount,e.teamSize),Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>a.BladeburnerConstants.ChaosThreshold){const e=t.chaos-a.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}toJSON(){return i.Generic_toJSON("Operation",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Operation=o,i.Reviver.constructors.Operation=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperation=void 0;const a=n(753),r=n(29);class i extends a.Operation{constructor(e=null){super(e),this.count=1,this.countGrowth=0}getActionTimePenalty(){return 1.5}getChaosCompetencePenalty(){return 1}getChaosDifficultyBonus(){return 1}toJSON(){return r.Generic_toJSON("BlackOperation",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.BlackOperation=i,r.Reviver.constructors.BlackOperation=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperations=void 0;const a=n(754);t.BlackOperations={},t.BlackOperations["Operation Typhoon"]=new a.BlackOperation({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Zero"]=new a.BlackOperation({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation X"]=new a.BlackOperation({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Titan"]=new a.BlackOperation({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ares"]=new a.BlackOperation({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Archangel"]=new a.BlackOperation({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Juggernaut"]=new a.BlackOperation({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Red Dragon"]=new a.BlackOperation({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation K"]=new a.BlackOperation({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Deckard"]=new a.BlackOperation({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.<br><br>The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Tyrell"]=new a.BlackOperation({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Wallace"]=new a.BlackOperation({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Shoulder of Orion"]=new a.BlackOperation({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Hyron"]=new a.BlackOperation({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Morpheus"]=new a.BlackOperation({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Ion Storm"]=new a.BlackOperation({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Annihilus"]=new a.BlackOperation({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ultron"]=new a.BlackOperation({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Centurion"]=new a.BlackOperation({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Vindictus"]=new a.BlackOperation({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Daedalus"]=new a.BlackOperation({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryUpgrades=void 0,t.IndustryUpgrades={0:[0,5e5,1,1.05,"Coffee","Provide your employees with coffee, increasing their energy by 5%."],1:[1,1e9,1.06,1.03,"AdVert.Inc","Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Employee=void 0;const a=n(95),r=n(44),i=n(29),o=n(52),s=n(294),l=n(6),c=n(24);class u{constructor(e={}){this.pro=0,this.cyclesUntilRaise=a.CorporationConstants.CyclesPerEmployeeRaise,this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:r.getRandomInt(50,100),this.hap=e.happiness?e.happiness:r.getRandomInt(50,100),this.ene=e.energy?e.energy:r.getRandomInt(50,100),this.int=e.intelligence?e.intelligence:r.getRandomInt(10,50),this.cha=e.charisma?e.charisma:r.getRandomInt(10,50),this.exp=e.experience?e.experience:r.getRandomInt(10,50),this.cre=e.creativity?e.creativity:r.getRandomInt(10,50),this.eff=e.efficiency?e.efficiency:r.getRandomInt(10,50),this.sal=e.salary?e.salary:r.getRandomInt(.1,5),this.loc=e.loc?e.loc:"",this.pos=s.EmployeePositions.Unassigned}process(e=1,t){const n=.003*e,r=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.sal+=a.CorporationConstants.EmployeeRaiseAmount,this.cyclesUntilRaise+=a.CorporationConstants.CyclesPerEmployeeRaise);const i=n*Math.random();return this.pos===s.EmployeePositions.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap),this.sal*e*a.CorporationConstants.SecsPerMarketCycle}calculateProductivity(e,t){const n=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),a=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),r=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),i=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier(),o=this.mor*this.hap*this.ene*1e-6;let l=0;switch(this.pos){case s.EmployeePositions.Operations:l=.6*r+.1*a+this.exp+.5*n+i;break;case s.EmployeePositions.Engineer:l=r+.1*a+1.5*this.exp+i;break;case s.EmployeePositions.Business:l=.4*r+a+.5*this.exp;break;case s.EmployeePositions.Management:l=2*a+this.exp+.2*n+.7*i;break;case s.EmployeePositions.RandD:l=1.5*r+.8*this.exp+n+.5*i;break;case s.EmployeePositions.Unassigned:case s.EmployeePositions.Training:l=0;break;default:console.error(`Invalid employee position: ${this.pos}`)}return o*l}throwParty(e){const t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t}createUI(e,t,n){const a=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),r=this.cha*t.getEmployeeChaMultiplier()*n.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier()*n.getEmployeeIntMultiplier(),u=this.eff*t.getEmployeeEffMultiplier()*n.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(o.createElement("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+c.formatNumber(this.mor,3)+"<br>Happiness: "+c.formatNumber(this.hap,3)+"<br>Energy: "+c.formatNumber(this.ene,3)+"<br>Intelligence: "+c.formatNumber(i,3)+"<br>Charisma: "+c.formatNumber(r,3)+"<br>Experience: "+c.formatNumber(this.exp,3)+"<br>Creativity: "+c.formatNumber(a,3)+"<br>Efficiency: "+c.formatNumber(u,3)+"<br>Salary: "+l.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}));const m=o.createElement("select",{});for(const e in s.EmployeePositions)s.EmployeePositions.hasOwnProperty(e)&&m.add(o.createElement("option",{text:s.EmployeePositions[e],value:s.EmployeePositions[e]}));m.addEventListener("change",()=>{this.pos=m.options[m.selectedIndex].value});for(let e=0;e<m.length;++e)if(m.options[e].value===this.pos){m.selectedIndex=e;break}e.appendChild(m)}toJSON(){return i.Generic_toJSON("Employee",this)}static fromJSON(e){return i.Generic_fromJSON(u,e.data)}}t.Employee=u,i.Reviver.constructors.Employee=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionInfos=t.FactionInfo=void 0;class a{constructor(e,t,n,a,r,i){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=r,this.offerSecurityWork=i,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}offersWork(){return this.offerFieldWork||this.offerHackingMission||this.offerHackingWork||this.offerSecurityWork}}t.FactionInfo=a,t.FactionInfos={Illuminati:new a("Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And from this chaos, we are the invisible hand that guides them to order. ",[],!0,!0,!0,!1),Daedalus:new a("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new a("Surrender yourself. Give up your empty individuality to become part of something great, something eternal. Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.<br><br>Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new a("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",[],!0,!0,!0,!0),MegaCorp:new a("MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an unprecendented scale, in ways that no other company can.<br><br>In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",[],!0,!0,!0,!0),"Bachman & Associates":new a("Where Law and Business meet - thats where we are.<br><br>Legal Insight - Business Instinct - Innovative Experience.",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is Salvation.",[],!0,!0,!0,!0),NWO:new a("Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given purpose and direction in life. That is why they created God. And that is why they created civilization - not because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.",[],!0,!0,!0,!0),"Clarke Incorporated":new a("The Power of the Genome - Unlocked.",[],!0,!0,!0,!0),"OmniTek Incorporated":new a("Simply put, our mission is to design and build robots that make a difference.",[],!0,!0,!0,!0),"Four Sigma":new a("The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",[],!0,!0,!0,!0),"KuaiGong International":new a("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new a("The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it would be necessary to create them. And now we can.",[],!0,!0,!1,!0),BitRunners:new a("Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be reconstructed. Transformed. Used.<br><br>Those who run the bits, run the world.",[],!0,!0,!1,!1),"The Black Hand":new a("The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. Technological power. And those at the top rule with an invisible hand. They built a society where the rich get richer, and everyone else suffers.<br><br>So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__ <br> _.nITESECNIt. <br> .-'NITESECNITESEc. <br> .' NITESECNITESECn <br> / NITESECNITESEC; <br> : :NITESECNITESEC; <br> ; $ NITESECNITESECN <br> : _, ,N'ITESECNITESEC <br> : .+^^`, : `NITESECNIT <br> ) /), `-,-=,NITESECNI <br> / ^ ,-;|NITESECN; <br> / _.' '-';NITESECN <br> ( , ,-''`^NITE' <br> )` :`. .' <br> )-- ; `- / <br> ' _.-' : <br> ( _.-' . <br> ------. <br> . <br> _.nIt <br> _.nITESECNi <br> nITESECNIT^' <br> NITE^' ___ <br> / .gP''''Tp. <br> : d' . `b <br> ; d' o `b ; <br> / d; `b| <br> /, $; @ `: <br> /' $$ ; <br> .' $$b o | <br> .' d$$$; : <br> / .d$$$$; , ; <br> d .dNITESEC $ | <br> :bp.__.gNITESEC$$ :$ ; <br> NITESECNITESECNIT $$b : <br>",[],!0,!0,!1,!1),Aevum:new a("The Silicon City.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new a("Serve the People.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new a("The East Asian Order of the Future.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new a("Asia's World City.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new a("The City of the Future.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new a("Benefit, Honor, and Glory.",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new a("It is better to reign in Hell than to serve in Heaven.",[],!0,!0,!0,!0),"The Dark Army":new a("The World doesn't care about right or wrong. It only cares about power.",[],!0,!0,!0,!1),"The Syndicate":new a("Honor holds you back.",[],!0,!0,!0,!0),Silhouette:new a("Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working for.<br><br>That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",[],!0,!0,!0,!1),Tetrads:new a("Following the mandate of Heaven and carrying out the way.",[],!1,!1,!0,!0),"Slum Snakes":new a("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new a("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new a("Obey Heaven and work righteously.",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?<br><br>Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",[],!1,!1,!1,!1)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileDiagnosticPopup=t.ServerAccordion=void 0;const r=a(n(0)),i=n(20),o=n(164),s=n(6);function l(e){const t=i.AllServers[e.ip];let n=0;for(const e of t.scripts)n+=e.code.length;for(const e of t.textFiles)n+=e.text.length;if(0===n)return r.default.createElement(r.default.Fragment,null);const a=[];for(const e of t.scripts)a.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)a.push({name:e.fn,size:e.text.length});return a.sort((e,t)=>t.size-e.size),r.default.createElement(o.Accordion,{headerContent:r.default.createElement(r.default.Fragment,null,t.hostname," (",s.numeralWrapper.formatBigNumber(n),"b)"),panelContent:r.default.createElement("ul",null,a.map(e=>r.default.createElement("li",{key:e.name},e.name,": ",s.numeralWrapper.formatBigNumber(e.size),"b")))})}t.ServerAccordion=l,t.FileDiagnosticPopup=function(e){const t=[];for(const e of Object.keys(i.AllServers))t.push(e);return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),t.map(e=>r.default.createElement(l,{key:e,ip:e})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuHeaders=t.MainMenuHeaders=void 0;const a=n(31);function r(e,t,n){for(let n=0;n<t.length;++n)e?(t[n].style.opacity="1",t[n].style.maxHeight=t[n].scrollHeight+"px"):(t[n].style.opacity="0",t[n].style.maxHeight="");for(let t=0;t<n.length;++t)e?(n[t].style.opacity="1",n[t].style.maxHeight=n[t].scrollHeight+"px",n[t].style.pointerEvents="auto"):(n[t].style.opacity="0",n[t].style.maxHeight="",n[t].style.pointerEvents="none")}t.MainMenuHeaders={Hacking:null,Character:null,World:null,Help:null},t.initializeMainMenuHeaders=function(e,n=!1){function i(e){const t=document.getElementById(e);if(null==t)throw new Error(`Failed to find element with id ${e} in initializeMainMenuHeaders()`);return t}try{return t.MainMenuHeaders.Hacking=i("hacking-menu-header"),t.MainMenuHeaders.Character=i("character-menu-header"),t.MainMenuHeaders.World=i("world-menu-header"),t.MainMenuHeaders.Help=i("help-menu-header"),t.MainMenuHeaders.Hacking.onclick=function(){const t=i("terminal-tab"),n=i("create-script-tab"),o=i("active-scripts-tab"),s=i("create-program-tab"),l=i("create-program-notification");s.style.display=e.firstProgramAvailable?"list-item":"none",this.classList.toggle("opened");const c=[t,n,o,s],u=[a.MainMenuLinks.Terminal,a.MainMenuLinks.ScriptEditor,a.MainMenuLinks.ActiveScripts,a.MainMenuLinks.CreateProgram];t.style.maxHeight?(r(!1,c,u),l.style.display="none"):(r(!0,c,u),l.style.display="block")},t.MainMenuHeaders.Character.onclick=function(){const t=i("stats-tab"),n=i("factions-tab"),o=i("augmentations-tab"),s=i("hacknet-nodes-tab"),l=i("sleeves-tab");l.style.display=e.sleeves.length>0?"list-item":"none",this.classList.toggle("opened");const c=[t,n,o,s,l],u=[a.MainMenuLinks.Stats,a.MainMenuLinks.Factions,a.MainMenuLinks.Augmentations,a.MainMenuLinks.HacknetNodes,a.MainMenuLinks.Sleeves];t.style.maxHeight?r(!1,c,u):r(!0,c,u)},t.MainMenuHeaders.World.onclick=function(){const t=i("city-tab"),n=i("travel-tab"),o=i("job-tab"),s=i("stock-market-tab"),l=i("bladeburner-tab"),c=i("corporation-tab"),u=i("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const m=[t,n,o,s,l,c,u],p=[a.MainMenuLinks.City,a.MainMenuLinks.Travel,a.MainMenuLinks.Job,a.MainMenuLinks.StockMarket,a.MainMenuLinks.Bladeburner,a.MainMenuLinks.Corporation,a.MainMenuLinks.Gang];t.style.maxHeight?r(!1,m,p):r(!0,m,p)},t.MainMenuHeaders.Help.onclick=function(){const e=i("milestones-tab"),t=i("tutorial-tab"),o=i("options-tab");this.classList.toggle("opened");const s=[e,t,o],l=[a.MainMenuLinks.Milestones,a.MainMenuLinks.Tutorial,a.MainMenuLinks.Options];n&&(s.push(i("dev-tab")),l.push(i("dev-menu-link"))),t.style.maxHeight?r(!1,s,l):r(!0,s,l)},!0}catch(e){return console.error(`Failed to initialize Main Menu Headers: ${e}`),!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(15),r=n(25),i=n(6);function o(){function e(e){0===r.Settings.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.Settings.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),n=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),p=document.getElementById("settingsSuppressBladeburnerPopup"),d=document.getElementById("settingsAutosaveIntervalValLabel"),h=document.getElementById("settingsDisableHotkeys"),f=document.getElementById("settingsDisableASCIIArt"),g=document.getElementById("settingsDisableTextEffects"),y=document.getElementById("settingsLocale");t.innerHTML=r.Settings.CodeInstructionRunTime+"ms",n.innerHTML=r.Settings.MaxLogCapacity,o.innerHTML=r.Settings.MaxPortCapacity,s.checked=r.Settings.SuppressMessages,l.checked=r.Settings.SuppressFactionInvites,c.checked=r.Settings.SuppressTravelConfirmation,u.checked=r.Settings.SuppressBuyAugmentationConfirmation,m.checked=r.Settings.SuppressHospitalizationPopup,p.checked=r.Settings.SuppressBladeburnerPopup,e(d),h.checked=r.Settings.DisableHotkeys,f.checked=r.Settings.CityListView,g.checked=r.Settings.DisableTextEffects,y.value=r.Settings.Locale,i.numeralWrapper.updateLocale(r.Settings.Locale);const _=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),v=document.getElementById("settingsNSPortRangeVal"),k=document.getElementById("settingsAutosaveIntervalVal");_.value=r.Settings.CodeInstructionRunTime,b.value=r.Settings.MaxLogCapacity,v.value=r.Settings.MaxPortCapacity,k.value=r.Settings.AutosaveInterval,_.oninput=function(){t.innerHTML=this.value+"ms",r.Settings.CodeInstructionRunTime=this.value},b.oninput=function(){n.innerHTML=this.value,r.Settings.MaxLogCapacity=this.value},v.oninput=function(){o.innerHTML=this.value,r.Settings.MaxPortCapacity=this.value},k.oninput=function(){r.Settings.AutosaveInterval=Number(this.value),e(d),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.Settings.SuppressMessages=this.checked},l.onclick=function(){r.Settings.SuppressFactionInvites=this.checked},c.onclick=function(){r.Settings.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.Settings.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.Settings.SuppressHospitalizationPopup=this.checked},p.onclick=function(){r.Settings.SuppressBladeburnerPopup=this.checked},h.onclick=function(){r.Settings.DisableHotkeys=this.checked},f.onclick=function(){r.Settings.DisableASCIIArt=this.checked},g.onclick=function(){r.Settings.DisableTextEffects=this.checked},y.onchange=function(){if(!i.numeralWrapper.updateLocale(y.value)){console.warn(`Invalid locale for numeral: ${y.value}`);let e="en";return r.Settings.Locale=e,void(y.value=e)}r.Settings.Locale=y.value}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterInfo=void 0;const o=i(n(0)),s=n(6),l=n(129),c=n(13),u=n(24),m=n(19),p=n(37),d=n(127),h=n(33),f=n(282),g=n(21);t.CharacterInfo=function(e){function t(e){const t=[["Total:",o.createElement(g.Money,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",o.createElement(g.Money,{money:e.bladeburner})]),e.codingcontract&&t.push(["Coding Contracts:",o.createElement(g.Money,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",o.createElement(g.Money,{money:e.work})]),e.class&&t.push(["Class:",o.createElement(g.Money,{money:e.class})]),e.corporation&&t.push(["Corporation:",o.createElement(g.Money,{money:e.corporation})]),e.crime&&t.push(["Crimes:",o.createElement(g.Money,{money:e.crime})]),e.gang&&t.push(["Gang:",o.createElement(g.Money,{money:e.gang})]),e.hacking&&t.push(["Hacking:",o.createElement(g.Money,{money:e.hacking})]),e.hacknetnode&&t.push(["Hacknet Nodes:",o.createElement(g.Money,{money:e.hacknetnode})]),e.hospitalization&&t.push(["Hospitalization:",o.createElement(g.Money,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",o.createElement(g.Money,{money:e.infiltration})]),e.stock&&t.push(["Stock Market:",o.createElement(g.Money,{money:e.stock})]),e.casino&&t.push(["Casino:",o.createElement(g.Money,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",o.createElement(g.Money,{money:e.sleeves})]),f.StatsTable(t)}function n(e){return o.createElement(o.Fragment,null,o.createElement("table",null,o.createElement("tbody",null,e.rows.map(e=>o.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},`${e[0]} multiplier:`),o.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},s.numeralWrapper.formatPercentage(e[1])),function(e){return p.SourceFileFlags[5]>0&&e.length>2&&e[1]!=e[2]?o.createElement("td",{key:"2",style:{textAlign:"right"}}," (",s.numeralWrapper.formatPercentage(e[2]),")"):o.createElement(o.Fragment,null)}(e))))))}const a=[["Time played since last Augmentation:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&a.push(["Time played since last Bitnode destroyed:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastBitnode)]),a.push(["Total Time played:",u.convertTimeMsToTimeElapsedString(e.totalPlaytime)]),o.createElement("pre",null,o.createElement("b",null,"General"),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,"Current City: ",e.city),o.createElement("br",null),o.createElement(function(){return e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Employer at which you last worked: ",e.companyName),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return""!==e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Job you last worked: ",e.jobs[e.companyName]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return e.jobs&&0!==Object.keys(e.jobs).length?o.createElement(o.Fragment,null,o.createElement("span",null,"All Employers:"),o.createElement("br",null),o.createElement("ul",null,Object.keys(e.jobs).map(e=>o.createElement("li",{key:e}," * ",e))),o.createElement("br",null),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("span",null,"Money: ",o.createElement(g.Money,{money:e.money.toNumber()})),o.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let n=o.createElement(o.Fragment,null,o.createElement("u",null,"Money earned since you last installed Augmentations:"),o.createElement("br",null),t(e.moneySourceA));0!==e.sourceFiles.length&&(n=o.createElement(o.Fragment,null,n,o.createElement("br",null),o.createElement("br",null),o.createElement("u",null,"Money earned in this BitNode:"),o.createElement("br",null),t(e.moneySourceB))),c.dialogBoxCreate(n,!1)}},"Money Statistics & Breakdown"),o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Stats"),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",{key:"0"},o.createElement("td",{key:"0"},"Hacking:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.hacking_skill)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.hacking_exp)," exp)")),o.createElement("tr",{key:"1"},o.createElement("td",{key:"0"},"Strength:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.strength)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.strength_exp)," exp)")),o.createElement("tr",{key:"2"},o.createElement("td",{key:"0"},"Defense:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.defense)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.defense_exp)," exp)")),o.createElement("tr",{key:"3"},o.createElement("td",{key:"0"},"Dexterity:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.dexterity)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.dexterity_exp)," exp)")),o.createElement("tr",{key:"4"},o.createElement("td",{key:"0"},"Agility:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.agility)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.agility_exp)," exp)")),o.createElement("tr",{key:"5"},o.createElement("td",{key:"0"},"Charisma:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.charisma)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.charisma_exp)," exp)")),o.createElement(function(){return e.intelligence>0&&(5===e.bitNodeN||p.SourceFileFlags[5]>0)?o.createElement("tr",{key:"5"},o.createElement("td",null,"Intelligence:"),o.createElement("td",{style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.intelligence))):o.createElement(o.Fragment,null)},null))),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*m.BitNodeMultipliers.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*m.BitNodeMultipliers.ServerGrowthRate]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*m.BitNodeMultipliers.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*m.BitNodeMultipliers.HackExpGain]]}),o.createElement("br",null),o.createElement(n,{rows:[["Strength Level",e.strength_mult,e.strength_mult*m.BitNodeMultipliers.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Defense Level",e.defense_mult,e.defense_mult*m.BitNodeMultipliers.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*m.BitNodeMultipliers.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Agility Level",e.agility_mult,e.agility_mult*m.BitNodeMultipliers.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*m.BitNodeMultipliers.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*m.BitNodeMultipliers.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*m.BitNodeMultipliers.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*m.BitNodeMultipliers.CompanyWorkMoney]]}),o.createElement("br",null),o.createElement(n,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*m.BitNodeMultipliers.CrimeMoney]]}),o.createElement("br",null),o.createElement(function(){return e.canAccessBladeburner()?o.createElement(o.Fragment,null,o.createElement(n,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("br",null),o.createElement("b",null,"Misc."),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,`Servers owned: ${e.purchasedServers.length} / ${d.getPurchaseServerLimit()}`),o.createElement("br",null),o.createElement(function(){return 9===e.bitNodeN||p.SourceFileFlags[9]>0?o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${h.HacknetServerConstants.MaxServers}`),o.createElement("br",null)):o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Nodes owned: ${e.hacknetNodes.length}`),o.createElement("br",null))},null),o.createElement("span",null,`Augmentations installed: ${e.augmentations.length}`),o.createElement("br",null),o.createElement("br",null),f.StatsTable(a),o.createElement("br",null),o.createElement(function(){if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return o.createElement(o.Fragment,null,o.createElement("span",null,"Current BitNode: ",e.bitNodeN," (",l.BitNodes[t].name,")"),o.createElement("br",null),o.createElement("br",null),o.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},l.BitNodes[t].info.split("<br>").map((e,t)=>o.createElement("div",{key:t},o.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),o.createElement("br",null)))))}return o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayMilestonesContent=void 0;const o=n(18),s=n(942),l=n(1),c=i(n(0)),u=i(n(22));let m=null;!function(){document.addEventListener("DOMContentLoaded",function e(){m=document.getElementById("milestones-container"),document.removeEventListener("DOMContentLoaded",e)})}(),t.displayMilestonesContent=function(){o.routing.isOn(o.Page.Milestones)&&m instanceof HTMLElement&&u.render(c.createElement(s.Root,{player:l.Player}),m)}},,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((a=a.apply(e,t||[])).next())})},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const l=i(n(0)),c=n(54),u=s(n(947)),m=n(40),p=n(946),d=n(945),h=n(87),f=n(13),g=n(197),y=n(66),_=n(233),b=n(139),v=n(502),k=n(156),E=n(6),C=n(701),S=n(943),P=n(461),T=n(25),M=n(45);let O=[];!function(){const e=P.NetscriptFunctions({});O=function e(t){let n=[];const a=Object.keys(t);for(const r of a)"object"==typeof t[r]&&(n.push(r),n=n.concat(e(t[r]))),"function"==typeof t[r]&&n.push(r);return n}(e)}();let w="",x="",N=null;t.Root=function(e){const t=l.useRef(null),[n,a]=l.useState(e.filename?e.filename:w),[r,i]=l.useState(e.code?e.code:x),[s,P]=l.useState("RAM: ???"),[A,R]=l.useState({theme:T.Settings.MonacoTheme,insertSpaces:T.Settings.MonacoInsertSpaces});function I(){if(null!==t.current){const e=t.current.getPosition();null!==e&&C.CursorPositions.saveCursor(n,{row:e.lineNumber,column:e.column})}if(N=null,M.ITutorial.isRunning&&M.ITutorial.currStep===M.iTutorialSteps.TerminalTypeScript){if("n00dles.script"!==n)return void f.dialogBoxCreate("Leave the script name as 'n00dles'!");if(-1==r.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void f.dialogBoxCreate("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");for(let a=0;a<t.scripts.length;a++)if(n==t.scripts[a].filename)return t.scripts[a].saveScript(r,e.player.currentServer,t.scripts),e.engine.loadTerminalContent(),M.iTutorialNextStep();const a=new _.Script;return a.saveScript(r,e.player.currentServer,t.scripts),t.scripts.push(a),M.iTutorialNextStep()}if(""==n)return void f.dialogBoxCreate("You must specify a filename!");if(".fconf"!==n&&!h.isValidFilePath(n))return void f.dialogBoxCreate("Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.");const a=e.player.getCurrentServer();if(null===a)throw new Error("Server should not be null but it is.");if(".fconf"===n)try{g.parseFconfSettings(r)}catch(e){return void f.dialogBoxCreate(`Invalid .fconf file: ${e}`)}else if(y.isScriptFilename(n)){for(let t=0;t<a.scripts.length;t++)if(n==a.scripts[t].filename)return a.scripts[t].saveScript(r,e.player.currentServer,a.scripts),void e.engine.loadTerminalContent();const t=new _.Script;t.saveScript(r,e.player.currentServer,a.scripts),a.scripts.push(t)}else{if(!n.endsWith(".txt"))return void f.dialogBoxCreate("Invalid filename. Must be either a script (.script, .js, or .ns) or or text file (.txt)");{for(let t=0;t<a.textFiles.length;++t)if(a.textFiles[t].fn===n)return a.textFiles[t].write(r),void e.engine.loadTerminalContent();const t=new b.TextFile(n,r);a.textFiles.push(t)}}e.engine.loadTerminalContent()}function B(){return o(this,void 0,void 0,function*(){const t=r+"",n=yield v.calculateRamUsage(t,e.player.getCurrentServer().scripts);if(!(n>0)){switch(n){case k.RamCalculationErrorCode.ImportError:P("RAM: Import Error");break;case k.RamCalculationErrorCode.URLImportError:P("RAM: HTTP Import Error");break;case k.RamCalculationErrorCode.SyntaxError:default:P("RAM: Syntax Error")}return new Promise(()=>void 0)}P("RAM: "+E.numeralWrapper.formatRAM(n))})}return l.useEffect(()=>{""!==e.filename&&(w=e.filename,x=e.code,N=null)},[]),l.useEffect(()=>{const e=setInterval(B,1e3);return()=>clearInterval(e)},[r]),l.useEffect(()=>{function e(e){T.Settings.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),I())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),l.default.createElement("div",{id:"script-editor-wrapper"},l.default.createElement("div",{id:"script-editor-filename-wrapper"},l.default.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",l.default.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),l.default.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:n,onChange:function(e){w=n,a(e.target.value)}}),l.default.createElement(c.StdButton,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,A),m.createPopup(e,p.OptionsPopup,{id:e,options:t,save:e=>{R(e),T.Settings.MonacoTheme=e.theme,T.Settings.MonacoInsertSpaces=e.insertSpaces}})}})),l.default.createElement(u.default,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const n of O)t.push({label:n,kind:e.languages.CompletionItemKind.Function,insertText:n,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(S.libSource,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(S.libSource,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const a=C.CursorPositions.getCursor(n);-1!==a.row?t.current.setPosition({lineNumber:a.row,column:a.column}):null!==N&&t.current.setPosition({lineNumber:N.lineNumber,column:N.column+1}),t.current.focus()},loading:l.default.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:r,onChange:function(e){void 0!==e&&(x=e,null!==t.current&&(N=t.current.getPosition()),i(e))},theme:A.theme,options:A}),l.default.createElement("div",{id:"script-editor-buttons-wrapper"},l.default.createElement(c.StdButton,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=d.js_beautify(r,{indent_with_tabs:!A.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),l.default.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},s),l.default.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:I},"Save & Close (Ctrl/Cmd + b)"),l.default.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayInfiltrationContent=void 0;const o=n(18),s=n(993),l=i(n(0)),c=i(n(22));let u=document.createElement("div");!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayInfiltrationContent=function(e,t,n,a,r){if(!o.routing.isOn(o.Page.Infiltration))return;const i=function(e,t){const n=e.strength+e.defense+e.dexterity+e.agility+e.charisma,a=t-Math.pow(n,.9)/250-e.intelligence/1600;return a<0?0:a>3?3:a}(t,a);c.render(l.createElement(s.Root,{Engine:e,Player:t,Location:n,StartingDifficulty:a,Difficulty:i,MaxLevel:r}),u)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const r=a(n(0)),i=n(1012),o=n(1010),s=n(1009);t.Root=function(e){return r.default.createElement("div",{id:"bladeburner-container"},r.default.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.default.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.default.createElement(i.Stats,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.default.createElement(o.Console,{bladeburner:e.bladeburner,player:e.player})),r.default.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.default.createElement(s.AllPages,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayGangContent=void 0;const o=i(n(0)),s=i(n(22)),l=n(1027),c=n(18);let u;!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("gang-container");if(null===t)throw new Error("Could not find element 'gang-container'");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayGangContent=function(e,t,n){c.routing.isOn(c.Page.Gang)&&s.render(o.createElement(l.Root,{engine:e,gang:t,player:n}),u)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionList=void 0;const o=i(n(0)),s=n(17),l=n(72);t.FactionList=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("h1",null,"Factions"),o.default.createElement("p",null,"Lists all factions you have joined"),o.default.createElement("br",null),o.default.createElement("ul",null,e.player.factions.map(t=>o.default.createElement("li",{key:t},o.default.createElement("a",{className:"a-link-button",onClick:()=>(function(t){e.engine.loadFactionContent(),l.displayFactionContent(t)})(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),o.default.createElement("br",null),o.default.createElement("h1",null,"Outstanding Faction Invitations"),o.default.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),o.default.createElement("ul",null,e.player.factionInvitations.map(e=>o.default.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},o.default.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),o.default.createElement("a",{className:"a-link-button",onClick:n=>(function(e,n){e.isTrusted&&(l.joinFaction(s.Factions[n]),t(e=>!e))})(n,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(0),r=n.n(a),i=n(1),o=n(6),s=n(60);const l=r.a.Component;class c extends l{render(){const e=r.a.createElement("tr",{id:"character-int-wrapper"},r.a.createElement("td",{className:"character-int-cell"},"Int: "),r.a.createElement("td",{id:"character-int-text",className:"character-int-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.intelligence))),t=r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",{className:"character-divider"},r.a.createElement("td",{colSpan:"2"},"Work progress:")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},"+",Object(s.Reputation)(i.Player.workRepGained)," rep")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},r.a.createElement("button",{onClick:()=>i.Player.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.numeralWrapper.formatHp(i.Player.hp)+" / "+o.numeralWrapper.formatHp(i.Player.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.numeralWrapper.formatMoney(i.Player.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.charisma))),i.Player.intelligence>=1&&e,i.Player.isWorking&&!i.Player.focus&&t)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=void 0,t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHacknetServer=t.getUpgradeHomeRamCost=t.getHomeComputer=t.getCurrentServer=t.hasTorRouter=void 0;const a=n(11),r=n(19),i=n(79),o=n(20),s=n(38);t.hasTorRouter=function(){return s.SpecialServerIps.hasOwnProperty("Darkweb Server")},t.getCurrentServer=function(){return o.AllServers[this.currentServer]},t.getHomeComputer=function(){return o.AllServers[this.homeComputer]},t.getUpgradeHomeRamCost=function(){const e=this.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*a.CONSTANTS.BaseCostFor1GBOfRamHome*n*r.BitNodeMultipliers.HomeComputerRamCost},t.createHacknetServer=function(){const e=`hacknet-node-${this.hacknetNodes.length}`,t=new i.HacknetServer({adminRights:!0,hostname:e,ip:o.createUniqueRandomIp()});this.hacknetNodes.push(t.ip),o.AddToAllServers(t);const n=this.getHomeComputer();return n.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(n.ip),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyExploit=void 0;const a=n(1);t.applyExploit=function(){if(a.Player.exploits&&0===a.Player.exploits.length)return;const e=Math.pow(1.001,a.Player.exploits.length),t=Math.pow(.999,a.Player.exploits.length);a.Player.hacking_chance_mult*=e,a.Player.hacking_speed_mult*=e,a.Player.hacking_money_mult*=e,a.Player.hacking_grow_mult*=e,a.Player.hacking_mult*=e,a.Player.strength_mult*=e,a.Player.defense_mult*=e,a.Player.dexterity_mult*=e,a.Player.agility_mult*=e,a.Player.charisma_mult*=e,a.Player.hacking_exp_mult*=e,a.Player.strength_exp_mult*=e,a.Player.defense_exp_mult*=e,a.Player.dexterity_exp_mult*=e,a.Player.agility_exp_mult*=e,a.Player.charisma_exp_mult*=e,a.Player.company_rep_mult*=e,a.Player.faction_rep_mult*=e,a.Player.crime_money_mult*=e,a.Player.crime_success_mult*=e,a.Player.hacknet_node_money_mult*=e,a.Player.hacknet_node_purchase_cost_mult*=t,a.Player.hacknet_node_ram_cost_mult*=t,a.Player.hacknet_node_core_cost_mult*=t,a.Player.hacknet_node_level_cost_mult*=t,a.Player.work_money_mult*=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applySourceFile=void 0;const a=n(232),r=n(1);t.applySourceFile=function(e){const t="SourceFile"+e.n,n=a.SourceFiles[t];if(null!=n){switch(e.n){case 1:{let t=0;for(let n=0;n<e.lvl;++n)t+=16/Math.pow(2,n);const n=1+t/100,a=1-t/100;r.Player.hacking_chance_mult*=n,r.Player.hacking_speed_mult*=n,r.Player.hacking_money_mult*=n,r.Player.hacking_grow_mult*=n,r.Player.hacking_mult*=n,r.Player.strength_mult*=n,r.Player.defense_mult*=n,r.Player.dexterity_mult*=n,r.Player.agility_mult*=n,r.Player.charisma_mult*=n,r.Player.hacking_exp_mult*=n,r.Player.strength_exp_mult*=n,r.Player.defense_exp_mult*=n,r.Player.dexterity_exp_mult*=n,r.Player.agility_exp_mult*=n,r.Player.charisma_exp_mult*=n,r.Player.company_rep_mult*=n,r.Player.faction_rep_mult*=n,r.Player.crime_money_mult*=n,r.Player.crime_success_mult*=n,r.Player.hacknet_node_money_mult*=n,r.Player.hacknet_node_purchase_cost_mult*=a,r.Player.hacknet_node_ram_cost_mult*=a,r.Player.hacknet_node_core_cost_mult*=a,r.Player.hacknet_node_level_cost_mult*=a,r.Player.work_money_mult*=n;break}case 2:{let t=0;for(let n=0;n<e.lvl;++n)t+=24/Math.pow(2,n);const n=1+t/100;r.Player.crime_money_mult*=n,r.Player.crime_success_mult*=n,r.Player.charisma_mult*=n;break}case 3:{let t=0;for(let n=0;n<e.lvl;++n)t+=8/Math.pow(2,n);const n=1+t/100;r.Player.charisma_mult*=n,r.Player.work_money_mult*=n;break}case 4:break;case 5:{let t=0;for(let n=0;n<e.lvl;++n)t+=8/Math.pow(2,n);const n=1+t/100;r.Player.hacking_chance_mult*=n,r.Player.hacking_speed_mult*=n,r.Player.hacking_money_mult*=n,r.Player.hacking_grow_mult*=n,r.Player.hacking_mult*=n,r.Player.hacking_exp_mult*=n;break}case 6:{let t=0;for(let n=0;n<e.lvl;++n)t+=8/Math.pow(2,n);const n=1+t/100;r.Player.strength_exp_mult*=n,r.Player.defense_exp_mult*=n,r.Player.dexterity_exp_mult*=n,r.Player.agility_exp_mult*=n,r.Player.strength_mult*=n,r.Player.defense_mult*=n,r.Player.dexterity_mult*=n,r.Player.agility_mult*=n;break}case 7:{let t=0;for(let n=0;n<e.lvl;++n)t+=8/Math.pow(2,n);const n=1+t/100;r.Player.bladeburner_max_stamina_mult*=n,r.Player.bladeburner_stamina_gain_mult*=n,r.Player.bladeburner_analysis_mult*=n,r.Player.bladeburner_success_chance_mult*=n;break}case 8:{let t=0;for(let n=0;n<e.lvl;++n)t+=12/Math.pow(2,n);const n=1+t/100;r.Player.hacking_grow_mult*=n;break}case 9:case 10:break;case 11:{let t=0;for(let n=0;n<e.lvl;++n)t+=32/Math.pow(2,n);const n=1+t/100;r.Player.work_money_mult*=n,r.Player.company_rep_mult*=n;break}case 12:break;default:console.error(`Invalid source file number: ${e.n}`)}n.owned=!0}else console.error(`Invalid source file number: ${e.n}`)}},function(e,t,n){"use strict";n.r(t),n.d(t,"init",function(){return re}),n.d(t,"prestigeAugmentation",function(){return ie}),n.d(t,"prestigeSourceFile",function(){return oe}),n.d(t,"receiveInvite",function(){return se}),n.d(t,"calculateSkill",function(){return le}),n.d(t,"updateSkillLevels",function(){return ce}),n.d(t,"resetMultipliers",function(){return ue}),n.d(t,"hasProgram",function(){return me}),n.d(t,"setMoney",function(){return pe}),n.d(t,"gainMoney",function(){return de}),n.d(t,"loseMoney",function(){return he}),n.d(t,"canAfford",function(){return fe}),n.d(t,"recordMoneySource",function(){return ge}),n.d(t,"gainHackingExp",function(){return ye}),n.d(t,"gainStrengthExp",function(){return _e}),n.d(t,"gainDefenseExp",function(){return be}),n.d(t,"gainDexterityExp",function(){return ve}),n.d(t,"gainAgilityExp",function(){return ke}),n.d(t,"gainCharismaExp",function(){return Ee}),n.d(t,"gainIntelligenceExp",function(){return Ce}),n.d(t,"queryStatFromString",function(){return Se}),n.d(t,"resetWorkStatus",function(){return Pe}),n.d(t,"processWorkEarnings",function(){return Te}),n.d(t,"startWork",function(){return Me}),n.d(t,"cancelationPenalty",function(){return Oe}),n.d(t,"work",function(){return we}),n.d(t,"finishWork",function(){return xe}),n.d(t,"startWorkPartTime",function(){return Ne}),n.d(t,"workPartTime",function(){return Ae}),n.d(t,"finishWorkPartTime",function(){return Re}),n.d(t,"startFocusing",function(){return Ie}),n.d(t,"stopFocusing",function(){return Be}),n.d(t,"startFactionWork",function(){return De}),n.d(t,"startFactionHackWork",function(){return Le}),n.d(t,"startFactionFieldWork",function(){return Fe}),n.d(t,"startFactionSecurityWork",function(){return je}),n.d(t,"workForFaction",function(){return We}),n.d(t,"finishFactionWork",function(){return Ge}),n.d(t,"getWorkMoneyGain",function(){return He}),n.d(t,"getWorkHackExpGain",function(){return Ue}),n.d(t,"getWorkStrExpGain",function(){return qe}),n.d(t,"getWorkDefExpGain",function(){return $e}),n.d(t,"getWorkDexExpGain",function(){return Ke}),n.d(t,"getWorkAgiExpGain",function(){return ze}),n.d(t,"getWorkChaExpGain",function(){return Ye}),n.d(t,"getWorkRepGain",function(){return Ve}),n.d(t,"startCreateProgramWork",function(){return Je}),n.d(t,"createProgramWork",function(){return Xe}),n.d(t,"finishCreateProgramWork",function(){return Qe}),n.d(t,"startClass",function(){return Ze}),n.d(t,"takeClass",function(){return et}),n.d(t,"finishClass",function(){return tt}),n.d(t,"startCrime",function(){return nt}),n.d(t,"commitCrime",function(){return at}),n.d(t,"finishCrime",function(){return rt}),n.d(t,"singularityStopWork",function(){return it}),n.d(t,"takeDamage",function(){return ot}),n.d(t,"regenerateHp",function(){return st}),n.d(t,"hospitalize",function(){return lt}),n.d(t,"applyForJob",function(){return ct}),n.d(t,"getNextCompanyPosition",function(){return ut}),n.d(t,"quitJob",function(){return mt}),n.d(t,"applyForSoftwareJob",function(){return pt}),n.d(t,"applyForSoftwareConsultantJob",function(){return dt}),n.d(t,"applyForItJob",function(){return ht}),n.d(t,"applyForSecurityEngineerJob",function(){return ft}),n.d(t,"applyForNetworkEngineerJob",function(){return gt}),n.d(t,"applyForBusinessJob",function(){return yt}),n.d(t,"applyForBusinessConsultantJob",function(){return _t}),n.d(t,"applyForSecurityJob",function(){return bt}),n.d(t,"applyForAgentJob",function(){return vt}),n.d(t,"applyForEmployeeJob",function(){return kt}),n.d(t,"applyForPartTimeEmployeeJob",function(){return Et}),n.d(t,"applyForWaiterJob",function(){return Ct}),n.d(t,"applyForPartTimeWaiterJob",function(){return St}),n.d(t,"isQualified",function(){return Pt}),n.d(t,"reapplyAllAugmentations",function(){return Tt}),n.d(t,"reapplyAllSourceFiles",function(){return Mt}),n.d(t,"checkForFactionInvitations",function(){return Ot}),n.d(t,"setBitNodeNumber",function(){return wt}),n.d(t,"queueAugmentation",function(){return xt}),n.d(t,"gainCodingContractReward",function(){return Nt}),n.d(t,"travel",function(){return At}),n.d(t,"gotoLocation",function(){return Rt}),n.d(t,"canAccessResleeving",function(){return It}),n.d(t,"giveExploit",function(){return Bt}),n.d(t,"getIntelligenceBonus",function(){return Dt}),n.d(t,"getCasinoWinnings",function(){return Lt});var a=n(12),r=n(80),i=n(200),o=n(3),s=n(19),l=n(92),c=n(140),u=n(32),m=n(471),p=n(457),d=n(53),h=n(58),f=n(11),g=n(30),y=n(252),_=n(170),b=n(15),v=n(126),k=n(17),E=n(72),C=n(86),S=n(26),P=n(195),T=n(425),M=n(43),O=n(41),w=n(179),x=n(122),N=n(428),A=n(109),R=n(20),I=n(23),B=n(25),D=n(38),L=n(832),F=n(831),j=n(232),W=n(37),G=n(313),H=n(429),U=n(69),q=n(6),$=n(180),K=n(13),z=n(50),Y=n(24),V=n(60),J=n(21),X=n(119),Q=n(456),Z=n(0),ee=n.n(Z),te=n(22),ne=n.n(te);const ae=1e3/f.CONSTANTS.MilliPerCycle;function re(){var e=Object(I.safetlyCreateUniqueServer)({adminRights:!0,hostname:"home",ip:Object(R.createUniqueRandomIp)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(R.AddToAllServers)(e),this.getHomeComputer().programs.push(g.Programs.NukeProgram.name)}function ie(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new U.default(1e3),this.city=M.CityName.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,W.SourceFileFlags[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e<t;e++)this.sleeves.push(new w.Sleeve(this));for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]instanceof w.Sleeve&&(this.sleeves[e].shock>=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.updateSkillLevels(),this.hp=this.max_hp}function oe(){this.prestigeAugmentation();for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]=new w.Sleeve(this);if(10===this.bitNodeN)for(let e=0;e<this.sleeves.length;e++)this.sleeves[e].shock=Math.max(25,this.sleeves[e].shock),this.sleeves[e].sync=Math.max(25,this.sleeves[e].sync);const e=document.getElementById("character-menu-header");e instanceof HTMLElement&&(e.click(),e.click()),this.timeWorked=0,this.gang=null,Object(C.resetGangs)(),this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.corporation=0,this.moneySourceB.reset(),this.playtimeSinceLastBitnode=0,this.augmentations=[]}function se(e){this.factionInvitations.includes(e)||this.factions.includes(e)||(this.firstFacInvRecvd=!0,this.factionInvitations.push(e))}function le(e,t=1){return Object(x.calculateSkill)(e,t)}function ce(){this.hacking_skill=Math.max(1,Math.floor(this.calculateSkill(this.hacking_exp,this.hacking_mult*s.BitNodeMultipliers.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateSkill(this.strength_exp,this.strength_mult*s.BitNodeMultipliers.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateSkill(this.defense_exp,this.defense_mult*s.BitNodeMultipliers.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateSkill(this.dexterity_exp,this.dexterity_mult*s.BitNodeMultipliers.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateSkill(this.agility_exp,this.agility_mult*s.BitNodeMultipliers.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateSkill(this.charisma_exp,this.charisma_mult*s.BitNodeMultipliers.CharismaLevelMultiplier))),this.intelligence>0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var n=0;n<t.programs.length;++n)if(e.toLowerCase()==t.programs[n].toLowerCase())return!0;return!1}function pe(e){isNaN(e)?console.error("NaN passed into Player.setMoney()"):this.money=new U.default(e)}function de(e){isNaN(e)?console.error("NaN passed into Player.gainMoney()"):this.money=this.money.plus(e)}function he(e){isNaN(e)?console.error("NaN passed into Player.loseMoney()"):this.money.eq(1/0)&&e===1/0||(this.money=this.money.minus(e))}function fe(e){return isNaN(e)?(console.error("NaN passed into Player.canAfford()"),!1):this.money.gte(e)}function ge(e,t){this.moneySourceA instanceof $.MoneySourceTracker||(console.warn("Player.moneySourceA was not properly initialized. Resetting"),this.moneySourceA=new $.MoneySourceTracker),this.moneySourceB instanceof $.MoneySourceTracker||(console.warn("Player.moneySourceB was not properly initialized. Resetting"),this.moneySourceB=new $.MoneySourceTracker),this.moneySourceA.record(e,t),this.moneySourceB.record(e,t)}function ye(e){isNaN(e)?console.error("ERR: NaN passed into Player.gainHackingExp()"):(this.hacking_exp+=e,this.hacking_exp<0&&(this.hacking_exp=0),this.hacking_skill=Object(x.calculateSkill)(this.hacking_exp,this.hacking_mult*s.BitNodeMultipliers.HackingLevelMultiplier))}function _e(e){isNaN(e)?console.error("ERR: NaN passed into Player.gainStrengthExp()"):(this.strength_exp+=e,this.strength_exp<0&&(this.strength_exp=0),this.strength=Object(x.calculateSkill)(this.strength_exp,this.strength_mult*s.BitNodeMultipliers.StrengthLevelMultiplier))}function be(e){isNaN(e)?console.error("ERR: NaN passed into player.gainDefenseExp()"):(this.defense_exp+=e,this.defense_exp<0&&(this.defense_exp=0),this.defense=Object(x.calculateSkill)(this.defense_exp,this.defense_mult*s.BitNodeMultipliers.DefenseLevelMultiplier))}function ve(e){isNaN(e)?console.error("ERR: NaN passed into Player.gainDexterityExp()"):(this.dexterity_exp+=e,this.dexterity_exp<0&&(this.dexterity_exp=0),this.dexterity=Object(x.calculateSkill)(this.dexterity_exp,this.dexterity_mult*s.BitNodeMultipliers.DexterityLevelMultiplier))}function ke(e){isNaN(e)?console.error("ERR: NaN passed into Player.gainAgilityExp()"):(this.agility_exp+=e,this.agility_exp<0&&(this.agility_exp=0),this.agility=Object(x.calculateSkill)(this.agility_exp,this.agility_mult*s.BitNodeMultipliers.AgilityLevelMultiplier))}function Ee(e){isNaN(e)?console.error("ERR: NaN passed into Player.gainCharismaExp()"):(this.charisma_exp+=e,this.charisma_exp<0&&(this.charisma_exp=0),this.charisma=Object(x.calculateSkill)(this.charisma_exp,this.charisma_mult*s.BitNodeMultipliers.CharismaLevelMultiplier))}function Ce(e){isNaN(e)?console.error("ERROR: NaN passed into Player.gainIntelligenceExp()"):(W.SourceFileFlags[5]>0||this.intelligence>0)&&(this.intelligence_exp+=e)}function Se(e){const t=e.toLowerCase();return t.includes("hack")?this.hacking_skill:t.includes("str")?this.strength:t.includes("def")?this.defense:t.includes("dex")?this.dexterity:t.includes("agi")?this.agility:t.includes("cha")?this.charisma:t.includes("int")?this.intelligence:void 0}function Pe(e,t,n){e===this.workType&&t===this.companyName||e===this.workType&&t===this.currentWorkFactionName&&n===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",ne.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function Te(e=1){const t=this.focus?1:.8,n=t*this.workHackExpGainRate*e,a=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(n),this.gainStrengthExp(a),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=n,this.workStrExpGained+=a,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Me(e){this.resetWorkStatus(f.CONSTANTS.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.CONSTANTS.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.CONSTANTS.MillisecondsPer8Hours;var t=Object(z.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const n=Object(z.clearEventListeners)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Oe(){const e=D.SpecialServerIps[this.companyName];if(e){const t=R.AllServers[e];if(t&&t.backdoorInstalled)return.75}return.5}function we(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.CONSTANTS.MillisecondsPer8Hours)return this.finishWork(!1);const n=u.Companies[this.companyName];let a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`),Object(G.influenceStockThroughCompanyWork)(n,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained})," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," (",`${q.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," (",`${q.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," (",`${q.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," (",`${q.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${q.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," (",`${q.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function xe(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty()),u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let n=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(n=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),n):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),n),t||Object(K.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),t){var a="You worked a short shift of "+Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+q.numeralWrapper.formatMoney(this.workMoneyGained)+", "+q.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+q.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ne(e){this.resetWorkStatus(f.CONSTANTS.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.CONSTANTS.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.CONSTANTS.MillisecondsPer8Hours;var t=Object(z.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Ae(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=u.Companies[this.companyName],a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained})," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(V.Reputation)(`${q.numeralWrapper.formatExp(this.workRepGainRate*ae)} / sec`),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," (",`${q.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," (",`${q.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," (",`${q.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," (",`${q.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${q.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," (",`${q.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Re(e=!1){u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object(K.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var n="You worked for "+Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+q.numeralWrapper.formatMoney(this.workMoneyGained)+", "+q.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+q.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ie(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Be(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function De(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=f.CONSTANTS.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=f.CONSTANTS.MillisecondsPer20Hours;const n=Object(z.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const a=Object(z.clearEventListeners)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(f.CONSTANTS.WorkTypeFaction,e.name,f.CONSTANTS.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/f.CONSTANTS.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=f.CONSTANTS.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(f.CONSTANTS.WorkTypeFaction,e.name,f.CONSTANTS.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(A.getFactionFieldWorkRepGain)(this,e),this.factionWorkType=f.CONSTANTS.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function je(e){this.resetWorkStatus(f.CONSTANTS.WorkTypeFaction,e.name,f.CONSTANTS.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(A.getFactionSecurityWorkRepGain)(this,e),this.factionWorkType=f.CONSTANTS.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function We(e){const t=k.Factions[this.currentWorkFactionName];switch(this.factionWorkType){case f.CONSTANTS.FactionWorkHacking:this.workRepGainRate=Object(A.getHackingWorkRepGain)(this,t);break;case f.CONSTANTS.FactionWorkField:this.workRepGainRate=Object(A.getFactionFieldWorkRepGain)(this,t);break;case f.CONSTANTS.FactionWorkSecurity:this.workRepGainRate=Object(A.getFactionSecurityWorkRepGain)(this,t)}var n=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.CONSTANTS.MillisecondsPer20Hours&&(n=!0,e=Math.round((f.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),n||this.timeWorked>=f.CONSTANTS.MillisecondsPer20Hours)return this.finishFactionWork(!1);const a=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.Reputation)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained})," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," (",q.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," (",q.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," (",q.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," (",q.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," (",q.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," (",q.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),a)}function Ge(e,t=!1){var n=k.Factions[this.currentWorkFactionName];if(n.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object(K.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",n.name," for a total of ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(E.displayFactionContent)(n.name),t){var a="You worked for your faction "+n.name+" for a total of "+Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+q.numeralWrapper.formatReputation(this.workRepGained)+" rep, "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, and "+q.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function He(){let e=1;const t=u.Companies[this.companyName];W.SourceFileFlags[11]>0&&(e=1+t.favor/100);const n=this.jobs[this.companyName],a=d.CompanyPositions[n];return null==a?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):a.baseSalary*t.salaryMultiplier*this.work_money_mult*s.BitNodeMultipliers.CompanyWorkMoney*e}function Ue(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):n.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function qe(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):n.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function $e(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):n.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ke(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):n.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function ze(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):n.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ye(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):n.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ve(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];if(null==e||null==n)return console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var a=n.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);a+=this.intelligence/f.CONSTANTS.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),a*this.company_rep_mult*r}function Je(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a<this.getHomeComputer().programs.length;++a){var r=this.getHomeComputer().programs[a];if(r.startsWith(e)&&r.endsWith("%-INC")){var i=r.split("-");if(3!=i.length)break;var o=Number(i[1].slice(0,-1));if(isNaN(o)||o<0||o>=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var s=Object(z.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1)),Object(z.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t*this.getIntelligenceBonus(3);n=1+(n-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",a,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Qe(e){var t=this.createProgramName;if(!1===e)Object(K.dialogBoxCreate)("You've finished creating "+t+"!<br>The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var n=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(n)}e||this.gainIntelligenceExp(this.createProgramReqLvl/f.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.CONSTANTS.WorkTypeStudyClass,this.className=n;const a=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const p=this.hashManager;switch(n){case f.CONSTANTS.ClassStudyComputerScience:i=f.CONSTANTS.ClassStudyComputerScienceBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassDataStructures:r=f.CONSTANTS.ClassDataStructuresBaseCost*e/a,i=f.CONSTANTS.ClassDataStructuresBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassNetworks:r=f.CONSTANTS.ClassNetworksBaseCost*e/a,i=f.CONSTANTS.ClassNetworksBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassAlgorithms:r=f.CONSTANTS.ClassAlgorithmsBaseCost*e/a,i=f.CONSTANTS.ClassAlgorithmsBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassManagement:r=f.CONSTANTS.ClassManagementBaseCost*e/a,m=f.CONSTANTS.ClassManagementBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassLeadership:r=f.CONSTANTS.ClassLeadershipBaseCost*e/a,m=f.CONSTANTS.ClassLeadershipBaseExp*t/a*p.getStudyMult();break;case f.CONSTANTS.ClassGymStrength:r=f.CONSTANTS.ClassGymBaseCost*e/a,o=t/a*p.getTrainingMult();break;case f.CONSTANTS.ClassGymDefense:r=f.CONSTANTS.ClassGymBaseCost*e/a,l=t/a*p.getTrainingMult();break;case f.CONSTANTS.ClassGymDexterity:r=f.CONSTANTS.ClassGymBaseCost*e/a,c=t/a*p.getTrainingMult();break;case f.CONSTANTS.ClassGymAgility:r=f.CONSTANTS.ClassGymBaseCost*e/a,u=t/a*p.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.BitNodeMultipliers.ClassGymExpGain;var d=Object(z.clearEventListeners)("work-in-progress-cancel-button");n==f.CONSTANTS.ClassGymStrength||n==f.CONSTANTS.ClassGymDefense||n==f.CONSTANTS.ClassGymDexterity||n==f.CONSTANTS.ClassGymAgility?d.innerHTML="Stop training at gym":d.innerHTML="Stop taking course",d.addEventListener("click",()=>(this.finishClass(),!1)),Object(z.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const n=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:-this.workMoneyGained})," (",Object(X.MoneyRate)(this.workMoneyLossRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," (",q.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," (",q.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," (",q.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," (",q.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," (",q.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," (",q.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),n)}function tt(e=!1){if(this.gainIntelligenceExp(f.CONSTANTS.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),e||Object(K.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",ee.a.createElement(J.Money,{money:-this.workMoneyGained}),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of "+q.numeralWrapper.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+q.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function nt(e,t,n,a,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.CONSTANTS.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=n*this.strength_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=a*this.defense_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(z.clearEventListeners)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1)),Object(z.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function at(e){if(this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var a="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".<br>Time remaining: "+Object(Y.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"<br>"+a.replace(/ /g," ")}}function rt(e){if(!e){if(Object(y.determineCrimeSuccess)(this,this.crimeType)){let e=null;for(const t in _.Crimes)if(_.Crimes[t].type==this.crimeType){e=_.Crimes[t];break}null==e&&Object(K.dialogBoxCreate)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),this.gainMoney(this.workMoneyGained),this.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+q.numeralWrapper.formatMoney(this.workMoneyGained)+", "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+q.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object(K.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),ee.a.createElement(J.Money,{money:this.workMoneyGained}),ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"))}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+q.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+q.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+q.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+q.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+q.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+q.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object(K.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"));this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case f.CONSTANTS.WorkTypeStudyClass:e=this.finishClass(!0);break;case f.CONSTANTS.WorkTypeCompany:e=this.finishWork(!0,!0);break;case f.CONSTANTS.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case f.CONSTANTS.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case f.CONSTANTS.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0);break;case f.CONSTANTS.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return e}function ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn(`Player.takeDamage() called without a numeric argument: ${e}`)}function st(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn(`Player.regenerateHp() called without a numeric argument: ${e}`)}function lt(){const e=Object(H.getHospitalizationCost)(this);return!1===B.Settings.SuppressHospitalizationPopup&&Object(K.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",ee.a.createElement(J.Money,{money:e}))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(e,t=!1){let n=null;""!==this.companyName&&(n=u.Companies[this.companyName]);const a=this.jobs[this.companyName],r=u.Companies[this.location];if(!(r instanceof c.Company))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(p.getJobRequirementText)(r,i);return!t&&void Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position<br>"+o)}for(;;){let e=Object(m.getNextCompanyPositionHelper)(i);if(null==e)break;if(!r.hasPosition(e))break;if(!this.isQualified(r,e))break;i=e}if(null==n||n.name!=r.name||i.name!=a){if(this.jobs[r.name]=i.name,this.companyName=this.location,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object(K.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.getNextCompanyPositionHelper)(i);if(null==s){if(t)return!1;Object(K.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(p.getJobRequirementText)(r,s);Object(K.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion<br>"+o)}else{if(t)return!1;Object(K.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var n=null;if(""!==this.companyName&&(n=u.Companies[this.companyName]),null==n||n.name!=e.name)return t;const a=this.jobs[this.companyName],r=d.CompanyPositions[a];return r.isSoftwareJob()&&t.isSoftwareJob()||r.isITJob()&&t.isITJob()||r.isBusinessJob()&&t.isBusinessJob()||r.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||r.isSecurityJob()&&t.isSecurityJob()||r.isAgentJob()&&t.isAgentJob()||r.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||r.isPartTimeJob()&&t.isPartTimeJob()?Object(m.getNextCompanyPositionHelper)(r):t}function mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function pt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareCompanyPositions[0]],e)}function dt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareConsultantCompanyPositions[0]],e)}function ht(e=!1){return this.applyForJob(d.CompanyPositions[h.ITCompanyPositions[0]],e)}function ft(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]],e):!e&&void Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]],e):!e&&void Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function yt(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessCompanyPositions[0]],e)}function _t(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessConsultantCompanyPositions[0]],e)}function bt(e=!1){return this.applyForJob(d.CompanyPositions[h.SecurityCompanyPositions[2]],e)}function vt(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.AgentCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.AgentCompanyPositions[0]],e):!e&&void Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function kt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[1]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(K.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Et(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[1]])){if(this.jobs[t.name]=h.PartTimeCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(K.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(K.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function St(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.PartTimeCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(K.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object(K.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Pt(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,r=t.requiredStrength>0?t.requiredStrength+n:0,i=t.requiredDefense>0?t.requiredDefense+n:0,o=t.requiredDexterity>0?t.requiredDexterity+n:0,s=t.requiredDexterity>0?t.requiredDexterity+n:0,l=t.requiredCharisma>0?t.requiredCharisma+n:0;return this.hacking_skill>=a&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation}function Tt(e=!0){e&&this.resetMultipliers();for(let e=0;e<this.augmentations.length;++e){"HacknetNode NIC Architecture Neural-Upload"===this.augmentations[e].name&&(this.augmentations[e].name="Hacknet Node NIC Architecture Neural-Upload");const n=this.augmentations[e].name;var t=a.Augmentations[n];if(null!=t)if(t.owned=!0,t.name!=o.AugmentationNames.NeuroFluxGovernor)Object(r.a)(this.augmentations[e],!0);else for(let n=0;n<t.level;++n)Object(r.a)(this.augmentations[e],!0);else console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${n} will be skipped`)}}function Mt(){for(let t=0;t<this.sourceFiles.length;++t){var e="SourceFile"+this.sourceFiles[t].n;null!=j.SourceFiles[e]?Object(L.applySourceFile)(this.sourceFiles[t]):console.error(`Invalid source file number: ${this.sourceFiles[t].n}`)}Object(F.applyExploit)()}function Ot(){let e=[];var t=this.augmentations.length;const n=Object.keys(this.jobs),a=Object.values(this.jobs);function r(e,t=f.CONSTANTS.CorpFactionRepRequirement){return n.includes(e)&&function(e){const t=u.Companies[e];return null==t?0:t.playerReputation}(e)>t}var i=k.Factions.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var o=k.Factions.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.BitNodeMultipliers.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=k.Factions["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=k.Factions.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(O.LocationName.AevumECorp)||e.push(c);var m=k.Factions.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(O.LocationName.Sector12MegaCorp)||e.push(m);var p=k.Factions["Bachman & Associates"];p.isBanned||p.isMember||p.alreadyInvited||!r(O.LocationName.AevumBachmanAndAssociates)||e.push(p);var d=k.Factions["Blade Industries"];d.isBanned||d.isMember||d.alreadyInvited||!r(O.LocationName.Sector12BladeIndustries)||e.push(d);var h=k.Factions.NWO;h.isBanned||h.isMember||h.alreadyInvited||!r(O.LocationName.VolhavenNWO)||e.push(h);var g=k.Factions["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(O.LocationName.AevumClarkeIncorporated)||e.push(g);var y=k.Factions["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(O.LocationName.VolhavenOmniTekIncorporated)||e.push(y);var _=k.Factions["Four Sigma"];_.isBanned||_.isMember||_.alreadyInvited||!r(O.LocationName.Sector12FourSigma)||e.push(_);var b=k.Factions["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(O.LocationName.ChongqingKuaiGongInternational)||e.push(b);var v=k.Factions["Fulcrum Secret Technologies"],E=R.AllServers[D.SpecialServerIps[D.SpecialServerNames.FulcrumSecretTechnologies]];null==E?console.error("Could not find Fulcrum Secret Technologies Server"):v.isBanned||v.isMember||v.alreadyInvited||!E.backdoorInstalled||!r(O.LocationName.AevumFulcrumTechnologies,25e4)||e.push(v);var C=k.Factions.BitRunners,P=this.getHomeComputer(),T=R.AllServers[D.SpecialServerIps[D.SpecialServerNames.BitRunnersServer]];null==T?console.error("Could not find BitRunners Server"):!C.isBanned&&!C.isMember&&T.backdoorInstalled&&!C.alreadyInvited&&P.maxRam>=128&&e.push(C);var w=k.Factions["The Black Hand"],x=R.AllServers[D.SpecialServerIps[D.SpecialServerNames.TheBlackHandServer]];null==x?console.error("Could not find The Black Hand Server"):!w.isBanned&&!w.isMember&&x.backdoorInstalled&&!w.alreadyInvited&&P.maxRam>=64&&e.push(w);var N=k.Factions.NiteSec,A=R.AllServers[D.SpecialServerIps[D.SpecialServerNames.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):!N.isBanned&&!N.isMember&&A.backdoorInstalled&&!N.alreadyInvited&&P.maxRam>=32&&e.push(N);var I=k.Factions.Chongqing;I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.Chongqing||e.push(I);var B=k.Factions["Sector-12"];B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(15e6)||this.city!=M.CityName.Sector12||e.push(B);var L=k.Factions["New Tokyo"];L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.NewTokyo||e.push(L);var F=k.Factions.Aevum;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(4e7)||this.city!=M.CityName.Aevum||e.push(F);var j=k.Factions.Ishima;j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(3e7)||this.city!=M.CityName.Ishima||e.push(j);var W=k.Factions.Volhaven;W.isBanned||W.isMember||W.alreadyInvited||!this.money.gte(5e7)||this.city!=M.CityName.Volhaven||e.push(W);var G=k.Factions["Speakers for the Dead"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!n.includes(O.LocationName.Sector12CIA)&&!n.includes(O.LocationName.Sector12NSA)&&e.push(G);var H=k.Factions["The Dark Army"];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==M.CityName.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!n.includes(O.LocationName.Sector12CIA)&&!n.includes(O.LocationName.Sector12NSA)&&e.push(H);var U=k.Factions["The Syndicate"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==M.CityName.Aevum||this.city==M.CityName.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!n.includes(O.LocationName.Sector12CIA)&&!n.includes(O.LocationName.Sector12NSA)&&e.push(U);var q=k.Factions.Silhouette;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(a.includes("Chief Technology Officer")||a.includes("Chief Financial Officer")||a.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(q);var $=k.Factions.Tetrads;!$.isBanned&&!$.isMember&&!$.alreadyInvited&&(this.city==M.CityName.Chongqing||this.city==M.CityName.NewTokyo||this.city==M.CityName.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push($);var K=k.Factions["Slum Snakes"];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(K);var z=k.Factions.Netburners,Y=0,V=0,J=0;for(let e=0;e<this.hacknetNodes.length;++e)if(Object(S.h)()){const t=R.AllServers[this.hacknetNodes[e]];t&&(J+=t.level,Y+=t.maxRam,V+=t.cores)}else J+=this.hacknetNodes[e].level,Y+=this.hacknetNodes[e].ram,V+=this.hacknetNodes[e].cores;!z.isBanned&&!z.isMember&&!z.alreadyInvited&&this.hacking_skill>=80&&Y>=8&&V>=4&&J>=100&&e.push(z);var X=k.Factions["Tian Di Hui"];X.isBanned||X.isMember||X.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=M.CityName.Chongqing&&this.city!=M.CityName.NewTokyo&&this.city!=M.CityName.Ishima||e.push(X);var Q=k.Factions.CyberSec,Z=R.AllServers[D.SpecialServerIps[D.SpecialServerNames.CyberSecServer]];return null==Z?console.error("Could not find CyberSec Server"):Q.isBanned||Q.isMember||!Z.backdoorInstalled||Q.alreadyInvited||e.push(Q),e}function wt(e){this.bitNodeN=e}function xt(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.PlayerOwnedAugmentation(e))}function Nt(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case l.CodingContractRewardType.FactionReputation:if(null==e.name||!(k.Factions[e.name]instanceof v.Faction))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=f.CONSTANTS.CodingContractBaseFactionRepGain*t;return k.Factions[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case l.CodingContractRewardType.FactionReputationAll:const i=f.CONSTANTS.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var a=this.factions.slice();if(0==(a=a.filter(e=>!o.includes(e))).length)return e.type=l.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/a.length);for(const e of a)k.Factions[e]instanceof v.Faction&&(k.Factions[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${a.toString()}`;case l.CodingContractRewardType.CompanyReputation:if(null==e.name||!(u.Companies[e.name]instanceof c.Company))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=f.CONSTANTS.CodingContractBaseCompanyRepGain*t;return u.Companies[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case l.CodingContractRewardType.Money:default:var r=f.CONSTANTS.CodingContractBaseMoneyGain*t*s.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),`Gained ${q.numeralWrapper.formatMoney(r)}`}}function At(e){return null==P.Cities[e]?(console.warn(`Player.travel() called with invalid city: ${e}`),!1):(this.city=e,!0)}function Rt(e){return null==T.Locations[e]?(console.warn(`Player.gotoLocation() called with invalid location: ${e}`),!1):(this.location=e,!0)}function It(){return 10===this.bitNodeN||W.SourceFileFlags[10]>0}function Bt(e){this.exploits.includes(e)||this.exploits.push(e)}function Dt(e){return Object(N.calculateIntelligenceBonus)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessGang",function(){return l}),n.d(t,"getGangFaction",function(){return c}),n.d(t,"getGangName",function(){return u}),n.d(t,"hasGangWith",function(){return m}),n.d(t,"inGang",function(){return p}),n.d(t,"startGang",function(){return d});var a=n(17),r=n(314),i=n(37),o=n(19);const s=-54e3;function l(){return 2===this.bitNodeN||!(i.SourceFileFlags[2]<=0)&&this.karma<=o.BitNodeMultipliers.GangKarmaRequirement*s}function c(){const e=a.Factions[this.gang.facName];if(null==e)throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);return e}function u(){return this.inGang()?this.gang.facName:""}function m(e){return this.inGang()&&this.gang.facName===e}function p(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof r.Gang}function d(e,t){this.gang=new r.Gang(e,t);const n=a.Factions[e];if(null==n)throw new Error(`Invalid faction name when creating gang: ${e}`);n.playerReputation=0}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessCorporation",function(){return i}),n.d(t,"hasCorporation",function(){return o}),n.d(t,"startCorporation",function(){return s});var a=n(123),r=n(37);function i(){return 3===this.bitNodeN||r.SourceFileFlags[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof a.Corporation}function s(e,t=0){this.corporation=new a.Corporation({name:e}),this.corporation.totalShares+=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptUrl=void 0;t.ScriptUrl=class{constructor(e,t){this.filename=e,this.url=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(68),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(836),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(n=>{const a=t.find(e=>e.filename==n.filename);return!a||a.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,n);return a.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',a.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.ScriptUrl(e.filename,URL.createObjectURL(makeScriptBlob(r)))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is2DArray=void 0,t.is2DArray=function(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tabCompletion=void 0;const a=n(7),r=n(24);t.tabCompletion=function(e,t,n){if(n.constructor!==Array)return;if(!r.containsAllStrings(n))return;if(""===t)for(let t=n.length-1;t>=0;--t)n[t].toLowerCase().startsWith(e.toLowerCase())||n.splice(t,1);else for(let e=n.length-1;e>=0;--e)n[e].toLowerCase().startsWith(t.toLowerCase())||n.splice(e,1);const i=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==n.length)if(1===n.length)l=""===t?n[0]+" ":e+" "+n[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=r.longestCommonStart(n);let l="";for(let e=0;e<n.length;++e)l+=n[e],l+=" ";""===t?i===e?(a.post("> "+e),a.post(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(a.post("> "+e+" "+t),a.post(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineAllPossibilitiesForTabCompletion=void 0;const a=n(87),r=n(1122),i=n(67),o=n(302),s=n(74),l=n(20),c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];t.determineAllPossibilitiesForTabCompletion=function(e,t,n,u=""){let m=[];m=m.concat(Object.keys(i.GlobalAliases));const p=e.getCurrentServer(),d=e.getHomeComputer();let h="",f=null;function g(){for(const e of p.contracts)m.push(e.fn)}function y(){for(const e of p.messages)e instanceof s.Message||m.push(e)}function _(){for(const e of d.programs)m.push(e)}function b(){for(const e of p.scripts){const t=E(e.filename);t&&m.push(t)}}function v(){for(const e of p.textFiles){const t=E(e.fn);t&&m.push(t)}}function k(){const e=r.getSubdirectories(p,null==f?"/":f);for(let t=0;t<e.length;++t){const n=E(null==f?e[t]:f+e[t]);null!=n&&(e[t]=n)}m=m.concat(e)}function E(e){if(!f){if(""!==h){let t=h;return t.endsWith("/")||(t+="/"),h+e}return e}return e.startsWith(f)?function(e){return null==h||null==f?(console.warn("convertParentPath() called when paths are null"),e):e.startsWith(f)?h+e.slice(f.length):(console.warn(`convertParentPath() called for invalid path. (filepath=${e}) (evaledParentDirPath=${f})`),e)}(e):null}function C(e){let n=e;return n.endsWith(" ")||(n+=" "),t.startsWith(n)}if(C("./")&&-1==n){for(let e=0;e<p.scripts.length;++e)m.push("./"+p.scripts[e].filename);for(let e=0;e<d.programs.length;++e)m.push("./"+d.programs[e]);return m}if(-1===n)return c.concat(Object.keys(i.Aliases)).concat(Object.keys(i.GlobalAliases));const S=t.split(" ");if(0===S.length)return console.warn("Tab autocompletion logic reached invalid branch"),m;const P=S[S.length-1];if(h=a.getAllParentDirectories(P),"/"===(f=a.evaluateDirectoryPath(h,u)))f=null;else{if(null==f)return m;f+="/"}if(C("buy")){const e=[];for(const t in o.DarkWebItems){const n=o.DarkWebItems[t];e.push(n.program)}return e.concat(Object.keys(i.GlobalAliases))}if(C("scp")&&1===n){for(const e in l.AllServers)m.push(l.AllServers[e].ip),m.push(l.AllServers[e].hostname);return m}if(C("scp")&&0===n)return b(),y(),v(),k(),m;if(C("connect")){for(let e=0;e<p.serversOnNetwork.length;++e){const t=l.AllServers[p.serversOnNetwork[e]];null!=t&&(m.push(t.ip),m.push(t.hostname))}return m}return C("kill")||C("tail")||C("mem")||C("check")?(b(),k(),m):C("nano")?(b(),v(),m.push(".fconf"),k(),m):C("rm")?(b(),_(),y(),v(),g(),k(),m):C("run")?(b(),_(),g(),k(),m):C("cat")?(function(){for(const e of p.messages)e instanceof s.Message&&m.push(e.filename)}(),y(),v(),k(),m):C("download")||C("mv")?(b(),v(),k(),m):C("cd")?(k(),m):(C("ls")&&0===n&&k(),m)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(26),o=n(1),s=n(21);function l(e){if(null==e.multiplier||null==e.onClick)throw new Error("PurchaseButton constructed without required props");const t=e.cost;let n,a=o.Player.canAfford(t)?"std-button":"std-button-disabled",l=null;return Object(i.h)()?Object(i.i)()?(a="std-button-disabled",n=r.a.createElement(r.a.Fragment,null,"Hacknet Server limit reached"),l={color:"red"}):n=r.a.createElement(r.a.Fragment,null,"Purchase Hacknet Server - ",r.a.createElement(s.Money,{money:t,player:o.Player})):n=r.a.createElement(r.a.Fragment,null,"Purchase Hacknet Node - ",r.a.createElement(s.Money,{money:t,player:o.Player})),r.a.createElement("button",{className:a,onClick:e.onClick,style:l},n)}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(0),r=n.n(a),i=n(26),o=n(1),s=n(21),l=n(119),c=n(463),u=n(128);function m(e){const t=Object(i.h)();let n;return n=t?Object(c.HashRate)(e.totalProduction):Object(l.MoneyRate)(e.totalProduction),r.a.createElement("p",{id:"hacknet-nodes-money"},r.a.createElement("span",null,"Money: "),r.a.createElement(s.Money,{money:o.Player.money.toNumber()}),r.a.createElement("br",null),t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Hashes: ",Object(u.Hashes)(o.Player.hashManager.hashes)," / ",Object(u.Hashes)(o.Player.hashManager.capacity)),r.a.createElement("br",null)),r.a.createElement("span",null,"Total Hacknet ",t?"Server":"Node"," Production: "),n)}},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var a=n(0),r=n.n(a),i=n(464);function o(e){return r.a.createElement("button",{className:e.className,onClick:e.onClick},e.text)}function s(e){if(null==e.purchaseMultiplier)throw new Error("MultiplierButtons constructed without required props");const t=["x1","x5","x10","MAX"],n=e.onClicks,a=[];for(let s=0;s<t.length;++s){const l=t[s],c={className:e.purchaseMultiplier===i.b[l]?"std-button-disabled":"std-button",key:l,onClick:n[s],text:l};a.push(r.a.createElement(o,c))}return r.a.createElement("span",{id:"hacknet-nodes-multipliers"},a)}},function(e,t,n){"use strict";n.d(t,"a",function(){return f});var a=n(0),r=n.n(a),i=n(26),o=n(178),s=n(246),l=n(1),c=n(6),u=n(560),m=n(13),p=n(167),d=n(128);class h extends r.a.Component{constructor(e){super(e),this.state={selectedServer:"ecorp"},this.changeTargetServer=this.changeTargetServer.bind(this),this.purchase=this.purchase.bind(this,this.props.hashManager,this.props.upg)}changeTargetServer(e){this.setState({selectedServer:e.target.value})}purchase(e,t){if(e.hashes>=e.getUpgradeCost(t.name)){Object(i.n)(t.name,this.state.selectedServer)?this.props.rerender():Object(m.dialogBoxCreate)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature this upgrade affects.")}}render(){const e=this.props.hashManager,t=this.props.upg,n=e.getUpgradeCost(t.name),a=e.upgrades[t.name],i=t.effectText(a),o=e.hashes>=n?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(p.CopyableText,{value:t.name}),r.a.createElement("p",null,"Cost: ",Object(d.Hashes)(n),", Bought: ",a," times"),r.a.createElement("p",null,t.desc),r.a.createElement("button",{className:o,onClick:this.purchase},"Purchase"),a>0&&i&&r.a.createElement("p",null,i),t.hasTargetServer&&r.a.createElement(u.a,{serverType:u.b.Foreign,onChange:this.changeTargetServer,style:{margin:"5px"}}))}}class f extends r.a.Component{constructor(e){super(e),this.state={totalHashes:l.Player.hashManager.hashes}}componentDidMount(){this.interval=setInterval(()=>this.tick(),1e3)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState({totalHashes:l.Player.hashManager.hashes})}render(){const e=this.props.rerender,t=l.Player.hashManager;if(!(t instanceof o.HashManager))throw new Error("Player does not have a HashManager)");const n=Object.keys(s.HashUpgrades).map(n=>{const a=s.HashUpgrades[n];return r.a.createElement(h,{upg:a,hashManager:t,key:a.name,rerender:e})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",c.numeralWrapper.formatHashes(this.state.totalHashes)),n)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(0),r=n.n(a),i=n(33),o=n(26),s=n(1),l=n(21),c=n(128),u=n(463);class m extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,m;if(e.level>=i.HacknetServerConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetServerConstants.MaxLevel);else{const a=i.HacknetServerConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:c,player:s.Player})),m=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let p,d;if(e.maxRam>=i.HacknetServerConstants.MaxRam)p=r.a.createElement(r.a.Fragment,null,"MAX RAM"),d="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetServerConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetServerConstants.MaxRam/e.maxRam));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:a,player:s.Player})),d=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let h,f;if(e.cores>=i.HacknetServerConstants.MaxCores)h=r.a.createElement(r.a.Fragment,null,"MAX CORES"),f="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetServerConstants.MaxCores);else{const a=i.HacknetServerConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:a,player:s.Player})),f=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let g,y;if(e.cache>=i.HacknetServerConstants.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.d)(e,i.HacknetServerConstants.MaxCache);else{const a=i.HacknetServerConstants.MaxCache-e.cache;n=Math.min(a,t)}const a=e.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:a,player:s.Player})),y=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(c.Hashes)(e.totalHashesGenerated)," (",Object(u.HashRate)(e.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(c.Hashes)(e.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:m,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetServerConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.maxRam,"GB"),r.a.createElement("button",{className:d,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetServerConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},p)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:f,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetServerConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.cache),r.a.createElement("button",{className:y,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.d)(e,i.HacknetServerConstants.MaxCache)),Object(o.k)(e,a),n(),Object(o.r)(),!1}},g))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(0),r=n.n(a),i=n(33),o=n(26),s=n(1),l=n(21),c=n(119);class u extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,u;if(e.level>=i.HacknetNodeConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel);else{const a=i.HacknetNodeConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:c,player:s.Player})),u=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let m,p;if(e.ram>=i.HacknetNodeConstants.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetNodeConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetNodeConstants.MaxRam/e.ram));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:a,player:s.Player})),p=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let d,h;if(e.cores>=i.HacknetNodeConstants.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),h="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetNodeConstants.MaxCores);else{const a=i.HacknetNodeConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(l.Money,{money:a,player:s.Player})),h=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(l.Money,{money:e.totalMoneyGenerated,player:s.Player})," (",Object(c.MoneyRate)(e.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:u,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.ram,"GB"),r.a.createElement("button",{className:p,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetNodeConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:h,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetNodeConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},d))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),r=n.n(a),i=n(26);class o extends r.a.Component{getSecondParagraph(){return Object(i.h)()?"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades.":"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."}getThirdParagraph(){return Object(i.h)()?"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.":"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it."}render(){return r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),r.a.createElement("p",{className:"hacknet-general-info"},this.getSecondParagraph()),r.a.createElement("p",{className:"hacknet-general-info"},this.getThirdParagraph()))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(72),r=n(15),i=n(1),o=n(50),s=n(18);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){!function(e){document.getElementById("faction-invitation-box-text").innerHTML=e}("You have received a faction invitation from "+e.name),e.alreadyInvited=!0,i.Player.factionInvitations.push(e.name),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),Object(o.clearEventListeners)("faction-invitation-box-yes").addEventListener("click",function(){return-1===i.Player.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(a.joinFaction)(e),l(),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return l(),!1}),document.getElementById("faction-invitation-box-container").style.display="flex"}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionRoot=void 0;const o=i(n(0)),s=n(1293),l=n(1290),c=n(1146),u=n(1143),m=n(11),p=n(19),d=n(709),h=n(37),f=n(63),g="Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",y="Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)",_="Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",b="Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",v="Serve in a security detail for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats. You will gain exp for all combat stats.",k="As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",E="Purchase Duplicate Sleeves and upgrades. These are permanent!",C=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];t.FactionRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const n=f.yesNoBoxGetYesButton(),a=f.yesNoBoxGetNoButton();if(null==n||null==a)return;n.innerHTML="Create Gang",n.addEventListener("click",()=>{this.props.p.startGang(e,t);const n=document.getElementById("world-menu-header");n instanceof HTMLElement&&(n.click(),n.click()),this.props.engine.loadGangContent(),f.yesNoBoxClose()}),a.innerHTML="Cancel",a.addEventListener("click",()=>{f.yesNoBoxClose()});let r="";r=t?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.<br><br>":"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. Compared to hacking gangs, progression with combat gangs can be more difficult as territory management is more important. However, well-managed combat gangs can progress faster than hacking ones.<br><br>",f.yesNoBoxCreate(`Would you like to create a new Gang with ${e}?<br><br>`+"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.<br><br>"+r+"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.")}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){d.createSleevePurchasesFromCovenantPopup(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,n=t.getInfo(),a=e.inGang()&&e.getGangName()===t.name,r=Math.floor(m.CONSTANTS.BaseFavorToDonate*p.BitNodeMultipliers.RepToDonateToFaction),i=t.favor>=r,s="The Covenant"===t.name&&e.bitNodeN>=10&&h.SourceFileFlags[10];let d=e.canAccessGang()&&C.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?d=!1:e.getGangName()===t.name&&(d=!0)),o.createElement("div",null,o.createElement("h1",null,t.name),o.createElement(c.Info,{faction:t,factionInfo:n}),d&&o.createElement(u.Option,{buttonText:"Manage Gang",infoText:g,onClick:this.manageGang}),!a&&n.offerHackingMission&&o.createElement(u.Option,{buttonText:"Hacking Mission",infoText:y,onClick:this.startHackingMission}),!a&&n.offerHackingWork&&o.createElement(u.Option,{buttonText:"Hacking Contracts",infoText:_,onClick:this.startHackingContracts}),!a&&n.offerFieldWork&&o.createElement(u.Option,{buttonText:"Field Work",infoText:b,onClick:this.startFieldWork}),!a&&n.offerSecurityWork&&o.createElement(u.Option,{buttonText:"Security Work",infoText:v,onClick:this.startSecurityWork}),!a&&n.offersWork()&&o.createElement(l.DonateOption,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:r,disabled:!i}),o.createElement(u.Option,{buttonText:"Purchase Augmentations",infoText:k,onClick:this.routeToPurchaseAugs}),s&&o.createElement(u.Option,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:E,onClick:this.sleevePurchases}))}renderAugmentationsPage(){return o.createElement("div",null,o.createElement(s.AugmentationsPage,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessBladeburner",function(){return i}),n.d(t,"inBladeburner",function(){return o}),n.d(t,"startBladeburner",function(){return s});var a=n(93),r=n(37);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.SourceFileFlags[6]>0||r.SourceFileFlags[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof a.Bladeburner}function s(){this.bladeburner=new a.Bladeburner(this)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasAugmentation=void 0;const a=n(16);t.hasAugmentation=function(e){const t=e instanceof a.Augmentation?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(858),r=n(857),i=n(835),o=n(834),s=n(833),l=n(830),c=n(178),u=n(43),m=n(180),p=n(29),d=n(69);function h(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new d.default(1e3),this.homeComputer="",this.city=u.CityName.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.HashManager,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.MoneySourceTracker,this.moneySourceB=new m.MoneySourceTracker,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(h.prototype,s,l,r,i,o,a),h.prototype.toJSON=function(){return Object(p.Generic_toJSON)("PlayerObject",this)},h.fromJSON=function(e){return Object(p.Generic_fromJSON)(h,e.data)},p.Reviver.constructors.PlayerObject=h},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsRoot=void 0;const o=i(n(0)),s=n(1355),l=n(1029),c=n(1028),u=n(1),m=n(54),p=n(154);t.AugmentationsRoot=class extends o.Component{constructor(e){super(e),this.state={rerender:!1},this.export=this.export.bind(this)}export(){this.props.exportGameFn(),this.setState({rerender:!this.state.rerender})}render(){return o.createElement("div",{id:"augmentations-content"},o.createElement("h1",null,"Purchased Augmentations"),o.createElement("p",null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),o.createElement("p",null,"WARNING: Installing your Augmentations resets most of your progress, including:"),o.createElement("br",null),o.createElement("p",null,"- Stats/Skill levels and Experience"),o.createElement("p",null,"- Money"),o.createElement("p",null,"- Scripts on every computer but your home computer"),o.createElement("p",null,"- Purchased servers"),o.createElement("p",null,"- Hacknet Nodes"),o.createElement("p",null,"- Faction/Company reputation"),o.createElement("p",null,"- Stocks"),o.createElement("br",null),o.createElement("p",null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)"),o.createElement(m.StdButton,{onClick:this.props.installAugmentationsFn,text:"Install Augmentations",tooltip:"'I never asked for this'"}),o.createElement(m.StdButton,{addClasses:"flashing-button",onClick:this.export,text:`Backup Save ${p.canGetBonus()?"(+1 favor to all factions)":""}`,tooltip:"It's always a good idea to backup/export your save!"}),o.createElement(c.PurchasedAugmentations,null),o.createElement("h1",null,"Installed Augmentations"),o.createElement("p",null,`List of all Augmentations ${u.Player.sourceFiles.length>0?"and Source Files ":""} `+"that have been installed. You have gained the effects of these."),o.createElement(s.InstalledAugmentationsAndSourceFiles,null),o.createElement("br",null)," ",o.createElement("br",null),o.createElement(l.PlayerMultipliers,null))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(169);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&a.Player.giveExploit(r.Exploit.Unclickable)}document.addEventListener("DOMContentLoaded",function t(){const n=document.getElementById("unclickable");null!=n?(n.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(169);setInterval(function(){"5.5e+1"!==55..toExponential()&&a.Player.giveExploit(r.Exploit.PrototypeTampering)},9e5)},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordionContentPaginated=t.ServerAccordionContent=void 0;const o=i(n(0)),s=n(565),l=n(564),c=20;function u(e){const[t,n]=o.useState(0),a=[],r=Math.ceil(e.workerScripts.length/c),i=Math.min((t+1)*c,e.workerScripts.length);for(let n=t*c;n<i;n++){const t=e.workerScripts[n];a.push(o.default.createElement(s.WorkerScriptAccordion,{key:`${t.name}_${t.args}`,workerScript:t}))}function u(e){return e<0&&(e=0),r-1<e&&(e=r-1),e}const m=u(t);function p(e){n(t=>(t+=e,u(t=Math.round(t))))}return m!==t&&n(m),o.default.createElement(o.default.Fragment,null,o.default.createElement("ul",null,a),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1e99),text:"<<"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1),text:"<"}),o.default.createElement("span",{className:"text"},t+1," / ",r),o.default.createElement(l.AccordionButton,{onClick:()=>p(1),text:">"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(1e99),text:">>"}))}t.ServerAccordionContent=function(e){if(e.workerScripts.length>c)return o.default.createElement(u,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>o.default.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e}));return o.default.createElement("ul",null,t)},t.ServerAccordionContentPaginated=u},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordion=void 0;const o=i(n(0)),s=n(565),l=n(164),c=n(929),u=n(191);t.ServerAccordion=function(e){const t=e.server,n=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),a={progress:t.ramUsed/t.maxRam,totalTicks:30},r=`${n} ${u.createProgressBarText(a)}`;return e.workerScripts.map(e=>o.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e})),o.createElement(l.Accordion,{headerContent:o.createElement("pre",null,r),panelContent:o.createElement(c.ServerAccordionContent,{workerScripts:e.workerScripts})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordions=void 0;const o=i(n(0)),s=n(930),l=n(151),c=n(23),u="ActiveScriptsUI";t.ServerAccordions=class extends o.Component{constructor(e){super(e),this.serverToScriptMap={},this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){l.WorkerScriptStartStopEventEmitter.addSubscriber({cb:this.rerender,id:u})}componentWillUnmount(){l.WorkerScriptStartStopEventEmitter.removeSubscriber(u)}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const n=c.getServer(t.serverIp);null!=n?(null==e[n.hostname]&&(e[n.hostname]={server:n,workerScripts:[]}),e[n.hostname].workerScripts.push(t)):console.warn(`WorkerScript has invalid IP address: ${t.serverIp}`)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return o.createElement(s.ServerAccordion,{key:e,server:t.server,workerScripts:t.workerScripts})});return o.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptProduction=void 0;const o=i(n(0)),s=n(21);t.ScriptProduction=function(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let n=0;for(const t of e.workerScripts.values())n+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return o.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-production-active"},o.createElement(s.Money,{money:n}))," / sec"),o.createElement("br",null),"Total online production since last Aug installation: ",o.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},o.createElement(s.Money,{money:e.p.scriptProdSinceLastAug}))," (",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},o.createElement(s.Money,{money:t}))," / sec"),")")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resleeve=void 0;const a=n(708),r=n(12),i=n(29);class o extends a.Person{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;e<this.augmentations.length;++e){const n=r.Augmentations[this.augmentations[e].name];null!=n?t+=n.startingCost:console.error(`Could not find Augmentation ${this.augmentations[e].name}`)}return 25e3*e+t*Math.pow(1.2,this.augmentations.length)}toJSON(){return i.Generic_toJSON("Resleeve",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Resleeve=o,i.Reviver.constructors.Resleeve=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateResleeves=t.purchaseResleeve=void 0;const a=n(933),r=n(12),i=n(200),o=n(3),s=n(44);t.purchaseResleeve=function(e,t){const n=e.getCost();if(!t.canAfford(n))return!1;t.loseMoney(n),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in r.Augmentations)r.Augmentations[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.AugmentationNames.NeuroFluxGovernor?t.augmentations.splice(e,1):r.Augmentations[o.AugmentationNames.NeuroFluxGovernor].owned=!0;for(let n=0;n<e.augmentations.length;++n)t.augmentations.push(new i.PlayerOwnedAugmentation(e.augmentations[n].name)),r.Augmentations[e.augmentations[n].name].owned=!0;for(let e=t.queuedAugmentations.length-1;e>=0;--e){const n=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.AugmentationNames.NeuroFluxGovernor&&e.name===n).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0},t.generateResleeves=function(){const e=[];for(let t=0;t<40;++t){const n=new a.Resleeve,i=5*t+1;n.hacking_exp=i*s.getRandomInt(1e3,5e3),n.strength_exp=i*s.getRandomInt(1e3,5e3),n.defense_exp=i*s.getRandomInt(1e3,5e3),n.dexterity_exp=i*s.getRandomInt(1e3,5e3),n.agility_exp=i*s.getRandomInt(1e3,5e3),n.charisma_exp=i*s.getRandomInt(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=s.getRandomInt(l,l+2),u=Object.keys(r.Augmentations);for(let e=0;e<c;++e){const e=s.getRandomInt(0,u.length-1),t=u[e];if(t===o.AugmentationNames.TheRedPill||t===o.AugmentationNames.NeuroFluxGovernor)continue;const a=r.Augmentations[t];if(null===a)throw new Error(`null augmentation: ${t}`);n.augmentations.push({name:a.name,level:1}),n.applyAugmentation(r.Augmentations[t]),n.updateStatLevels(),u.splice(e,1)}e.push(n)}return e}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MoreEarningsContent=void 0;const o=n(6),s=n(21),l=i(n(0)),c=n(282);t.MoreEarningsContent=function(e){return l.createElement(l.Fragment,null,c.StatsTable([["Money ",l.createElement(s.Money,{money:e.earningsForTask.money})],["Hacking Exp ",o.numeralWrapper.formatExp(e.earningsForTask.hack)],["Strength Exp ",o.numeralWrapper.formatExp(e.earningsForTask.str)],["Defense Exp ",o.numeralWrapper.formatExp(e.earningsForTask.def)],["Dexterity Exp ",o.numeralWrapper.formatExp(e.earningsForTask.dex)],["Agility Exp ",o.numeralWrapper.formatExp(e.earningsForTask.agi)],["Charisma Exp ",o.numeralWrapper.formatExp(e.earningsForTask.cha)]],"Earnings for Current Task:"),l.createElement("br",null),c.StatsTable([["Money: ",l.createElement(s.Money,{money:e.earningsForPlayer.money})],["Hacking Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.hack)],["Strength Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.str)],["Defense Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.def)],["Dexterity Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.dex)],["Agility Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.agi)],["Charisma Exp: ",o.numeralWrapper.formatExp(e.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),l.createElement("br",null),c.StatsTable([["Money: ",l.createElement(s.Money,{money:e.earningsForSleeves.money})],["Hacking Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.hack)],["Strength Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.str)],["Defense Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.def)],["Dexterity Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.dex)],["Agility Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.agi)],["Charisma Exp: ",o.numeralWrapper.formatExp(e.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),l.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MoreStatsContent=void 0;const o=n(6),s=n(282),l=i(n(0));t.MoreStatsContent=function(e){return l.createElement(l.Fragment,null,s.StatsTable([["Hacking: ",e.hacking_skill,`(${o.numeralWrapper.formatExp(e.hacking_exp)} exp)`],["Strength: ",e.strength,`(${o.numeralWrapper.formatExp(e.strength_exp)} exp)`],["Defense: ",e.defense,`(${o.numeralWrapper.formatExp(e.defense_exp)} exp)`],["Dexterity: ",e.dexterity,`(${o.numeralWrapper.formatExp(e.dexterity_exp)} exp)`],["Agility: ",e.agility,`(${o.numeralWrapper.formatExp(e.agility_exp)} exp)`],["Charisma: ",e.charisma,`(${o.numeralWrapper.formatExp(e.charisma_exp)} exp)`]],"Stats:"),l.createElement("br",null),s.StatsTable([["Hacking Level multiplier: ",o.numeralWrapper.formatPercentage(e.hacking_mult)],["Hacking Experience multiplier: ",o.numeralWrapper.formatPercentage(e.hacking_exp_mult)],["Strength Level multiplier: ",o.numeralWrapper.formatPercentage(e.strength_mult)],["Strength Experience multiplier: ",o.numeralWrapper.formatPercentage(e.strength_exp_mult)],["Defense Level multiplier: ",o.numeralWrapper.formatPercentage(e.defense_mult)],["Defense Experience multiplier: ",o.numeralWrapper.formatPercentage(e.defense_exp_mult)],["Dexterity Level multiplier: ",o.numeralWrapper.formatPercentage(e.dexterity_mult)],["Dexterity Experience multiplier: ",o.numeralWrapper.formatPercentage(e.dexterity_exp_mult)],["Agility Level multiplier: ",o.numeralWrapper.formatPercentage(e.agility_mult)],["Agility Experience multiplier: ",o.numeralWrapper.formatPercentage(e.agility_exp_mult)],["Charisma Level multiplier: ",o.numeralWrapper.formatPercentage(e.charisma_mult)],["Charisma Experience multiplier: ",o.numeralWrapper.formatPercentage(e.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",o.numeralWrapper.formatPercentage(e.faction_rep_mult)],["Company Reputation Gain multiplier: ",o.numeralWrapper.formatPercentage(e.company_rep_mult)],["Salary multiplier: ",o.numeralWrapper.formatPercentage(e.work_money_mult)],["Crime Money multiplier: ",o.numeralWrapper.formatPercentage(e.crime_money_mult)],["Crime Success multiplier: ",o.numeralWrapper.formatPercentage(e.crime_success_mult)]],"Multipliers:"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsElement=void 0;const o=n(6),s=i(n(0));t.StatsElement=function(e){let t={};return t={textAlign:"right"},s.createElement(s.Fragment,null,s.createElement("table",null,s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",{className:"character-hp-cell"},"HP: "),s.createElement("td",{className:"character-hp-cell",style:t},o.numeralWrapper.formatHp(e.hp)," / ",o.numeralWrapper.formatHp(e.max_hp))),s.createElement("tr",null,s.createElement("td",null,"City: "),s.createElement("td",{style:t},e.city)),s.createElement("tr",null,s.createElement("td",{className:"character-hack-cell"},"Hacking: "),s.createElement("td",{className:"character-hack-cell",style:t},o.numeralWrapper.formatSkill(e.hacking_skill))),s.createElement("tr",null,s.createElement("td",{className:"character-combat-cell"},"Strength: "),s.createElement("td",{className:"character-combat-cell",style:t},o.numeralWrapper.formatSkill(e.strength))),s.createElement("tr",null,s.createElement("td",{className:"character-combat-cell"},"Defense: "),s.createElement("td",{className:"character-combat-cell",style:t},o.numeralWrapper.formatSkill(e.defense))),s.createElement("tr",null,s.createElement("td",{className:"character-combat-cell"},"Dexterity: "),s.createElement("td",{className:"character-combat-cell",style:t},o.numeralWrapper.formatSkill(e.dexterity))),s.createElement("tr",null,s.createElement("td",{className:"character-combat-cell"},"Agility: "),s.createElement("td",{className:"character-combat-cell",style:t},o.numeralWrapper.formatSkill(e.agility))),s.createElement("tr",null,s.createElement("td",{className:"character-cha-cell"},"Charisma: "),s.createElement("td",{className:"character-cha-cell",style:t},o.numeralWrapper.formatSkill(e.charisma))),s.createElement("tr",null,s.createElement("td",{className:"character-int-cell"},"Shock: "),s.createElement("td",{className:"character-int-cell",style:t},o.numeralWrapper.formatSleeveShock(100-e.shock))),s.createElement("tr",null,s.createElement("td",{className:"character-int-cell"},"Sync: "),s.createElement("td",{className:"character-int-cell",style:t},o.numeralWrapper.formatSleeveSynchro(e.sync))),s.createElement("tr",null,s.createElement("td",{className:"character-int-cell"},"Memory: "),s.createElement("td",{className:"character-int-cell",style:t},o.numeralWrapper.formatSleeveMemory(e.memory))))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EarningsTableElement=void 0;const o=i(n(0));t.EarningsTableElement=function(e,t){return o.createElement(o.Fragment,null,o.createElement("pre",null,e),o.createElement("table",null,o.createElement("tbody",null,t.map((e,t)=>o.createElement("tr",{key:t},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right"}),o.createElement("td",{style:n,key:t},e)}))))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveFaq=void 0;const o=i(n(0));t.SleeveFaq=o.createElement(o.Fragment,null,o.createElement("strong",null,o.createElement("u",null,"How do Duplicate Sleeves work?")),o.createElement("br",null),"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation.",o.createElement("br",null),o.createElement("br",null),"Sleeves are their own individuals, which means they each have their own experience and stats.",o.createElement("br",null),o.createElement("br",null),"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Synchronization (Sync)?")),o.createElement("br",null),"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task.",o.createElement("br",null),o.createElement("br",null),"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.",o.createElement("br",null),o.createElement("br",null),"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Shock?")),o.createElement("br",null),"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve.",o.createElement("br",null),o.createElement("br",null),"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I work for this company or faction?")),o.createElement("br",null),"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why did my Sleeve stop working?")),o.createElement("br",null),"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"How do I buy Augmentations for my Sleeves?")),o.createElement("br",null),"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I buy the X Augmentation for my sleeve?")),o.createElement("br",null),"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Do sleeves get reset when installing Augmentations or switching BitNodes?")),o.createElement("br",null),"Sleeves are reset when switching BitNodes, but not when installing Augmentations.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Memory?")),o.createElement("br",null),"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.",o.createElement("br",null),o.createElement("br",null),"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createSleevePurchaseAugsPopup=void 0;const r=a(n(0)),i=n(546),o=n(12),s=n(21),l=n(13),c=n(52),u=n(147),m=n(481),p=n(96),d=n(412);t.createSleevePurchaseAugsPopup=function e(t,n){const a=t.augmentations.map(e=>e.name),h=i.findSleevePurchasableAugs(t,n),f="purchase-sleeve-augs-popup",g=[m.createPopupCloseButton(f,{innerText:"Cancel"}),c.createElement("p",{display:"block",innerHTML:"Owned Augmentations:"})],y=c.createElement("div",{width:"70%"});for(const e of a){const t=o.Augmentations[e];if(null==t){console.warn(`Invalid Augmentation: ${e}`);continue}let n=t.info;"string"!=typeof n&&(n=d.renderToStaticMarkup(n)),n+="<br /><br />",n+=d.renderToStaticMarkup(t.stats),y.appendChild(c.createElement("div",{class:"gang-owned-upgrade",innerText:e,tooltip:n}))}g.push(y);const _=c.createElement("p",{innerHTML:["You can purchase Augmentations for your Duplicate Sleeves. These Augmentations","have the same effect as they would for you. You can only purchase Augmentations","that you have unlocked through Factions.<br><br>","When purchasing an Augmentation for a Duplicate Sleeve, they are immediately","installed. This means that the Duplicate Sleeve will immediately lose all of","its stat experience."].join(" ")});g.push(_);for(const a of h){const i=c.createElement("div",{class:"cmpy-mgmt-upgrade-div"});let o=a.info;"string"!=typeof o&&(o=d.renderToStaticMarkup(o)),o+="<br /><br />",o+=d.renderToStaticMarkup(a.stats),i.appendChild(c.createElement("p",{fontSize:"12px",innerHTML:[`<h2>${a.name}</h2><br>`,`Cost: ${d.renderToStaticMarkup(r.default.createElement(s.Money,{money:a.startingCost,player:n}))}<br><br>`,`${o}`].join(" "),padding:"2px",clickListener:()=>{t.tryBuyAugmentation(n,a)?(l.dialogBoxCreate(`Installed ${a.name} on Duplicate Sleeve!`,!1),p.removeElementById(f),e(t,n)):l.dialogBoxCreate(`You cannot afford ${a.name}`,!1)}})),g.push(i)}u.createPopup(f,g)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Milestones=void 0;const a=n(17),r=n(23);function i(e,t){const n=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of n)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}t.Milestones=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,a.Factions.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,a.Factions.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,a.Factions["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,a.Factions.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=n(941),s=i(n(0));t.Root=function(e){const t=function(e,t){let n=-1;for(let a=0;a<t.length;a++)t[a].fulfilled(e)&&(n=a);return n}(e.player,o.Milestones),n=o.Milestones.map((n,a)=>{if(a<=t+1)return s.createElement("ul",{key:a},s.createElement("p",null,"[",n.fulfilled(e.player)?"x":" ","] ",n.title))});return s.createElement(s.Fragment,null,s.createElement("h1",null,"Milestones"),s.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),s.createElement("br",null),s.createElement("h2",null,"Completing fl1ght.exe"),s.createElement("li",null,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.libSource=void 0,t.libSource="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise<string>;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise<void>;\n grow(ip: string, threads: number, stock: boolean): Promise<string>;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise<string>;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise<boolean>;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise<string>;\n installBackdoor(): Promise<void>;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationPrereq(name: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsPopup=void 0;const o=i(n(0)),s=n(54),l=n(40);t.OptionsPopup=function(e){const[t,n]=o.useState(e.options.theme),[a,r]=o.useState(e.options.insertSpaces);return o.default.createElement("div",{className:"editor-options-container noselect"},o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Theme: "),o.default.createElement("select",{className:"dropdown",onChange:e=>n(e.target.value),defaultValue:t},o.default.createElement("option",{value:"vs-dark"},"vs-dark"),o.default.createElement("option",{value:"light"},"light"))),o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Use whitespace over tabs: "),o.default.createElement("input",{type:"checkbox",onChange:e=>r(e.target.checked),checked:a})),o.default.createElement("br",null),o.default.createElement(s.StdButton,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:a}),l.removePopup(e.id)}}))}},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CorruptableText=void 0;const o=i(n(0));t.CorruptableText=function(e){const[t,n]=o.useState(e.content);return o.useEffect(()=>{let e=5;const a=setInterval(()=>{if(--e>0)return;e=5*Math.random();const a=Math.random()*t.length,r=t.charAt(a);n(function(e,t,n){return e.substring(0,t)+n+e.substring(t+1)}(t,a,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],n=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const a of n)if(a.includes(e))return t(a);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{n(t)},50)},100);return()=>{clearInterval(a)}},[]),o.default.createElement("span",null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlotMachine=void 0;const o=i(n(0)),s=n(54),l=n(21),c=n(295),u=n(400),m=n(478),p=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function d(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const h=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]],f=0,g=1e6;t.SlotMachine=class extends u.Game{constructor(e){super(e),this.interval=-1,this.rng=new c.WHRNG(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const n in t)(t[n]!==this.state.locks[n]||e)&&(t[n]=(t[n]+1)%p.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[p[(this.state.index[0]+p.length-1)%p.length],p[(this.state.index[1]+p.length-1)%p.length],p[(this.state.index[2]+p.length-1)%p.length],p[(this.state.index[3]+p.length-1)%p.length],p[(this.state.index[4]+p.length-1)%p.length]],[p[this.state.index[0]],p[this.state.index[1]],p[this.state.index[2]],p[this.state.index[3]],p[this.state.index[4]]],[p[(this.state.index[0]+1)%p.length],p[(this.state.index[1]+1)%p.length],p[(this.state.index[2]+1)%p.length],p[(this.state.index[3]+1)%p.length],p[(this.state.index[4]+1)%p.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const n=[];for(const a of t)n.push(e[a[0]][a[1]]);return n},n=function(e){let t=1;for(let n=1;n<e.length&&e[n]===e[n-1];n++)t++;return t};let a=-this.state.investment;for(const e of h){const r=t(e),i=n(r);if(i<3)continue;const o=d(r[0],i-3);a+=this.state.investment*o,this.win(this.props.p,this.state.investment*o)}this.setState({status:o.createElement(o.Fragment,null,a>0?"gained":"lost"," ",o.createElement(l.Money,{money:Math.abs(a)})),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=f),t>g&&(t=g),t<f&&(t=f),this.setState({investment:t})}render(){const e=this.getTable();return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————————————————————+",o.createElement("br",null),"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[this.state.index[0]]," | ",p[this.state.index[1]]," | ",p[this.state.index[2]]," | ",p[this.state.index[3]]," | ",p[this.state.index[4]]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[(this.state.index[0]+1)%p.length]," | ",p[(this.state.index[1]+1)%p.length]," | ",p[(this.state.index[2]+1)%p.length]," | ",p[(this.state.index[3]+1)%p.length]," | ",p[(this.state.index[4]+1)%p.length]," | |",o.createElement("br",null),"+———————————————————————+",o.createElement("br",null)),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement(s.StdButton,{onClick:m.trusted(this.play),text:"Spin!",disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("h2",null,"Pay lines"),o.createElement("pre",null,"----- ····· ····· ",o.createElement("br",null),"····· ----- ····· ",o.createElement("br",null),"····· ····· ----- ",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"··^·· \\···/ \\···/",o.createElement("br",null),"·/·\\· ·\\·/· ·---·",o.createElement("br",null),"/···\\ ··v·· ·····",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"····· ·---· ·····",o.createElement("br",null),"·---· /···\\ \\···/",o.createElement("br",null),"/···\\ ····· ·---·",o.createElement("br",null)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Roulette=void 0;const o=i(n(0)),s=n(54),l=n(21),c=n(400),u=n(295),m=n(478),p=0,d=1e7;const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],f={Red:{match:e=>0!==e&&h.includes(e),payout:1},Black:{match:e=>!h.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function g(e){return{match:t=>e===t,payout:36}}t.Roulette=class extends c.Game{constructor(e){super(e),this.interval=-1,this.rng=new u.WHRNG((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=p),t>d&&(t=d),t<p&&(t=p),this.setState({investment:t})}currentNumber(){if(0===this.state.n)return"0";const e=function(e){return[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(e)}(this.state.n)?"R":"B";return`${this.state.n}${e}`}play(e){this.reachedLimit(this.props.p)||(this.setState({canPlay:!1,lock:!1,status:"playing",strategy:e}),setTimeout(()=>{let e=Math.floor(37*this.rng.random()),t=o.createElement(o.Fragment,null),n=0,a=this.state.strategy.match(e);if(a&&Math.random()>.9)for(a=!1;this.state.strategy.match(e);)e++;a?(n=this.state.investment*this.state.strategy.payout,t=o.createElement(o.Fragment,null,"won ",o.createElement(l.Money,{money:n}))):(n=-this.state.investment,t=o.createElement(o.Fragment,null,"lost ",o.createElement(l.Money,{money:-n}))),this.win(this.props.p,n),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return o.createElement(o.Fragment,null,o.createElement("h1",null,this.currentNumber()),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"3",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(3)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"6",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(6)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"9",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(9)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(12)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"15",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(15)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"18",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(18)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"21",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(21)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(24)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"27",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(27)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"30",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(30)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"33",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(33)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(36)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"2",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(2)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"5",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(5)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"8",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(8)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"11",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(11)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"14",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(14)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"17",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(17)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"20",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(20)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"23",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(23)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"26",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(26)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"29",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(29)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"32",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(32)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"35",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(35)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"1",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(1)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"4",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(4)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"7",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(7)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"10",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(10)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"13",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(13)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"16",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(16)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"19",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(19)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"22",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(22)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"25",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(25)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"28",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(28)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"31",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(31)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"34",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(34)))}))),o.createElement("tr",null,o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"1 to 12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Third1))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"13 to 24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Third2))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"25 to 36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Third3))}))),o.createElement("tr",null,o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Red",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Red))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Black",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Black))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Odd",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Odd))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Even",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Even))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"High",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.High))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Low",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(f.Low))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"0",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(0)))}))))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinFlip=void 0;const o=i(n(0)),s=n(54),l=n(295),c=n(400),u=n(478),m=0,p=1e4;t.CoinFlip=class extends c.Game{constructor(e){super(e),this.state={investment:1e3,result:o.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=m),t>p&&(t=p),t<m&&(t=m),this.setState({investment:t})}play(e){if(this.reachedLimit(this.props.p))return;let t;const n=e===(t=l.BadRNG.random()<.5?"H":"T");this.setState({result:o.createElement("span",{className:n?"text":"failure"},t),status:n?" win!":"lose!",playLock:!0}),setTimeout(()=>this.setState({playLock:!1}),250),n?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————+",o.createElement("br",null),"| | | |",o.createElement("br",null),"| | ",this.state.result," | |",o.createElement("br",null),"| | | |",o.createElement("br",null),"+———————+",o.createElement("br",null)),o.createElement("span",{className:"text"},"Play for: "),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),o.createElement("br",null),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),o.createElement("h1",null,this.state.status))}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiPaper=void 0;const r=a(n(0)),i=n(399),o=i.makeStyles({root:{backgroundColor:"rgb(30, 30, 30)",border:"2px solid #000",borderRadius:"10px",display:"inline-block",flexWrap:"wrap",padding:"10px"}});t.MuiPaper=(e=>r.default.createElement(i.Paper,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiButton=void 0;const r=a(n(0)),i=n(399),o=i.makeStyles({root:{backgroundColor:"#555",border:"1px solid #333",color:"white",margin:"5px",padding:"3px 5px","&:hover":{backgroundColor:"#666"}},textPrimary:{color:"rgb( 144, 202, 249)"},textSecondary:{color:"rgb(244, 143, 177)"},disabled:{backgroundColor:"#333",color:"#fff",cursor:"default"}});t.MuiButton=(e=>r.default.createElement(i.Button,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiTextField=void 0;const r=a(n(0)),i=n(399),o={backgroundColor:"rgba(57, 54, 54, 0.9)","&:hover":{backgroundColor:"rgba(70, 70, 70, 0.9)"}},s=Object.assign({border:"1px solid #e2e2e1",overflow:"hidden",borderRadius:4,color:"white"},o),l=i.makeStyles({root:Object.assign({},s)}),c=i.makeStyles({root:Object.assign(Object.assign({},o),{color:"white"}),focused:{backgroundColor:"rgba(70, 70, 70, 0.9)"},disabled:{color:"white"}}),u=i.makeStyles({root:{color:"white"},focused:{color:"white !important"},disabled:{color:"white !important"}});t.MuiTextField=(e=>{var t,n;return r.default.createElement(i.TextField,Object.assign({},e,{classes:Object.assign(Object.assign({},l()),e.classes),InputProps:Object.assign({classes:Object.assign(Object.assign({},c()),null===(t=e.InputProps)||void 0===t?void 0:t.classes)},e.InputProps),InputLabelProps:Object.assign({classes:Object.assign(Object.assign({},u()),null===(n=e.InputLabelProps)||void 0===n?void 0:n.classes)},e.InputLabelProps)}))})},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCard=void 0;const r=a(n(0)),i=n(657);t.ReactCard=(({card:e,hidden:t})=>{let n;switch(e.suit){case i.Suit.Clubs:n=r.default.createElement("span",null,"♣");break;case i.Suit.Diamonds:n=r.default.createElement("span",null,"♦");break;case i.Suit.Hearts:n=r.default.createElement("span",null,"♥");break;case i.Suit.Spades:n=r.default.createElement("span",null,"♠");break;default:throw new Error(`MissingCaseException: ${e.suit}`)}return r.default.createElement("div",{className:`casino-card ${e.isRedSuit()?"red":"black"}`},r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.default.createElement("div",{className:"suit"},t?" - ":n)))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hand=void 0;class a{constructor(e){this.cards=e}addCards(...e){return new a([...this.cards,...e])}removeByIndex(e){if(e>=this.cards.length)throw new Error(`Tried to remove invalid card from Hand by index: ${e}`);return new a([...this.cards.slice().splice(e,1)])}}t.Hand=a},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deck=void 0;const a=n(657),r=n(958);t.Deck=class{constructor(e=1){this.numDecks=e,this.cards=[],this.reset()}shuffle(){this.cards=r.shuffle(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t<this.numDecks;++t)this.cards.push(new a.Card(e,a.Suit.Clubs)),this.cards.push(new a.Card(e,a.Suit.Diamonds)),this.cards.push(new a.Card(e,a.Suit.Hearts)),this.cards.push(new a.Card(e,a.Suit.Spades));this.shuffle()}size(){return this.cards.length}isEmpty(){return 0===this.cards.length}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Blackjack=void 0;const o=i(n(0)),s=n(21),l=n(400),c=n(959),u=n(956),m=n(399),p=n(955),d=n(954),h=n(953),f=n(952),g=1e8;var y;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(y||(y={}));t.Blackjack=class extends l.Game{constructor(e){super(e),this.canStartGame=(()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),this.startGame=(()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:y.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(y.Tie):this.finishGame(y.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(y.DealerWon)}),this.getHandValue=(e=>{let t=[0];for(let n=0;n<e.cards.length;++n){const a=e.cards[n].value;t=a>=10?t.map(e=>e+10):1===a?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+a)}return t}),this.getTrueHandValue=(e=>{const t=this.getHandValue(e),n=t.filter(e=>e<=21);return n.length>0?(n.sort((e,t)=>e-t),n[n.length-1]):t[0]}),this.getHandDisplayValues=(e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),this.isHandBusted=(e=>this.getTrueHandValue(e)>21),this.playerHit=(e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(y.DealerWon)}),this.playerStay=(e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;this.getTrueHandValue(t)<=16;)t=t.addCards(this.deck.safeDrawCard());if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(y.PlayerWon);else{const e=this.getTrueHandValue(t),n=this.getTrueHandValue(this.state.playerHand);if(e>21||n>21)throw new Error("Someone busted when not expected to");n>e?this.finishGame(y.PlayerWon):n<e?this.finishGame(y.DealerWon):this.finishGame(y.Tie)}}),this.finishGame=(e=>{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===y.DealerWon?t=-1*this.state.bet:e===y.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),this.isPlayerWinResult=(e=>e===y.PlayerWon||e===y.PlayerWonByBlackjack),this.wagerOnChange=(e=>{const{p:t}=this.props,n=e.target.value,a=Math.round(parseFloat(n));isNaN(a)?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):a<=0?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):a>g?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(a)?this.setState({bet:a,betInput:n,wagerInvalid:!1,wagerInvalidHelperText:"",result:y.Pending}):this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),this.startOnClick=(e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new c.Deck(5),this.state={playerHand:new u.Hand([]),dealerHand:new u.Hand([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:y.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:n,gameInProgress:a,result:r,wagerInvalid:i,wagerInvalidHelperText:l,gains:c}=this.state,u=this.getHandDisplayValues(t),_=this.getHandDisplayValues(n);return o.createElement("div",null,o.createElement("div",null,o.createElement(d.MuiTextField,{value:e,label:o.createElement(o.Fragment,null,"Wager (Max: ",o.createElement(s.Money,{money:g}),")"),disabled:a,onChange:this.wagerOnChange,error:i,helperText:i?l:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:o.createElement(m.InputAdornment,{position:"start"},"$")}}),o.createElement("p",null,"Total earnings this session: ",o.createElement(s.Money,{money:c}))),a?o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.playerHit},"Hit"),o.createElement(h.MuiButton,{color:"secondary",onClick:this.playerStay},"Stay")):o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.startOnClick,disabled:i||!this.canStartGame()},"Start")),(a||r!==y.Pending)&&o.createElement("div",null,o.createElement(f.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Player"),t.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,key:t})),o.createElement("pre",null,"Value(s): "),u.map((e,t)=>o.createElement("pre",{key:t},e))),o.createElement("br",null),o.createElement(f.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Dealer"),n.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,hidden:a&&0!==t,key:t})),!a&&o.createElement(o.Fragment,null,o.createElement("pre",null,"Value(s): "),_.map((e,t)=>o.createElement("pre",{key:t},e))))),r!==y.Pending&&o.createElement("p",null,r,this.isPlayerWinResult(r)&&o.createElement(o.Fragment,null," You gained ",o.createElement(s.Money,{money:this.state.bet})),r===y.DealerWon&&o.createElement(o.Fragment,null," You lost ",o.createElement(s.Money,{money:this.state.bet}))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CasinoLocation=void 0;const o=i(n(0)),s=n(960),l=n(951),c=n(950),u=n(949),m=n(54);var p;!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(p||(p={}));t.CasinoLocation=class extends o.Component{constructor(e){super(e),this.state={game:p.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Coin),text:"Play coin flip"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Slots),text:"Play slots"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Roulette),text:"Play roulette"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case p.Coin:e=o.createElement(l.CoinFlip,{p:this.props.p});break;case p.Slots:e=o.createElement(u.SlotMachine,{p:this.props.p});break;case p.Roulette:e=o.createElement(c.Roulette,{p:this.props.p});break;case p.Blackjack:e=o.createElement(s.Blackjack,{p:this.props.p});break;case p.None:break;default:throw new Error(`MissingCaseException: ${this.state.game}`)}return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.None),text:"Stop playing"}),e)}render(){return this.state.game===p.None?this.renderGames():this.renderGame()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UniversityLocation=void 0;const o=i(n(0)),s=n(11),l=n(23),c=n(38),u=n(54),m=n(21);t.UniversityLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(s.CONSTANTS.ClassStudyComputerScience)}dataStructures(){this.take(s.CONSTANTS.ClassDataStructures)}networks(){this.take(s.CONSTANTS.ClassNetworks)}algorithms(){this.take(s.CONSTANTS.ClassAlgorithms)}management(){this.take(s.CONSTANTS.ClassManagement)}leadership(){this.take(s.CONSTANTS.ClassLeadership)}render(){const e=this.calculateCost(),t=s.CONSTANTS.ClassDataStructuresBaseCost*e,n=s.CONSTANTS.ClassNetworksBaseCost*e,a=s.CONSTANTS.ClassAlgorithmsBaseCost*e,r=s.CONSTANTS.ClassManagementBaseCost*e,i=s.CONSTANTS.ClassLeadershipBaseCost*e;return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.dataStructures,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Data Structures course (",o.createElement(m.Money,{money:t,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.networks,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Networks course (",o.createElement(m.Money,{money:n,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.algorithms,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Algorithms course (",o.createElement(m.Money,{money:a,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.management,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Management course (",o.createElement(m.Money,{money:r,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}),o.createElement(u.StdButton,{onClick:this.leadership,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Leadership course (",o.createElement(m.Money,{money:i,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelAgencyLocation=void 0;const o=i(n(0)),s=n(43),l=n(401),c=n(11),u=n(25),m=n(54),p=n(21);t.TravelAgencyLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){const e=e=>e.city!==this.props.p.city?o.createElement("span",{className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:l.createTravelPopup.bind(null,e.city,this.props.travel)},o.createElement("span",{className:"tooltiptext"},e.city),e.city[0]):o.createElement("span",null,e.city[0]);return o.createElement("div",{className:"noselect"},o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",o.createElement(p.Money,{money:c.CONSTANTS.TravelCost,player:this.props.p}),"."),o.createElement("pre",null," ,_ . ._. _. ."),o.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),o.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),o.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",o.createElement(e,{city:"Volhaven"}),",'|~ ._/-, /~"),o.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),o.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",o.createElement(e,{city:"Chongqing"})," /,"),o.createElement("pre",null," '\\ ",o.createElement(e,{city:"Sector-12"})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),o.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",o.createElement(e,{city:"New Tokyo"})),o.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),o.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),o.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),o.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),o.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),o.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),o.createElement("pre",null," \\, ",o.createElement(e,{city:"Aevum"})," / \\ / /| ,-, , -,"),o.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),o.createElement("pre",null," ,| ,/ \\ ,/ \\ ",o.createElement(e,{city:"Ishima"})," |"),o.createElement("pre",null," / | ~ -~~-, / _"),o.createElement("pre",null," | ,-' ~ /"),o.createElement("pre",null," / ,' ~"),o.createElement("pre",null," ',| ~"),o.createElement("pre",null," ~'"))}listWorldMap(){const e=[];for(const t in s.CityName){const n=s.CityName[t];n!==this.props.p.city&&e.push(o.createElement(m.StdButton,{key:n,onClick:l.createTravelPopup.bind(null,n,this.props.travel),style:this.btnStyle,text:`Travel to ${n}`}))}return o.createElement("div",null,o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",o.createElement(p.Money,{money:c.CONSTANTS.TravelCost}),"."),e)}render(){return u.Settings.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CoresButton=void 0;const o=i(n(0)),s=n(407),l=n(54),c=n(21),u=n(419);t.CoresButton=function(e){const t=o.useState(!1)[1],n={display:"block"},a=e.p.getHomeComputer(),r=a.cpuCores>=8;if(r)return o.default.createElement(s.StdButtonPurchased,{style:n,text:"Upgrade 'home' cores - MAX"});const i=1e9*Math.pow(7.5,a.cpuCores);return o.default.createElement(l.StdButton,{disabled:!e.p.canAfford(i),onClick:function(){r||e.p.canAfford(i)&&(e.p.loseMoney(i),a.cpuCores++,t(e=>!e))},style:n,text:o.default.createElement(o.default.Fragment,null,"Upgrade 'home' cores (",a.cpuCores," -> ",a.cpuCores+1,") - ",o.default.createElement(c.Money,{money:i,player:e.p})),tooltip:o.default.createElement(u.MathComponent,{tex:String.raw`\large{cost = 10^9 \times 7.5 ^{\text{cores}}}`})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TorButton=void 0;const o=i(n(0)),s=n(401),l=n(11),c=n(407),u=n(54),m=n(21);t.TorButton=function(e){const t=o.useState(!1)[1],n={display:"block"};return e.p.hasTorRouter()?o.default.createElement(c.StdButtonPurchased,{style:n,text:"TOR Router - Purchased"}):o.default.createElement(u.StdButton,{disabled:!e.p.canAfford(l.CONSTANTS.TorRouterCost),onClick:function(){s.purchaseTorRouter(e.p),t(e=>!e)},style:n,text:o.default.createElement(o.default.Fragment,null,"Purchase TOR router - ",o.default.createElement(m.Money,{money:l.CONSTANTS.TorRouterCost,player:e.p}))})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RamButton=void 0;const o=i(n(0)),s=n(11),l=n(127),c=n(407),u=n(54),m=n(21),p=n(419);t.RamButton=function(e){const t=o.useState(!1)[1],n={display:"block"},a=e.p.getHomeComputer();if(a.maxRam>=s.CONSTANTS.HomeComputerMaxRam)return o.default.createElement(c.StdButtonPurchased,{style:n,text:"Upgrade 'home' RAM - MAX"});const r=e.p.getUpgradeHomeRamCost();return o.default.createElement(u.StdButton,{disabled:!e.p.canAfford(r),onClick:function(){l.purchaseRamForHomeComputer(e.p),t(e=>!e)},style:n,text:o.default.createElement(o.default.Fragment,null,"Upgrade 'home' RAM (",a.maxRam,"GB -> ",2*a.maxRam,"GB) - ",o.default.createElement(m.Money,{money:r,player:e.p})),tooltip:o.default.createElement(p.MathComponent,{tex:String.raw`\large{3.2 \times 10^3 \times 1.58^{log_2{(ram)}}}`})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TechVendorLocation=void 0;const o=i(n(0)),s=n(401),l=n(966),c=n(965),u=n(964),m=n(127),p=n(54),d=n(21);t.TechVendorLocation=function(e){const t={display:"block"},n=[];for(let a=e.loc.techVendorMinRam;a<=e.loc.techVendorMaxRam;a*=2){const r=m.getPurchaseServerCost(a);n.push(o.createElement(p.StdButton,{key:a,onClick:()=>s.createPurchaseServerPopup(a,e.p),style:t,text:o.createElement(o.Fragment,null,"Purchase ",a,"GB Server - ",o.createElement(d.Money,{money:r,player:e.p})),disabled:!e.p.canAfford(r)}))}return o.createElement("div",null,n,o.createElement("br",null),o.createElement("p",{className:"noselect"},o.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),o.createElement("br",null),o.createElement(c.TorButton,{p:e.p}),o.createElement(l.RamButton,{p:e.p}),o.createElement(u.CoresButton,{p:e.p}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialLocation=void 0;const o=i(n(0)),s=n(401),l=n(41),c=n(482),u=n(54),m=n(13);t.SpecialLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){s.createStartCorporationPopup(this.props.p)}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),m.dialogBoxCreate("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else m.dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return o.createElement(u.StdButton,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return o.createElement(u.StdButton,{onClick:function(){m.dialogBoxCreate(o.createElement(o.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?o.createElement(c.AutoupdatingStdButton,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?o.createElement(u.StdButton,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case l.LocationName.NewTokyoVitaLife:return this.renderResleeving();case l.LocationName.Sector12CityHall:return this.renderCreateCorporation();case l.LocationName.Sector12NSA:return this.renderBladeburner();case l.LocationName.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlumsLocation=void 0;const o=i(n(0)),s=n(170),l=n(6),c=n(482);t.SlumsLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&s.Crimes.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&s.Crimes.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&s.Crimes.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&s.Crimes.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&s.Crimes.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&s.Crimes.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&s.Crimes.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&s.Crimes.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&s.Crimes.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&s.Crimes.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&s.Crimes.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&s.Crimes.Heist.commit(this.props.p)}render(){const e=s.Crimes.Shoplift.successRate(this.props.p),t=s.Crimes.RobStore.successRate(this.props.p),n=s.Crimes.Mug.successRate(this.props.p),a=s.Crimes.Larceny.successRate(this.props.p),r=s.Crimes.DealDrugs.successRate(this.props.p),i=s.Crimes.BondForgery.successRate(this.props.p),u=s.Crimes.TraffickArms.successRate(this.props.p),m=s.Crimes.Homicide.successRate(this.props.p),p=s.Crimes.GrandTheftAuto.successRate(this.props.p),d=s.Crimes.Kidnap.successRate(this.props.p),h=s.Crimes.Assassination.successRate(this.props.p),f=s.Crimes.Heist.successRate(this.props.p);return o.createElement("div",null,o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${l.numeralWrapper.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${l.numeralWrapper.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${l.numeralWrapper.formatPercentage(n)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${l.numeralWrapper.formatPercentage(a)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${l.numeralWrapper.formatPercentage(r)} chance of success)`,tooltip:"Attempt to deal drugs"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${l.numeralWrapper.formatPercentage(i)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${l.numeralWrapper.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${l.numeralWrapper.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${l.numeralWrapper.formatPercentage(p)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${l.numeralWrapper.formatPercentage(d)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${l.numeralWrapper.formatPercentage(h)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${l.numeralWrapper.formatPercentage(f)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HospitalLocation=void 0;const o=i(n(0)),s=n(429),l=n(482),c=n(21),u=n(13);t.HospitalLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return s.getHospitalizationCost(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),u.dialogBoxCreate(o.createElement(o.Fragment,null,"You were healed to full health! The hospital billed you for ",o.createElement(c.Money,{money:t})))}render(){const e=this.getCost();return o.createElement(l.AutoupdatingStdButton,{onClick:this.getHealed,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Get treatment for wounds - ",o.createElement(c.Money,{money:e,player:this.props.p}))})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GymLocation=void 0;const o=i(n(0)),s=n(11),l=n(23),c=n(38),u=n(54),m=n(21);t.GymLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(s.CONSTANTS.ClassGymStrength)}trainDefense(){this.train(s.CONSTANTS.ClassGymDefense)}trainDexterity(){this.train(s.CONSTANTS.ClassGymDexterity)}trainAgility(){this.train(s.CONSTANTS.ClassGymAgility)}render(){const e=s.CONSTANTS.ClassGymBaseCost*this.calculateCost();return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.trainStrength,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Strength (",o.createElement(m.Money,{money:e,player:this.props.p})," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDefense,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Defense (",o.createElement(m.Money,{money:e,player:this.props.p})," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDexterity,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Dexterity (",o.createElement(m.Money,{money:e,player:this.props.p})," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainAgility,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Agility (",o.createElement(m.Money,{money:e,player:this.props.p})," / sec)")}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyToJobButton=void 0;const o=i(n(0)),s=n(457),l=n(54);t.ApplyToJobButton=class extends o.Component{constructor(e){super(e),this.getJobRequirementTooltip=this.getJobRequirementTooltip.bind(this)}getJobRequirementTooltip(){const e=this.props.p.getNextCompanyPosition(this.props.company,this.props.entryPosType);return null==e?"":this.props.company.hasPosition(e)?s.getJobRequirementText(this.props.company,e,!0):""}render(){return o.createElement(l.StdButton,{onClick:this.props.onClick,style:this.props.style,text:this.props.text,tooltip:this.getJobRequirementTooltip()})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyLocation=void 0;const o=i(n(0)),s=n(972),l=n(425),c=n(32),u=n(298),m=n(53),p=i(n(58)),d=n(54),h=n(60),f=n(710),g=n(63),y={display:"block"};t.CompanyLocation=class extends o.Component{constructor(e){if(super(e),this.companyPosition=null,this.jobTitle=null,this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=l.Locations[e.locName],null==this.location)throw new Error(`CompanyLocation component constructed with invalid location: ${e.locName}`);if(this.company=c.Companies[e.locName],null==this.company)throw new Error(`CompanyLocation component constructed with invalid company: ${e.locName}`);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=m.CompanyPositions[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;t.infiltrationData?(this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel),t.infiltrationData):console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`)}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof u.CompanyPosition&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;const t=g.yesNoBoxGetYesButton(),n=g.yesNoBoxGetNoButton();null!=t&&null!=n&&(t.innerHTML="Quit job",n.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),g.yesNoBoxClose()}),n.addEventListener("click",()=>{g.yesNoBoxClose()}),g.yesNoBoxCreate(o.createElement(o.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return o.createElement("div",null,e&&o.createElement("div",null,o.createElement("p",null,"Job Title: ",this.jobTitle),o.createElement("br",null),o.createElement("p",{style:y},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company reputation: ",h.Reputation(this.company.playerReputation),o.createElement("span",{className:"tooltiptext"},"You will earn ",f.Favor(t[0])," company favor upon resetting after installing Augmentations")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:y},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company Favor: ",f.Favor(this.company.favor),o.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:y},"-------------------------"),o.createElement("br",null),o.createElement(d.StdButton,{onClick:this.work,text:"Work"})," ",o.createElement(d.StdButton,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.AgentCompanyPositions[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessConsultantCompanyPositions[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessCompanyPositions[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.ITCompanyPositions[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SecurityCompanyPositions[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareConsultantCompanyPositions[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareCompanyPositions[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&o.createElement(d.StdButton,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GenericLocation=void 0;const o=i(n(0)),s=n(973),l=n(971),c=n(970),u=n(969),m=n(968),p=n(967),d=n(963),h=n(962),f=n(961),g=n(490),y=n(25),_=n(38),b=n(23),v=n(54),k=n(948);t.GenericLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(g.LocationType.Company)&&e.push(o.createElement(s.CompanyLocation,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Gym)&&e.push(o.createElement(l.GymLocation,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Hospital)&&e.push(o.createElement(c.HospitalLocation,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Slums)&&e.push(o.createElement(u.SlumsLocation,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Special)&&e.push(o.createElement(m.SpecialLocation,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TechVendor)&&e.push(o.createElement(p.TechVendorLocation,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TravelAgency)&&e.push(o.createElement(d.TravelAgencyLocation,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(g.LocationType.University)&&e.push(o.createElement(h.UniversityLocation,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Casino)&&e.push(o.createElement(f.CasinoLocation,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=_.SpecialServerIps.getIp(this.props.loc.name),n=b.getServer(t),a=null!==n&&b.isBackdoorInstalled(n);return o.createElement("div",null,o.createElement(v.StdButton,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),o.createElement("h1",{className:"noselect"},a&&!y.Settings.DisableTextEffects?o.createElement(k.CorruptableText,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LocationCity=void 0;const o=i(n(0)),s=n(25),l=n(54);t.LocationCity=class extends o.Component{asciiCity(){const e=e=>e?o.createElement("span",{key:e,className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},"X"):o.createElement("span",null,"*"),t=/[A-Z]/g,n={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},a=a=>{const r=[],i=[];let o;for(;null!==(o=t.exec(a));)i.push(o);if(0===i.length)return r.push(a),r;for(let t=0;t<i.length;t++){const o=0===t?0:i[t-1].index+1,s=i[t].index;r.push(a.slice(o,s));const l=n[a[i[t].index]];r.push(e(this.props.city.locations[l]))}return r.push(a.slice(i[i.length-1].index+1)),r},r=[],i=this.props.city.asciiArt.split("\n");for(const e in i)r.push(o.createElement("pre",{key:e},a(i[e])));return o.createElement("div",{className:"noselect"},r)}listCity(){const e=this.props.city.locations.map(e=>o.createElement("li",{key:e},o.createElement(l.StdButton,{onClick:this.props.enterLocation.bind(this,e),text:e})));return o.createElement("ul",null,e)}render(){return o.createElement(o.Fragment,null,s.Settings.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Victory=void 0;const s=n(17),l=i(n(0)),c=n(54),u=o(n(89)),m=n(21),p=n(60),d=n(19);t.Victory=function(e){const[t,n]=l.useState("none");function a(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const r=e.MaxLevel*Math.pow(1.01,e.MaxLevel),i=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*r*d.BitNodeMultipliers.InfiltrationRep,o=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*r*d.BitNodeMultipliers.InfiltrationMoney;return l.default.createElement(l.default.Fragment,null,l.default.createElement(u.default,{container:!0,spacing:3},l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h1",null,"Infiltration successful!")),l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),l.default.createElement("select",{className:"dropdown",onChange:function(e){n(e.target.value)}},l.default.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>s.Factions[e].getInfo().offersWork()).map(e=>l.default.createElement("option",{key:e,value:e},e))),l.default.createElement(c.StdButton,{onClick:function(){"none"!==t&&(s.Factions[t].playerReputation+=i,a())},text:l.default.createElement(l.default.Fragment,null,"Trade for ",p.Reputation(i)," reputation")})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:function(){e.Player.gainMoney(o),e.Player.recordMoneySource(o,"infiltration"),a()},text:l.default.createElement(l.default.Fragment,null,"Sell for ",l.default.createElement(m.Money,{money:o}))})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:a,text:"Quit"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WireCuttingGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(220),p=n(161),d={Trivial:{timer:9e3,wiresmin:4,wiresmax:4,rules:2},Normal:{timer:7e3,wiresmin:6,wiresmax:6,rules:2},Hard:{timer:5e3,wiresmin:8,wiresmax:8,rules:3},Impossible:{timer:4e3,wiresmin:9,wiresmax:9,rules:4}},h=["|",".","/","-","█","#"],f=["red","#FFC107","blue","white"],g={red:"red","#FFC107":"yellow",blue:"blue",white:"white"};function y(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,n)=>t===n}}function _(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${g[t]}.`,shouldCut:e=>e.colors.includes(t)}}t.WireCuttingGame=function(e){const t={timer:0,wiresmin:0,wiresmax:0,rules:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[],n=m.random(e.wiresmin,e.wiresmax);for(let e=0;e<n;e++){const e=[f[Math.floor(Math.random()*f.length)]];Math.random()<.15&&e.push(f[Math.floor(Math.random()*f.length)]),t.push({tpe:h[Math.floor(Math.random()*h.length)],colors:e})}return t}(t)),[r,i]=s.useState(new Array(a.length).fill(!1)),[o]=s.useState(function(e,t){const n=t.rules,a=[y,_],r=[];for(let t=0;t<n;t++)r.push(a[t%2](e));return r}(a,t));return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Cut the wires with the following properties! (keyboard 1 to 9)"),o.map((e,t)=>s.default.createElement("h3",{key:t},e.toString())),s.default.createElement("pre",null,new Array(a.length).fill(0).map((e,t)=>s.default.createElement("span",{key:t}," ",t+1," "))),new Array(8).fill(0).map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,a.map((e,n)=>3!==t&&4!==t||!r[n]?s.default.createElement("span",{key:n,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"| "):s.default.createElement("span",{key:n}," "))))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=parseInt(t.key);n<1||n>a.length||isNaN(n)||i(t=>{const r=[...t];r[n-1]=!0,o.some(e=>e.shouldCut(a[n-1],n-1))||e.onFailure();const i=[];for(let e=0;e<a.length;e++){let t=!1;for(let n=0;n<o.length;n++)t=t||o[n].shouldCut(a[e],e);i.push(t)}return i.every((e,t)=>e===r[t])&&e.onSuccess(),r})},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MinesweeperGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(161),p=n(220),d={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function h(e){const t=[];for(let n=0;n<e.height;n++)t.push(new Array(Math.round(e.width)).fill(!1));return t}t.MinesweeperGame=function(e){const t={timer:0,width:0,height:0,mines:0};m.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=h(e);for(let n=0;n<e.mines;n++){const e=Math.floor(Math.random()*t.length),a=Math.floor(Math.random()*t[0].length);t[e][a]?n--:t[e][a]=!0}return t}(t)),[r,i]=s.useState(h(t)),[o,f]=s.useState([0,0]),[g,y]=s.useState(!0);return s.useEffect(()=>{const e=setTimeout(()=>y(!1),2e3);return()=>clearInterval(e)},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},g?"Remember all the mines!":"Mark all the mines!"),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>g?a[t][n]?s.default.createElement("span",{key:n},"[?] "):s.default.createElement("span",{key:n},"[ ] "):n==o[0]&&t==o[1]?s.default.createElement("span",{key:n},"[X] "):r[t][n]?s.default.createElement("span",{key:n},"[.] "):s.default.createElement("span",{key:n},"[ ] "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),g)return;const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const r=[o[0]+n[0],o[1]+n[1]];if(r[0]=(r[0]+a[0].length)%a[0].length,r[1]=(r[1]+a.length)%a.length,f(r),32==t.keyCode){if(!a[o[1]][o[0]])return void e.onFailure();i(t=>(t[o[1]][o[0]]=!0,function(e,t){function n(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return n(e)===n(t)}(a,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Cyberpunk2077Game=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(161),p=n(220),d={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}t.Cyberpunk2077Game=function(e){const t={timer:0,width:0,height:0,symbols:0};m.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];for(let n=0;n<Math.round(e.height);n++){const n=[];for(let t=0;t<Math.round(e.width);t++)n.push(h()+h());t.push(n)}return t}(t)),[r]=s.useState(function(e,t){const n=[];for(let a=0;a<Math.round(t.symbols);a++)n.push(e[Math.floor(Math.random()*e.length)][Math.floor(Math.random()*e[0].length)]);return n}(a,t)),[i,o]=s.useState(0),[f,g]=s.useState([0,0]);return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Match the symbols!"),s.default.createElement("h2",{style:{fontSize:"2em"}},"Targets: ",r.map((e,t)=>t==i?s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em",color:"blue"}},e," "):s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em"}},e," "))),s.default.createElement("br",null),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>n==f[0]&&t==f[1]?s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em"}},e," "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const s=[f[0]+n[0],f[1]+n[1]];if(s[0]=(s[0]+a[0].length)%a[0].length,s[1]=(s[1]+a.length)%a.length,g(s),32==t.keyCode){if(a[f[1]][f[0]]!==r[i])return void e.onFailure();o(i+1),r.length===i+1&&e.onSuccess()}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheatCodeGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(220),p=n(161),d={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:9}};t.CheatCodeGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=["←","→","↑","↓"];let n="";for(let a=0;a<m.random(e.min,e.max);a++){let e=t[Math.floor(4*Math.random())];for(;e===n[n.length-1];)e=t[Math.floor(4*Math.random())];n+=e}return n}(t)),[r,i]=s.useState(0);return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Enter the Code!"),s.default.createElement("p",{style:{fontSize:"5em"}},a[r]),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault(),a[r]===m.getArrow(t)?(i(r+1),r+1>=a.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BribeGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(161),p={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};t.BribeGame=function(e){const t={timer:0,size:0};m.interpolate(p,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];t.push(d[Math.floor(Math.random()*d.length)]);for(let n=0;n<e.size;n++){const e=h[Math.floor(Math.random()*h.length)];t.includes(e)?n--:t.push(e)}return function(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}}(t),t}(t)),[r,i]=s.useState(0);return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Say something nice about the guard."),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=t.keyCode;if(32===n)return void(d.includes(a[r])?e.onSuccess():e.onFailure());let o=r;for([38,87,68,39].includes(n)&&o++,[65,37,83,40].includes(n)&&o--;o<0;)o+=a.length;for(;o>a.length-1;)o-=a.length;i(o)},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("h2",{style:{fontSize:"2em"}},"↑"),s.default.createElement("h2",{style:{fontSize:"2em"}},a[r]),s.default.createElement("h2",{style:{fontSize:"2em"}},"↓")))};const d=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BackwardGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(220),p=n(161),d=n(658),h={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};t.BackwardGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=m.random(e.min,e.max);let n="";for(let e=0;e<t;e++)e>0&&(n+=" "),n+=f[Math.floor(Math.random()*f.length)];return n}(t)),[r,i]=s.useState("");return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Type it backward"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const n=r+t.key.toUpperCase();a.startsWith(n)?a===n?e.onSuccess():i(n):e.onFailure()},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",{style:{transform:"scaleX(-1)"}},a)),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",null,r,s.default.createElement(d.BlinkingCursor,null))))};const f=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SlashGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(161),p={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};t.SlashGame=function(e){const t={window:0};m.interpolate(p,e.difficulty,t);const[n,a]=s.useState(!0);return s.useEffect(()=>{let e=-1;const n=window.setTimeout(()=>{a(!1),e=window.setTimeout(()=>a(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(n),-1!==e&&clearInterval(e)}},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:5e3,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),s.default.createElement("p",{style:{fontSize:"5em"}},n?"!Guarding!":"!ATTACKING!"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(n?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BracketGame=void 0;const s=i(n(0)),l=o(n(89)),c=n(163),u=n(162),m=n(220),p=n(161),d=n(658),h={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};t.BracketGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a,r]=s.useState(""),[i]=s.useState(function(e){let t="";const n=m.random(e.min,e.max);for(let e=0;e<n;e++)t+=["[","<","(","{"][Math.floor(4*Math.random())];return t}(t));return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Close the brackets"),s.default.createElement("p",{style:{fontSize:"5em"}},`${i}${a}`,s.default.createElement(d.BlinkingCursor,null)),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=function(e){return 48==e.keyCode&&e.shiftKey?")":221!=e.keyCode||e.shiftKey?221==e.keyCode&&e.shiftKey?"}":190==e.keyCode&&e.shiftKey?">":"":"]"}(t);n&&(function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(i[i.length-a.length-1],n)?i.length!==a.length+1?r(a+n):e.onSuccess():e.onFailure())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Countdown=void 0;const s=i(n(0)),l=o(n(89));t.Countdown=function(e){const[t,n]=s.useState(3);return s.useEffect(()=>{0!==t?setTimeout(()=>n(t-1),200):e.onFinish()}),s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Get Ready!"),s.default.createElement("h1",null,t))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const s=i(n(0)),l=o(n(89)),c=n(985),u=n(984),m=n(983),p=n(982),d=n(981),h=n(980),f=n(979),g=n(978),y=n(977),_=n(976);var b;!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(b||(b={}));const v=[m.SlashGame,u.BracketGame,p.BackwardGame,d.BribeGame,h.CheatCodeGame,f.Cyberpunk2077Game,g.MinesweeperGame,y.WireCuttingGame];t.Game=function(e){const[t,n]=s.useState(1),[a,r]=s.useState(b.Countdown),[i,o]=s.useState(""),[u,m]=s.useState({lastGames:[-1,-1],id:Math.floor(Math.random()*v.length)});function p(){m({lastGames:[u.lastGames[1],u.id],id:function(){let e=u.lastGames[0];const t=[u.lastGames[0],u.lastGames[1],u.id];for(;t.includes(e);)e=Math.floor(Math.random()*v.length);return e}()})}function d(e){o(t=>{let n=t;return(n+=e?"✓":"✗").length>15&&(n=n.slice(1)),n})}let h;switch(a){case b.Countdown:h=s.default.createElement(c.Countdown,{onFinish:()=>r(b.Minigame)});break;case b.Minigame:{const a=v[u.id];h=s.default.createElement(a,{onSuccess:function(){d(!0),t===e.MaxLevel?r(b.Sell):(r(b.Countdown),n(t+1)),p()},onFailure:function(t){r(b.Countdown),d(!1);const n=(null===t||void 0===t?void 0:t.automated)?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(n)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}p()},difficulty:e.Difficulty+t/50});break}case b.Sell:h=s.default.createElement(_.Victory,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:3},s.default.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),s.default.createElement(function(){return s.default.createElement("h4",null,s.default.createElement("span",{style:{color:"gray"}},i.slice(0,i.length-1)),i[i.length-1])},null)),s.default.createElement(l.default,{item:!0,xs:12},h)))}},,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Intro=void 0;const r=a(n(0)),i=n(54),o=a(n(89));function s(e,t){let n="";return t<=0?t=0:t>13?t=13:(t--,n=">"),r.default.createElement("span",{style:{color:e}},"=".repeat(t),n," ".repeat(13-n.length-t))}t.Intro=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.default,{container:!0,spacing:3},r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h1",null,"Infiltrating ",e.Location)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("pre",null,"[",function(e){return 0===e?r.default.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.default.createElement(r.default.Fragment,null,s("white",13*e),s("orange",13*(e-1)),s("red",13*(e-2)))}(e.Difficulty),"]"),r.default.createElement("pre",null," ^ ^ ^ ^"),r.default.createElement("pre",null," Trivial Normal Hard Impossible")),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.default.createElement("br",null),r.default.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.default.createElement("br",null),r.default.createElement("p",null,"No game require use of the mouse."),r.default.createElement("br",null),r.default.createElement("p",null,"Spacebar is the default action/confirm button."),r.default.createElement("br",null),r.default.createElement("p",null,"Everything that uses arrow can also use WASD"),r.default.createElement("br",null),r.default.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.start,text:"Start"})),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.cancel,text:"Cancel"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(992),l=n(986);t.Root=function(e){const[t,n]=o.useState(!1);return t?o.default.createElement(l.Game,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):o.default.createElement(s.Intro,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>n(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillElem=void 0;const r=a(n(0)),i=n(167),o=n(24);t.SkillElem=function(e){const t=e.skill.name;let n=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(n=e.bladeburner.skills[t]);const a=e.skill.calculateCost(n),s=e.bladeburner.skillPoints>=a,l=!!e.skill.maxLvl&&n>=e.skill.maxLvl;return r.default.createElement(r.default.Fragment,null,r.default.createElement("h2",{style:{display:"inline-block"}},r.default.createElement(i.CopyableText,{value:e.skill.name})),r.default.createElement("a",{onClick:function(){e.bladeburner.skillPoints<a||(e.bladeburner.skillPoints-=a,e.bladeburner.upgradeSkill(e.skill),e.onUpgrade())},style:{display:"inline-block",margin:"3px",padding:"3px"},className:s&&!l?"a-link-button":"a-link-button-inactive"},"Level"),r.default.createElement("br",null),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"block"}},"Level: ",n),l?r.default.createElement("p",{style:{color:"red",display:"block"}},"MAX LEVEL"):r.default.createElement("p",{style:{display:"block"}},"Skill Points required: ",o.formatNumber(a,0)),r.default.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.skill.desc}}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillList=void 0;const o=i(n(0)),s=n(994),l=n(751);t.SkillList=function(e){return o.createElement(o.Fragment,null,Object.keys(l.Skills).map(t=>o.createElement("li",{key:t,className:"bladeburner-action"},o.createElement(s.SkillElem,{bladeburner:e.bladeburner,skill:l.Skills[t],onUpgrade:e.onUpgrade}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillPage=void 0;const o=i(n(0)),s=n(995),l=n(144),c=n(24);t.SkillPage=function(e){const t=o.useState(!1)[1],n=e.bladeburner.skillMultipliers;function a(e){return e&&1!==e}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("strong",null,"Skill Points: ",c.formatNumber(e.bladeburner.skillPoints,0))),o.default.createElement("p",null,"You will gain one skill point every ",l.BladeburnerConstants.RanksPerSkillPoint," ranks.",o.default.createElement("br",null),o.default.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",o.default.createElement("br",null)),o.default.createElement("br",null),a(n.successChanceAll)&&o.default.createElement("p",null,"Total Success Chance: x",c.formatNumber(n.successChanceAll,3)),a(n.successChanceStealth)&&o.default.createElement("p",null,"Stealth Success Chance: x",c.formatNumber(n.successChanceStealth,3)),a(n.successChanceKill)&&o.default.createElement("p",null,"Retirement Success Chance: x",c.formatNumber(n.successChanceKill,3)),a(n.successChanceContract)&&o.default.createElement("p",null,"Contract Success Chance: x",c.formatNumber(n.successChanceContract,3)),a(n.successChanceOperation)&&o.default.createElement("p",null,"Operation Success Chance: x",c.formatNumber(n.successChanceOperation,3)),a(n.successChanceEstimate)&&o.default.createElement("p",null,"Synthoid Data Estimate: x",c.formatNumber(n.successChanceEstimate,3)),a(n.actionTime)&&o.default.createElement("p",null,"Action Time: x",c.formatNumber(n.actionTime,3)),a(n.effHack)&&o.default.createElement("p",null,"Hacking Skill: x",c.formatNumber(n.effHack,3)),a(n.effStr)&&o.default.createElement("p",null,"Strength: x",c.formatNumber(n.effStr,3)),a(n.effDef)&&o.default.createElement("p",null,"Defense: x",c.formatNumber(n.effDef,3)),a(n.effDex)&&o.default.createElement("p",null,"Dexterity: x",c.formatNumber(n.effDex,3)),a(n.effAgi)&&o.default.createElement("p",null,"Agility: x",c.formatNumber(n.effAgi,3)),a(n.effCha)&&o.default.createElement("p",null,"Charisma: x",c.formatNumber(n.effCha,3)),a(n.effInt)&&o.default.createElement("p",null,"Intelligence: x",c.formatNumber(n.effInt,3)),a(n.stamina)&&o.default.createElement("p",null,"Stamina: x",c.formatNumber(n.stamina,3)),a(n.money)&&o.default.createElement("p",null,"Contract Money: x",c.formatNumber(n.money,3)),a(n.expGain)&&o.default.createElement("p",null,"Exp Gain: x",c.formatNumber(n.expGain,3)),o.default.createElement("br",null),o.default.createElement(s.SkillList,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpElem=void 0;const o=i(n(0)),s=n(24),l=n(293),c=n(191),u=n(406),m=n(40),p=n(667),d=n(489),h=n(167);t.BlackOpElem=function(e){const t=o.useState(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return o.default.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const n=e.bladeburner.action.type===l.ActionTypes.BlackOperation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=e.action.getActionTime(e.bladeburner),i=e.bladeburner.rank>=e.action.reqdRank,f=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(h.CopyableText,{value:e.action.name})," (IN PROGRESS - ",s.formatNumber(f,0)," / ",s.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(h.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},c.createProgressBarText({progress:f/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:i?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=l.ActionTypes.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";m.createPopup(t,p.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",s.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"block",color:i?"white":"red"}},"Required Rank: ",s.formatNumber(e.action.reqdRank,0)),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",o.default.createElement(d.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",s.convertTimeMsToTimeElapsedString(1e3*r)))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpList=void 0;const r=a(n(0)),i=n(755),o=n(997);t.BlackOpList=function(e){let t=[];for(const e in i.BlackOperations)i.BlackOperations.hasOwnProperty(e)&&t.push(i.BlackOperations[e]);return t.sort(function(e,t){return e.reqdRank-t.reqdRank}),t=(t=t.filter((n,a)=>!(null==e.bladeburner.blackops[t[a].name]&&0!==a&&null==e.bladeburner.blackops[t[a-1].name]))).reverse(),r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(o.BlackOpElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpPage=void 0;const o=i(n(0)),s=n(998);t.BlackOpPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),o.createElement("br",null),o.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),o.createElement(s.BlackOpList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationElem=void 0;const o=i(n(0)),s=n(293),l=n(191),c=n(24),u=n(406),m=n(144),p=n(40),d=n(667),h=n(489),f=n(167);t.OperationElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Operation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),i=e.action.level>=e.action.maxLevel,g=e.action.getActionTime(e.bladeburner),y=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(f.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(f.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";p.createPopup(t,d.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",c.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(h.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*g),o.default.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:y},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:y,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationList=void 0;const r=a(n(0)),i=n(1e3);t.OperationList=function(e){const t=Object.keys(e.bladeburner.operations),n=e.bladeburner.operations;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.OperationElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPage=void 0;const o=i(n(0)),s=n(1001);t.OperationPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",o.createElement("br",null),o.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",o.createElement("br",null),o.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),o.createElement(s.OperationList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractElem=void 0;const o=i(n(0)),s=n(293),l=n(191),c=n(24),u=n(406),m=n(144),p=n(489),d=n(167);t.ContractElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Contract&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=(e.action.getSuccessChance(e.bladeburner),Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete)),i=e.action.level>=e.action.maxLevel,h=e.action.getActionTime(e.bladeburner),f=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(d.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(d.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(p.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*h),o.default.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:f},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:f,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractList=void 0;const r=a(n(0)),i=n(1003);t.ContractList=function(e){const t=Object.keys(e.bladeburner.contracts),n=e.bladeburner.contracts;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.ContractElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractPage=void 0;const o=i(n(0)),s=n(1004);t.ContractPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),o.createElement(s.ContractList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionElem=void 0;const o=i(n(0)),s=n(293),l=n(191),c=n(24),u=n(167);t.GeneralActionElem=function(e){const t=o.useState(!1)[1],n=e.action.name===e.bladeburner.action.name,a=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),r=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),i="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(u.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(a,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(u.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:a/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*r),-1!==i&&o.default.createElement(o.default.Fragment,null,o.default.createElement("br",null),"Estimated success chance: ",c.formatNumber(100*i,1),"%")))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionList=void 0;const r=a(n(0)),i=n(1006),o=n(752);t.GeneralActionList=function(e){const t=[];for(const e in o.GeneralActions)o.GeneralActions.hasOwnProperty(e)&&t.push(o.GeneralActions[e]);return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(i.GeneralActionElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionPage=void 0;const o=i(n(0)),s=n(1007);t.GeneralActionPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),o.createElement(s.GeneralActionList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AllPages=void 0;const o=i(n(0)),s=n(1008),l=n(1005),c=n(1002),u=n(999),m=n(996),p=n(406);t.AllPages=function(e){const[t,n]=o.useState("General"),a=o.useState(!1)[1];function r(e){return o.default.createElement("a",{onClick:()=>n(e.name),className:t!==e.name?"bladeburner-nav-button":"bladeburner-nav-button-inactive"},e.name)}return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement(r,{name:"General"}),o.default.createElement(r,{name:"Contracts"}),o.default.createElement(r,{name:"Operations"}),o.default.createElement(r,{name:"BlackOps"}),o.default.createElement(r,{name:"Skills"}),o.default.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&o.default.createElement(s.GeneralActionPage,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&o.default.createElement(l.ContractPage,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&o.default.createElement(c.OperationPage,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&o.default.createElement(u.BlackOpPage,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&o.default.createElement(m.SkillPage,{bladeburner:e.bladeburner})),o.default.createElement("span",{className:"text"},p.stealthIcon," = This action requires stealth, ",p.killIcon," = This action involves retirement"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Console=void 0;const o=i(n(0));function s(e){return o.default.createElement("tr",null,o.default.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}t.Console=function(e){const t=o.useRef(null),n=o.useState(!1)[1],[a,r]=o.useState(e.bladeburner.consoleHistory.length);function i(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function l(){n(e=>!e)}return o.useEffect(()=>{const e=setInterval(l,1e3),t=setInterval(i,100);return()=>{clearInterval(e),clearInterval(t)}},[]),o.default.createElement("div",{ref:t,className:"bladeburner-console-div"},o.default.createElement("table",{className:"bladeburner-console-table"},o.default.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>o.default.createElement(s,{key:t,content:e})),o.default.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},o.default.createElement("td",{className:"bladeburner-console-input-cell"},o.default.createElement("pre",null,"> "),o.default.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const n=t.currentTarget.value;t.currentTarget.value="",n.length>0&&(e.bladeburner.postToConsole("> "+n),e.bladeburner.executeConsoleCommands(e.player,n),r(e.bladeburner.consoleHistory.length),l())}const n=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=a;const i=n.length;if(0===i)return;(e<0||e>i)&&r(i),0!==e&&(e-=1),r(e);const o=n[e];t.currentTarget.value=o}if(40===t.keyCode){const e=a,i=n.length;if(0==i)return;if((e<0||e>i)&&r(i),e==i||e==i-1)r(i),t.currentTarget.value="";else{r(a+1);const e=n[a+1];t.currentTarget.value=e}}}}))))))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelPopup=void 0;const r=a(n(0)),i=n(40),o=n(144);t.TravelPopup=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),o.BladeburnerConstants.CityNames.map(t=>r.default.createElement("div",{key:t,className:"cmpy-mgmt-find-employee-option",onClick:()=>(function(t){e.bladeburner.city=t,i.removePopup(e.popupId)})(t)},t)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=void 0;const o=i(n(0)),s=n(24),l=n(144),c=n(21),u=n(282),m=n(6),p=n(13),d=n(40),h=n(17),f=n(72),g=n(1011);t.Stats=function(e){const t=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",s.formatNumber(e.bladeburner.rank,2),o.default.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina: ",s.formatNumber(e.bladeburner.stamina,3)," / ",s.formatNumber(e.bladeburner.maxStamina,3)),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina Penalty: ",s.formatNumber(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),o.default.createElement("br",null),o.default.createElement("p",null,"Team Size: ",s.formatNumber(e.bladeburner.teamSize,0)),o.default.createElement("p",null,"Team Members Lost: ",s.formatNumber(e.bladeburner.teamLost,0)),o.default.createElement("br",null),o.default.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),o.default.createElement("p",null,"Money Lost From Hospitalizations: ",o.default.createElement(c.Money,{money:e.bladeburner.moneyLost})),o.default.createElement("br",null),o.default.createElement("p",null,"Current City: ",e.bladeburner.city),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",m.numeralWrapper.formatPopulation(e.bladeburner.getCurrentCity().popEst),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",s.formatNumber(e.bladeburner.getCurrentCity().comms,0),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",s.formatNumber(e.bladeburner.getCurrentCity().chaos),o.default.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",s.convertTimeMsToTimeElapsedString(e.bladeburner.storedCycles/l.BladeburnerConstants.CyclesPerSecond*1e3),o.default.createElement("br",null),o.default.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),o.default.createElement("p",null,"Skill Points: ",s.formatNumber(e.bladeburner.skillPoints,0)),o.default.createElement("br",null),u.StatsTable([["Aug. Success Chance mult: ",s.formatNumber(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",s.formatNumber(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",s.formatNumber(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",s.formatNumber(100*e.player.bladeburner_analysis_mult,1)+"%"]]),o.default.createElement("br",null),o.default.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";d.createPopup(t,g.TravelPopup,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),o.default.createElement("a",{onClick:function(){const t=h.Factions.Bladeburners;t.isMember?(e.engine.loadFactionContent(),f.displayFactionContent("Bladeburners")):e.bladeburner.rank>=l.BladeburnerConstants.RankNeededForFaction?(f.joinFaction(t),p.dialogBoxCreate("Congratulations! You were accepted into the Bladeburners faction")):p.dialogBoxCreate("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),o.default.createElement("br",null),o.default.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TerritorySubpage=void 0;const r=a(n(0)),i=n(6),o=n(13),s=n(24),l=n(86);t.TerritorySubpage=function(e){function t(e){const t=100*e;return t<=0?s.formatNumber(0,2):t>=100?s.formatNumber(100,2):s.formatNumber(t,2)}const n=l.AllGangs[e.gang.facName].power,a=Object.keys(l.AllGangs).filter(t=>t!=e.gang.facName);return r.default.createElement("div",{style:{width:"70%"}},r.default.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.default.createElement("br",null),r.default.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.default.createElement("br",null),r.default.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.default.createElement("br",null),r.default.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.default.createElement("br",null),r.default.createElement("br",null)),r.default.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.numeralWrapper.formatPercentage(e.gang.territoryClashChance,3)),r.default.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){o.dialogBoxCreate("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.default.createElement("br",null),r.default.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.default.createElement("br",null),r.default.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.default.createElement("p",null,r.default.createElement("b",null,r.default.createElement("u",null,e.gang.facName)),r.default.createElement("br",null),"Power: ",s.formatNumber(l.AllGangs[e.gang.facName].power,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e.gang.facName].territory),"%",r.default.createElement("br",null),r.default.createElement("br",null),a.map(e=>(function(e){const a=l.AllGangs[e].power,o=n/(a+n);return r.default.createElement("span",{key:e},r.default.createElement("u",null,e),r.default.createElement("br",null),"Power: ",s.formatNumber(a,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e].territory),"%",r.default.createElement("br",null),"Chance to win clash with this gang: ",i.numeralWrapper.formatPercentage(o,3),r.default.createElement("br",null),r.default.createElement("br",null))})(e)))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitPopup=void 0;const o=i(n(0)),s=n(40),l=n(13);t.RecruitPopup=function(e){const[t,n]=o.useState("");function a(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),s.removePopup(e.popupId)):l.dialogBoxCreate("You already have a gang member with this name!"):l.dialogBoxCreate("You cannot recruit another Gang member!"):l.dialogBoxCreate("You must enter a name for your Gang member!")}function r(){s.removePopup(e.popupId)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),o.default.createElement("br",null),o.default.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&a(),27===e.keyCode&&r()},onChange:function(e){n(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),o.default.createElement("a",{className:"std-button",onClick:a},"Recruit Gang Member"),o.default.createElement("a",{className:"std-button",onClick:r},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitButton=void 0;const r=a(n(0)),i=n(1014),o=n(703),s=n(24),l=n(40);t.RecruitButton=function(e){if(e.gang.members.length>=o.GangConstants.MaximumGangMembers)return r.default.createElement(r.default.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.default.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},s.formatNumber(t,2)," respect needed to recruit next member"))}return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";l.createPopup(t,i.RecruitPopup,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDescription=void 0;const r=a(n(0)),i=n(297);t.TaskDescription=function(e){const t=i.GangMemberTasks[e.member.task],n=t?t.desc:i.GangMemberTasks.Unassigned.desc;return r.default.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:n}})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskSelector=void 0;const o=i(n(0)),s=n(6),l=n(282),c=n(119);t.TaskSelector=function(e){const[t,n]=o.useState(e.member.task),a=e.gang.getAllTaskNames(),r=[["Money:",c.MoneyRate(5*e.member.calculateMoneyGain(e.gang))],["Respect:",`${s.numeralWrapper.formatRespect(5*e.member.calculateRespectGain(e.gang))} / sec`],["Wanted Level:",`${s.numeralWrapper.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))} / sec`],["Total Respect:",`${s.numeralWrapper.formatRespect(e.member.earnedRespect)}`]];return o.default.createElement(o.default.Fragment,null,o.default.createElement("select",{onChange:function(t){const a=t.target.value;e.member.assignToTask(a),n(a),e.onTaskChange()},className:"dropdown noselect",value:t},o.default.createElement("option",{key:0,value:"---"},"---"),a.map((e,t)=>o.default.createElement("option",{key:t+1,value:e},e))),o.default.createElement("div",null,l.StatsTable(r)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AscensionPopup=void 0;const o=i(n(0)),s=n(6),l=n(40),c=n(13);t.AscensionPopup=function(e){const t=o.useState(!1)[1];o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const n=e.member.getAscensionResults();return o.default.createElement(o.default.Fragment,null,o.default.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",o.default.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",o.default.createElement("br",null),o.default.createElement("br",null),"Furthermore, your gang will lose ",s.numeralWrapper.formatRespect(e.member.earnedRespect)," respect",o.default.createElement("br",null),o.default.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(n.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(n.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(n.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(n.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(n.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(n.cha,"0.000"),o.default.createElement("br",null)),o.default.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);c.dialogBoxCreate(o.default.createElement("p",null,"You ascended ",e.member.name,"!",o.default.createElement("br",null),o.default.createElement("br",null),"Your gang lost ",s.numeralWrapper.formatRespect(t.respect)," respect.",o.default.createElement("br",null),o.default.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(t.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(t.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(t.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(t.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(t.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(t.cha,"0.000"),o.default.createElement("br",null))),l.removePopup(e.popupId)}},"Ascend"),o.default.createElement("button",{className:"std-button",onClick:function(){l.removePopup(e.popupId)}},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberStats=void 0;const r=a(n(0)),i=n(13),o=n(24),s=n(6),l=n(40),c=n(1018);t.GangMemberStats=function(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.default.createElement(r.default.Fragment,null,r.default.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.numeralWrapper.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.numeralWrapper.formatMultiplier(e.member.hack_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.hack)," Asc)",r.default.createElement("br",null),"St: x",s.numeralWrapper.formatMultiplier(e.member.str_mult*t.str),"(x",s.numeralWrapper.formatMultiplier(e.member.str_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.str)," Asc)",r.default.createElement("br",null),"Df: x",s.numeralWrapper.formatMultiplier(e.member.def_mult*t.def),"(x",s.numeralWrapper.formatMultiplier(e.member.def_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.def)," Asc)",r.default.createElement("br",null),"Dx: x",s.numeralWrapper.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.numeralWrapper.formatMultiplier(e.member.dex_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.dex)," Asc)",r.default.createElement("br",null),"Ag: x",s.numeralWrapper.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.numeralWrapper.formatMultiplier(e.member.agi_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.agi)," Asc)",r.default.createElement("br",null),"Ch: x",s.numeralWrapper.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.numeralWrapper.formatMultiplier(e.member.cha_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.cha)," Asc)"),r.default.createElement("pre",null,"Hacking: ",o.formatNumber(e.member.hack,0)," (",s.numeralWrapper.formatExp(e.member.hack_exp)," exp)",r.default.createElement("br",null),"Strength: ",o.formatNumber(e.member.str,0)," (",s.numeralWrapper.formatExp(e.member.str_exp)," exp)",r.default.createElement("br",null),"Defense: ",o.formatNumber(e.member.def,0)," (",s.numeralWrapper.formatExp(e.member.def_exp)," exp)",r.default.createElement("br",null),"Dexterity: ",o.formatNumber(e.member.dex,0)," (",s.numeralWrapper.formatExp(e.member.dex_exp)," exp)",r.default.createElement("br",null),"Agility: ",o.formatNumber(e.member.agi,0)," (",s.numeralWrapper.formatExp(e.member.agi_exp)," exp)",r.default.createElement("br",null),"Charisma: ",o.formatNumber(e.member.cha,0)," (",s.numeralWrapper.formatExp(e.member.cha_exp)," exp)",r.default.createElement("br",null)),r.default.createElement("br",null),e.member.canAscend()&&r.default.createElement(r.default.Fragment,null,r.default.createElement("button",{className:"accordion-button noselect",onClick:function(){const t=`gang-management-ascend-member ${e.member.name}`;l.createPopup(t,c.AscensionPopup,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.default.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){i.dialogBoxCreate(r.default.createElement(r.default.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.default.createElement("br",null),r.default.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.default.createElement("br",null),r.default.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordionContent=void 0;const o=i(n(0)),s=n(1019),l=n(1017),c=n(1016);t.GangMemberAccordionContent=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"gang-member-info-div tooltip"},o.default.createElement(s.GangMemberStats,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(l.TaskSelector,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(c.TaskDescription,{member:e.member})))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordion=void 0;const r=a(n(0)),i=n(164),o=n(1020);t.GangMemberAccordion=function(e){return r.default.createElement(i.Accordion,{panelInitiallyOpened:!0,headerContent:r.default.createElement(r.default.Fragment,null,e.member.name),panelContent:r.default.createElement(o.GangMemberAccordionContent,{gang:e.gang,member:e.member})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgradePopup=void 0;const o=i(n(0)),s=n(24),l=n(6),c=n(176),u=n(21),m=n(40),p=n(499);function d(e){const t=o.useState(!1)[1];function n(t,n){return Object.keys(c.GangMemberUpgrades).filter(a=>{const r=c.GangMemberUpgrades[a];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===n&&!t.includes(a))}).map(e=>c.GangMemberUpgrades[e])}const a=n(e.member.upgrades,p.UpgradeType.Weapon),r=n(e.member.upgrades,p.UpgradeType.Armor),i=n(e.member.upgrades,p.UpgradeType.Vehicle),l=n(e.member.upgrades,p.UpgradeType.Rootkit),m=n(e.member.augmentations,p.UpgradeType.Augmentation);function d(e){const t=c.GangMemberUpgrades[e];return o.default.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,o.default.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function h(n,a=!1){return o.default.createElement("a",{key:n.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(n,e.player,e.gang),t(e=>!e)}},n.name," - ",o.default.createElement(u.Money,{money:e.gang.getUpgradeCost(n),player:e.player}),o.default.createElement("span",{className:a?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:n.desc}}))}const f=e.member.calculateAscensionMult(e.member.hack_asc_points),g=e.member.calculateAscensionMult(e.member.str_asc_points),y=e.member.calculateAscensionMult(e.member.def_asc_points),_=e.member.calculateAscensionMult(e.member.dex_asc_points),b=e.member.calculateAscensionMult(e.member.agi_asc_points),v=e.member.calculateAscensionMult(e.member.cha_asc_points);return o.default.createElement("div",{style:{border:"1px solid white"}},o.default.createElement("h1",null,e.member.name,"(",e.member.task,")"),o.default.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",s.formatNumber(e.member.hack_mult*f,2),")",o.default.createElement("br",null),"Str: ",e.member.str," (x",s.formatNumber(e.member.str_mult*g,2),")",o.default.createElement("br",null),"Def: ",e.member.def," (x",s.formatNumber(e.member.def_mult*y,2),")",o.default.createElement("br",null),"Dex: ",e.member.dex," (x",s.formatNumber(e.member.dex_mult*_,2),")",o.default.createElement("br",null),"Agi: ",e.member.agi," (x",s.formatNumber(e.member.agi_mult*b,2),")",o.default.createElement("br",null),"Cha: ",e.member.cha," (x",s.formatNumber(e.member.cha_mult*v,2),")"),o.default.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>d(e)),e.member.augmentations.map(e=>d(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Weapons"),a.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Armor"),r.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Vehicles"),i.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Rootkits"),l.map(e=>h(e,!0))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Augmentations"),m.map(e=>h(e,!0))))}t.GangMemberUpgradePopup=function(e){const t=o.useState(!1)[1],[n,a]=o.useState("");function r(t){27===t.keyCode&&m.removePopup(e.popupId)}return o.useEffect(()=>{window.addEventListener("keydown",r);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",r)}},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("input",{className:"text-input noselect",value:n,placeholder:"Filter gang member",onChange:e=>a(e.target.value)}),o.default.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",l.numeralWrapper.formatPercentage(1-1/e.gang.getDiscount()),o.default.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>o.default.createElement(d,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberList=void 0;const o=i(n(0)),s=n(1022),l=n(1021),c=n(40),u=n(1015);t.GangMemberList=function(e){const[t,n]=o.useState(""),a=o.useState(!1)[1],r=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.RecruitButton,{onRecruit:()=>a(e=>!e),gang:e.gang}),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){n(e.target.value)}}),o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){c.createPopup("gang-upgrade-popup",s.GangMemberUpgradePopup,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),o.default.createElement("ul",null,r.map(t=>o.default.createElement("li",{key:t.name},o.default.createElement(l.GangMemberAccordion,{gang:e.gang,member:t})))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BonusTime=void 0;const o=i(n(0)),s=n(11),l=n(24);t.BonusTime=function(e){const t=1e3/s.CONSTANTS._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return o.createElement(o.Fragment,null);const n=e.gang.storedCycles/t*1e3;return o.createElement(o.Fragment,null,o.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",l.convertTimeMsToTimeElapsedString(n),o.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),o.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangStats=void 0;const r=a(n(0)),i=n(17),o=n(24),s=n(6),l=n(119),c=n(60),u=n(86),m=n(1024);t.GangStats=function(e){const t=100*u.AllGangs[e.gang.facName].territory;let n;return n=t<=0?o.formatNumber(0,2):t>=100?o.formatNumber(100,2):o.formatNumber(t,2),r.default.createElement(r.default.Fragment,null,r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.numeralWrapper.formatRespect(e.gang.respect)," (",s.numeralWrapper.formatRespect(5*e.gang.respectGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.numeralWrapper.formatWanted(e.gang.wanted)," (",s.numeralWrapper.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",o.formatNumber(100*(1-e.gang.getWantedPenalty()),2),"%",r.default.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.default.createElement("br",null),r.default.createElement("div",null,r.default.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",l.MoneyRate(5*e.gang.moneyGainRate))),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",n,"%",r.default.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",c.Reputation(i.Factions[e.gang.facName].playerReputation)),r.default.createElement("br",null),r.default.createElement(m.BonusTime,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagementSubpage=void 0;const r=a(n(0)),i=n(1025),o=n(1023);t.ManagementSubpage=function(e){return r.default.createElement("div",{style:{display:"block"}},r.default.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.default.createElement("br",null),r.default.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.default.createElement("br",null),r.default.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.default.createElement("br",null),r.default.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.default.createElement("br",null),r.default.createElement(i.GangStats,{gang:e.gang}),r.default.createElement("br",null),r.default.createElement(o.GangMemberList,{gang:e.gang,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(1026),l=n(1013),c=n(72);t.Root=function(e){const[t,n]=o.useState(!0),a=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),c.displayFactionContent(e.gang.facName)}},"Back"),o.default.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>n(!0)},"Gang Management"),o.default.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>n(!1)},"Gang Territory"),t?o.default.createElement(s.ManagementSubpage,{gang:e.gang,player:e.player}):o.default.createElement(l.TerritorySubpage,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchasedAugmentations=void 0;const o=i(n(0)),s=n(12),l=n(3),c=n(1),u=n(668);t.PurchasedAugmentations=function(){const e=[];let t=-1;for(let e=c.Player.queuedAugmentations.length-1;e>=0;e--)if(c.Player.queuedAugmentations[e].name===l.AugmentationNames.NeuroFluxGovernor){t=e;break}for(let n=0;n<c.Player.queuedAugmentations.length;n++){const a=c.Player.queuedAugmentations[n];if(a.name===l.AugmentationNames.NeuroFluxGovernor&&n!==t)continue;const r=s.Augmentations[a.name];let i=null;a.name===l.AugmentationNames.NeuroFluxGovernor&&(i=a.level),e.push(o.createElement("li",{key:`${a.name}${a.level}`},o.createElement(u.AugmentationAccordion,{aug:r,level:i})))}return o.createElement("ul",{className:"augmentations-list"},e)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerMultipliers=void 0;const o=i(n(0)),s=n(1),l=n(6),c=n(12);t.PlayerMultipliers=function(){const e=function(){const e={};for(const t of s.Player.queuedAugmentations){const n=c.Augmentations[t.name];for(const t in n.mults){const a=e[t]?e[t]:1;e[t]=a*n.mults[t]}}return e}();function t(e){return o.createElement("table",null,o.createElement("tbody",null,e.map(e=>o.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},o.createElement("span",null,e[0]," multiplier: ")),o.createElement("td",{key:"1",style:{textAlign:"right"}},l.numeralWrapper.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[o.createElement("td",{key:"2"}," ","=>"," "),o.createElement("td",{key:"3"},l.numeralWrapper.formatPercentage(e))]),t}(e[2])))))}return o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("strong",null,o.createElement("u",null,"Multipliers:"))),o.createElement("br",null),t([["Hacking Chance ",s.Player.hacking_chance_mult,s.Player.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",s.Player.hacking_speed_mult,s.Player.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",s.Player.hacking_money_mult,s.Player.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",s.Player.hacking_grow_mult,s.Player.hacking_grow_mult*e.hacking_grow_mult]]),o.createElement("br",null),t([["Hacking Level ",s.Player.hacking_mult,s.Player.hacking_mult*e.hacking_mult],["Hacking Experience ",s.Player.hacking_exp_mult,s.Player.hacking_exp_mult*e.hacking_exp_mult]]),o.createElement("br",null),t([["Strength Level ",s.Player.strength_mult,s.Player.strength_mult*e.strength_mult],["Strength Experience ",s.Player.strength_exp_mult,s.Player.strength_exp_mult*e.strength_exp_mult]]),o.createElement("br",null),t([["Defense Level ",s.Player.defense_mult,s.Player.defense_mult*e.defense_mult],["Defense Experience ",s.Player.defense_exp_mult,s.Player.defense_exp_mult*e.defense_exp_mult]]),o.createElement("br",null),t([["Dexterity Level ",s.Player.dexterity_mult,s.Player.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",s.Player.dexterity_exp_mult,s.Player.dexterity_exp_mult*e.dexterity_exp_mult]]),o.createElement("br",null),t([["Agility Level ",s.Player.agility_mult,s.Player.agility_mult*e.agility_mult],["Agility Experience ",s.Player.agility_exp_mult,s.Player.agility_exp_mult*e.agility_exp_mult]]),o.createElement("br",null),t([["Charisma Level ",s.Player.charisma_mult,s.Player.charisma_mult*e.charisma_mult],["Charisma Experience ",s.Player.charisma_exp_mult,s.Player.charisma_exp_mult*e.charisma_exp_mult]]),o.createElement("br",null),t([["Hacknet Node production ",s.Player.hacknet_node_money_mult,s.Player.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",s.Player.hacknet_node_purchase_cost_mult,s.Player.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",s.Player.hacknet_node_ram_cost_mult,s.Player.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",s.Player.hacknet_node_core_cost_mult,s.Player.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",s.Player.hacknet_node_level_cost_mult,s.Player.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),o.createElement("br",null),t([["Company reputation gain ",s.Player.company_rep_mult,s.Player.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",s.Player.faction_rep_mult,s.Player.faction_rep_mult*e.faction_rep_mult],["Salary ",s.Player.work_money_mult,s.Player.work_money_mult*e.work_money_mult]]),o.createElement("br",null),t([["Crime success ",s.Player.crime_success_mult,s.Player.crime_success_mult*e.crime_success_mult],["Crime money ",s.Player.crime_money_mult,s.Player.crime_money_mult*e.crime_money_mult]]),o.createElement("br",null),o.createElement(function(){return s.Player.canAccessBladeburner()?o.createElement(o.Fragment,null,t([["Bladeburner Success Chance",s.Player.bladeburner_success_chance_mult,s.Player.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",s.Player.bladeburner_max_stamina_mult,s.Player.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",s.Player.bladeburner_stamina_gain_mult,s.Player.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",s.Player.bladeburner_analysis_mult,s.Player.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileMinus1=void 0;const o=i(n(0)),s=n(1),l=n(169),c=n(164);t.SourceFileMinus1=function(){const e=s.Player.exploits;return 0===e.length?o.createElement(o.Fragment,null):o.createElement("li",{key:-1},o.createElement(c.Accordion,{headerContent:o.createElement(o.Fragment,null,"Source-File -1: Exploits in the BitNodes",o.createElement("br",null),"Level ",e.length," / ?"),panelContent:o.createElement(o.Fragment,null,o.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),o.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),o.createElement("br",null),o.createElement("p",null,"You have found the following exploits:"),o.createElement("ul",null,e.map(e=>o.createElement("li",{key:e},"* ",l.ExploitName(e)))))}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileAccordion=void 0;const o=i(n(0)),s=n(164);t.SourceFileAccordion=function(e){const t=12===e.sf.n?"∞":"3";return o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,e.sf.name,o.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:o.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedSourceFiles=void 0;const o=i(n(0)),s=n(1),l=n(25),c=n(227),u=n(232),m=n(1031);t.OwnedSourceFiles=function(){const e=s.Player.sourceFiles.slice();l.Settings.OwnedAugmentationsOrder===c.OwnedAugmentationsOrderSetting.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,n=u.SourceFiles[t];return null==n?(console.error(`Invalid source file number: ${e.n}`),null):o.createElement("li",{key:e.n},o.createElement(m.SourceFileAccordion,{level:e.lvl,sf:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ListConfiguration=void 0;const o=i(n(0)),s=n(54);t.ListConfiguration=function(e){return o.createElement(o.Fragment,null,o.createElement(s.StdButton,{onClick:e.expandAllButtonsFn,text:"Expand All"}),o.createElement(s.StdButton,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),o.createElement(s.StdButton,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),o.createElement(s.StdButton,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationsMetadata=void 0;const a=n(43),r=n(41),i=n(490);t.LocationsMetadata=[{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.LocationName.AevumAeroCorp,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.LocationName.AevumBachmanAndAssociates,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.LocationName.AevumClarkeIncorporated,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:3,expMult:2,name:r.LocationName.AevumCrushFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.LocationName.AevumECorp,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.LocationName.AevumFulcrumTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.LocationName.AevumGalacticCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.LocationName.AevumNetLinkTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.LocationName.AevumPolice,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.LocationName.AevumRhoConstruction,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:10,expMult:5,name:r.LocationName.AevumSnapFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,costMult:4,expMult:3,name:r.LocationName.AevumSummitUniversity,types:[i.LocationType.University]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.LocationName.AevumWatchdogSecurity,types:[i.LocationType.Company]},{city:a.CityName.Aevum,name:r.LocationName.AevumCasino,types:[i.LocationType.Casino]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.LocationName.ChongqingKuaiGongInternational,types:[i.LocationType.Company]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.LocationName.ChongqingSolarisSpaceSystems,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.LocationName.IshimaNovaMedical,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.LocationName.IshimaOmegaSoftware,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.LocationName.IshimaStormTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.LocationName.NewTokyoDefComm,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.LocationName.NewTokyoGlobalPharmaceuticals,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.LocationName.NewTokyoNoodleBar,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.LocationName.NewTokyoVitaLife,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.LocationName.Sector12AlphaEnterprises,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.LocationName.Sector12BladeIndustries,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CIA,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.LocationName.Sector12CarmichaelSecurity,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CityHall,types:[i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12DeltaOne,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12FoodNStuff,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.LocationName.Sector12FourSigma,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.LocationName.Sector12IcarusMicrosystems,types:[i.LocationType.Company]},{city:a.CityName.Sector12,expMult:1,costMult:1,name:r.LocationName.Sector12IronGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.LocationName.Sector12JoesGuns,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.LocationName.Sector12MegaCorp,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12NSA,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,costMult:20,expMult:10,name:r.LocationName.Sector12PowerhouseGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,costMult:3,expMult:2,name:r.LocationName.Sector12RothmanUniversity,types:[i.LocationType.University]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12UniversalEnergy,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.LocationName.VolhavenCompuTek,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.LocationName.VolhavenHeliosLabs,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.LocationName.VolhavenLexoCorp,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:7,expMult:4,name:r.LocationName.VolhavenMilleniumFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.LocationName.VolhavenNWO,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.LocationName.VolhavenOmniTekIncorporated,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.LocationName.VolhavenOmniaCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.LocationName.VolhavenSysCoreSecurities,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:5,expMult:4,name:r.LocationName.VolhavenZBInstituteOfTechnology,types:[i.LocationType.University]},{city:null,name:r.LocationName.Hospital,types:[i.LocationType.Hospital]},{city:null,name:r.LocationName.Slums,types:[i.LocationType.Slums]},{city:null,name:r.LocationName.TravelAgency,types:[i.LocationType.TravelAgency]},{city:null,name:r.LocationName.WorldStockExchange,types:[i.LocationType.StockMarket]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Location=void 0;const a=n(41);t.Location=class{constructor(e){this.city=null,this.costMult=0,this.expMult=0,this.name=a.LocationName.Void,this.types=[],this.techVendorMaxRam=0,this.techVendorMinRam=0,e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;t.City=class{constructor(e,t=[],n=""){this.name=e,this.locations=t,this.asciiArt=n}addLocation(e){this.locations.push(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFile=void 0;const a=n(129);t.SourceFile=class{constructor(e,t=""){this.lvl=1,this.owned=!1;const n="BitNode"+e,r=a.BitNodes[n];if(null==r)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name=`Source-File ${e}: ${r.name}`,this.info=t}}},,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=void 0;const o=i(n(0)),s=n(500),l={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};t.ErrorBoundary=class extends o.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof s.EventEmitter&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?o.createElement("div",{style:l},o.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),o.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),o.createElement("p",null,`Error info: ${this.state.errorInfo}`)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickersConfig=t.TickerDisplayMode=void 0;const o=i(n(0)),s=n(54);var l;!function(e){e[e.AllStocks=0]="AllStocks",e[e.Portfolio=1]="Portfolio"}(l=t.TickerDisplayMode||(t.TickerDisplayMode={}));t.StockTickersConfig=class extends o.Component{constructor(e){super(e)}renderDisplayModeButton(){let e="",t="";return this.props.tickerDisplayMode===l.Portfolio?(e="Switch to 'All Stocks' Mode",t="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",t="Displays only the stocks for which you have shares or orders"),o.createElement(s.StdButton,{onClick:this.props.changeDisplayMode,text:e,tooltip:t})}render(){return o.createElement("div",null,this.renderDisplayModeButton(),o.createElement(s.StdButton,{onClick:this.props.expandAllTickers,text:"Expand Tickers"}),o.createElement(s.StdButton,{onClick:this.props.collapseAllTickers,text:"Collapse Tickers"}),o.createElement("input",{className:"text-input",id:"stock-market-watchlist-filter",onChange:this.props.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerTxButton=void 0;const o=i(n(0));t.StockTickerTxButton=function(e){let t="stock-market-input std-button";return null!=e.tooltip&&(t+=" tooltip"),o.createElement("button",{className:t,onClick:e.onClick},e.text,null!=e.tooltip&&o.createElement("span",{className:"tooltiptext"},e.tooltip))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerPositionText=void 0;const o=i(n(0)),s=n(6),l=n(21),c=n(37),u={display:"block"};t.StockTickerPositionText=class extends o.Component{renderLongPosition(){const e=this.props.stock,t=e.playerShares*e.playerAvgPx,n=(e.getBidPrice()-e.playerAvgPx)*e.playerShares;let a=n/t;return isNaN(a)&&(a=0),o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Long Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the long position will increase in value if the price of the corresponding stock increases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",o.createElement(l.Money,{money:e.playerAvgPx})," (Total Cost: ",o.createElement(l.Money,{money:t})),o.createElement("br",null),o.createElement("p",null,"Profit: ",o.createElement(l.Money,{money:n})," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null))}renderShortPosition(){const e=this.props.stock,t=e.playerShortShares*e.playerAvgShortPx,n=(e.playerAvgShortPx-e.getAskPrice())*e.playerShortShares;let a=n/t;return isNaN(a)&&(a=0),8===this.props.p.bitNodeN||c.SourceFileFlags[8]>=2?o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Short Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShortShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",o.createElement(l.Money,{money:e.playerAvgShortPx})," (Total Cost: ",o.createElement(l.Money,{money:t}),")"),o.createElement("br",null),o.createElement("p",null,"Profit: ",o.createElement(l.Money,{money:n})," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null)):null}render(){const e=this.props.stock;return o.createElement("div",{className:"stock-market-position-text"},o.createElement("p",{style:u},"Max Shares: ",s.numeralWrapper.formatShares(e.maxShares)),o.createElement("p",{className:"tooltip"},"Ask Price: ",o.createElement(l.Money,{money:e.getAskPrice()}),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Bid Price: ",o.createElement(l.Money,{money:e.getBidPrice()}),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrder=void 0;const o=i(n(0)),s=n(98),l=n(6),c=n(21);t.StockTickerOrder=class extends o.Component{constructor(e){super(e),this.handleCancelOrderClick=this.handleCancelOrderClick.bind(this)}handleCancelOrderClick(){this.props.cancelOrder({order:this.props.order})}render(){const e=this.props.order,t=e.pos===s.PositionTypes.Long?"Long Position":"Short Position",n=o.createElement(o.Fragment,null,e.type," - ",t," - ",l.numeralWrapper.formatShares(e.shares)," @ ",o.createElement(c.Money,{money:e.price}));return o.createElement("li",null,n,o.createElement("button",{className:"std-button stock-market-order-cancel-btn",onClick:this.handleCancelOrderClick},"Cancel Order"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrderList=void 0;const o=i(n(0)),s=n(1055);t.StockTickerOrderList=class extends o.Component{render(){const e=[];for(let t=0;t<this.props.orders.length;++t){const n=this.props.orders[t];e.push(o.createElement(s.StockTickerOrder,{cancelOrder:this.props.cancelOrder,order:n,key:t}))}return o.createElement("ul",{className:"stock-market-order-list"},e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TickerHeaderFormatData=void 0;const a=n(296);t.TickerHeaderFormatData={longestName:0,longestSymbol:0};for(const e in a.StockSymbols)t.TickerHeaderFormatData.longestName=Math.max(e.length,t.TickerHeaderFormatData.longestName),t.TickerHeaderFormatData.longestSymbol=Math.max(a.StockSymbols[e].length,t.TickerHeaderFormatData.longestSymbol)},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerHeaderText=void 0;const o=i(n(0)),s=n(1057),l=n(25),c=n(6),u=["cs","lv","pl","ru"];t.StockTickerHeaderText=function(e){const t=e.stock,n=c.numeralWrapper.formatMoney(t.price),a=u.includes(l.Settings.Locale)?15:12,r=" ".repeat(1+s.TickerHeaderFormatData.longestName-t.name.length+(s.TickerHeaderFormatData.longestSymbol-t.symbol.length)),i=" ".repeat(a-n.length);let m=`${t.name}${r}${t.symbol} -${i}${n}`;if(e.p.has4SData){m+=` - Volatility: ${c.numeralWrapper.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),m+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}const p={color:"#66ff33"};return t.lastPrice===t.price?p.color="white":t.lastPrice>t.price&&(p.color="red"),o.createElement("pre",{style:p},m)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTicker=void 0;const o=i(n(0)),s=n(1058),l=n(1056),c=n(1054),u=n(1053),m=n(301),p=n(110),d=n(98),h=n(37),f=n(6),g=n(164),y=n(21),_=n(13),b=n(63);var v;!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(v||(v={}));t.StockTicker=class extends o.Component{constructor(e){super(e),this.state={orderType:v.Market,position:d.PositionTypes.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}createPlaceOrderPopupBox(e,t,n){const a=b.yesNoTxtInpBoxGetYesButton(),r=b.yesNoTxtInpBoxGetNoButton();a.innerText=e,a.addEventListener("click",()=>{const e=parseFloat(b.yesNoTxtInpBoxGetInput());if(isNaN(e))return _.dialogBoxCreate(`Invalid input for price: ${b.yesNoTxtInpBoxGetInput()}`),!1;n(e),b.yesNoTxtInpBoxClose()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{b.yesNoTxtInpBoxClose()}),b.yesNoTxtInpBoxCreate(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const n=m.getBuyTransactionCost(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Purchasing ",f.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will cost ",o.createElement(y.Money,{money:n}),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===d.PositionTypes.Long){if(t>e.playerShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Short position");const n=m.getSellTransactionGain(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Selling ",f.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will result in a gain of ",o.createElement(y.Money,{money:n}),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))_.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case v.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case v.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitBuy,this.state.position)});break;case v.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let n=m.calculateBuyMaxAmount(t,this.state.position,e);switch(n=Math.min(n,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case v.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(t,n):this.props.buyStockLong(t,n),this.props.rerenderAllTickers();break;default:_.dialogBoxCreate("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const n=t.nextElementSibling;"block"===n.style.display?n.style.display="none":n.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case v.Limit:this.setState({orderType:v.Limit});break;case v.Stop:this.setState({orderType:v.Stop});break;case v.Market:default:this.setState({orderType:v.Market})}}handlePositionTypeChange(e){e.target.value===d.PositionTypes.Short?this.setState({position:d.PositionTypes.Short}):this.setState({position:d.PositionTypes.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))_.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case v.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case v.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitSell,this.state.position)});break;case v.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case v.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:_.dialogBoxCreate("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=2}render(){return o.createElement("li",null,o.createElement(g.Accordion,{headerContent:o.createElement(s.StockTickerHeaderText,{p:this.props.p,stock:this.props.stock}),panelContent:o.createElement("div",null,o.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},o.createElement("option",{value:d.PositionTypes.Long},"Long"),this.hasShortAccess()&&o.createElement("option",{value:d.PositionTypes.Short},"Short")),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},o.createElement("option",{value:v.Market},v.Market),this.hasOrderAccess()&&o.createElement("option",{value:v.Limit},v.Limit),this.hasOrderAccess()&&o.createElement("option",{value:v.Stop},v.Stop)),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),o.createElement(c.StockTickerPositionText,{p:this.props.p,stock:this.props.stock}),o.createElement(l.StockTickerOrderList,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickers=void 0;const o=i(n(0)),s=n(1059),l=n(1052),c=n(193),u=n(1051);t.StockTickers=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:l.TickerDisplayMode.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=o.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===l.TickerDisplayMode.AllStocks?this.setState({tickerDisplayMode:l.TickerDisplayMode.Portfolio}):this.setState({tickerDisplayMode:l.TickerDisplayMode.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,n=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==n?this.setState({watchlistSymbols:n.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const n=t[e];n instanceof HTMLButtonElement&&n.classList.contains("active")&&n.click()}}expandAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const n=t[e];n instanceof HTMLButtonElement&&(n.classList.contains("active")||n.click())}}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const n=this.props.stockMarket[t];if(n instanceof c.Stock){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(n.symbol))continue;let t=this.props.stockMarket.Orders[n.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===l.TickerDisplayMode.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===t.length)continue;e.push(o.createElement(s.StockTicker,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:n.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:n}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return o.createElement(u.ErrorBoundary,Object.assign({},t),o.createElement(l.StockTickersConfig,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),o.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InfoAndPurchases=void 0;const o=i(n(0)),s=n(251),l=n(11),c=n(54),u=n(407),m=n(21),p=n(13),d={display:"block"};t.InfoAndPurchases=class extends o.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){p.dialogBoxCreate("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility<br><br>Price Forecast indicates the probability the stock has of increasing or decreasing. A '+' forecast means the stock has a higher chance of increasing than decreasing, and a '-' means the opposite. The number of '+/-' symbols is used to illustrate the magnitude of these probabilities. For example, '+++' means that the stock has a significantly higher chance of increasing than decreasing, while '+' means that the stock only has a slightly higher chance of increasing than decreasing.<br><br>Volatility represents the maximum percentage by which a stock's price can change every tick (a tick occurs every few seconds while the game is running).<br><br>A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(l.CONSTANTS.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(l.CONSTANTS.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(l.CONSTANTS.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(l.CONSTANTS.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(s.getStockMarket4SDataCost())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(s.getStockMarket4SDataCost()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(s.getStockMarket4STixApiCost())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(s.getStockMarket4STixApiCost()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return o.createElement(u.StdButtonPurchased,{text:"WSE Account - Purchased"});{const e=l.CONSTANTS.WSEAccountCost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:o.createElement(o.Fragment,null,"Buy WSE Account - ",o.createElement(m.Money,{money:e,player:this.props.p}))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return o.createElement(u.StdButtonPurchased,{text:"TIX API Access - Purchased"});{const e=l.CONSTANTS.TIXAPICost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:d,text:o.createElement(o.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",o.createElement(m.Money,{money:e,player:this.props.p}))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=s.getStockMarket4SDataCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:o.createElement(o.Fragment,null,"Buy 4S Market Data Access - ",o.createElement(m.Money,{money:e,player:this.props.p})),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=s.getStockMarket4STixApiCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:o.createElement(o.Fragment,null,"Buy 4S Market Data TIX API Access - ",o.createElement(m.Money,{money:e,player:this.props.p})),tooltip:"Let you access 4S Market Data through Netscript"})}}return o.createElement(c.StdButton,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return o.createElement("div",{className:"stock-market-info-and-purchases"},o.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),o.createElement("button",{className:"std-button"},o.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),o.createElement("br",null),o.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),o.createElement("h2",null,"Trade Information eXchange (TIX) API"),o.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),o.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),o.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),o.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),o.createElement("p",null,"Commission Fees: Every transaction you make has a ",o.createElement(m.Money,{money:l.CONSTANTS.StockMarketCommission,player:this.props.p})," commission fee."),o.createElement("br",null),o.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockMarketRoot=void 0;const o=i(n(0)),s=n(1061),l=n(1060);t.StockMarketRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return o.createElement("div",null,o.createElement(s.InfoAndPurchases,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&o.createElement(l.StockTickers,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitStockMetadata=void 0;const a=n(296),r=n(41);t.InitStockMetadata=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.LocationName.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.LocationName.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.LocationName.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.LocationName.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.LocationName.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.LocationName.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.LocationName.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.LocationName.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:a.StockSymbols[r.LocationName.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.LocationName.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.LocationName.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.LocationName.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.LocationName.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:a.StockSymbols[r.LocationName.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.LocationName.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.LocationName.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:a.StockSymbols[r.LocationName.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.LocationName.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:a.StockSymbols[r.LocationName.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:a.StockSymbols["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:a.StockSymbols["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:a.StockSymbols["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Titan Laboratories"]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TicksPerCycle=void 0,t.TicksPerCycle=75},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.processOrders=void 0;const o=n(175),s=n(193),l=n(110),c=n(98),u=n(6),m=n(21),p=n(13),d=i(n(0));function h(e,t){const n=t.symbolToStockMap[e.stockSymbol];if(!(n instanceof s.Stock))return void console.error(`Could not find stock for this order: ${e.stockSymbol}`);const a=t.stockMarket.Orders[n.symbol],r={rerenderFn:t.rerenderFn,suppressDialog:!0};let i=!0,h=!1;switch(e.type){case l.OrderTypes.LimitBuy:case l.OrderTypes.StopBuy:h=!0,e.pos===c.PositionTypes.Long?i=o.buyStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.shortStock(n,e.shares,null,r)&&i);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopSell:e.pos===c.PositionTypes.Long?i=o.sellStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.sellShort(n,e.shares,null,r)&&i);break;default:return void console.warn(`Invalid order type: ${e.type}`)}const f=e.pos===c.PositionTypes.Long?"Long":"Short";if(i){for(let r=0;r<a.length;++r)if(e==a[r])return a.splice(r,1),p.dialogBoxCreate(d.createElement(d.Fragment,null,e.type," for ",n.symbol," @ ",d.createElement(m.Money,{money:e.price})," (",f,") was filled (",u.numeralWrapper.formatShares(Math.round(e.shares))," shares)")),void t.rerenderFn();console.error("Could not find the following Order in Order Book: "),console.error(e)}else h&&p.dialogBoxCreate(d.createElement(d.Fragment,null,"Failed to execute ",e.type," for ",n.symbol," @ ",d.createElement(m.Money,{money:e.price})," (",f,"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares"))}t.processOrders=function(e,t,n,a){const r=a.stockMarket.Orders;if(null==r){const e={};for(const t in a.stockMarket){const n=a.stockMarket[t];n instanceof s.Stock&&(e[n.symbol]=[])}return void(a.stockMarket.Orders=e)}let i=r[e.symbol];if(null==i||i.constructor!==Array)return console.error(`Invalid Order book for ${e.symbol} in processOrders(): ${i}`),void(i=[]);for(const r of i)if(r.type===t&&r.pos===n)switch(r.type){case l.OrderTypes.LimitBuy:r.pos===c.PositionTypes.Long&&e.price<=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price>=r.price&&h(r,a);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopBuy:r.pos===c.PositionTypes.Long&&e.price>=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price<=r.price&&h(r,a);break;case l.OrderTypes.StopSell:r.pos===c.PositionTypes.Long&&e.price<=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price>=r.price&&h(r,a);break;default:return void console.warn(`Invalid order type: ${r.type}`)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Order=void 0;const a=n(110),r=n(98),i=n(29);class o{constructor(e="",t=0,n=0,i=a.OrderTypes.LimitBuy,o=r.PositionTypes.Long){let s=!1;if("number"==typeof t&&"number"==typeof n||(s=!0),(isNaN(t)||isNaN(n))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=n,this.type=i,this.pos=o}toJSON(){return i.Generic_toJSON("Order",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Order=o,i.Reviver.constructors.Order=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=void 0,t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubdirectories=void 0;const a=n(87);t.getSubdirectories=function(e,t){const n=[];if(!a.isValidDirectoryPath(t))return n;let r=t;function i(e){if("/"===r&&a.isInRootDirectory(e)){const t=a.getFirstParentDirectory(e);"/"===t||n.includes(t)||n.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=a.getFirstParentDirectory(t);"/"===i||n.includes(i)||n.push(i)}}r.endsWith("/")||(r+="/");for(const t of e.scripts)i(t.filename);for(const t of e.textFiles)i(t.fn);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgrade=void 0;const a=n(499),r=n(6);t.GangMemberUpgrade=class{constructor(e="",t=0,n=a.UpgradeType.Weapon,r={}){this.name=e,this.cost=t,this.type=n,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("<br>")}getType(){switch(this.type){case a.UpgradeType.Weapon:return"Weapon";case a.UpgradeType.Armor:return"Armor";case a.UpgradeType.Vehicle:return"Vehicle";case a.UpgradeType.Rootkit:return"Rootkit";case a.UpgradeType.Augmentation:return"Augmentation";default:return""}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMember=void 0;const a=n(702),r=n(297),i=n(176),o=n(86),s=n(29);class l{constructor(e=""){this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_points=0,this.str_asc_points=0,this.def_asc_points=0,this.dex_asc_points=0,this.agi_asc_points=0,this.cha_asc_points=0,this.upgrades=[],this.augmentations=[],this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.GangMemberTasks.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof a.GangMemberTask&&(this.task=this.task.name),r.GangMemberTasks.hasOwnProperty(this.task)?r.GangMemberTasks[this.task]:r.GangMemberTasks.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.respect)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*n*a*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.wanted)/100);if(isNaN(a)||a<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*a;const r=7*t.baseWanted/Math.pow(3*n*a,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.money)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*n*a*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.GangMemberTasks.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e,a=this.expMult();this.hack_exp+=t.hackWeight/1500*n*a.hack,this.str_exp+=t.strWeight/1500*n*a.str,this.def_exp+=t.defWeight/1500*n*a.def,this.dex_exp+=t.dexWeight/1500*n*a.dex,this.agi_exp+=t.agiWeight/1500*n*a.agi,this.cha_exp+=t.chaWeight/1500*n*a.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e<this.augmentations.length;++e){const t=i.GangMemberUpgrades[this.augmentations[e]];this.applyUpgrade(t)}this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.updateSkillLevels();const n=this.earnedRespect;return this.earnedRespect=0,{respect:n,hack:e.hack,str:e.str,def:e.def,dex:e.dex,agi:e.agi,cha:e.cha}}applyUpgrade(e){null!=e.mults.str&&(this.str_mult*=e.mults.str),null!=e.mults.def&&(this.def_mult*=e.mults.def),null!=e.mults.dex&&(this.dex_mult*=e.mults.dex),null!=e.mults.agi&&(this.agi_mult*=e.mults.agi),null!=e.mults.cha&&(this.cha_mult*=e.mults.cha),null!=e.mults.hack&&(this.hack_mult*=e.mults.hack)}buyUpgrade(e,t,n){return!this.augmentations.includes(e.name)&&!this.upgrades.includes(e.name)&&(!t.money.lt(n.getUpgradeCost(e))&&(t.loseMoney(n.getUpgradeCost(e)),"g"===e.type?this.augmentations.push(e.name):this.upgrades.push(e.name),this.applyUpgrade(e),!0))}toJSON(){return s.Generic_toJSON("GangMember",this)}static fromJSON(e){return s.Generic_fromJSON(l,e.data)}}t.GangMember=l,s.Reviver.constructors.GangMember=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberTasksMetadata=void 0,t.gangMemberTasksMetadata=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:1,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:120,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism<br><br>Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations<br><br>Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets<br><br>Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:1.2,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs<br><br>Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory<br><br>Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:38,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:24,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism<br><br>Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Terrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:36,territory:{money:1,respect:2,wanted:2}}},{desc:"Assign this gang member to be a vigilante and protect the city from criminals<br><br>Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItem=void 0;t.DarkWebItem=class{constructor(e,t,n){this.program=e,this.price=t,this.description=n}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;class a{constructor(e){this.parent=null,this.stopFlag=!1,this.vars={},e instanceof a&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error(`Undefined variable ${e}`)}set(e,t){const n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}t.Environment=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidNumber=void 0,t.isValidNumber=function(e){return"number"==typeof e&&!isNaN(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serverMetadata=void 0;const a=n(41),r=n(148);t.serverMetadata=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:a.LocationName.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:a.LocationName.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:a.LocationName.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:a.LocationName.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.LiteratureNames.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:a.LocationName.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.LiteratureNames.BeyondMan,r.LiteratureNames.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.LiteratureNames.CodedIntelligence,r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:a.LocationName.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:a.LocationName.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:a.LocationName.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:a.LocationName.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:"Fulcrum Secret Technologies Server"},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:a.LocationName.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:a.LocationName.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:a.LocationName.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:a.LocationName.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:a.LocationName.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:a.LocationName.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.LiteratureNames.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:a.LocationName.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:a.LocationName.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.LiteratureNames.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:a.LocationName.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:a.LocationName.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:a.LocationName.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:a.LocationName.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:a.LocationName.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:a.LocationName.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:a.LocationName.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:a.LocationName.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:a.LocationName.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:a.LocationName.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:a.LocationName.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:a.LocationName.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:a.LocationName.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:a.LocationName.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:a.LocationName.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.LiteratureNames.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.LiteratureNames.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.LiteratureNames.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.LiteratureNames.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:a.LocationName.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:a.LocationName.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:a.LocationName.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:a.LocationName.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:a.LocationName.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.LiteratureNames.SimulatedReality,r.LiteratureNames.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"BitRunners Server"},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:"The Black Hand Server"},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:"NiteSec Server"},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"The Dark Army Server"},{hackDifficulty:0,hostname:"CSEC",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:"CyberSec Server"},{hackDifficulty:0,hostname:"The-Cave",literature:[r.LiteratureNames.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:"Daedalus Server"},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:"w0r1d_d43m0n"}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomString=void 0;const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t.createRandomString=function(e){let t="";for(let n=0;n<e;++n)t+=a.charAt(Math.floor(Math.random()*a.length));return t}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgradesMetadata=void 0;const r=a(n(0)),i=n(6),o=n(21);t.HashUpgradesMetadata=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:e=>r.default.createElement(r.default.Fragment,null,"Sold for ",r.default.createElement(o.Money,{money:1e6*e})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.default.createElement(r.default.Fragment,null,"Sold for ",r.default.createElement(o.Money,{money:1e9*e})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.default.createElement(r.default.Fragment,null,"Improves training by $",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.default.createElement(r.default.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrade=void 0;t.HashUpgrade=class{constructor(e){this.costPerLevel=0,this.desc="",this.hasTargetServer=!1,this.name="",this.value=0,this.effectText=(()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomByte=void 0;const a=n(44);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return a.getRandomInt(0,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContractPopup=void 0;const o=i(n(0)),s=n(46),l=n(92),c=n(167),u=n(706);t.CodingContractPopup=function(e){const[t,n]=o.useState(""),a=l.CodingContractTypes[e.c.type],r=[];for(const[t,n]of a.desc(e.c.data).split("\n").entries())r.push(o.default.createElement("span",{key:t,dangerouslySetInnerHTML:{__html:n+"<br />"}}));return o.default.createElement("div",null,o.default.createElement(c.CopyableText,{value:e.c.type,tag:c.ClickableTag.Tag_h1}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"You are attempting to solve a Coding Contract. You have ",e.c.getMaxNumTries()-e.c.tries," tries remaining, after which the contract will self-destruct."),o.default.createElement("br",null),o.default.createElement("p",null,r),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){n(e.target.value)},onKeyDown:function(n){const a=n.target.value;n.keyCode===s.KEY.ENTER&&""!==a?(n.preventDefault(),e.onAttempt(t)):n.keyCode===s.KEY.ESC&&(n.preventDefault(),e.onClose())}}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:()=>e.onAttempt(t),text:"Solve"}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:e.onClose,text:"Close"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codingContractTypesMetadata=void 0;const a=n(44);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let n=e.toString();n=["[",n,"]"].join(""),t.push(n)}),t.join(",").replace(/\s/g,"")}t.codingContractTypesMetadata=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>a.getRandomInt(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let n=2,a=e;for(;a>(n-1)*(n-1);){for(;a%n==0;)a=Math.round(a/n);++n}return(1===a?n-1:a)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",`${e.toString()}`].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(5,40),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(-10,10);return t},name:"Subarray with Maximum Sum",numTries:10,solver:(e,t)=>{const n=e.slice();for(let e=1;e<n.length;e++)n[e]=Math.max(n[e],n[e]+n[e-1]);return parseInt(t,10)===Math.max(...n)}},{desc:e=>["It is possible write four as a sum in exactly four different ways:\n\n"," 3 + 1\n"," 2 + 2\n"," 2 + 1 + 1\n"," 1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>a.getRandomInt(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const n=[1];n.length=e+1,n.fill(0,1);for(let t=1;t<e;++t)for(let a=t;a<=e;++a)n[a]+=n[a-t];return n[e]===parseInt(t,10)}},{desc:e=>{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");for(const n of e)t+=`${n.toString()},\n`;return t+=["\nHere is an example of what spiral order should be:","\nExample:"," [\n"," [1, 2, 3],\n"," [4, 5, 6],\n"," [7, 8, 9]\n"," ] should result in [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n"," [\n"," [1, 2, 3, 4]\n"," [5, 6, 7, 8]\n"," [9, 10, 11, 12]\n"," ] should result in [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7"].join(" ")},difficulty:2,gen:()=>{const e=a.getRandomInt(1,15),t=a.getRandomInt(1,15),n=[];n.length=e;for(let a=0;a<e;++a)n[a]=[],n[a].length=t;for(let r=0;r<e;++r)for(let e=0;e<t;++e)n[r][e]=a.getRandomInt(1,50);return n},name:"Spiralize Matrix",numTries:10,solver:(e,t)=>{const n=[];let a=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)n[l]=e[a][t],++l;if(++a>i)break;for(let t=a;t<=i;t++)n[l]=e[t][s],++l;if(--s<o)break;for(let t=s;t>=o;t--)n[l]=e[i][t],++l;if(--i<a)break;for(let t=i;t>=a;t--)n[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e<c.length;++e)c[e]=parseInt(c[e],10);if(n.length!==c.length)return!1;for(let e=0;e<n.length;++e)if(n[e]!==c[e])return!1;return!0}},{desc:e=>["You are given the following array of integers:\n\n",`${e}\n\n`,"Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=a.getRandomInt(3,25),t=[];t.length=e;for(let e=0;e<t.length;++e)Math.random()<.2?t[e]=0:t[e]=a.getRandomInt(0,10);return t},name:"Array Jumping Game",numTries:1,solver:(e,t)=>{const n=e.length;let a=0;for(let t=0;a<n&&a<=t;++a)t=Math.max(a+e[a],t);const r=a===n;return!("1"!==t||!r)||"0"===t&&!r}},{desc:e=>["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=a.getRandomInt(3,20);for(let n=0;n<t;++n){const t=a.getRandomInt(1,25),n=t+a.getRandomInt(1,10);e.push([t,n])}return e},name:"Merge Overlapping Intervals",numTries:15,solver:(e,t)=>{const n=e.slice();n.sort((e,t)=>e[0]-t[0]);const a=[];let i=n[0][0],s=n[0][1];for(const e of n)e[0]<=s?s=Math.max(s,e[1]):(a.push([i,s]),i=e[0],s=e[1]);a.push([i,s]);const l=o(a),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",`${e}\n\n`,"Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=a.getRandomInt(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const n=[];for(let t=1;t<=3;++t)for(let a=1;a<=3;++a)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+a+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+a),10),l=parseInt(e.substring(t+a,t+a+r),10),c=parseInt(e.substring(t+a+r,t+a+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&n.push(t)}}const a=r(t).replace(/\s/g,"").split(",");if(a.length!==n.length)return!1;for(const e of a)if(!n.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader I",numTries:5,solver:(e,t)=>{let n=0,a=0;for(let t=1;t<e.length;++t)n=Math.max(0,n+=e[t]-e[t-1]),a=Math.max(n,a);return a.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader II",numTries:10,solver:(e,t)=>{let n=0;for(let t=1;t<e.length;++t)n+=Math.max(e[t]-e[t-1],0);return n.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader III",numTries:10,solver:(e,t)=>{let n=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,a+t),a=Math.max(a,r-t),r=Math.max(r,n+t),n=Math.max(n,-1*t);return i.toString()===t}},{desc:e=>{return["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" ")},difficulty:8,gen:()=>{const e=a.getRandomInt(2,10),t=a.getRandomInt(3,50),n=[];n.length=t;for(let e=0;e<t;++e)n[e]=a.getRandomInt(1,200);return[e,n]},name:"Algorithmic Stock Trader IV",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1],r=a.length;if(r<2)return 0===parseInt(t);if(n>r/2){let e=0;for(let t=1;t<r;++t)e+=Math.max(a[t]-a[t-1],0);return parseInt(t)===e}const i=[],o=[];i.length=n+1,o.length=n+1;for(let e=0;e<=n;++e)i[e]=Number.MIN_SAFE_INTEGER,o[e]=0;let s;for(let e=0;e<r;++e){s=a[e];for(let e=n;e>0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[n]}},{desc:e=>{return["Given a triangle, find the minimum path sum from top to bottom. In each step","of the path, you may only move to adjacent numbers in the row below.","The triangle is represented as a 2D array of numbers:\n\n",`${function(e){return["[\n",function e(t,n=0){const a=t.length;if(n>=a)return"";let r=[" ".repeat(a-n+1),"[",t[n].toString(),"]"].join("");return n<a-1&&(r+=","),r+"\n"+e(t,n+1)}(e),"]"].join("")}(e)}\n\n`,"Example: If you are given the following triangle:\n\n[\n"," [2],\n"," [3,4],\n"," [6,5,7],\n"," [4,1,8,3]\n","]\n\n","The minimum path sum is 11 (2 -> 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=a.getRandomInt(3,12);e.length=t;for(let n=0;n<t;++n){e[n]=[],e[n].length=n+1;for(let t=0;t<e[n].length;++t)e[n][t]=a.getRandomInt(1,9)}return e},name:"Minimum Path Sum in a Triangle",numTries:10,solver:(e,t)=>{const n=e.length,a=e[n-1].slice();for(let t=n-2;t>-1;--t)for(let n=0;n<e[t].length;++n)a[n]=Math.min(a[n],a[n+1])+e[t][n];return a[0]===parseInt(t)}},{desc:e=>{const t=e[0],n=e[1];return["You are in a grid with",`${t} rows and ${n} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${n}]`].join(" ")},difficulty:3,gen:()=>{return[a.getRandomInt(2,14),a.getRandomInt(2,14)]},name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1],r=[];r.length=n;for(let e=0;e<n;e++)r[e]=1;for(let e=1;e<a;e++)for(let e=1;e<n;e++)r[e]+=r[e-1];return parseInt(t)===r[n-1]}},{desc:e=>{let t="";for(const n of e)t+=`${n.toString()},\n`;return["You are located in the top-left corner of the following grid:\n\n",`${t}\n`,"You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=a.getRandomInt(2,12),t=a.getRandomInt(2,12),n=[];n.length=e;for(let a=0;a<e;++a)n[a]=[],n[a].length=t,n[a].fill(0);for(let a=0;a<e;++a)for(let r=0;r<t;++r)0===a&&0===r||a===e-1&&r===t-1||Math.random()<.15&&(n[a][r]=1);return n},name:"Unique Paths in a Grid II",numTries:10,solver:(e,t)=>{const n=[];n.length=e.length;for(let t=0;t<n.length;++t)n[t]=e[t].slice();for(let e=0;e<n.length;e++)for(let t=0;t<n[0].length;t++)1==n[e][t]?n[e][t]=0:0==e&&0==t?n[0][0]=1:n[e][t]=(e>0?n[e-1][t]:0)+(t>0?n[e][t-1]:0);return n[n.length-1][n[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",`${e}\n\n`,"remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=a.getRandomInt(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let n=1;n<e;++n){const e=Math.random();t[n]=e<.4?"(":e<.8?")":"a"}return t.join("")},name:"Sanitize Parentheses in Expression",numTries:10,solver:(e,t)=>{let n=0,a=0;const i=[];for(let t=0;t<e.length;++t)"("===e[t]?++n:")"===e[t]&&(n>0?--n:++a);!function e(t,n,a,r,i,o,s){if(i.length!==n)"("===i[n]?(a>0&&e(t,n+1,a-1,r,i,o,s),e(t+1,n+1,a,r,i,o+i[n],s)):")"===i[n]?(r>0&&e(t,n+1,a,r-1,i,o,s),t>0&&e(t-1,n+1,a,r,i,o+i[n],s)):e(t,n+1,a,r,i,o+i[n],s);else if(0===a&&0===r&&0===t){for(let e=0;e<s.length;e++)if(s[e]===o)return;s.push(o)}}(0,0,n,a,e,"",i);const o=r(t).replace(/\s/g,"").split(",");if(o.length!==i.length)return!1;for(const e of i)if(!o.includes(e))return!1;return!0}},{desc:e=>{const t=e[0],n=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",`${t}\n\n`,`You are also given a target number of ${n}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${n}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=a.getRandomInt(4,12),t=[];t.length=e;for(let e=0;e<t.length;++e)t[e]=0===e?String(a.getRandomInt(1,9)):String(a.getRandomInt(0,9));const n=a.getRandomInt(-100,100);return[t.join(""),n]},name:"Find All Valid Math Expressions",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1];const o=r(t).split(",");for(let e=0;e<o.length;++e)o[e]=i(o[e]).replace(/\s/g,"");if(null==n||0===n.length)return 0===o.length||1===o.length&&""===o[0];const s=[];!function e(t,n,a,r,i,o,s){if(i!==a.length)for(let l=i;l<a.length&&(l==i||"0"!=a[i]);++l){const c=parseInt(a.substring(i,l+1));0===i?e(t,n+c,a,r,l+1,c,c):(e(t,n+"+"+c,a,r,l+1,o+c,c),e(t,n+"-"+c,a,r,l+1,o-c,-c),e(t,n+"*"+c,a,r,l+1,o-s+s*c,s*c))}else r===o&&t.push(n)}(s,"",n,a,0,0,0);for(const e of s)if(!o.includes(e))return!1;return!0}}]},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PopupButton=void 0;const o=i(n(0)),s=i(n(22)),l=n(46),c=n(229);t.PopupButton=class extends o.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.keyListener=this.keyListener.bind(this)}componentDidMount(){document.addEventListener("keydown",this.keyListener)}componentWillUnmount(){document.removeEventListener("keydown",this.keyListener)}handleClick(){let e;this.props.onClose&&this.props.onClose(),(e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup)instanceof HTMLElement&&(s.unmountComponentAtNode(e),c.removeElement(e))}keyListener(e){e.keyCode===l.KEY.ESC&&this.handleClick()}render(){const e=this.props.class?this.props.class:"std-button";return o.createElement("button",{className:e,onClick:this.handleClick,style:this.props.style},this.props.text)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.companyPositionMetadata=void 0;const o=i(n(58));t.companyPositionMetadata=[{name:o.SoftwareCompanyPositions[0],nextPosition:o.SoftwareCompanyPositions[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:o.SoftwareCompanyPositions[1],nextPosition:o.SoftwareCompanyPositions[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:o.SoftwareCompanyPositions[2],nextPosition:o.SoftwareCompanyPositions[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:o.SoftwareCompanyPositions[3],nextPosition:o.SoftwareCompanyPositions[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:o.SoftwareCompanyPositions[4],nextPosition:o.SoftwareCompanyPositions[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:o.SoftwareCompanyPositions[5],nextPosition:o.SoftwareCompanyPositions[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:o.SoftwareCompanyPositions[6],nextPosition:o.SoftwareCompanyPositions[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:o.SoftwareCompanyPositions[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:o.ITCompanyPositions[0],nextPosition:o.ITCompanyPositions[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:o.ITCompanyPositions[1],nextPosition:o.ITCompanyPositions[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:o.ITCompanyPositions[2],nextPosition:o.ITCompanyPositions[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:o.ITCompanyPositions[3],nextPosition:o.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:o.SecurityEngineerCompanyPositions[0],nextPosition:o.SoftwareCompanyPositions[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:o.NetworkEngineerCompanyPositions[0],nextPosition:o.NetworkEngineerCompanyPositions[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:o.NetworkEngineerCompanyPositions[1],nextPosition:o.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:o.BusinessCompanyPositions[0],nextPosition:o.BusinessCompanyPositions[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:o.BusinessCompanyPositions[1],nextPosition:o.BusinessCompanyPositions[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:o.BusinessCompanyPositions[2],nextPosition:o.BusinessCompanyPositions[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:o.BusinessCompanyPositions[3],nextPosition:o.BusinessCompanyPositions[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:o.BusinessCompanyPositions[4],nextPosition:o.BusinessCompanyPositions[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:o.BusinessCompanyPositions[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:o.SecurityCompanyPositions[0],nextPosition:o.SecurityCompanyPositions[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:o.SecurityCompanyPositions[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:o.SecurityCompanyPositions[2],nextPosition:o.SecurityCompanyPositions[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:o.SecurityCompanyPositions[3],nextPosition:o.SecurityCompanyPositions[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:o.SecurityCompanyPositions[4],nextPosition:o.SecurityCompanyPositions[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:o.SecurityCompanyPositions[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:o.AgentCompanyPositions[0],nextPosition:o.AgentCompanyPositions[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:o.AgentCompanyPositions[1],nextPosition:o.AgentCompanyPositions[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:o.AgentCompanyPositions[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:o.MiscCompanyPositions[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:o.MiscCompanyPositions[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:o.SoftwareConsultantCompanyPositions[0],nextPosition:o.SoftwareConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:o.SoftwareConsultantCompanyPositions[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:o.BusinessConsultantCompanyPositions[0],nextPosition:o.BusinessConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:o.BusinessConsultantCompanyPositions[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:o.PartTimeCompanyPositions[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:o.PartTimeCompanyPositions[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantSleeveMemoryUpgrade=void 0;const o=i(n(0)),s=n(6),l=n(54),c=n(21);t.CovenantSleeveMemoryUpgrade=class extends o.Component{constructor(e){super(e),this.state={amt:1},this.changePurchaseAmount=this.changePurchaseAmount.bind(this),this.purchaseMemory=this.purchaseMemory.bind(this)}changePurchaseAmount(e){let t=parseInt(e.target.value);isNaN(t)&&(t=1);const n=100-this.props.sleeve.memory;t>n&&(t=n),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,n=this.getPurchaseCost(),a=!this.props.p.canAfford(n);let r;return r=isNaN(this.state.amt)?o.createElement(o.Fragment,null,"Invalid value"):this.state.amt>t?o.createElement(o.Fragment,null,"Memory cannot exceed 100?"):o.createElement(o.Fragment,null,"Purchase ",this.state.amt," memory - ",o.createElement(c.Money,{money:n,player:this.props.p}),"?"),o.createElement("div",null,o.createElement("h2",null,o.createElement("u",null,"Upgrade Memory")),o.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current: ",s.numeralWrapper.formatSleeveMemory(this.props.sleeve.memory),")"),o.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),o.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),o.createElement("br",null),o.createElement(l.StdButton,{disabled:a,onClick:this.purchaseMemory,text:r}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantSleeveUpgrades=void 0;const o=i(n(0)),s=n(1140);t.CovenantSleeveUpgrades=class extends o.Component{render(){return o.createElement("div",{className:"bladeburner-action"},o.createElement("h1",null,"Duplicate Sleeve ",this.props.index),o.createElement(s.CovenantSleeveMemoryUpgrade,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantPurchasesRoot=void 0;const o=i(n(0)),s=n(1141),l=n(179),c=n(709),u=n(706),m=n(54),p=n(21),d=n(13);t.CovenantPurchasesRoot=function(e){const[t,n]=o.useState(0);function a(){return(e.p.sleevesFromCovenant+1)*c.BaseCostPerSleeve}function r(){n(t+1)}let i=!1;e.p.canAfford(a())||(i=!0),e.p.sleevesFromCovenant>=c.MaxSleevesFromCovenant&&(i=!0);const h=[];for(let t=0;t<e.p.sleeves.length;++t){const n=e.p.sleeves[t];h.push(o.default.createElement(s.CovenantSleeveUpgrades,Object.assign({},e,{sleeve:n,index:t,rerender:r,key:t})))}return o.default.createElement("div",null,o.default.createElement(u.PopupCloseButton,{popup:c.PopupId,text:"Close"}),o.default.createElement("p",null,"Would you like to purchase an additional Duplicate Sleeve from The Covenant for ",o.default.createElement(p.Money,{money:a(),player:e.p}),"?"),o.default.createElement("br",null),o.default.createElement("p",null,"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of ",c.MaxSleevesFromCovenant," from The Covenant."),o.default.createElement(m.StdButton,{disabled:i,onClick:function(){e.p.sleevesFromCovenant>=c.MaxSleevesFromCovenant||(e.p.canAfford(a())?(e.p.loseMoney(a()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new l.Sleeve(e.p)),r()):d.dialogBoxCreate("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),h)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;const o=i(n(0)),s=n(54);t.Option=class extends o.Component{render(){return o.createElement("div",{className:"faction-work-div"},o.createElement("div",{className:"faction-work-div-wrapper"},o.createElement(s.StdButton,{onClick:this.props.onClick,text:this.props.buttonText}),o.createElement("p",null,this.props.infoText)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphWithTooltip=void 0;const o=i(n(0));t.ParagraphWithTooltip=class extends o.Component{render(){return o.createElement("div",{className:"tooltip",style:this.props.style},o.createElement("p",null,this.props.content),o.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingParagraph=void 0;const o=i(n(0));t.AutoupdatingParagraph=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():o.createElement(o.Fragment,null)}render(){return o.createElement("div",{className:"tooltip",style:this.props.style},o.createElement("p",null,this.props.getContent()),this.hasTooltip()&&o.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const o=i(n(0)),s=n(1145),l=n(1144),c=n(60),u=n(710),m=n(419),p={display:"block"},d={display:"block",width:"70%"};t.Info=class extends o.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return o.createElement(o.Fragment,null,"You will have ",u.Favor(this.props.faction.favor+e)," faction favor after installing an Augmentation.",o.createElement(m.MathComponent,{tex:String.raw`\large{r = \text{total faction reputation}}`}),o.createElement(m.MathComponent,{tex:String.raw`\large{favor=\left\lfloor\log_{1.02}\left(\frac{r+25000}{25500}\right)\right\rfloor}`}))}getReputationContent(){return o.createElement(o.Fragment,null,"Reputation: ",c.Reputation(this.props.faction.playerReputation))}render(){const e=o.createElement(o.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.",o.createElement(m.MathComponent,{tex:String.raw`\large{r = reputation}`}),o.createElement(m.MathComponent,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`})),t={__html:this.props.factionInfo.infoText};return o.createElement("div",null,o.createElement("pre",null,o.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),o.createElement("p",{style:p},"-------------------------"),o.createElement(s.AutoupdatingParagraph,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),o.createElement("p",{style:p},"-------------------------"),o.createElement(l.ParagraphWithTooltip,{content:o.createElement(o.Fragment,null,"Faction Favor: ",u.Favor(this.props.faction.favor)),tooltip:e}),o.createElement("p",{style:p},"-------------------------"),o.createElement("p",{style:d},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repFromDonation=void 0;const a=n(11);t.repFromDonation=function(e,t){return e/a.CONSTANTS.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DonateOption=void 0;const o=i(n(0)),s=n(11),l=n(1289),c=n(21),u=n(60),m=n(54),p=n(6),d=n(13),h=n(419),f={margin:"5px",height:"26px"};t.DonateOption=function(e){const[t,n]=o.useState(null),a=(s.CONSTANTS.DonateMoneyToRepDivisor+"").length-1;function r(){return!(null===t||isNaN(t)||t<=0||e.p.money.lt(t))}return o.default.createElement("div",{className:"faction-work-div"},o.default.createElement("div",{className:"faction-work-div-wrapper"},o.default.createElement("input",{className:"text-input",onChange:function(e){const t=p.numeralWrapper.parseMoney(e.target.value);""===e.target.value||isNaN(t)?n(null):n(t)},placeholder:"Donation amount",style:f,disabled:e.disabled}),o.default.createElement(m.StdButton,{onClick:function(){const n=e.faction,a=t;if(null===a)return;if(!r())return;e.p.loseMoney(a);const i=l.repFromDonation(a,e.p);e.faction.playerReputation+=i,d.dialogBoxCreate(o.default.createElement(o.default.Fragment,null,"You just donated ",o.default.createElement(c.Money,{money:a})," to ",n.name," to gain ",u.Reputation(i)," reputation.")),e.rerender()},text:"Donate Money",disabled:e.disabled||!r()}),o.default.createElement(function(){return null===t?o.default.createElement(o.default.Fragment,null):r()?o.default.createElement("p",null,"This donation will result in ",u.Reputation(l.repFromDonation(t,e.p))," reputation gain"):e.p.money.lt(t)?o.default.createElement("p",null,"Insufficient funds"):o.default.createElement("p",null,"Invalid donate amount entered!")},null),e.disabled?o.default.createElement("p",null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):o.default.createElement("div",{className:"text"},o.default.createElement(h.MathComponent,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${a}}}`}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const o=i(n(0));t.Augmentation=function(e){return o.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchaseableAugmentation=void 0;const o=i(n(0)),s=n(72),l=n(12),c=n(3),u=n(25),m=n(21),p=n(60),d=n(54),h=n(1291),f={margin:"4px",padding:"4px"},g={display:"inline-block"};t.PurchaseableAugmentation=class extends o.Component{constructor(e){super(e);const t=l.Augmentations[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){u.Settings.SuppressBuyAugmentationConfirmation?s.purchaseAugmentation(this.aug,this.props.faction):s.purchaseAugmentationBoxCreate(this.aug,this.props.faction)}hasPrereqs(){return s.hasAugmentationPrereqs(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${this.props.augName}`),null;const e=this.getMoneyCost(),t=this.getRepCost();let n=!1,a=o.createElement(o.Fragment,null),r="";this.hasPrereqs()?this.aug.name!==c.AugmentationNames.NeuroFluxGovernor&&(this.aug.owned||this.owned())?n=!0:this.hasReputation()?a=o.createElement(o.Fragment,null,"UNLOCKED (at ",p.Reputation(t)," faction reputation) - ",o.createElement(m.Money,{money:e,player:this.props.p})):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",p.Reputation(t)," faction reputation - ",o.createElement(m.Money,{money:e,player:this.props.p}),")"),r="red"):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>h.Augmentation(e))," as prerequisite)"),r="red");const i={display:"inline-block"};""!==r&&(i.color=r);let l=this.aug.name;this.aug.name===c.AugmentationNames.NeuroFluxGovernor&&(l+=` - Level ${s.getNextNeurofluxLevel()}`);let u=o.createElement(o.Fragment,null);return u="string"==typeof this.aug.info?o.createElement(o.Fragment,null,o.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),o.createElement("br",null),o.createElement("br",null),this.aug.stats):o.createElement(o.Fragment,null,this.aug.info,o.createElement("br",null),o.createElement("br",null),this.aug.stats),o.createElement("li",null,o.createElement("span",{style:f},o.createElement(d.StdButton,{disabled:n,onClick:this.handleClick,style:g,text:l,tooltip:u}),o.createElement("p",{style:i},a)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsPage=void 0;const o=i(n(0)),s=n(1292),l=n(12),c=n(3),u=n(227),m=n(25),p=n(54),d={width:"70%"};t.AugmentationsPage=class extends o.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:u.PurchaseAugmentationsOrderSetting.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in l.Augmentations)l.Augmentations[t].isSpecial||e.push(t);return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(m.Settings.PurchaseAugmentationsOrder){case u.PurchaseAugmentationsOrderSetting.Cost:return this.getAugsSortedByCost();case u.PurchaseAugmentationsOrderSetting.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){m.Settings.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===c.AugmentationNames.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),n=e=>o.createElement(s.PurchaseableAugmentation,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),a=t.map(e=>n(e));let r=o.createElement(o.Fragment,null);const i=e.filter(e=>!t.includes(e));return 0!==i.length&&(r=o.createElement(o.Fragment,null,o.createElement("br",null),o.createElement("h2",null,"Purchased Augmentations"),o.createElement("p",{style:d},"This factions also offers these augmentations but you already own them."),i.map(e=>n(e)))),o.createElement("div",null,o.createElement(p.StdButton,{onClick:this.props.routeToMainPage,text:"Back"}),o.createElement("h1",null,"Faction Augmentations"),o.createElement("p",{style:d},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Cost),text:"Sort by Cost"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Reputation),text:"Sort by Reputation"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Default),text:"Sort by Default Order"}),o.createElement("br",null),a,r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.programsMetadata=void 0;const a=n(11);function r(e){return function(t){return t.hacking_skill>=e}}t.programsMetadata=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:r(1),time:a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:a.CONSTANTS.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:a.CONSTANTS.MillisecondsPer8Hours}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:r(75),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:r(400),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:r(25),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:a.CONSTANTS.MillisecondsPerFiveMinutes/20}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Program=void 0;t.Program=class{constructor(e,t){this.name="",this.name=e,this.create=t}htmlID(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.companiesMetadata=void 0;const o=i(n(58)),s=n(41),l={},c={},u={},m={},p={},d={},h={},f={},g={},y={},_={},b={},v={},k={},E={},C={},S={},P={},T={};o.SoftwareCompanyPositions.forEach(e=>{l[e]=!0,p[e]=!0}),o.ITCompanyPositions.forEach(e=>{c[e]=!0,p[e]=!0}),o.NetworkEngineerCompanyPositions.forEach(e=>{u[e]=!0,p[e]=!0}),p[o.SecurityEngineerCompanyPositions[0]]=!0,m[o.SecurityEngineerCompanyPositions[0]]=!0,o.BusinessCompanyPositions.forEach(e=>{d[e]=!0}),o.SecurityCompanyPositions.forEach(e=>{f[e]=!0}),o.AgentCompanyPositions.forEach(e=>{h[e]=!0}),o.SoftwareConsultantCompanyPositions.forEach(e=>{g[e]=!0}),o.BusinessConsultantCompanyPositions.forEach(e=>{y[e]=!0});for(let e=0;e<o.SoftwareCompanyPositions.length;++e){const t=o.SoftwareCompanyPositions[e];e<=5&&(_[t]=!0),e<=3&&(b[t]=!0)}for(let e=0;e<o.BusinessCompanyPositions.length;++e){const t=o.BusinessCompanyPositions[e];e<=3&&(v[t]=!0)}k[o.MiscCompanyPositions[0]]=!0,E[o.MiscCompanyPositions[1]]=!0,C[o.PartTimeCompanyPositions[0]]=!0,S[o.PartTimeCompanyPositions[1]]=!0,P[o.BusinessCompanyPositions[3]]=!0,T[o.BusinessCompanyPositions[5]]=!0,t.companiesMetadata=[{name:s.LocationName.AevumECorp,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:s.LocationName.Sector12MegaCorp,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:s.LocationName.AevumBachmanAndAssociates,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.6,salaryMultiplier:2.6,jobStatReqOffset:224},{name:s.LocationName.Sector12BladeIndustries,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:224},{name:s.LocationName.VolhavenNWO,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:249},{name:s.LocationName.AevumClarkeIncorporated,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:s.LocationName.VolhavenOmniTekIncorporated,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:s.LocationName.Sector12FourSigma,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.5,salaryMultiplier:2.5,jobStatReqOffset:224},{name:s.LocationName.ChongqingKuaiGongInternational,info:"",companyPositions:Object.assign({},p,d,f),expMultiplier:2.2,salaryMultiplier:2.2,jobStatReqOffset:224},{name:s.LocationName.AevumFulcrumTechnologies,info:"",companyPositions:Object.assign({},p,d),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:224},{name:s.LocationName.IshimaStormTechnologies,info:"",companyPositions:Object.assign({},p,g,d),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:s.LocationName.NewTokyoDefComm,info:"",companyPositions:Object.assign({},T,p,g),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:s.LocationName.VolhavenHeliosLabs,info:"",companyPositions:Object.assign({},T,p,g),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:s.LocationName.NewTokyoVitaLife,info:"",companyPositions:Object.assign({},p,d,g),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:s.LocationName.Sector12IcarusMicrosystems,info:"",companyPositions:Object.assign({},p,d,g),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:s.LocationName.Sector12UniversalEnergy,info:"",companyPositions:Object.assign({},p,d,g),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:199},{name:s.LocationName.AevumGalacticCybersystems,info:"",companyPositions:Object.assign({},p,d,g),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:s.LocationName.AevumAeroCorp,info:"",companyPositions:Object.assign({},T,P,p,f),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:s.LocationName.VolhavenOmniaCybersystems,info:"",companyPositions:Object.assign({},T,P,p,f),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:s.LocationName.ChongqingSolarisSpaceSystems,info:"",companyPositions:Object.assign({},T,P,p,f),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:s.LocationName.Sector12DeltaOne,info:"",companyPositions:Object.assign({},T,P,p,f),expMultiplier:1.6,salaryMultiplier:1.6,jobStatReqOffset:199},{name:s.LocationName.NewTokyoGlobalPharmaceuticals,info:"",companyPositions:Object.assign({},p,d,g,f),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:224},{name:s.LocationName.IshimaNovaMedical,info:"",companyPositions:Object.assign({},p,d,g,f),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:s.LocationName.Sector12CIA,info:"",companyPositions:Object.assign({},_,u,m,c,f,h),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:s.LocationName.Sector12NSA,info:"",companyPositions:Object.assign({},_,u,m,c,f,h),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:s.LocationName.AevumWatchdogSecurity,info:"",companyPositions:Object.assign({},_,u,c,f,h,g),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:124},{name:s.LocationName.VolhavenLexoCorp,info:"",companyPositions:Object.assign({},p,g,d,f),expMultiplier:1.4,salaryMultiplier:1.4,jobStatReqOffset:99},{name:s.LocationName.AevumRhoConstruction,info:"",companyPositions:Object.assign({},b,v),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:49},{name:s.LocationName.Sector12AlphaEnterprises,info:"",companyPositions:Object.assign({},b,v,g),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:99},{name:s.LocationName.AevumPolice,info:"",companyPositions:Object.assign({},f,b),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:99},{name:s.LocationName.VolhavenSysCoreSecurities,info:"",companyPositions:Object.assign({},p),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:124},{name:s.LocationName.VolhavenCompuTek,info:"",companyPositions:Object.assign({},p),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:s.LocationName.AevumNetLinkTechnologies,info:"",companyPositions:Object.assign({},p),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:99},{name:s.LocationName.Sector12CarmichaelSecurity,info:"",companyPositions:Object.assign({},p,g,h,f),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:s.LocationName.Sector12FoodNStuff,info:"",companyPositions:Object.assign({},E,S),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:s.LocationName.Sector12JoesGuns,info:"",companyPositions:Object.assign({},E,S),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:s.LocationName.IshimaOmegaSoftware,info:"",companyPositions:Object.assign({},l,g,c),expMultiplier:1.1,salaryMultiplier:1.1,jobStatReqOffset:49},{name:s.LocationName.NewTokyoNoodleBar,info:"",companyPositions:Object.assign({},k,C),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleHelpText=void 0,t.ConsoleHelpText={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper<br> skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;const a=n(144),r=n(44),i=n(29),o=n(234);class s{constructor(e=a.BladeburnerConstants.CityNames[2]){this.name="",this.pop=0,this.popEst=0,this.comms=0,this.commsEst=0,this.chaos=0,this.name=e,this.pop=r.getRandomInt(a.BladeburnerConstants.PopulationThreshold,1.5*a.BladeburnerConstants.PopulationThreshold),this.popEst=this.pop*(Math.random()+.5),this.comms=r.getRandomInt(5,150),this.commsEst=this.comms+r.getRandomInt(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}changeChaosByPercentage(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");0!==e&&(this.chaos+=this.chaos*(e/100),this.chaos<0&&(this.chaos=0))}improvePopulationEstimateByCount(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEst<this.pop?(this.popEst+=e,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEst<this.pop&&(this.popEst=this.pop))}improvePopulationEstimateByPercentage(e,t=1){if(e*=t,isNaN(e))throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");this.popEst<this.pop?(++this.popEst,this.popEst*=1+e/100,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEst<this.pop&&(this.popEst=this.pop))}improveCommunityEstimate(e=1){if(isNaN(e))throw new Error("NaN passed into City.improveCommunityEstimate()");this.commsEst<this.comms?(this.commsEst+=e,this.commsEst>this.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst<this.comms&&(this.commsEst=this.comms))}changePopulationByCount(e,t={estChange:0,estOffset:0}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByCount()");this.pop+=e,t.estChange&&!isNaN(t.estChange)&&(this.popEst+=t.estChange),t.estOffset&&(this.popEst=o.addOffset(this.popEst,t.estOffset)),this.popEst=Math.max(this.popEst,0)}changePopulationByPercentage(e,t={nonZero:!1,changeEstEqually:!1}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByPercentage()");if(0===e)return 0;let n=Math.round(this.pop*(e/100));return t.nonZero&&0===n&&(n=e>0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))}toJSON(){return i.Generic_toJSON("City",this)}static fromJSON(e){return i.Generic_fromJSON(s,e.data)}}t.City=s,i.Reviver.constructors.City=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SkillNames=void 0,t.SkillNames={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=void 0;const a=n(511),r=n(29);class i extends a.Action{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return r.Generic_toJSON("Contract",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.Contract=i,r.Reviver.constructors.Contract=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionIdentifier=void 0;const a=n(29);class r{constructor(e={}){this.name="",this.type=-1,e.name&&(this.name=e.name),e.type&&(this.type=e.type)}toJSON(){return a.Generic_toJSON("ActionIdentifier",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.ActionIdentifier=r,a.Reviver.constructors.ActionIdentifier=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationRouting=t.overviewPage=void 0,t.overviewPage="Overview";t.CorporationRouting=class{constructor(e){this.currentPage=t.overviewPage,this.currentDivision=null,this.corp=e}current(){return this.currentPage}isValidPage(e){if(e===t.overviewPage)return!0;for(const t of this.corp.divisions)if(t.name===e)return!0;return!1}isOn(e){return!!this.isValidPage(e)&&e===this.currentPage}isOnOverviewPage(){return this.currentPage===t.overviewPage}routeTo(e){if(this.isValidPage(e)){if(this.currentDivision=null,e!==t.overviewPage){for(let t=0;t<this.corp.divisions.length;++t)this.corp.divisions[t].name===e&&(this.currentDivision=this.corp.divisions[t]);null==this.currentDivision&&console.warn(`Routing could not find division ${e}`)}this.currentPage=e}}routeToOverviewPage(){this.currentPage=t.overviewPage,this.currentDivision=null}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GoPublicPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(6);t.GoPublicPopup=function(e){const[t,n]=o.useState(""),a=e.corp.determineValuation()/e.corp.totalShares;function r(){const n=parseFloat(t),a=e.corp.determineValuation()/e.corp.totalShares;isNaN(n)?s.dialogBoxCreate("Invalid value for number of issued shares"):n>e.corp.numShares?s.dialogBoxCreate("Error: You don't have that many shares to issue!"):(e.corp.public=!0,e.corp.sharePrice=a,e.corp.issuedShares=n,e.corp.numShares-=n,e.corp.addFunds(n*a),e.corp.rerender(e.player),s.dialogBoxCreate(`You took your ${e.corp.name} public and earned `+`${c.numeralWrapper.formatMoney(n*a)} in your IPO`),l.removePopup(e.popupId))}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",c.numeralWrapper.formatMoney(a)," per share (the IPO money will be deposited directly into your Corporation's funds).",o.default.createElement("br",null),o.default.createElement("br",null),"You have a total of ",c.numeralWrapper.format(e.corp.numShares,"0.000a")," of shares that you can issue."),o.default.createElement("input",{className:"text-input",value:t,onChange:function(e){n(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&r()}}),o.default.createElement("button",{className:"std-button",onClick:r},"Go Public"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FindInvestorsPopup=void 0;const r=a(n(0)),i=n(40),o=n(6),s=n(95);t.FindInvestorsPopup=function(e){const t=e.corp.determineValuation();let n=0,a=4;switch(e.corp.fundingRound){case 0:n=.1,a=4;break;case 1:n=.35,a=3;break;case 2:n=.25,a=3;break;case 3:n=.2,a=2.5;break;default:return r.default.createElement(r.default.Fragment,null)}const l=t*n*a,c=Math.floor(s.CorporationConstants.INITIALSHARES*n);return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"An investment firm has offered you ",o.numeralWrapper.formatMoney(l)," in funding in exchange for a ",o.numeralWrapper.format(100*n,"0.000a"),"% stake in the company (",o.numeralWrapper.format(c,"0.000a")," shares).",r.default.createElement("br",null),r.default.createElement("br",null),"Do you accept or reject this offer?",r.default.createElement("br",null),r.default.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.default.createElement("button",{onClick:function(){e.corp.fundingRound++,e.corp.addFunds(l),e.corp.numShares-=c,e.corp.rerender(e.player),i.removePopup(e.popupId)},className:"std-button"},"Accept"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IssueNewSharesPopup=void 0;const o=i(n(0)),s=n(6),l=n(13),c=n(40),u=n(44),m=n(95);function p(e){if(null===e.shares)return o.default.createElement(o.default.Fragment,null);const t=Math.round(.9*e.corp.sharePrice),n=Math.round(.2*e.corp.totalShares),a=n-n%1e6;let r=e.shares;return isNaN(r)?o.default.createElement("p",null,"Invalid input"):(r/=1e7,(r=1e7*Math.round(r))<1e7?o.default.createElement("p",null,"Must issue at least 10 million new shares"):r>a?o.default.createElement("p",null,"You cannot issue that many shares"):o.default.createElement("p",null,"Issue $",s.numeralWrapper.format(r,"0.000a")," new shares for ",s.numeralWrapper.formatMoney(r*t),"?"))}t.IssueNewSharesPopup=function(e){const[t,n]=o.useState(null),a=Math.round(.2*e.corp.totalShares),r=a-a%1e6;function i(){if(null===t)return;const n=Math.round(.9*e.corp.sharePrice);let a=t;if(isNaN(a))return void l.dialogBoxCreate("Invalid input for number of new shares");if((a=1e7*Math.round(a/1e7))<1e7||a>r)return void l.dialogBoxCreate("Invalid input for number of new shares");const i=a*n;e.corp.issueNewSharesCooldown=m.CorporationConstants.IssueNewSharesCooldown,e.corp.totalShares+=a;let o=u.getRandomInt(0,Math.round(a/2));o=1e6*Math.round(o/1e6),e.corp.issuedShares+=a-o,e.corp.funds=e.corp.funds.plus(i),e.corp.immediatelyUpdateSharePrice(),c.removePopup(e.popupId),l.dialogBoxCreate(`Issued ${s.numeralWrapper.format(a,"0.000a")} and raised `+`${s.numeralWrapper.formatMoney(i)}. ${s.numeralWrapper.format(o,"0.000a")} `+"of these shares were bought by private investors.<br><br>"+`Stock price decreased to ${s.numeralWrapper.formatMoney(e.corp.sharePrice)}`)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",o.default.createElement("br",null),o.default.createElement("br",null)," * You can issue at most ",s.numeralWrapper.formatMoney(r)," new shares",o.default.createElement("br",null)," * New shares are sold at a 10% discount",o.default.createElement("br",null)," * You can only issue new shares once every 12 hours",o.default.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",o.default.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",o.default.createElement("br",null),o.default.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),o.default.createElement(p,{corp:e.corp,shares:t}),o.default.createElement("input",{className:"text-input",autoFocus:!0,placeholder:"# New Shares",style:{margin:"5px"},onChange:function(e){""===e.target.value?n(null):n(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&i()}}),o.default.createElement("button",{onClick:i,className:"std-button",style:{display:"inline-block"}},"Issue New Shares"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IssueDividendsPopup=void 0;const o=i(n(0)),s=n(40),l=n(13),c=n(95),u=n(133);t.IssueDividendsPopup=function(e){const[t,n]=o.useState(null);function a(){if(null!==t){try{u.IssueDividends(e.corp,t/100)}catch(e){l.dialogBoxCreate(e+"")}s.removePopup(e.popupId)}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",o.default.createElement("br",null),o.default.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and ",c.CorporationConstants.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",o.default.createElement("br",null),o.default.createElement("br",null),"Two important things to note:",o.default.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",o.default.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",o.default.createElement("br",null),o.default.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),o.default.createElement("input",{autoFocus:!0,onChange:function(e){""===e.target.value?n(null):n(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&a()},className:"text-input",placeholder:"Dividend %",type:"number",style:{margin:"5px"}}),o.default.createElement("button",{onClick:a,className:"std-button",style:{display:"inline-block"}},"Allocate Dividend Percentage"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BuybackSharesPopup=void 0;const o=i(n(0)),s=n(40),l=n(6),c=n(13);t.BuybackSharesPopup=function(e){const[t,n]=o.useState(null),a=1.1*e.corp.sharePrice;function r(){if(null===t)return;const n=1.1*e.corp.sharePrice;if(isNaN(t)||t<=0)c.dialogBoxCreate("ERROR: Invalid value for number of shares");else if(t>e.corp.issuedShares)c.dialogBoxCreate("ERROR: There are not this many oustanding shares to buy back");else if(t*n>e.player.money)c.dialogBoxCreate("ERROR: You do not have enough money to purchase this many shares (you need "+l.numeralWrapper.format(t*n,"$0.000a")+")");else{if(e.corp.numShares+=t,isNaN(e.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+e.corp.issuedShares),console.warn("Converting to number now");const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares-=t,e.player.loseMoney(t*n),s.removePopup(e.popupId),e.corp.rerender(e.player)}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",o.default.createElement("br",null),o.default.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",o.default.createElement("br",null),o.default.createElement("br",null),"The current buyback price of your company's stock is ",l.numeralWrapper.formatMoney(a),". Your company currently has ",l.numeralWrapper.formatBigNumber(e.corp.issuedShares)," outstanding stock shares."),o.default.createElement(function(){return null===t?o.default.createElement(o.default.Fragment,null):isNaN(t)||t<=0?o.default.createElement(o.default.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):t>e.corp.issuedShares?o.default.createElement(o.default.Fragment,null,"There are not this many shares available to buy back. There are only ",l.numeralWrapper.formatBigNumber(e.corp.issuedShares)," outstanding shares."):o.default.createElement(o.default.Fragment,null,"Purchase ",t," shares for a total of ",l.numeralWrapper.formatMoney(t*a))},null),o.default.createElement("br",null),o.default.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to buyback",style:{margin:"5px"},onChange:function(e){""===e.target.value?n(null):n(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&r()}}),o.default.createElement("button",{onClick:r,className:"a-link-button",style:{display:"inline-block"}},"Buy shares"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SellSharesPopup=void 0;const o=i(n(0)),s=n(6),l=n(13),c=n(40),u=n(95);t.SellSharesPopup=function(e){const[t,n]=o.useState(null);function a(){if(null!==t)if(isNaN(t)||t<=0)l.dialogBoxCreate("ERROR: Invalid value for number of shares");else if(t>e.corp.numShares)l.dialogBoxCreate("ERROR: You don't have this many shares to sell");else{const n=e.corp.calculateShareSale(t),a=n[0],r=n[1],i=n[2];if(e.corp.numShares-=t,isNaN(e.corp.issuedShares)){console.error(`Corporation issuedShares is NaN: ${e.corp.issuedShares}`);const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares+=t,e.corp.sharePrice=r,e.corp.shareSalesUntilPriceUpdate=i,e.corp.shareSaleCooldown=u.CorporationConstants.SellSharesCooldown,e.player.gainMoney(a),e.player.recordMoneySource(a,"corporation"),c.removePopup(e.popupId),l.dialogBoxCreate(`Sold ${s.numeralWrapper.formatMoney(t)} shares for `+`${s.numeralWrapper.formatMoney(a)}. `+`The corporation's stock price fell to ${s.numeralWrapper.formatMoney(e.corp.sharePrice)} `+"as a result of dilution."),e.corp.rerender(e.player)}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",o.default.createElement("br",null),o.default.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",o.default.createElement("br",null),o.default.createElement("br",null),"The current price of your company's stock is ",s.numeralWrapper.formatMoney(e.corp.sharePrice)),o.default.createElement(function(e){if(null===e.shares)return o.default.createElement(o.default.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return o.default.createElement(o.default.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>e.corp.numShares)return o.default.createElement(o.default.Fragment,null,"You don't have this many shares to sell!");{const t=e.corp.calculateShareSale(e.shares)[0];return o.default.createElement(o.default.Fragment,null,"Sell ",e.shares," shares for a total of ",s.numeralWrapper.formatMoney(t))}},{shares:t,corp:e.corp}),o.default.createElement("br",null),o.default.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to sell",style:{margin:"5px"},onChange:function(e){""===e.target.value?n(null):n(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&a()}}),o.default.createElement("button",{onClick:a,className:"a-link-button",style:{display:"inline-block"}},"Sell shares"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BribeFactionPopup=void 0;const o=i(n(0)),s=n(17),l=n(95),c=n(6),u=n(40),m=n(13);t.BribeFactionPopup=function(e){const[t,n]=o.useState(0),[a,r]=o.useState(0),[i,p]=o.useState(e.player.factions.length>0?e.player.factions[0]:"");function d(t,n){return(t+n*e.corp.sharePrice)/l.CorporationConstants.BribeToRepRatio}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),o.default.createElement("select",{className:"dropdown",style:{margin:"3px"},defaultValue:i,onChange:function(e){p(e.target.value)}},e.player.factions.map(e=>{if(s.Factions[e].getInfo().offersWork())return o.default.createElement("option",{key:e,value:e},e)})),o.default.createElement("p",null,function(t,n){return 0===t&&0===n?"":isNaN(t)||isNaN(n)||t<0||n<0?"ERROR: Invalid value(s) entered":e.corp.funds.lt(t)?"ERROR: You do not have this much money to bribe with":n>e.corp.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+c.numeralWrapper.formatReputation(d(t,n))+" reputation with "+i+" with this bribe"}(t||0,a||0)),o.default.createElement("input",{className:"text-input",onChange:function(e){n(parseFloat(e.target.value))},placeholder:"Corporation funds",style:{margin:"5px"}}),o.default.createElement("input",{className:"text-input",onChange:function(e){r(parseFloat(e.target.value))},placeholder:"Stock Shares",style:{margin:"5px"}}),o.default.createElement("button",{className:"a-link-button",onClick:()=>(function(t,n){const a=s.Factions[i];if(null==a&&m.dialogBoxCreate("ERROR: You must select a faction to bribe"),isNaN(t)||isNaN(n)||t<0||n<0);else if(e.corp.funds.lt(t));else if(n>e.corp.numShares);else{const r=d(t,n);m.dialogBoxCreate("You gained "+c.numeralWrapper.formatReputation(r)+" reputation with "+a.name+" by bribing them."),a.playerReputation+=r,e.corp.funds=e.corp.funds.minus(t),e.corp.numShares-=n,u.removePopup(e.popupId)}})(t||0,a||0),style:{display:"inline-block"}},"Bribe"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UnlockUpgrade=void 0;const r=a(n(0)),i=n(13),o=n(133),s=n(21);t.UnlockUpgrade=function(e){const t=e.upgradeData,n=r.default.createElement(r.default.Fragment,null,t[2]," - ",r.default.createElement(s.Money,{money:t[1]})),a=t[3];return r.default.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){try{o.UnlockUpgrade(e.corp,e.upgradeData)}catch(e){i.dialogBoxCreate(e+"")}e.corp.rerender(e.player)}},n,r.default.createElement("span",{className:"tooltiptext"},a))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LevelableUpgrade=void 0;const r=a(n(0)),i=n(13),o=n(133),s=n(21);t.LevelableUpgrade=function(e){const t=e.upgrade,n=e.corp.upgrades[t[0]],a=t[1],l=t[2],c=a*Math.pow(l,n),u=r.default.createElement(r.default.Fragment,null,t[4]," - ",r.default.createElement(s.Money,{money:c})),m=t[5];return r.default.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){try{o.LevelUpgrade(e.corp,e.upgrade)}catch(e){i.dialogBoxCreate(e+"")}e.corp.rerender(e.player)}},u,r.default.createElement("span",{className:"tooltiptext"},m))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Overview=void 0;const r=a(n(0)),i=n(1311),o=n(1310),s=n(1309),l=n(1308),c=n(1307),u=n(1306),m=n(1305),p=n(1304),d=n(1303),h=n(95),f=n(518),g=n(517),y=n(11),_=n(6),b=n(24),v=n(40),k=n(21);t.Overview=function(e){function t(e){let t=e.className?e.className:"std-button";const n=null!=e.tooltip;return n&&(t+=" tooltip"),r.default.createElement("a",{className:t,onClick:e.onClick,style:{display:e.display?e.display:"block"}},e.text,n&&r.default.createElement("span",{className:"tooltiptext"},e.tooltip))}function n(){v.createPopup("corp-bribe-popup",s.BribeFactionPopup,{player:e.player,popupId:"corp-bribe-popup",corp:e.corp})}const a=e.corp.revenue.minus(e.corp.expenses).toNumber();function E(e){return e.mult<=1?r.default.createElement(r.default.Fragment,null):r.default.createElement("p",null,e.name,_.numeralWrapper.format(e.mult,"0.000"),r.default.createElement("br",null))}function C(){const t="cmpy-mgmt-find-investors-popup";v.createPopup(t,p.FindInvestorsPopup,{player:e.player,popupId:t,corp:e.corp})}function S(){const t="cmpy-mgmt-go-public-popup";v.createPopup(t,d.GoPublicPopup,{player:e.player,popupId:t,corp:e.corp})}function P(){const t="cmpy-mgmt-sell-shares-popup";v.createPopup(t,l.SellSharesPopup,{corp:e.corp,player:e.player,popupId:t})}function T(){const t="corp-buyback-shares-popup";v.createPopup(t,c.BuybackSharesPopup,{player:e.player,popupId:t,corp:e.corp})}function M(){const t="cmpy-mgmt-issue-new-shares-popup";v.createPopup(t,m.IssueNewSharesPopup,{popupId:t,corp:e.corp})}function O(){const t="cmpy-mgmt-issue-dividends-popup";v.createPopup(t,u.IssueDividendsPopup,{popupId:t,corp:e.corp})}return r.default.createElement("div",null,r.default.createElement("p",null,"Total Funds: ",r.default.createElement(k.Money,{money:e.corp.funds.toNumber()}),r.default.createElement("br",null),"Total Revenue: ",r.default.createElement(k.Money,{money:e.corp.revenue.toNumber()})," / s",r.default.createElement("br",null),"Total Expenses: ",r.default.createElement(k.Money,{money:e.corp.expenses.toNumber()})," / s",r.default.createElement("br",null),"Total Profits: ",r.default.createElement(k.Money,{money:a})," / s",r.default.createElement("br",null),r.default.createElement(function(){if(e.corp.dividendPercentage<=0||a<=0)return r.default.createElement(r.default.Fragment,null);const t=e.corp.dividendPercentage/100*a,n=a-t,i=t/e.corp.totalShares,o=e.corp.numShares*i;return r.default.createElement(r.default.Fragment,null,"Retained Profits (after dividends): ",r.default.createElement(k.Money,{money:n})," / s",r.default.createElement("br",null),r.default.createElement("br",null),"Dividend Percentage: ",_.numeralWrapper.format(e.corp.dividendPercentage/100,"0%"),r.default.createElement("br",null),"Dividends per share: ",r.default.createElement(k.Money,{money:i})," / s",r.default.createElement("br",null),"Your earnings as a shareholder (Pre-Tax): ",r.default.createElement(k.Money,{money:o})," / s",r.default.createElement("br",null),"Dividend Tax Rate: ",e.corp.dividendTaxPercentage,"%",r.default.createElement("br",null),"Your earnings as a shareholder (Post-Tax): ",r.default.createElement(k.Money,{money:o*(1-e.corp.dividendTaxPercentage/100)})," / s",r.default.createElement("br",null),r.default.createElement("br",null))},null),"Publicly Traded: ",e.corp.public?"Yes":"No",r.default.createElement("br",null),"Owned Stock Shares: ",_.numeralWrapper.format(e.corp.numShares,"0.000a"),r.default.createElement("br",null),"Stock Price: ",e.corp.public?r.default.createElement(k.Money,{money:e.corp.sharePrice}):"N/A",r.default.createElement("br",null)),r.default.createElement("p",{className:"tooltip"},"Total Stock Shares: ",_.numeralWrapper.format(e.corp.totalShares,"0.000a"),r.default.createElement("span",{className:"tooltiptext"},"Outstanding Shares: ",_.numeralWrapper.format(e.corp.issuedShares,"0.000a"),r.default.createElement("br",null),"Private Shares: ",_.numeralWrapper.format(e.corp.totalShares-e.corp.issuedShares-e.corp.numShares,"0.000a"))),r.default.createElement("br",null),r.default.createElement("br",null),r.default.createElement(E,{name:"Production Multiplier: ",mult:e.corp.getProductionMultiplier()}),r.default.createElement(E,{name:"Storage Multiplier: ",mult:e.corp.getStorageMultiplier()}),r.default.createElement(E,{name:"Advertising Multiplier: ",mult:e.corp.getAdvertisingMultiplier()}),r.default.createElement(E,{name:"Empl. Creativity Multiplier: ",mult:e.corp.getEmployeeCreMultiplier()}),r.default.createElement(E,{name:"Empl. Charisma Multiplier: ",mult:e.corp.getEmployeeChaMultiplier()}),r.default.createElement(E,{name:"Empl. Intelligence Multiplier: ",mult:e.corp.getEmployeeIntMultiplier()}),r.default.createElement(E,{name:"Empl. Efficiency Multiplier: ",mult:e.corp.getEmployeeEffMultiplier()}),r.default.createElement(E,{name:"Sales Multiplier: ",mult:e.corp.getSalesMultiplier()}),r.default.createElement(E,{name:"Scientific Research Multiplier: ",mult:e.corp.getScientificResearchMultiplier()}),r.default.createElement("br",null),r.default.createElement(function(){const t=e.corp.storedCycles*y.CONSTANTS.MilliPerCycle;return t<=15e3?r.default.createElement(r.default.Fragment,null):r.default.createElement("p",null,"Bonus time: ",b.convertTimeMsToTimeElapsedString(t),r.default.createElement("br",null),r.default.createElement("br",null))},null),r.default.createElement("div",null,r.default.createElement(t,{className:"a-link-button",display:"inline-block",onClick:()=>e.corp.getStarterGuide(e.player),text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),e.corp.public?r.default.createElement(function(){const n=e.corp,a=n.shareSaleCooldown>0,i=a?"a-link-button-inactive":"std-button",o=a?"Cannot sell shares for "+n.convertCooldownToString(n.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=n.issueNewSharesCooldown>0,l=s?"a-link-button-inactive":"std-button",c=s?"Cannot issue new shares for "+n.convertCooldownToString(n.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.default.createElement(r.default.Fragment,null,r.default.createElement(t,{className:i,display:"inline-block",onClick:P,text:"Sell Shares",tooltip:o}),r.default.createElement(t,{className:"std-button",display:"inline-block",onClick:T,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.default.createElement("br",null),r.default.createElement(t,{className:l,display:"inline-block",onClick:M,text:"Issue New Shares",tooltip:c}),r.default.createElement(t,{className:"std-button",display:"inline-block",onClick:O,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.default.createElement("br",null))},null):r.default.createElement(function(){const n=e.corp.fundingRound<4,a=n?"std-button":"a-link-button-inactive",i=n?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":void 0;return r.default.createElement(r.default.Fragment,null,r.default.createElement(t,{className:a,onClick:C,text:"Find Investors",tooltip:i,display:"inline-block"}),r.default.createElement(t,{className:"std-button",onClick:S,display:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."}),r.default.createElement("br",null))},null),r.default.createElement(function(){const a=e.corp.determineValuation()>=h.CorporationConstants.BribeThreshold||!0,i=a?"a-link-button":"a-link-button-inactive";return r.default.createElement(t,{className:i,display:"inline-block",onClick:n,text:"Bribe Factions",tooltip:a?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})},null)),r.default.createElement("br",null),r.default.createElement(function(){return e.corp.divisions.length<=0?r.default.createElement(r.default.Fragment,null):r.default.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.default.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(f.CorporationUnlockUpgrades).filter(t=>0===e.corp.unlockUpgrades[t[0]]).map(t=>r.default.createElement(o.UnlockUpgrade,{player:e.player,corp:e.corp,upgradeData:t,key:t[0]})),r.default.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.corp.upgrades.map((e,t)=>g.CorporationUpgrades[t]).map(t=>r.default.createElement(i.LevelableUpgrade,{player:e.player,corp:e.corp,upgrade:t,key:t[0]})))},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductMarketTaPopup=void 0;const o=i(n(0)),s=n(6);function l(e){const t=e.product.rat/e.product.mku,[n,a]=o.useState(e.product.pCost),r=o.useState(!1)[1];const i=n;let l=1;return i>e.product.pCost&&i-e.product.pCost>t&&(l=t/(i-e.product.pCost)),o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("br",null),o.default.createElement("u",null,o.default.createElement("strong",null,"Market-TA.II")),o.default.createElement("br",null),"If you sell at ",s.numeralWrapper.formatMoney(i),", then you will sell ",s.numeralWrapper.format(l,"0.00000"),"x as much compared to if you sold at market price."),o.default.createElement("input",{className:"text-input",onChange:function(e){a(parseFloat(e.target.value))},value:n,type:"number",style:{marginTop:"4px"}}),o.default.createElement("div",{style:{display:"block"}},o.default.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",o.default.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold).")),o.default.createElement("input",{className:"text-input",onChange:function(t){e.product.marketTa2=t.target.checked,r(e=>!e)},id:"cmpy-mgmt-marketa2-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa2})),o.default.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}t.ProductMarketTaPopup=function(e){const t=e.product.rat/e.product.mku,n=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("u",null,o.default.createElement("strong",null,"Market-TA.I")),o.default.createElement("br",null),"The maximum sale price you can mark this up to is ",s.numeralWrapper.formatMoney(e.product.pCost+t),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales."),o.default.createElement("div",{style:{display:"block"}},o.default.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",o.default.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above).")),o.default.createElement("input",{onChange:function(t){e.product.marketTa1=t.target.checked,n(e=>!e)},className:"text-input",id:"cmpy-mgmt-marketa1-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa1})),e.industry.hasResearch("Market-TA.II")&&o.default.createElement(l,{product:e.product,industry:e.industry,popupId:e.popupId}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchaseMaterialPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(420),u=n(6),m=n(133);function p(e){const t=parseFloat(e.amount),n=t*e.mat.bCost,a=c.MaterialSizes[e.mat.name];return t*a>(e.warehouse.size-e.warehouse.sizeUsed)/a?o.default.createElement(o.default.Fragment,null,"Not enough warehouse space to purchase this amount"):isNaN(n)?o.default.createElement(o.default.Fragment,null,"Invalid put for Bulk Purchase amount"):o.default.createElement(o.default.Fragment,null,"Purchasing ",u.numeralWrapper.format(t,"0,0.00")," of",e.mat.name," will cost ",u.numeralWrapper.formatMoney(n))}function d(e){const[t,n]=o.useState("");return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),o.default.createElement(p,{warehouse:e.warehouse,mat:e.mat,amount:t}),o.default.createElement("input",{onChange:function(e){n(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",style:{margin:"5px"},onKeyDown:function(n){13===n.keyCode&&function(){const n=parseFloat(t),a=c.MaterialSizes[e.mat.name];if(n*a>(e.warehouse.size-e.warehouse.sizeUsed)/a)s.dialogBoxCreate("You do not have enough warehouse size to fit this purchase");else if(isNaN(n))s.dialogBoxCreate("Invalid input amount");else{const t=n*e.mat.bCost;if(!e.corp.funds.gt(t))return void s.dialogBoxCreate("You cannot afford this purchase.");e.corp.funds=e.corp.funds.minus(t),e.mat.qty+=n,l.removePopup(e.popupId)}}()}}),o.default.createElement("button",{className:"std-button"},"Confirm Bulk Purchase"))}t.PurchaseMaterialPopup=function(e){const[t,n]=o.useState(e.mat.buy?e.mat.buy:null);function a(){if(null!==t){try{m.BuyMaterial(e.mat,t)}catch(e){s.dialogBoxCreate(e+"")}l.removePopup(e.popupId)}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),o.default.createElement("input",{onChange:function(e){n(parseFloat(e.target.value))},className:"text-input",autoFocus:!0,placeholder:"Purchase amount",type:"number",style:{margin:"5px"},onKeyDown:function(e){13===e.keyCode&&a()}}),o.default.createElement("button",{onClick:a,className:"std-button"},"Confirm"),o.default.createElement("button",{onClick:function(){e.mat.buy=0,l.removePopup(e.popupId)},className:"std-button"},"Clear Purchase"),e.industry.hasResearch("Bulk Purchasing")&&o.default.createElement(d,{corp:e.corp,mat:e.mat,industry:e.industry,warehouse:e.warehouse,popupId:e.popupId}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SellProductPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(133);t.SellProductPopup=function(e){const[t,n]=o.useState(!0),[a,r]=o.useState(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[i,u]=o.useState(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.product));function m(){try{c.SellProduct(e.product,e.city,a,i,t)}catch(e){s.dialogBoxCreate(e+"")}l.removePopup(e.popupId)}function p(e){13===e.keyCode&&m()}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the maximum amount of ",e.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",o.default.createElement("br",null),o.default.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",o.default.createElement("br",null),o.default.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",o.default.createElement("br",null),o.default.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",o.default.createElement("br",null),o.default.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input",value:a,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){r(e.target.value)},onKeyDown:p}),o.default.createElement("input",{className:"text-input",value:i,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){u(e.target.value)},onKeyDown:p}),o.default.createElement("button",{className:"std-button",onClick:m},"Confirm"),o.default.createElement("div",{style:{border:"1px solid white",display:"inline-block"}},o.default.createElement("label",{htmlFor:e.popupId+"-checkbox"},"Use same 'Sell Amount' for all cities"),o.default.createElement("input",{checked:t,onChange:function(e){n(e.target.checked)},id:e.popupId+"-checkbox",style:{margin:"2px"},type:"checkbox"})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SellMaterialPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(133);t.SellMaterialPopup=function(e){const[t,n]=o.useState(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[a,r]=o.useState(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.mat));function i(){try{c.SellMaterial(e.mat,t,a)}catch(e){s.dialogBoxCreate(e+"")}l.removePopup(e.popupId)}function u(e){13===e.keyCode&&i()}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the maximum amount of ",e.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",o.default.createElement("br",null),o.default.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",o.default.createElement("br",null),o.default.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",o.default.createElement("br",null),o.default.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",o.default.createElement("br",null),o.default.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input",value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){n(e.target.value)},onKeyDown:u}),o.default.createElement("input",{className:"text-input",value:a,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){r(e.target.value)},onKeyDown:u}),o.default.createElement("button",{className:"std-button",onClick:i},"Confirm"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialMarketTaPopup=void 0;const o=i(n(0)),s=n(6);function l(e){if(!e.industry.hasResearch("Market-TA.II"))return o.default.createElement(o.default.Fragment,null);const[t,n]=o.useState(e.mat.bCost),a=o.useState(!1)[1];const r=e.mat.getMarkupLimit();const i=t;let l=1;return i>e.mat.bCost?i-e.mat.bCost>r&&(l=Math.pow(r/(i-e.mat.bCost),2)):i<e.mat.bCost&&(l=i<=0?1e12:e.mat.bCost/i),o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("br",null),o.default.createElement("u",null,o.default.createElement("strong",null,"Market-TA.II")),o.default.createElement("br",null),"If you sell at ",s.numeralWrapper.formatMoney(i),", then you will sell ",s.numeralWrapper.format(l,"0.00000"),"x as much compared to if you sold at market price."),o.default.createElement("input",{className:"text-input",type:"number",style:{marginTop:"4px"},onChange:function(e){""===e.target.value?n(0):n(parseFloat(e.target.value))},value:t}),o.default.createElement("div",{style:{display:"block"}},o.default.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",o.default.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")),o.default.createElement("input",{id:"cmpy-mgmt-marketa2-checkbox",type:"checkbox",onChange:function(t){e.mat.marketTa2=t.target.checked,a(e=>!e)},checked:e.mat.marketTa2,style:{margin:"3px"}})),o.default.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}t.MaterialMarketTaPopup=function(e){const t=o.useState(!1)[1],n=e.mat.getMarkupLimit();return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("u",null,o.default.createElement("strong",null,"Market-TA.I")),o.default.createElement("br",null),"The maximum sale price you can mark this up to is ",s.numeralWrapper.formatMoney(e.mat.bCost+n),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),o.default.createElement("div",{style:{display:"block"}},o.default.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",o.default.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")),o.default.createElement("input",{id:"cmpy-mgmt-marketa1-checkbox",type:"checkbox",onChange:function(n){e.mat.marketTa1=n.target.checked,t(e=>!e)},checked:e.mat.marketTa1,style:{margin:"3px"}})),o.default.createElement(l,{mat:e.mat,industry:e.industry}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LimitProductProductionPopup=void 0;const o=i(n(0)),s=n(13),l=n(40);t.LimitProductProductionPopup=function(e){const[t,n]=o.useState(null);function a(){if(null===t)return e.product.prdman[e.city][0]=!1,void l.removePopup(e.popupId);const n=t;isNaN(n)?s.dialogBoxCreate("Invalid value entered"):(n<0?e.product.prdman[e.city][0]=!1:(e.product.prdman[e.city][0]=!0,e.product.prdman[e.city][1]=n),l.removePopup(e.popupId))}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."),o.default.createElement("input",{autoFocus:!0,className:"text-input",style:{margin:"5px"},placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?n(null):n(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&a()}}),o.default.createElement("button",{className:"std-button",style:{margin:"5px",display:"inline-block"},onClick:a},"Limit production"))}},function(module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportPopup=void 0;const react_1=__importStar(__webpack_require__(0)),DialogBox_1=__webpack_require__(13),createPopup_1=__webpack_require__(40);function ExportPopup(props){if(0===props.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(props.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[industry,setIndustry]=react_1.useState(props.corp.divisions[0].name),[city,setCity]=react_1.useState(Object.keys(props.corp.divisions[0].warehouses)[0]),[amt,setAmt]=react_1.useState(""),setRerender=react_1.useState(!1)[1];function rerender(){setRerender(e=>!e)}function onCityChange(e){setCity(e.target.value)}function onIndustryChange(e){setIndustry(e.target.value)}function onAmtChange(e){setAmt(e.target.value)}function exportMaterial(){const industryName=industry,cityName=city;console.log(`${industryName}, ${cityName}, ${amt}`);let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,"1");try{temp=eval(temp)}catch(e){return void DialogBox_1.dialogBoxCreate("Invalid expression entered for export amount: "+e)}const n=parseFloat(temp);if(null==n||isNaN(n)||n<0)return void DialogBox_1.dialogBoxCreate("Invalid amount entered for export");const exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};console.log(exportObj),props.mat.exp.push(exportObj),createPopup_1.removePopup(props.popupId)}function removeExport(e){for(let t=0;t<props.mat.exp.length;++t)if(props.mat.exp[t].ind===e.ind&&props.mat.exp[t].city===e.city&&props.mat.exp[t].amt===e.amt){props.mat.exp.splice(t,1);break}rerender()}const currentDivision=props.corp.divisions.find(e=>e.name===industry);return react_1.default.createElement(react_1.default.Fragment,null,react_1.default.createElement("p",null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),react_1.default.createElement("select",{className:"dropdown",onChange:onIndustryChange,defaultValue:industry},props.corp.divisions.map(e=>react_1.default.createElement("option",{key:e.name,value:e.name},e.name))),react_1.default.createElement("select",{className:"dropdown",onChange:onCityChange,defaultValue:city},currentDivision&&Object.keys(currentDivision.warehouses).map(e=>{if(0!==currentDivision.warehouses[e])return react_1.default.createElement("option",{key:e,value:e},e)})),react_1.default.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:onAmtChange}),react_1.default.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:exportMaterial},"Export"),react_1.default.createElement("p",null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),props.mat.exp.map((e,t)=>react_1.default.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>removeExport(e)},"Industry: ",e.ind,react_1.default.createElement("br",null),"City: ",e.city,react_1.default.createElement("br",null),"Amount/s: ",e.amt)))}exports.ExportPopup=ExportPopup},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiscontinueProductPopup=void 0;const r=a(n(0)),i=n(40);t.DiscontinueProductPopup=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.default.createElement("button",{className:"popup-box-button",onClick:function(){e.industry.discontinueProduct(e.product),i.removePopup(e.popupId),e.corp.rerender(e.player)}},"Discontinue"))}},function(module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndustryWarehouse=void 0;const react_1=__importDefault(__webpack_require__(0)),Constants_1=__webpack_require__(95),OfficeSpace_1=__webpack_require__(228),Material_1=__webpack_require__(515),Product_1=__webpack_require__(513),Warehouse_1=__webpack_require__(516),DiscontinueProductPopup_1=__webpack_require__(1320),ExportPopup_1=__webpack_require__(1319),LimitProductProductionPopup_1=__webpack_require__(1318),MaterialMarketTaPopup_1=__webpack_require__(1317),SellMaterialPopup_1=__webpack_require__(1316),SellProductPopup_1=__webpack_require__(1315),PurchaseMaterialPopup_1=__webpack_require__(1314),ProductMarketTaPopup_1=__webpack_require__(1313),numeralFormat_1=__webpack_require__(6),DialogBox_1=__webpack_require__(13),createPopup_1=__webpack_require__(40),isString_1=__webpack_require__(73),Actions_1=__webpack_require__(133);function ProductComponent(e){const t=e.corp,n=e.division,a=e.city,r=e.product,i="0.000",o="0.000a",s=n.hasResearch("uPgrade: Dashboard"),l=r.data[a][1]-r.data[a][2];let c;if(c=r.sllman[a][0]?isString_1.isString(r.sllman[a][1])?`Sell (${numeralFormat_1.numeralWrapper.format(r.data[a][2],o)}/${r.sllman[a][1]})`:`Sell (${numeralFormat_1.numeralWrapper.format(r.data[a][2],o)}/${numeralFormat_1.numeralWrapper.format(r.sllman[a][1],o)})`:"Sell (0.000/0.000)",r.marketTa2)c+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(r.marketTa2Price[a]);else if(r.marketTa1){const e=r.rat/r.mku;c+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(r.pCost+e)}else r.sCost&&(isString_1.isString(r.sCost)?c+=" @ "+r.sCost:c+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(r.sCost));function u(){const e="cmpy-mgmt-limit-product-production-popup";createPopup_1.createPopup(e,SellProductPopup_1.SellProductPopup,{product:r,city:a,popupId:e})}let m="Limit Production";function p(){const e="cmpy-mgmt-limit-product-production-popup";createPopup_1.createPopup(e,LimitProductProductionPopup_1.LimitProductProductionPopup,{product:r,city:a,popupId:e})}function d(){const t="cmpy-mgmt-discontinue-product-popup";createPopup_1.createPopup(t,DiscontinueProductPopup_1.DiscontinueProductPopup,{product:r,industry:n,corp:e.corp,popupId:t,player:e.player})}function h(){const e="cmpy-mgmt-marketta-popup";createPopup_1.createPopup(e,ProductMarketTaPopup_1.ProductMarketTaPopup,{product:r,industry:n,popupId:e})}return r.prdman[a][0]&&(m+=" ("+numeralFormat_1.numeralWrapper.format(r.prdman[a][1],i)+")"),r.fin?react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react_1.default.createElement("p",{className:"tooltip"},r.name,": ",numeralFormat_1.numeralWrapper.format(r.data[a][0],o)," (",numeralFormat_1.numeralWrapper.format(l,o),"/s)",react_1.default.createElement("span",{className:"tooltiptext"},"Prod: ",numeralFormat_1.numeralWrapper.format(r.data[a][1],o),"/s",react_1.default.createElement("br",null),"Sell: ",numeralFormat_1.numeralWrapper.format(r.data[a][2],o)," /s")),react_1.default.createElement("br",null),react_1.default.createElement("p",{className:"tooltip"},"Rating: ",numeralFormat_1.numeralWrapper.format(r.rat,i),react_1.default.createElement("span",{className:"tooltiptext"},"Quality: ",numeralFormat_1.numeralWrapper.format(r.qlt,i)," ",react_1.default.createElement("br",null),"Performance: ",numeralFormat_1.numeralWrapper.format(r.per,i)," ",react_1.default.createElement("br",null),"Durability: ",numeralFormat_1.numeralWrapper.format(r.dur,i)," ",react_1.default.createElement("br",null),"Reliability: ",numeralFormat_1.numeralWrapper.format(r.rel,i)," ",react_1.default.createElement("br",null),"Aesthetics: ",numeralFormat_1.numeralWrapper.format(r.aes,i)," ",react_1.default.createElement("br",null),"Features: ",numeralFormat_1.numeralWrapper.format(r.fea,i),1===t.unlockUpgrades[2]&&react_1.default.createElement("br",null),1===t.unlockUpgrades[2]&&"Demand: "+numeralFormat_1.numeralWrapper.format(r.dmd,i),1===t.unlockUpgrades[3]&&react_1.default.createElement("br",null),1===t.unlockUpgrades[3]&&"Competition: "+numeralFormat_1.numeralWrapper.format(r.cmp,i))),react_1.default.createElement("br",null),react_1.default.createElement("p",{className:"tooltip"},"Est. Production Cost: ",numeralFormat_1.numeralWrapper.formatMoney(r.pCost/Constants_1.CorporationConstants.ProductProductionCostRatio),react_1.default.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react_1.default.createElement("br",null),react_1.default.createElement("p",{className:"tooltip"},"Est. Market Price: ",numeralFormat_1.numeralWrapper.formatMoney(r.pCost),react_1.default.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react_1.default.createElement("div",null,react_1.default.createElement("button",{className:"std-button",onClick:u},c),react_1.default.createElement("br",null),react_1.default.createElement("button",{className:"std-button",onClick:p},m),react_1.default.createElement("button",{className:"std-button",onClick:d},"Discontinue"),n.hasResearch("Market-TA.I")&&react_1.default.createElement("button",{className:"std-button",onClick:h},"Market-TA"))):s?react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react_1.default.createElement("p",null,"Designing ",r.name,"..."),react_1.default.createElement("br",null),react_1.default.createElement("p",null,numeralFormat_1.numeralWrapper.format(r.prog,"0.00"),"% complete"),react_1.default.createElement("br",null),react_1.default.createElement("div",null,react_1.default.createElement("button",{className:"std-button",onClick:u},c),react_1.default.createElement("br",null),react_1.default.createElement("button",{className:"std-button",onClick:p},m),react_1.default.createElement("button",{className:"std-button",onClick:d},"Discontinue"),n.hasResearch("Market-TA.I")&&react_1.default.createElement("button",{className:"std-button",onClick:h},"Market-TA"))):react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react_1.default.createElement("p",null,"Designing ",r.name,"..."),react_1.default.createElement("br",null),react_1.default.createElement("p",null,numeralFormat_1.numeralWrapper.format(r.prog,"0.00"),"% complete"))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof OfficeSpace_1.OfficeSpace))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${numeralFormat_1.numeralWrapper.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button";function openPurchaseMaterialPopup(){const e="cmpy-mgmt-material-purchase-popup";createPopup_1.createPopup(e,PurchaseMaterialPopup_1.PurchaseMaterialPopup,{mat:mat,industry:division,warehouse:warehouse,corp:props.corp,popupId:e})}function openExportPopup(){const e="cmpy-mgmt-export-popup";createPopup_1.createPopup(e,ExportPopup_1.ExportPopup,{mat:mat,corp:props.corp,popupId:e})}let sellButtonText;if(mat.sllman[0]){if(sellButtonText=isString_1.isString(mat.sllman[1])?`Sell (${numeralFormat_1.numeralWrapper.format(mat.sll,nfB)}/${mat.sllman[1]})`:`Sell (${numeralFormat_1.numeralWrapper.format(mat.sll,nfB)}/${numeralFormat_1.numeralWrapper.format(mat.sllman[1],nfB)})`,mat.marketTa2)sellButtonText+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(mat.marketTa2Price);else if(mat.marketTa1)sellButtonText+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(mat.bCost+markupLimit);else if(mat.sCost)if(isString_1.isString(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");sellButtonText+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(eval(sCost))}else sellButtonText+=" @ "+numeralFormat_1.numeralWrapper.formatMoney(mat.sCost)}else sellButtonText="Sell (0.000/0.000)";function openSellMaterialPopup(){const e="cmpy-mgmt-material-sell-popup";createPopup_1.createPopup(e,SellMaterialPopup_1.SellMaterialPopup,{mat:mat,corp:props.corp,popupId:e})}function openMaterialMarketTaPopup(){const e="cmpy-mgmt-export-popup";createPopup_1.createPopup(e,MaterialMarketTaPopup_1.MaterialMarketTaPopup,{mat:mat,industry:division,corp:props.corp,popupId:e})}return react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react_1.default.createElement("div",{style:{display:"inline-block"}},react_1.default.createElement("p",{className:"tooltip"},mat.name,": ",numeralFormat_1.numeralWrapper.format(mat.qty,nfB)," (",numeralFormat_1.numeralWrapper.format(totalGain,nfB),"/s)",react_1.default.createElement("span",{className:"tooltiptext"},"Buy: ",numeralFormat_1.numeralWrapper.format(mat.buy,nfB)," ",react_1.default.createElement("br",null),"Prod: ",numeralFormat_1.numeralWrapper.format(mat.prd,nfB)," ",react_1.default.createElement("br",null),"Sell: ",numeralFormat_1.numeralWrapper.format(mat.sll,nfB)," ",react_1.default.createElement("br",null),"Export: ",numeralFormat_1.numeralWrapper.format(mat.totalExp,nfB)," ",react_1.default.createElement("br",null),"Import: ",numeralFormat_1.numeralWrapper.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react_1.default.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+numeralFormat_1.numeralWrapper.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react_1.default.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+numeralFormat_1.numeralWrapper.format(mat.cmp,nf))),react_1.default.createElement("br",null),react_1.default.createElement("p",{className:"tooltip"},"MP: ",numeralFormat_1.numeralWrapper.formatMoney(mat.bCost),react_1.default.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react_1.default.createElement("br",null),react_1.default.createElement("p",{className:"tooltip"},"Quality: ",numeralFormat_1.numeralWrapper.format(mat.qlt,"0.00a"),react_1.default.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react_1.default.createElement("div",{style:{display:"inline-block"}},react_1.default.createElement("button",{className:purchaseButtonClass,onClick:openPurchaseMaterialPopup},purchaseButtonText,tutorial&&react_1.default.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react_1.default.createElement("button",{className:"std-button",onClick:openExportPopup},"Export"),react_1.default.createElement("br",null),react_1.default.createElement("button",{className:"std-button",onClick:openSellMaterialPopup},sellButtonText),division.hasResearch("Market-TA.I")&&react_1.default.createElement("button",{className:"std-button",onClick:openMaterialMarketTaPopup},"Market-TA")))}function IndustryWarehouse(e){function t(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}const n=e.routing.currentDivision;if(null==n)throw new Error("Routing does not hold reference to the current Industry");return n.warehouses[e.currentCity]instanceof Warehouse_1.Warehouse?function(){const n=e.corp,a=e.routing.currentDivision;if(null===a)return react_1.default.createElement(react_1.default.Fragment,null);const r=a.warehouses[e.currentCity];if(0===r)return react_1.default.createElement(react_1.default.Fragment,null);const i={color:r.sizeUsed>=r.size?"red":"white",margin:"5px"},o=Constants_1.CorporationConstants.WarehouseUpgradeBaseCost*Math.pow(1.07,r.level+1),s=n.funds.gt(o)?"std-button":"a-link-button-inactive";let l="This Industry uses ["+Object.keys(a.reqMats).join(", ")+"] in order to ";a.prodMats.length>0?(l+="produce ["+a.prodMats.join(", ")+"] ",a.makesProducts&&(l+=" and "+a.getProductDescriptionText())):a.makesProducts&&(l+=a.getProductDescriptionText()+".");const c=[];for(const e in a.reqMats)if(a.reqMats.hasOwnProperty(e)){const t=[" *",a.reqMats[e],e].join(" ");c.push(react_1.default.createElement("div",{key:e},react_1.default.createElement("p",null,t)))}let u,m="in order to create ";switch(a.prodMats.length>0?(m+="one of each produced Material ("+a.prodMats.join(", ")+") ",a.makesProducts&&(m+="or to create one of its Products")):a.makesProducts&&(m+="one of its Products"),a.state){case"START":u="Current state: Preparing...";break;case"PURCHASE":u="Current state: Purchasing materials...";break;case"PRODUCTION":u="Current state: Producing materials and/or products...";break;case"SALE":u="Current state: Selling materials and/or products...";break;case"EXPORT":u="Current state: Exporting materials and/or products...";break;default:console.error(`Invalid state: ${a.state}`)}const p=[];for(const i in r.materials)r.materials[i]instanceof Material_1.Material&&t(i,a)&&p.push(react_1.default.createElement(MaterialComponent,{city:e.currentCity,corp:n,division:a,key:i,mat:r.materials[i],warehouse:r}));const d=[];if(a.makesProducts&&Object.keys(a.products).length>0)for(const t in a.products){const r=a.products[t];r instanceof Product_1.Product&&d.push(react_1.default.createElement(ProductComponent,{player:e.player,city:e.currentCity,corp:n,division:a,key:t,product:r}))}return react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react_1.default.createElement("p",{className:"tooltip",style:i},"Storage: ",numeralFormat_1.numeralWrapper.formatBigNumber(r.sizeUsed)," / ",numeralFormat_1.numeralWrapper.formatBigNumber(r.size),react_1.default.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:r.breakdown}})),react_1.default.createElement("button",{className:s,onClick:function(){null!==a&&0!==r&&(++r.level,r.updateSize(n,a),n.funds=n.funds.minus(o),n.rerender(e.player))}},"Upgrade Warehouse Size - ",numeralFormat_1.numeralWrapper.formatMoney(o)),react_1.default.createElement("p",null,l,". The exact requirements for production are:"),react_1.default.createElement("br",null),c,react_1.default.createElement("br",null),react_1.default.createElement("p",null,m),react_1.default.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react_1.default.createElement("br",null),react_1.default.createElement("p",null,u),n.unlockUpgrades[1]&&react_1.default.createElement("div",null,react_1.default.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),react_1.default.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:function(t){0!==r&&(Actions_1.SetSmartSupply(r,t.target.checked),n.rerender(e.player))},style:{margin:"3px"},checked:r.smartSupplyEnabled})),p,d)}():react_1.default.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react_1.default.createElement("button",{className:"std-button",onClick:()=>(function(t,n){e.corp.funds.lt(Constants_1.CorporationConstants.WarehouseInitialCost)?DialogBox_1.dialogBoxCreate("You do not have enough funds to do this!"):(t.warehouses[n]=new Warehouse_1.Warehouse({corp:e.corp,industry:t,loc:n,size:Constants_1.CorporationConstants.WarehouseInitialSize}),e.corp.funds=e.corp.funds.minus(Constants_1.CorporationConstants.WarehouseInitialCost),e.corp.rerender(e.player))})(n,e.currentCity)},"Purchase Warehouse (",numeralFormat_1.numeralWrapper.formatMoney(Constants_1.CorporationConstants.WarehouseInitialCost),")"))}exports.IndustryWarehouse=IndustryWarehouse},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ResearchPopup=void 0;const o=i(n(0)),s=n(13),l=n(52),c=n(40),u=n(146),m=n(95),p=n(514),d=n(1322);t.ResearchPopup=function(e){return o.useEffect(()=>{const t=u.IndustryResearchTrees[e.industry.type];if(void 0===t)return;const n=t.createTreantMarkup();n.chart.container="#"+e.popupId+"-content",n.chart.nodeAlign="BOTTOM",n.chart.rootOrientation="WEST",n.chart.siblingSeparation=40,n.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},d.Treant(n);const a=t.getAllNodes();for(let n=0;n<a.length;++n){if(!0===e.industry.researched[a[n]])continue;const r=p.ResearchMap[a[n]],i=a[n].replace(/\s/g,""),o=document.getElementById(i+"-corp-research-click-listener");null!=o?o.addEventListener("click",()=>{e.industry.sciResearch.qty>=r.cost?(e.industry.sciResearch.qty-=r.cost,t.research(a[n]),e.industry.researched[a[n]]=!0,s.dialogBoxCreate(`Researched ${a[n]}. It may take a market cycle `+`(~${m.CorporationConstants.SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),c.removePopup(e.popupId)):s.dialogBoxCreate(`You do not have enough Scientific Research for ${r.name}`)}):console.warn(`Could not find Research Tree div for ${i}`)}const r=document.getElementById(`${e.popupId}-content`);null!=r&&r.appendChild(l.createElement("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`}))}),o.default.createElement("div",{id:e.popupId},o.default.createElement("div",{id:e.popupId+"outer-box"}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MakeProductPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(146),u=n(513);t.MakeProductPopup=function(e){const t=Object.keys(e.division.offices).filter(t=>0!==e.division.offices[t]),[n,a]=o.useState(t.length>0?t[0]:""),[r,i]=o.useState(""),[m,p]=o.useState(null),[d,h]=o.useState(null);if(e.division.hasMaximumNumberProducts())return o.default.createElement(o.default.Fragment,null);function f(){let t=m,a=d;if((null==t||t<0)&&(t=0),(null==a||a<0)&&(a=0),null==r||""===r)s.dialogBoxCreate("You must specify a name for your product!");else if(isNaN(t))s.dialogBoxCreate("Invalid value for design investment");else if(isNaN(a))s.dialogBoxCreate("Invalid value for marketing investment");else if(e.corp.funds.lt(t+a))s.dialogBoxCreate("You don't have enough company funds to make this large of an investment");else{const i=new u.Product({name:r.replace(/[<>]/g,""),createCity:n,designCost:t,advCost:a});if(e.division.products[i.name]instanceof u.Product)return void s.dialogBoxCreate("You already have a product with this name!");e.corp.funds=e.corp.funds.minus(t+a),e.division.products[i.name]=i,l.removePopup(e.popupId)}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{dangerouslySetInnerHTML:{__html:e.popupText}}),o.default.createElement("select",{className:"dropdown",style:{margin:"5px"},onChange:function(e){a(e.target.value)},defaultValue:n},t.map(e=>o.default.createElement("option",{key:e,value:e},e))),o.default.createElement("input",{onChange:function(e){i(e.target.value)},className:"text-input",style:{margin:"5px"},placeholder:function(e){return e===c.Industries.Food?"Restaurant Name":e===c.Industries.Healthcare?"Hospital Name":e===c.Industries.RealEstate?"Property Name":"Product Name"}(e.division.type)}),o.default.createElement("br",null),o.default.createElement("input",{onChange:function(e){""===e.target.value?p(null):p(parseFloat(e.target.value))},autoFocus:!0,type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Design investment"}),o.default.createElement("input",{onChange:function(e){""===e.target.value?h(null):h(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&f()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),o.default.createElement("button",{className:"std-button",onClick:f},"Develop Product"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryOverview=void 0;const r=a(n(0)),i=n(228),o=n(146),s=n(756),l=n(6),c=n(13),u=n(191),m=n(1324),p=n(1323),d=n(40),h=n(21);t.IndustryOverview=function(e){function t(e){return r.default.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",onClick:e.onClick,key:e.key},e.text,null!=e.tooltip&&r.default.createElement("span",{className:"tooltiptext"},e.tooltip))}const n=e.routing.currentDivision;if(null==n)throw new Error("Routing does not hold reference to the current Industry");const a=function(){const t=e.routing.currentDivision;if(null===t)return r.default.createElement(r.default.Fragment,null);let n="",a="";switch(t.type){case o.Industries.Food:n="Build Restaurant",a="Build and manage a new restaurant!";break;case o.Industries.Tobacco:n="Create Product",a="Create a new tobacco product!";break;case o.Industries.Pharmaceutical:n="Create Drug",a="Design and develop a new pharmaceutical drug!";break;case o.Industries.Computer:case"Computer":n="Create Product",a="Design and manufacture a new computer hardware product!";break;case o.Industries.Robotics:n="Design Robot",a="Design and create a new robot or robotic system!";break;case o.Industries.Software:n="Develop Software",a="Develop a new piece of software!";break;case o.Industries.Healthcare:n="Build Hospital",a="Build and manage a new hospital!";break;case o.Industries.RealEstate:n="Develop Property",a="Develop a new piece of real estate property!";break;default:return n="Create Product",a="Create a new product!",r.default.createElement(r.default.Fragment,null)}a+="<br><br>To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.<br><br>You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.";const i=t.hasMaximumNumberProducts(),s=i?"a-link-button-inactive tooltip":"std-button";return r.default.createElement("button",{className:s,onClick:function(){if(null===t)return;const n="cmpy-mgmt-create-product-popup";d.createPopup(n,m.MakeProductPopup,{popupText:a,division:t,corp:e.corp,popupId:n})},style:{margin:"6px",display:"inline-block"}},n,i&&r.default.createElement("span",{className:"tooltiptext"},"You have reached the maximum number of products: ",t.getMaximumNumberProducts()))}();return r.default.createElement("div",{className:"cmpy-mgmt-industry-overview-panel"},function(){const t=e.corp,n=e.routing.currentDivision;if(null===n)return r.default.createElement(r.default.Fragment,null);const a=1===t.unlockUpgrades[4],i=n.lastCycleRevenue.minus(n.lastCycleExpenses).toNumber();let o=!1;const s=n.getAdvertisingFactors(),m=s[1],f=s[2],g=s[3],y=s[0];return a&&(o=!0),r.default.createElement("div",null,"Industry: ",n.type," (Corp Funds: ",r.default.createElement(h.Money,{money:t.funds.toNumber()}),")",r.default.createElement("br",null)," ",r.default.createElement("br",null),"Awareness: ",l.numeralWrapper.format(n.awareness,"0.000")," ",r.default.createElement("br",null),"Popularity: ",l.numeralWrapper.format(n.popularity,"0.000")," ",r.default.createElement("br",null),!1!==o&&r.default.createElement("p",{className:"tooltip"},"Advertising Multiplier: x",l.numeralWrapper.format(y,"0.000"),r.default.createElement("span",{className:"tooltiptext cmpy-mgmt-advertising-info"},"Total multiplier for this industrys sales due to its awareness and popularity",r.default.createElement("br",null),"Awareness Bonus: x",l.numeralWrapper.format(Math.pow(m,.85),"0.000"),r.default.createElement("br",null),"Popularity Bonus: x",l.numeralWrapper.format(Math.pow(f,.85),"0.000"),r.default.createElement("br",null),"Ratio Multiplier: x",l.numeralWrapper.format(Math.pow(g,.85),"0.000"))),o,r.default.createElement("br",null),r.default.createElement("br",null),"Revenue: ",r.default.createElement(h.Money,{money:n.lastCycleRevenue.toNumber()})," / s ",r.default.createElement("br",null),"Expenses: ",r.default.createElement(h.Money,{money:n.lastCycleExpenses.toNumber()})," /s ",r.default.createElement("br",null),"Profit: ",r.default.createElement(h.Money,{money:i})," / s",r.default.createElement("br",null)," ",r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip"},"Production Multiplier: ",l.numeralWrapper.format(n.prodMult,"0.00"),r.default.createElement("span",{className:"tooltiptext"},"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate")),r.default.createElement("div",{className:"help-tip",onClick:function(){function e(e){return u.createProgressBarText({progress:e,totalTicks:20})}null!==n&&c.dialogBoxCreate("Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.<br><br>This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.<br><br>Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):<br><br>"+`Hardware: ${e(n.hwFac)}<br>`+`Robots: ${e(n.robFac)}<br>`+`AI Cores: ${e(n.aiFac)}<br>`+`Real Estate: ${e(n.reFac)}`)}},"?"),r.default.createElement("br",null)," ",r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip"},"Scientific Research: ",l.numeralWrapper.format(n.sciResearch.qty,"0.000a"),r.default.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.default.createElement("button",{className:"help-tip",onClick:function(){if(null===n)return;const e="corporation-research-popup-box";d.createPopup(e,p.ResearchPopup,{industry:n,popupId:e})}},"Research"))}(),r.default.createElement("br",null),r.default.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.default.createElement("br",null),function(){const n=e.corp,a=e.routing.currentDivision;if(null===a)return[r.default.createElement(r.default.Fragment,null)];const o=a.offices[e.currentCity];if(!(o instanceof i.OfficeSpace))throw new Error(`Current City (${e.currentCity}) for UI does not have an OfficeSpace object`);const l=[];for(const i in s.IndustryUpgrades){const m=s.IndustryUpgrades[i];if(a.hasResearch("AutoBrew")&&"Coffee"===m[4])continue;const p=m[0],d=m[1],f=m[2];let g=0;switch(p){case 0:g=o.employees.length*d;break;default:g=d*Math.pow(f,a.upgrades[p])}function u(){0!==o&&null!==a&&(n.funds.lt(g)?c.dialogBoxCreate("Insufficient funds"):(n.funds=n.funds.minus(g),a.upgrade(m,{corporation:n,office:o}),n.rerender(e.player)))}l.push(t({key:i,onClick:u,text:r.default.createElement(r.default.Fragment,null,m[4]," - ",r.default.createElement(h.Money,{money:g})),tooltip:m[5]}))}return l}()," ",r.default.createElement("br",null),n.makesProducts&&a)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ThrowPartyPopup=void 0;const o=i(n(0)),s=n(40),l=n(6),c=n(13);t.ThrowPartyPopup=function(e){const[t,n]=o.useState(null);function a(){if(null===t||isNaN(t)||t<0)c.dialogBoxCreate("Invalid value entered");else{const n=t*e.office.employees.length;if(e.corp.funds.lt(n))c.dialogBoxCreate("You don't have enough company funds to throw a party!");else{e.corp.funds=e.corp.funds.minus(n);let a=0;for(let n=0;n<e.office.employees.length;++n)a=e.office.employees[n].throwParty(t);c.dialogBoxCreate("You threw a party for the office! The morale and happiness of each employee increased by "+l.numeralWrapper.formatPercentage(a-1)),s.removePopup(e.popupId)}}}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),o.default.createElement(function(e){let t=e.cost;return null!==t&&(isNaN(t)||t<0)?o.default.createElement("p",null,"Invalid value entered!"):(null===t&&(t=0),o.default.createElement("p",null,"Throwing this party will cost a total of ",l.numeralWrapper.formatMoney(t*e.office.employees.length)))},{cost:t,office:e.office}),o.default.createElement("input",{autoFocus:!0,className:"text-input",type:"number",style:{margin:"5px"},placeholder:"$ / employee",onChange:function(e){n(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&a()}}),o.default.createElement("button",{className:"std-button",onClick:a},"Throw Party"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HireEmployeePopup=void 0;const o=i(n(0)),s=n(40),l=n(6),c=n(95),u=n(44),m=n(24),p=n(757),d=n(13);function h(e){const[t,n]=o.useState("");function a(){for(let n=0;n<e.office.employees.length;++n)if(e.office.employees[n].name===t)return void d.dialogBoxCreate("You already have an employee with this nickname!");e.employee.name=t,e.office.employees.push(e.employee),e.corp.rerender(e.player),s.removePopup(e.popupId)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Give your employee a nickname!"),o.default.createElement("input",{value:t,className:"text-input",type:"text",placeholder:"Employee nickname",onKeyDown:function(e){13===e.keyCode&&a()},onChange:function(e){n(e.target.value)}}),o.default.createElement("button",{className:"std-button",onClick:a},"Hire!"))}function f(e){return o.default.createElement("div",{onClick:function(){const t="cmpy-mgmt-name-employee-popup";s.createPopup(t,h,{office:e.office,corp:e.corp,popupId:t,player:e.player,employee:e.employee}),s.removePopup(e.popupId)},className:"cmpy-mgmt-find-employee-option"},"Intelligence: ",m.formatNumber(e.employee.int,1),o.default.createElement("br",null),"Charisma: ",m.formatNumber(e.employee.cha,1),o.default.createElement("br",null),"Experience: ",m.formatNumber(e.employee.exp,1),o.default.createElement("br",null),"Creativity: ",m.formatNumber(e.employee.cre,1),o.default.createElement("br",null),"Efficiency: ",m.formatNumber(e.employee.eff,1),o.default.createElement("br",null),"Salary: ",l.numeralWrapper.formatMoney(e.employee.sal)," \\ s",o.default.createElement("br",null))}t.HireEmployeePopup=function(e){if(e.office.atCapacity())return o.default.createElement(o.default.Fragment,null);const t=u.getRandomInt(25,50)/100,n=u.getRandomInt(51,75)/100,a=u.getRandomInt(76,100)/100,r=u.getRandomInt(50,100),i=u.getRandomInt(50,100),s=u.getRandomInt(50,100),l=u.getRandomInt(50,100),m=u.getRandomInt(50,100),d=c.CorporationConstants.EmployeeSalaryMultiplier*(r+i+s+l+m),h=new p.Employee({intelligence:r*t,charisma:i*t,experience:s*t,creativity:l*t,efficiency:m*t,salary:d*t}),g=new p.Employee({intelligence:r*n,charisma:i*n,experience:s*n,creativity:l*n,efficiency:m*n,salary:d*n}),y=new p.Employee({intelligence:r*a,charisma:i*a,experience:s*a,creativity:l*a,efficiency:m*a,salary:d*a});return o.default.createElement(o.default.Fragment,null,o.default.createElement("h1",null,"Select one of the following candidates for hire:"),o.default.createElement(f,{employee:h,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}),o.default.createElement(f,{employee:g,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}),o.default.createElement(f,{employee:y,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpgradeOfficeSizePopup=void 0;const r=a(n(0)),i=n(40),o=n(6),s=n(13),l=n(95);t.UpgradeOfficeSizePopup=function(e){const t=Math.round(e.office.size/l.CorporationConstants.OfficeInitialSize),n=l.CorporationConstants.OfficeInitialCost*Math.pow(1.09,t);let a=0;for(let e=0;e<5;++e)a+=Math.pow(1.09,t+e);const c=l.CorporationConstants.OfficeInitialCost*a,u=e.corp.funds.dividedBy(l.CorporationConstants.OfficeInitialCost).toNumber();let m=1;for(a=Math.pow(1.09,t);m<50&&!(a>=u);){const e=Math.pow(1.09,t+m);if(a+e>u)break;a+=e,++m}const p=l.CorporationConstants.OfficeInitialCost*a;function d(t,n){e.corp.funds.lt(t)?s.dialogBoxCreate("You don't have enough company funds to purchase this upgrade!"):(e.office.size+=n,e.corp.funds=e.corp.funds.minus(t),s.dialogBoxCreate("Office space increased! It can now hold "+e.office.size+" employees"),e.corp.rerender(e.player)),i.removePopup(e.popupId)}function h(e){return r.default.createElement("button",{className:"tooltip "+(e.corp.funds.lt(e.cost)?"a-link-button-inactive":"a-link-button"),style:{display:"inline-block",margin:"4px"},onClick:()=>d(e.cost,e.size)},"by ",e.size,r.default.createElement("span",{className:"tooltiptext"},o.numeralWrapper.formatMoney(e.cost)))}return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Increase the size of your office space to fit additional employees!"),r.default.createElement("p",null,"Upgrade size: "),r.default.createElement(h,{corp:e.corp,cost:n,size:l.CorporationConstants.OfficeInitialSize}),r.default.createElement(h,{corp:e.corp,cost:c,size:5*l.CorporationConstants.OfficeInitialSize}),r.default.createElement(h,{corp:e.corp,cost:p,size:m*l.CorporationConstants.OfficeInitialSize}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryOffice=void 0;const o=i(n(0)),s=n(228),l=n(294),c=n(6),u=n(512),m=n(40),p=n(1328),d=n(1327),h=n(1326);t.IndustryOffice=function(e){const[t,n]=o.useState(!1),[a,r]=o.useState(""),[i,f]=o.useState(""),[g,y]=o.useState(null),[_,b]=o.useState(0),[v,k]=o.useState(0),[E,C]=o.useState(0),[S,P]=o.useState(0),[T,M]=o.useState(0),[O,w]=o.useState(0),[x,N]=o.useState(0),[A,R]=o.useState(0);function I(){b(0),k(0),C(0),P(0),M(0),w(0),N(0),R(0)}function B(){const t=e.routing.currentDivision;if(null==t)throw new Error("Routing does not hold reference to the current Industry");const n=t.offices[e.currentCity];if(!(n instanceof s.OfficeSpace))throw new Error(`Current City (${e.currentCity}) for UI does not have an OfficeSpace object`);t.name===i&&e.currentCity===a||(I(),f(t.name),r(e.currentCity));const o=n.employees.length;let c=v,u=E,m=S,p=T,d=O,h=x,g=A;for(let e=_;e<n.employees.length;++e)switch(n.employees[e].pos){case l.EmployeePositions.Operations:c++;break;case l.EmployeePositions.Engineer:u++;break;case l.EmployeePositions.Business:m++;break;case l.EmployeePositions.Management:p++;break;case l.EmployeePositions.RandD:d++;break;case l.EmployeePositions.Unassigned:h++;break;case l.EmployeePositions.Training:g++;break;default:console.error("Unrecognized employee position: "+n.employees[e].pos)}c!==v&&k(c),u!==E&&C(u),m!==S&&P(m),p!==T&&M(p),d!==O&&w(d),h!==x&&N(h),g!==A&&R(g),o!==_&&b(o)}B();const D=e.routing.currentDivision;if(null===D)return o.default.createElement(o.default.Fragment,null);const L=D.offices[e.currentCity];if(0===L)return o.default.createElement(o.default.Fragment,null);const F={fontSize:"13px"};let j="tooltip";L.atCapacity()?j+=" a-link-button-inactive":(j+=" std-button",0===L.employees.length&&(j+=" flashing-button"));let W="tooltip";return L.atCapacity()?W+=" a-link-button-inactive":W+=" std-button",o.default.createElement("div",{className:"cmpy-mgmt-employee-panel"},o.default.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),o.default.createElement("p",null,"Size: ",L.employees.length," / ",L.size," employees"),o.default.createElement("button",{className:j,onClick:function(){if(0===L)return;const t="cmpy-mgmt-hire-employee-popup";m.createPopup(t,d.HireEmployeePopup,{office:L,corp:e.corp,popupId:t,player:e.player})},style:F},"Hire Employee",0===L.employees.length&&o.default.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),o.default.createElement("button",{className:W,onClick:function(){0!==L&&(L.atCapacity()||(L.hireRandomEmployee(),e.corp.rerender(e.player)))},style:F},"Autohire Employee",o.default.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),o.default.createElement("br",null),o.default.createElement("button",{className:"std-button tooltip",onClick:function(){if(0===L)return;const t="cmpy-mgmt-upgrade-office-size-popup";m.createPopup(t,p.UpgradeOfficeSizePopup,{office:L,corp:e.corp,popupId:t,player:e.player})},style:F},"Upgrade size",o.default.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!D.hasResearch("AutoPartyManager")&&o.default.createElement("button",{className:"std-button tooltip",onClick:function(){if(0===L)return;const t="cmpy-mgmt-throw-office-party-popup";m.createPopup(t,h.ThrowPartyPopup,{office:L,corp:e.corp,popupId:t})},style:F},"Throw Party",o.default.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),o.default.createElement("br",null),(B(),t?function(){const t=e.corp,a=e.routing.currentDivision;if(null===a)return o.default.createElement(o.default.Fragment,null);const r=a.offices[e.currentCity];if(0===r)return o.default.createElement(o.default.Fragment,null);const i=[];for(let e=0;e<r.employees.length;++e)i.push(o.default.createElement("option",{key:r.employees[e].name},r.employees[e].name));const s=g;let m="";const p=[],d=Object.values(l.EmployeePositions);for(let e=0;e<d.length;++e)p.push(o.default.createElement("option",{key:d[e],value:d[e]},d[e])),null!=s&&s.pos===d[e]&&(m=d[e]);const h="0.000",f=s?s.cre*t.getEmployeeCreMultiplier()*a.getEmployeeCreMultiplier():0,_=s?s.cha*t.getEmployeeChaMultiplier()*a.getEmployeeChaMultiplier():0,b=s?s.int*t.getEmployeeIntMultiplier()*a.getEmployeeIntMultiplier():0,v=s?s.eff*t.getEmployeeEffMultiplier()*a.getEmployeeEffMultiplier():0;return o.default.createElement("div",null,o.default.createElement("button",{className:"std-button tooltip",onClick:function(){n(!1),e.corp.rerender(e.player)}},"Switch to Auto Mode",o.default.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")),o.default.createElement("div",{style:{color:"white",margin:"4px",padding:"4px"}},o.default.createElement("select",{onChange:function(n){if(0===r)return;const a=u.getSelectText(n.target);for(let e=0;e<r.employees.length;++e)if(a===r.employees[e].name){y(r.employees[e]);break}t.rerender(e.player)}},i),null!=g&&o.default.createElement("p",null,"Morale: ",c.numeralWrapper.format(g.mor,h),o.default.createElement("br",null),"Happiness: ",c.numeralWrapper.format(g.hap,h),o.default.createElement("br",null),"Energy: ",c.numeralWrapper.format(g.ene,h),o.default.createElement("br",null),"Intelligence: ",c.numeralWrapper.format(b,h),o.default.createElement("br",null),"Charisma: ",c.numeralWrapper.format(_,h),o.default.createElement("br",null),"Experience: ",c.numeralWrapper.format(g.exp,h),o.default.createElement("br",null),"Creativity: ",c.numeralWrapper.format(f,h),o.default.createElement("br",null),"Efficiency: ",c.numeralWrapper.format(v,h),o.default.createElement("br",null),"Salary: ",c.numeralWrapper.formatMoney(g.sal)),null!=g&&o.default.createElement("select",{onChange:function(n){if(null===g)return;const a=u.getSelectText(n.target);g.pos=a,I(),t.rerender(e.player)},value:m},p)))}():function(){const t=e.routing.currentDivision;if(null===t)return o.default.createElement(o.default.Fragment,null);const a=t.offices[e.currentCity];if(0===a)return o.default.createElement(o.default.Fragment,null);const r=1===e.corp.unlockUpgrades[4];let i=0,s=0,u=0,m=0;for(let e=0;e<a.employees.length;++e)i+=a.employees[e].mor,s+=a.employees[e].hap,u+=a.employees[e].ene,m+=a.employees[e].sal;let p=0,d=0,h=0;function f(n){if(0!==a&&null!==t)if(x<=0)console.warn("Cannot assign employee. No unassigned employees available");else{switch(n){case l.EmployeePositions.Operations:k(e=>e+1);break;case l.EmployeePositions.Engineer:C(e=>e+1);break;case l.EmployeePositions.Business:P(e=>e+1);break;case l.EmployeePositions.Management:M(e=>e+1);break;case l.EmployeePositions.RandD:w(e=>e+1);break;case l.EmployeePositions.Unassigned:N(e=>e+1);break;case l.EmployeePositions.Training:R(e=>e+1);break;default:console.error("Unrecognized employee position: "+n)}N(e=>e-1),a.assignEmployeeToJob(n),a.calculateEmployeeProductivity(e.corp,t),e.corp.rerender(e.player)}}function g(n){if(0!==a&&null!==t){switch(n){case l.EmployeePositions.Operations:if(v<=0)return r(l.EmployeePositions.Operations);k(e=>e-1);break;case l.EmployeePositions.Engineer:if(E<=0)return r(l.EmployeePositions.Operations);C(e=>e-1);break;case l.EmployeePositions.Business:if(S<=0)return r(l.EmployeePositions.Operations);P(e=>e-1);break;case l.EmployeePositions.Management:if(T<=0)return r(l.EmployeePositions.Operations);M(e=>e-1);break;case l.EmployeePositions.RandD:if(O<=0)return r(l.EmployeePositions.Operations);w(e=>e-1);break;case l.EmployeePositions.Unassigned:console.warn("Tried to unassign from the Unassigned position");break;case l.EmployeePositions.Training:if(A<=0)return r(l.EmployeePositions.Operations);R(e=>e-1);break;default:console.error("Unrecognized employee position: "+n)}N(e=>e+1),a.unassignEmployeeFromJob(n),a.calculateEmployeeProductivity(e.corp,t),e.corp.rerender(e.player)}function r(e){console.warn(`Cannot unassign from ${e} because there is nobody assigned to that position`)}}a.employees.length>0&&(p=i/a.employees.length,d=s/a.employees.length,h=u/a.employees.length);const y={fontSize:"15px",margin:"5px 0px 5px 0px",width:"50%"},_=x>0?"std-button":"a-link-button-inactive",b=v>0?"std-button":"a-link-button-inactive",I=E>0?"std-button":"a-link-button-inactive",B=S>0?"std-button":"a-link-button-inactive",D=T>0?"std-button":"a-link-button-inactive",L=O>0?"std-button":"a-link-button-inactive",F=A>0?"std-button":"a-link-button-inactive";return o.default.createElement("div",null,o.default.createElement("button",{className:"std-button tooltip",onClick:function(){n(!0),e.corp.rerender(e.player)}},"Switch to Manual Mode",o.default.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")),o.default.createElement("p",null,o.default.createElement("strong",null,"Unassigned Employees: ",x)),o.default.createElement("br",null),o.default.createElement("p",null,"Avg Employee Morale: ",c.numeralWrapper.format(p,"0.000")),o.default.createElement("p",null,"Avg Employee Happiness: ",c.numeralWrapper.format(d,"0.000")),o.default.createElement("p",null,"Avg Employee Energy: ",c.numeralWrapper.format(h,"0.000")),o.default.createElement("p",null,"Total Employee Salary: ",c.numeralWrapper.formatMoney(m)),r&&o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production: ",c.numeralWrapper.format(t.getOfficeProductivity(a),"0.000"),o.default.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),r&&o.default.createElement("br",null),r&&o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production: ",c.numeralWrapper.format(t.getOfficeProductivity(a,{forProduct:!0}),"0.000"),o.default.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),r&&o.default.createElement("br",null),r&&o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier: x",c.numeralWrapper.format(t.getBusinessFactor(a),"0.000"),o.default.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales")),r&&o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.Operations," (",v,")",o.default.createElement("span",{className:"tooltiptext"},"Manages supply chain operations. Improves the amount of Materials and Products you produce.")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.Operations),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:b,onClick:function(){g(l.EmployeePositions.Operations),e.corp.rerender(e.player)}},"-"),o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.Engineer," (",E,")",o.default.createElement("span",{className:"tooltiptext"},"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.Engineer),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:I,onClick:function(){g(l.EmployeePositions.Engineer),e.corp.rerender(e.player)}},"-"),o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.Business," (",S,")",o.default.createElement("span",{className:"tooltiptext"},"Handles sales and finances. Improves the amount of Materials and Products you can sell.")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.Business),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:B,onClick:function(){g(l.EmployeePositions.Business),e.corp.rerender(e.player)}},"-"),o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.Management," (",T,")",o.default.createElement("span",{className:"tooltiptext"},"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.Management),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:D,onClick:function(){g(l.EmployeePositions.Management),e.corp.rerender(e.player)}},"-"),o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.RandD," (",O,")",o.default.createElement("span",{className:"tooltiptext"},"Research new innovative ways to improve the company. Generates Scientific Research")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.RandD),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:L,onClick:function(){g(l.EmployeePositions.RandD),e.corp.rerender(e.player)}},"-"),o.default.createElement("br",null),o.default.createElement("h2",{className:"tooltip",style:y},l.EmployeePositions.Training," (",A,")",o.default.createElement("span",{className:"tooltiptext"},"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations.")),o.default.createElement("button",{className:_,onClick:function(){f(l.EmployeePositions.Training),e.corp.rerender(e.player)}},"+"),o.default.createElement("button",{className:F,onClick:function(){g(l.EmployeePositions.Training),e.corp.rerender(e.player)}},"-"))}()))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Industry=void 0;const r=a(n(0)),i=n(1329),o=n(1325),s=n(1321);t.Industry=function(e){return r.default.createElement("div",null,r.default.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.default.createElement(o.IndustryOverview,{player:e.player,routing:e.routing,corp:e.corp,currentCity:e.currentCity}),r.default.createElement(i.IndustryOffice,{player:e.player,routing:e.routing,corp:e.corp,currentCity:e.currentCity})),r.default.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.default.createElement(s.IndustryWarehouse,{player:e.player,corp:e.corp,routing:e.routing,currentCity:e.currentCity})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandNewCityPopup=void 0;const o=i(n(0)),s=n(6),l=n(95),c=n(40),u=n(13),m=n(133);t.ExpandNewCityPopup=function(e){const t=o.useRef(null);return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Would you like to expand into a new city by opening an office? This would cost ",s.numeralWrapper.format(l.CorporationConstants.OfficeInitialCost,"$0.000a")),o.default.createElement("select",{ref:t,className:"dropdown",style:{margin:"5px"}},Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).map(e=>o.default.createElement("option",{key:e,value:e},e))),o.default.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){if(null!==t.current){try{m.NewCity(e.corp,e.division,t.current.value)}catch(e){return void u.dialogBoxCreate(e+"")}u.dialogBoxCreate(`Opened a new office in ${t.current.value}!`),e.cityStateSetter(t.current.value),c.removePopup(e.popupId)}}},"Confirm"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CityTab=void 0;const r=a(n(0));t.CityTab=function(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.default.createElement("button",{className:t,onClick:e.onClick},e.name)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CityTabs=void 0;const r=a(n(0)),i=n(1332),o=n(1331),s=n(40);t.CityTabs=function(e){const t=e.routing.currentDivision;return r.default.createElement(r.default.Fragment,null,Object.keys(e.onClicks).map(t=>r.default.createElement(i.CityTab,{current:e.city===t,key:t,name:t,onClick:e.onClicks[t]})),r.default.createElement(i.CityTab,{current:!1,key:"Expand into new City",name:"Expand into new City",onClick:function(){if(null===t)return;const n="cmpy-mgmt-expand-city-popup";s.createPopup(n,o.ExpandNewCityPopup,{popupId:n,corp:e.corp,division:t,cityStateSetter:e.cityStateSetter})}}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MainPanel=void 0;const o=i(n(0)),s=n(1333),l=n(1330),c=n(1312),u=n(228),m=n(43);t.MainPanel=function(e){const[t,n]=o.useState(""),[a,r]=o.useState(m.CityName.Sector12);function i(e){Object.values(m.CityName).includes(e)?r(e):console.error(`Tried to change MainPanel's city state to an invalid city: ${e}`)}if(e.routing.isOnOverviewPage())return o.default.createElement("div",{id:"cmpy-mgmt-panel"},o.default.createElement(c.Overview,Object.assign({},e)));{const c=e.routing.current();return c!==t&&(n(c),r(m.CityName.Sector12)),function(){const t=e.routing.currentDivision;if(null==t)throw new Error("Routing does not hold reference to the current Industry");const n={};for(const a in t.offices)t.offices[a]instanceof u.OfficeSpace&&(n[a]=(()=>{r(a),e.corp.rerender(e.player)}));const c=o.default.createElement(s.CityTabs,Object.assign({},e,{corp:e.corp,city:a,onClicks:n,cityStateSetter:i}));return o.default.createElement("div",{id:"cmpy-mgmt-panel"},c,o.default.createElement(l.Industry,Object.assign({},e,{currentCity:a})))}()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCityMap=void 0;const a=n(195);t.createCityMap=function(e){const t={},n=Object.keys(a.Cities);for(let a=0;a<n.length;++a)t[n[a]]=e;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProductRatingWeights=void 0;const a=n(146);t.ProductRatingWeights={[a.Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[a.Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[a.Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[a.Industries.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[a.Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[a.Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[a.Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[a.Industries.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}}},function(e,t,n){"use strict";function a(e,t,n){return(t<=0||t>=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),n<1&&console.warn(`Linear factor is ${n}. This is not an intended value for it`),Math.pow(e,t)+e/n}Object.defineProperty(t,"__esModule",{value:!0}),t.EffectWithFactors=t.calculateEffectWithFactors=void 0,t.calculateEffectWithFactors=a;t.EffectWithFactors=class{constructor(e,t){this.expFac=e,this.linearFac=t}calculate(e){return a(e,this.expFac,this.linearFac)}}},function(module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Industry=void 0;const JSONReviver_1=__webpack_require__(29),CityNames_1=__webpack_require__(43),decimal_js_1=__importDefault(__webpack_require__(69)),IndustryData_1=__webpack_require__(146),Constants_1=__webpack_require__(95),EmployeePositions_1=__webpack_require__(294),Material_1=__webpack_require__(515),getRandomInt_1=__webpack_require__(44),calculateEffectWithFactors_1=__webpack_require__(1337),OfficeSpace_1=__webpack_require__(228),Product_1=__webpack_require__(513),DialogBox_1=__webpack_require__(13),isString_1=__webpack_require__(73),MaterialSizes_1=__webpack_require__(420),Warehouse_1=__webpack_require__(516),IndustryUpgrades_1=__webpack_require__(756),StringHelperFunctions_1=__webpack_require__(24);class Industry{constructor(e={}){this.name="",this.type=IndustryData_1.Industries.Agriculture,this.sciResearch=new Material_1.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.upgrades=Array(Object.keys(IndustryUpgrades_1.IndustryUpgrades).length).fill(0),this.state="START",this.newInd=!0,this.offices={[CityNames_1.CityName.Aevum]:0,[CityNames_1.CityName.Chongqing]:0,[CityNames_1.CityName.Sector12]:new OfficeSpace_1.OfficeSpace({loc:CityNames_1.CityName.Sector12,size:Constants_1.CorporationConstants.OfficeInitialSize}),[CityNames_1.CityName.NewTokyo]:0,[CityNames_1.CityName.Ishima]:0,[CityNames_1.CityName.Volhaven]:0},this.name=e.name?e.name:"",this.type=e.type?e.type:IndustryData_1.Industries.Agriculture,this.lastCycleRevenue=new decimal_js_1.default(0),this.lastCycleExpenses=new decimal_js_1.default(0),this.thisCycleRevenue=new decimal_js_1.default(0),this.thisCycleExpenses=new decimal_js_1.default(0),this.warehouses={[CityNames_1.CityName.Aevum]:0,[CityNames_1.CityName.Chongqing]:0,[CityNames_1.CityName.Sector12]:new Warehouse_1.Warehouse({corp:e.corp,industry:this,loc:CityNames_1.CityName.Sector12,size:Constants_1.CorporationConstants.WarehouseInitialSize}),[CityNames_1.CityName.NewTokyo]:0,[CityNames_1.CityName.Ishima]:0,[CityNames_1.CityName.Volhaven]:0},this.init()}init(){const e=IndustryData_1.IndustryStartingCosts[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case IndustryData_1.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case IndustryData_1.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case IndustryData_1.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case IndustryData_1.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case IndustryData_1.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case IndustryData_1.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case IndustryData_1.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case IndustryData_1.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case IndustryData_1.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case IndustryData_1.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case IndustryData_1.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case IndustryData_1.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case IndustryData_1.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case IndustryData_1.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case IndustryData_1.Industries.Food:return"create and manage restaurants";case IndustryData_1.Industries.Tobacco:return"create tobacco and tobacco-related products";case IndustryData_1.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case IndustryData_1.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case IndustryData_1.Industries.Robotics:return"build specialized robots and robot-related products";case IndustryData_1.Industries.Software:return"develop computer software";case IndustryData_1.Industries.Healthcare:return"build and manage hospitals";case IndustryData_1.Industries.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,Constants_1.CorporationConstants.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<Constants_1.CorporationConstants.Cities.length;++t){const n=Constants_1.CorporationConstants.Cities[t],a=this.warehouses[n];if(!(a instanceof Warehouse_1.Warehouse))continue;const r=a.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const n=this.products[t];if(void 0===n)continue;e.sizeUsed+=n.data[e.loc][0]*n.siz,n.data[e.loc][0]>0&&(e.breakdown+=t+": "+StringHelperFunctions_1.formatNumber(n.data[e.loc][0]*n.siz,0)+"<br>")}}process(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),DialogBox_1.dialogBoxCreate("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js_1.default(0),this.thisCycleExpenses=new decimal_js_1.default(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*Constants_1.CorporationConstants.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*Constants_1.CorporationConstants.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js_1.default(0),this.thisCycleExpenses=new decimal_js_1.default(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const a in this.offices){const r=this.offices[a];0!==r&&(r instanceof OfficeSpace_1.OfficeSpace&&(t+=r.process(e,n,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const a=n.getDreamSenseGain(),r=4*a;return void(a>0&&(this.popularity+=a*e,this.awareness+=r*e))}let a=this.processMaterials(e,n);Array.isArray(a)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1])),a=this.processProducts(e,n),Array.isArray(a)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let n=0;n<Constants_1.CorporationConstants.Cities.length;++n)if(this.warehouses[Constants_1.CorporationConstants.Cities[n]]instanceof Warehouse_1.Warehouse){const a=this.warehouses[Constants_1.CorporationConstants.Cities[n]];if(0===a)continue;for(const t in e)e.hasOwnProperty(t)&&a.materials[t].processMarket();for(let e=0;e<t.length;++e)a.materials[t[e]].processMarket();a.materials.Hardware.processMarket(),a.materials.Robots.processMarket(),a.materials.AICores.processMarket(),a.materials.RealEstate.processMarket()}}processProductMarket(e=1){for(const t in this.products)if(this.products.hasOwnProperty(t)){const n=this.products[t];if(void 0===n)continue;let a=4e-4*getRandomInt_1.getRandomInt(0,3);if(0===a)continue;this.type!==IndustryData_1.Industries.Pharmaceutical&&this.type!==IndustryData_1.Industries.Software&&this.type!==IndustryData_1.Industries.Robotics||(a*=3),a*=e,n.dmd-=a,n.cmp+=a,n.cmp=Math.min(n.cmp,99.99),n.dmd=Math.max(n.dmd,.001)}}processMaterials(marketCycles=1,corporation){let revenue=0,expenses=0;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(let e=0;e<Constants_1.CorporationConstants.Cities.length;++e){const t=Constants_1.CorporationConstants.Cities[e];if(!(this.warehouses[t]instanceof Warehouse_1.Warehouse))continue;const n=this.warehouses[t];if(0!==n)for(const e in n.materials)if(n.materials.hasOwnProperty(e)){const t=n.materials[e];t.imp=0}}for(let i=0;i<Constants_1.CorporationConstants.Cities.length;++i){const city=Constants_1.CorporationConstants.Cities[i],office=this.offices[city];if(0!==office){if(this.warehouses[city]instanceof Warehouse_1.Warehouse){const warehouse=this.warehouses[city];if(0===warehouse)continue;switch(this.state){case"PURCHASE":for(const e in warehouse.materials)warehouse.materials.hasOwnProperty(e)&&(!function(e,t){const n=warehouse.materials[e];let a,r;if(warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)){const r=t.reqMats[e];if(void 0===r)throw new Error(`reqMat "${e}" is undefined`);n.buy=r*warehouse.smartSupplyStore,a=n.buy*Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles}else a=n.buy*Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles;r="RealEstate"==e?a:Math.floor((warehouse.size-warehouse.sizeUsed)/MaterialSizes_1.MaterialSizes[e]),(a=Math.min(a,r))>0&&(n.qty+=a,expenses+=a*n.bCost)}(e,this),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const e=warehouse.materials[this.prodMats[0]],t=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let n;n=e.prdman[0]?Math.min(t,e.prdman[1]):t,n*=Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles;let a=0;for(let e=0;e<this.prodMats.length;++e)a+=MaterialSizes_1.MaterialSizes[this.prodMats[e]];for(const e in this.reqMats){const t=this.reqMats[e];void 0!==t&&(a-=MaterialSizes_1.MaterialSizes[e]*t)}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);n=Math.min(e,n)}n<0&&(n=0),warehouse.smartSupplyStore+=n/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const a=t*n;warehouse.materials[e].qty<a&&(r=Math.min(r,warehouse.materials[e].qty/a))}if(r<=0&&(r=0,n=0),r>0&&n>0){for(const e in this.reqMats){const t=this.reqMats[e];if(void 0===t)continue;const a=t*n*r;warehouse.materials[e].qty-=a,warehouse.materials[e].prd=0,warehouse.materials[e].prd-=a/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles)}for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].qty+=n*r,warehouse.materials[this.prodMats[e]].qlt=office.employeeProd[EmployeePositions_1.EmployeePositions.Engineer]/90+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(const e in this.reqMats)this.reqMats.hasOwnProperty(e)&&(warehouse.materials[e].prd=0);const i=n*r/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles);for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].prd=i}else for(const e in this.reqMats)warehouse.materials[e].prd=0;break;case"SALE":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),markupLimit=mat.getMarkupLimit();let sCost;if(mat.marketTa2){const e=mat.prd,t=markupLimit,n=e,a=(mat.qlt+.001)*marketFactor*businessFactor*corporation.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(n/a);let i;0===a||0===r?0===n?i=0:(i=mat.bCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+mat.bCost,mat.marketTa2Price=i,sCost=i}else mat.marketTa1?sCost=mat.bCost+markupLimit:isString_1.isString(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost+""),sCost=eval(sCost)):sCost=mat.sCost;let markup=1;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);const maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*corporation.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(isString_1.isString(mat.sllman[1])){let tmp=mat.sllman[1].replace(/MAX/g,maxSell+"");tmp=tmp.replace(/PROD/g,mat.prd+"");try{sellAmt=eval(tmp)}catch(e){DialogBox_1.dialogBoxCreate("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`),mat.sll=0;continue}sellAmt&&sCost>=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI<mat.exp.length;++expI){const exp=mat.exp[expI],amtStr=exp.amt.replace(/MAX/g,mat.qty/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles)+"");let amt=0;try{amt=eval(amtStr)}catch(e){DialogBox_1.dialogBoxCreate("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))DialogBox_1.dialogBoxCreate("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(let e=0;e<corporation.divisions.length;++e)if(corporation.divisions[e].name===exp.ind){const t=corporation.divisions[e],n=t.warehouses[exp.city];if(!(n instanceof Warehouse_1.Warehouse)){console.error(`Invalid export! ${t.name} ${exp.city}`);break}if(n.sizeUsed>=n.size)return[0,0];{const e=Math.floor((n.size-n.sizeUsed)/MaterialSizes_1.MaterialSizes[matName]);amt=Math.min(e,amt)}n.materials[matName].imp+=amt/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles),n.materials[matName].qty+=amt,n.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(n);break}}}mat.totalExp/=Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace_1.OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[EmployeePositions_1.EmployeePositions.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(void 0!==n&&!n.fin){const t=n.createCity,a=this.offices[t];if(0===a)continue;const r=a.employeeProd[EmployeePositions_1.EmployeePositions.Engineer],i=a.employeeProd[EmployeePositions_1.EmployeePositions.Management],o=a.employeeProd[EmployeePositions_1.EmployeePositions.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(a.employeeProd,this);break}}for(const a in this.products)if(this.products.hasOwnProperty(a)){const r=this.products[a];r instanceof Product_1.Product&&r.fin&&(n+=this.processProduct(e,r,t))}return[n,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<Constants_1.CorporationConstants.Cities.length;++i){const city=Constants_1.CorporationConstants.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof Warehouse_1.Warehouse)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles;let n=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];n-=MaterialSizes_1.MaterialSizes[e]*t}if(n>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/n);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles);let a=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const n=product.reqMats[e]*t;warehouse.materials[e].qty<n&&(a=Math.min(a,warehouse.materials[e].qty/n))}if(a>0&&t>0){for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const n=product.reqMats[e]*t*a;warehouse.materials[e].qty-=n,warehouse.materials[e].prd-=n/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*a}product.data[city][1]=t*a/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=Constants_1.CorporationConstants.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,a=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(n/a);let i;0===a||0===r?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(isString_1.isString(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&isString_1.isString(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){DialogBox_1.dialogBoxCreate("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(Constants_1.CorporationConstants.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const n=t.corporation,a=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e<a.employees.length;++e)a.employees[e].ene=Math.min(1.05*a.employees[e].ene,a.maxEne);break;case 1:{const e=n.getAdvertisingMultiplier()*this.getAdvertisingMultiplier();this.awareness+=3*e,this.popularity+=1*e,this.awareness*=1.01*e,this.popularity*=(1+getRandomInt_1.getRandomInt(1,3)/100)*e;break}default:console.error(`Un-implemented function index: ${r}`)}}getOfficeProductivity(e,t={}){const n=e.employeeProd[EmployeePositions_1.EmployeePositions.Operations],a=e.employeeProd[EmployeePositions_1.EmployeePositions.Engineer],r=e.employeeProd[EmployeePositions_1.EmployeePositions.Management],i=n+a+r;if(i<=0)return 0;const o=1+r/(1.2*i),s=(Math.pow(n,.4)+Math.pow(a,.3))*o;return t&&t.forProduct?.025*s:.05*s}getBusinessFactor(e){const t=1+e.employeeProd[EmployeePositions_1.EmployeePositions.Business];return calculateEffectWithFactors_1.calculateEffectWithFactors(t,.26,1e4)}getAdvertisingFactors(){const e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),n=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*n,.85),e,t,n]}getMarketFactor(e){return Math.max(.1,e.dmd*(100-e.cmp)/100)}hasResearch(e){return!0===this.researched[e]}updateResearchTree(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry "${this.type}"`);if(Object.keys(e.researched).length!==Object.keys(this.researched).length)for(const t in this.researched)e.research(t)}getAdvertisingMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getAdvertisingMultiplier()}getEmployeeChaMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeChaMultiplier()}getEmployeeCreMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeCreMultiplier()}getEmployeeEffMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeEffMultiplier()}getEmployeeIntMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeIntMultiplier()}getProductionMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getProductionMultiplier()}getProductProductionMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getProductProductionMultiplier()}getSalesMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getSalesMultiplier()}getScientificResearchMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getScientificResearchMultiplier()}getStorageMultiplier(){const e=IndustryData_1.IndustryResearchTrees[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getStorageMultiplier()}toJSON(){return JSONReviver_1.Generic_toJSON("Industry",this)}static fromJSON(e){return JSONReviver_1.Generic_fromJSON(Industry,e.data)}}exports.Industry=Industry,JSONReviver_1.Reviver.constructors.Industry=Industry},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResearchTree=t.Node=void 0;const a=n(514),r=n(6);t.Node=class{constructor(e={cost:0,text:""}){if(this.children=[],this.cost=0,this.researched=!1,this.parent=null,this.text="",null==a.ResearchMap[e.text])throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${e.text}`);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t<this.children.length;++t)e.push(this.children[t].createTreantMarkup());let t="";t=this.researched?"researched":this.parent&&!1===this.parent.researched?"locked":"unlocked";const n=a.ResearchMap[this.text];return{children:e,HTMLclass:t,innerHTML:`<div id="${this.text.replace(/\s/g,"")}-corp-research-click-listener" class="tooltip">`+`${this.text}<br>${r.numeralWrapper.format(this.cost,"0,0")} Scientific Research`+'<span class="tooltiptext">'+`${n.desc}`+"</span></div>",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let n=0;n<this.children.length;++n)if(null!=(t=this.children[n].findNode(e)))return t;return null}setParent(e){this.parent=e}};t.ResearchTree=class{constructor(){this.researched={},this.root=null}createTreantMarkup(){return null==this.root?{}:{chart:{container:""},nodeStructure:this.root.createTreantMarkup()}}getAllNodes(){const e=[],t=[];if(null==this.root)return e;for(t.push(this.root);0!==t.length;){const n=t.shift();if(null!=n){e.push(n.text);for(let e=0;e<n.children.length;++e)t.push(n.children[e])}}return e}getAdvertisingMultiplier(){return this.getMultiplierHelper("advertisingMult")}getEmployeeChaMultiplier(){return this.getMultiplierHelper("employeeChaMult")}getEmployeeCreMultiplier(){return this.getMultiplierHelper("employeeCreMult")}getEmployeeEffMultiplier(){return this.getMultiplierHelper("employeeEffMult")}getEmployeeIntMultiplier(){return this.getMultiplierHelper("employeeIntMult")}getProductionMultiplier(){return this.getMultiplierHelper("productionMult")}getProductProductionMultiplier(){return this.getMultiplierHelper("productProductionMult")}getSalesMultiplier(){return this.getMultiplierHelper("salesMult")}getScientificResearchMultiplier(){return this.getMultiplierHelper("sciResearchMult")}getStorageMultiplier(){return this.getMultiplierHelper("storageMult")}getMultiplierHelper(e){let t=1;if(null==this.root)return t;const n=[];for(n.push(this.root);0!==n.length;){const r=n.shift();if(null==r||!r.researched)continue;const i=a.ResearchMap[r.text];if(null==i){console.warn(`Invalid Research name in node: ${r.text}`);continue}const o=i[e];if(null!=o){t*=o;for(let e=0;e<r.children.length;++e)n.push(r.children[e])}else console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${e}`)}return t}findNode(e){return null==this.root?null:this.root.findNode(e)}research(e){if(null==this.root)return;const t=[];for(t.push(this.root);0!==t.length;){const n=t.shift();if(null!=n){if(n.text===e)return n.researched=!0,void(this.researched[e]=!0);for(let e=0;e<n.children.length;++e)t.push(n.children[e])}}console.warn(`ResearchTree.research() did not find the specified Research node for: ${e}`)}setRoot(e){this.root=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.researchMetadata=void 0,t.researchMetadata=[{name:"AutoBrew",cost:12e3,desc:"Automatically keep your employees fully caffeinated with coffee injections. This research will keep the energy of all employees at its maximum possible value, for no cost. This will also disable the Coffee upgrade."},{name:"AutoPartyManager",cost:15e3,desc:"Automatically analyzes your employees' happiness and morale and boosts them whenever it detects a decrease. This research will keep the morale and happiness of all employees at their maximum possible values, for no cost. This will also disable the 'Throw Party' feature."},{name:"Automatic Drug Administration",cost:1e4,desc:"Research how to automatically administer performance-enhacing drugs to all of your employees. This unlocks Drug-related Research."},{name:"Bulk Purchasing",cost:5e3,desc:"Research the art of buying materials in bulk. This allows you to purchase any amount of a material instantly."},{name:"CPH4 Injections",cost:25e3,desc:"Develop an advanced and harmless synthetic drug that is administered to employees to increase all of their stats, except experience, by 10%.",employeeCreMult:1.1,employeeChaMult:1.1,employeeEffMult:1.1,employeeIntMult:1.1},{name:"Drones",cost:5e3,desc:"Acquire the knowledge needed to create advanced drones. This research does nothing by itself, but unlocks other Drone-related research."},{name:"Drones - Assembly",cost:25e3,desc:"Manufacture and use Assembly Drones to improve the efficiency of your production lines. This increases all production by 20%.",productionMult:1.2},{name:"Drones - Transport",cost:3e4,desc:"Manufacture and use intelligent Transport Drones to optimize your warehouses. This increases the storage space of all warehouses by 50%.",storageMult:1.5},{name:"Go-Juice",cost:25e3,desc:"Provide employees with Go-Juice, a coffee-derivative that further enhances the brain's dopamine production. This increases the maximum energy of all employees by 10."},{name:"Hi-Tech R&D Laboratory",cost:5e3,desc:"Construct a cutting edge facility dedicated to advanced research and and development. This allows you to spend Scientific Research on powerful upgrades. It also globally increases Scientific Research production by 10%.",sciResearchMult:1.1},{name:"HRBuddy-Recruitment",cost:15e3,desc:"Use automated software to handle the hiring of employees. With this research, each office will automatically hire one employee per market cycle if there is available space."},{name:"HRBuddy-Training",cost:2e4,desc:"Use automated software to handle the training of employees. With this research, each employee hired with HRBuddy-Recruitment will automatically be assigned to 'Training', rather than being unassigned."},{name:"JoyWire",cost:2e4,desc:"A brain implant which is installed in employees, increasing their maximum happiness by 10."},{name:"Market-TA.I",cost:2e4,desc:"Develop advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know what price to sell your Materials/Products at in order to avoid losing sales due to having too high of a mark-up. It also lets you automatically use that sale price."},{name:"Market-TA.II",cost:5e4,desc:"Develop double-advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know how many sales of a Material/Product you lose or gain from having too high or too low or a sale price. It also lets you automatically set the sale price of your Materials/Products at the optimal price such that the amount sold matches the amount produced."},{name:"Overclock",cost:15e3,desc:"Equip employees with a headset that uses transcranial direct current stimulation (tDCS) to increase the speed of their neurotransmitters. This research increases the intelligence and efficiency of all employees by 25%.",employeeEffMult:1.25,employeeIntMult:1.25},{name:"Self-Correcting Assemblers",cost:25e3,desc:"Create assemblers that can be used for universal production. These assemblers use deep learning to improve their efficiency at their tasks. This research increases all production by 10%",productionMult:1.1},{name:"Sti.mu",cost:3e4,desc:"Upgrade the tDCS headset to stimulate regions of the brain that control confidence and enthusiasm. This research increases the max morale of all employees by 10."},{name:"sudo.Assist",cost:15e3,desc:"Develop a virtual assistant AI to handle and manage administrative issues for your corporation."},{name:"uPgrade: Capacity.I",cost:2e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 3 to 4)."},{name:"uPgrade: Capacity.II",cost:3e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 4 to 5)."},{name:"uPgrade: Dashboard",cost:5e3,desc:"Improve the software used to manage the industry's production line for its various products. This allows you to manage the production and sale of a product before it's finished being designed."},{name:"uPgrade: Fulcrum",cost:1e4,desc:"Streamline the manufacturing of this industry's various products. This research increases the production of your products by 5%",productProductionMult:1.05}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Research=void 0;t.Research=class{constructor(e={name:"",cost:0,desc:""}){this.name="",this.cost=0,this.desc="",this.advertisingMult=1,this.employeeChaMult=1,this.employeeCreMult=1,this.employeeEffMult=1,this.employeeIntMult=1,this.productionMult=1,this.productProductionMult=1,this.salesMult=1,this.sciResearchMult=1,this.storageMult=1,this.name=e.name,this.cost=e.cost,this.desc=e.desc,e.advertisingMult&&(this.advertisingMult=e.advertisingMult),e.employeeChaMult&&(this.employeeChaMult=e.employeeChaMult),e.employeeCreMult&&(this.employeeCreMult=e.employeeCreMult),e.employeeEffMult&&(this.employeeEffMult=e.employeeEffMult),e.employeeIntMult&&(this.employeeIntMult=e.employeeIntMult),e.productionMult&&(this.productionMult=e.productionMult),e.productProductionMult&&(this.productProductionMult=e.productProductionMult),e.salesMult&&(this.salesMult=e.salesMult),e.sciResearchMult&&(this.sciResearchMult=e.sciResearchMult),e.storageMult&&(this.storageMult=e.storageMult)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductIndustryResearchTreeCopy=t.getBaseResearchTreeCopy=void 0;const a=n(514),r=n(1339);function i(e){const t=a.ResearchMap[e];if(null==t)throw new Error(`Invalid research name: ${e}`);return new r.Node({text:t.name,cost:t.cost})}function o(){const e=i("Hi-Tech R&D Laboratory"),t=i("AutoBrew"),n=i("AutoPartyManager"),a=i("Automatic Drug Administration"),r=i("Bulk Purchasing"),o=i("CPH4 Injections"),s=i("Drones"),l=i("Drones - Assembly"),c=i("Drones - Transport"),u=i("Go-Juice"),m=i("HRBuddy-Recruitment"),p=i("HRBuddy-Training"),d=i("JoyWire"),h=i("Market-TA.I"),f=i("Market-TA.II"),g=i("Overclock"),y=i("Self-Correcting Assemblers"),_=i("Sti.mu");return a.addChild(u),a.addChild(o),s.addChild(l),s.addChild(c),m.addChild(p),h.addChild(f),g.addChild(_),e.addChild(t),e.addChild(n),e.addChild(a),e.addChild(r),e.addChild(s),e.addChild(m),e.addChild(d),e.addChild(h),e.addChild(g),e.addChild(y),e}t.getBaseResearchTreeCopy=function(){const e=new r.ResearchTree;return e.setRoot(o()),e},t.getProductIndustryResearchTreeCopy=function(){const e=new r.ResearchTree,t=o(),n=i("uPgrade: Fulcrum"),a=i("uPgrade: Capacity.I"),s=i("uPgrade: Capacity.II"),l=i("uPgrade: Dashboard");return a.addChild(s),n.addChild(a),n.addChild(l),t.addChild(n),e.setRoot(t),e}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NewIndustryPopup=void 0;const o=i(n(0)),s=n(13),l=n(40),c=n(146),u=n(133);t.NewIndustryPopup=function(e){const t=Object.keys(c.Industries).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort(),[n,a]=o.useState(t.length>0?t[0]:""),[r,i]=o.useState("");function m(){try{u.NewIndustry(e.corp,n,r)}catch(e){return void s.dialogBoxCreate(e+"")}e.routing.routeTo(r),l.removePopup(e.popupId)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Create a new division to expand into a new industry:"),o.default.createElement("select",{className:"dropdown",defaultValue:n,onChange:function(e){a(e.target.value)}},t.map(e=>o.default.createElement("option",{key:e,value:e},e))),o.default.createElement("p",null,c.IndustryDescriptions[n]),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"Division name:"),o.default.createElement("input",{autoFocus:!0,value:r,onChange:function(e){i(e.target.value)},onKeyDown:function(e){13===e.keyCode&&m()},type:"text",className:"text-input",style:{display:"block"},maxLength:30,pattern:"[a-zA-Z0-9-_]"}),o.default.createElement("span",{onClick:m,className:"popup-box-button"},"Create Division"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTab=void 0;const r=a(n(0));t.HeaderTab=function(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.default.createElement("button",{className:t,onClick:e.onClick},e.text)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTabs=void 0;const r=a(n(0)),i=n(1344),o=n(1343),s=n(40);t.HeaderTabs=function(e){return r.default.createElement("div",null,r.default.createElement(i.HeaderTab,{current:e.routing.isOnOverviewPage(),key:"overview",onClick:function(){e.routing.routeToOverviewPage(),e.corp.rerender(e.player)},text:e.corp.name}),e.corp.divisions.map(t=>r.default.createElement(i.HeaderTab,{current:e.routing.isOn(t.name),key:t.name,onClick:()=>{e.routing.routeTo(t.name),e.corp.rerender(e.player)},text:t.name})),r.default.createElement(i.HeaderTab,{current:!1,onClick:function(){const t="cmpy-mgmt-expand-industry-popup";s.createPopup(t,o.NewIndustryPopup,{corp:e.corp,routing:e.routing,popupId:t})},text:"Expand into new Industry"}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationRoot=void 0;const r=a(n(0)),i=n(1345),o=n(1334);t.CorporationRoot=function(e){return r.default.createElement("div",null,r.default.createElement(i.HeaderTabs,{corp:e.corp,routing:e.routing,player:e.player}),r.default.createElement(o.MainPanel,{corp:e.corp,routing:e.routing,player:e.player}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literature=void 0;t.Literature=class{constructor(e,t,n){this.title=e,this.fn=t,this.txt=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literatures=void 0;const a=n(1347),r=n(148);t.Literatures={},function(){let e,n,i;e="The Beginner's Guide to Hacking",n=r.LiteratureNames.HackersStartingHandbook,i="Some resources:<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript.html' target='_blank' style='margin:4px'>Netscript Documentation</a><br><br>When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)<br><br>-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()<br><br>-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()<br><br>-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game<br><br>-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'<br><br>-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",t.Literatures[n]=new a.Literature(e,n,i),e="The Complete Handbook for Creating a Successful Corporation",n=r.LiteratureNames.CorporationManagementHandbook,i="<u>Getting Started with Corporations</u><br>To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.<br><br>Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.<br><br>The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.<br><br>Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.<br><br>Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').<br><br>To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.<br><br>Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.<br><br>These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.<br><br><u>Tips/Pointers</u><br>-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.<br><br>-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.<br><br>-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers<br><br>-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.<br><br>-If your employees have low morale, energy, or happiness, their production will greatly suffer.<br><br>-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.<br><br>-Don't forget to advertise your company. You won't have any business if nobody knows you.<br><br>-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales<br><br>-Remember, you need to spend money to make money!<br><br>-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",t.Literatures[n]=new a.Literature(e,n,i),e="A Brief History of Synthoids",n=r.LiteratureNames.HistoryOfSynthoids,i="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.<br><br>Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.<br><br>All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.<br><br>What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.<br><br>It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.<br><br>In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.<br><br>Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.<br><br>To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.<br><br>Nobody knows what happened to the terrorist group Ascendis Totalis.",t.Literatures[n]=new a.Literature(e,n,i),e="A Green Tomorrow",n=r.LiteratureNames.AGreenTomorrow,i="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.<br><br>Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.<br><br>The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",t.Literatures[n]=new a.Literature(e,n,i),e="Alpha and Omega",n=r.LiteratureNames.AlphaOmega,i="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'<br><br>And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",t.Literatures[n]=new a.Literature(e,n,i),e="Are We Living in a Computer Simulation?",n=r.LiteratureNames.SimulatedReality,i="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened. <br><br>Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",t.Literatures[n]=new a.Literature(e,n,i),e="Beyond Man",n=r.LiteratureNames.BeyondMan,i="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.<br><br>And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?<br><br>Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",t.Literatures[n]=new a.Literature(e,n,i),e="Brighter than the Sun",n=r.LiteratureNames.BrighterThanTheSun,i="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.<br><br>TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.<br><br>The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",t.Literatures[n]=new a.Literature(e,n,i),e="Democracy is Dead: The Fall of an Empire",n=r.LiteratureNames.DemocracyIsDead,i="They rose from the shadows in the street.<br>From the places where the oppressed meet.<br>Their cries echoed loudly through the air.<br>As they once did in Tiananmen Square.<br>Loudness in the silence, Darkness in the light.<br>They came forth with power and might.<br>Once the beacon of democracy, America was first.<br>Its pillars of society destroyed and dispersed.<br>Soon the cries rose everywhere, with revolt and riot.<br>Until one day, finally, all was quiet.<br>From the ashes rose a new order, corporatocracy was its name.<br>Rome, Mongol, Byzantine, all of history is just the same.<br>For man will never change in a fundamental way.<br>And now democracy is dead, in the USA.",t.Literatures[n]=new a.Literature(e,n,i),e="Figures Show Rising Crime Rates in Sector-12",n=r.LiteratureNames.Sector12Crime,i="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.<br><br>CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",t.Literatures[n]=new a.Literature(e,n,i),e="Man and the Machine",n=r.LiteratureNames.ManAndMachine,i="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?<br><br>The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",t.Literatures[n]=new a.Literature(e,n,i),e="Secret Societies",n=r.LiteratureNames.SecretSocieties,i="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.<br><br>However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.<br><br>Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",t.Literatures[n]=new a.Literature(e,n,i),e="Space: The Failed Frontier",n=r.LiteratureNames.TheFailedFrontier,i="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.<br><br>But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.<br><br>And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",t.Literatures[n]=new a.Literature(e,n,i),e="Coded Intelligence: Myth or Reality?",n=r.LiteratureNames.CodedIntelligence,i="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.<br><br>We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",t.Literatures[n]=new a.Literature(e,n,i),e="Synthetic Muscles",n=r.LiteratureNames.SyntheticMuscles,i="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.<br><br>As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",t.Literatures[n]=new a.Literature(e,n,i),e="Tensions rise in global tech race",n=r.LiteratureNames.TensionsInTechRace,i="Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",t.Literatures[n]=new a.Literature(e,n,i),e="The Cost of Immortality",n=r.LiteratureNames.CostOfImmortality,i="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.<br><br>Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.<br><br>Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",t.Literatures[n]=new a.Literature(e,n,i),e="The Hidden World",n=r.LiteratureNames.TheHiddenWorld,i="WAKE UP SHEEPLE<br><br>THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.<br><br>OPEN YOUR EYES<br><br>It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.<br><br>THEY ARE ALL AROUND YOU<br><br>After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",t.Literatures[n]=new a.Literature(e,n,i),e="The New God",n=r.LiteratureNames.TheNewGod,i="Everyone has a moment in their life when they wonder about the bigger questions.<br><br>What's the point of all this? What is my purpose?<br><br>Some people dare to think even bigger.<br><br>What will the fate of the human race be?<br><br>We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.<br><br>The Singularity is here. The merging of man and machine. This is where humanity evolves into ",t.Literatures[n]=new a.Literature(e,n,i),e="The New Triads",n=r.LiteratureNames.NewTriads,i="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.<br><br>It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.<br><br>Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",t.Literatures[n]=new a.Literature(e,n,i),e="The Secret War",n=r.LiteratureNames.TheSecretWar,i="",t.Literatures[n]=new a.Literature(e,n,i)}()},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;const o=i(n(0));t.Popup=function(e){function t(t){"Escape"===t.key&&e.removePopup(e.id)}return o.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),o.default.createElement("div",{className:"popup-box-content",id:`${e.id}-content`},o.default.createElement(e.content,e.props))}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationState=t.AllCorporationStates=void 0;const a=n(29);t.AllCorporationStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class r{constructor(){this.state=0}getState(){return t.AllCorporationStates[this.state]}nextState(){(this.state<0||this.state>=t.AllCorporationStates.length)&&(this.state=0),++this.state,this.state>=t.AllCorporationStates.length&&(this.state=0)}toJSON(){return a.Generic_toJSON("CorporationState",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.CorporationState=r,a.Reviver.constructors.CorporationState=r},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstalledAugmentations=void 0;const o=i(n(0)),s=n(1),l=n(12),c=n(3),u=n(25),m=n(227),p=n(668);t.InstalledAugmentations=function(){const e=s.Player.augmentations.slice();u.Settings.OwnedAugmentationsOrder===m.OwnedAugmentationsOrderSetting.Alphabetically&&e.sort((e,t)=>e.name<=t.name?-1:1);const t=e.map(e=>{const t=l.Augmentations[e.name];let n=null;return e.name===c.AugmentationNames.NeuroFluxGovernor&&(n=e.level),o.createElement("li",{key:e.name},o.createElement(p.AugmentationAccordion,{aug:t,level:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstalledAugmentationsAndSourceFiles=void 0;const o=i(n(0)),s=n(1354),l=n(1033),c=n(1032),u=n(1030),m=n(25),p=n(227);t.InstalledAugmentationsAndSourceFiles=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=o.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const n=t[e];n instanceof HTMLButtonElement&&n.classList.contains("active")&&n.click()}}expandAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const n=t[e];n instanceof HTMLButtonElement&&(n.classList.contains("active")||n.click())}}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.AcquirementTime,this.rerender()}sortInOrder(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.Alphabetically,this.rerender()}render(){return o.createElement(o.Fragment,null,o.createElement(l.ListConfiguration,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),o.createElement("ul",{className:"augmentations-list",ref:this.listRef},o.createElement(u.SourceFileMinus1,null),o.createElement(c.OwnedSourceFiles,null),o.createElement(s.InstalledAugmentations,null)))}}},,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repToFavor=t.favorToRep=void 0,t.favorToRep=function(e){function t(e,t,n){return e*t+n}const n=t(e,Math.log(51)-Math.log(50),Math.log(51));return t(500,Math.exp(n),-25e3)},t.repToFavor=function(e){return-Math.log(25500/(e+25e3))/Math.log(1.02)}}]);
|
||
//# sourceMappingURL=engine.bundle.js.map |